As with the previous post with the same tools as Android reverse helper v2.2
This is just a test embedded in the Smali, the embedded thing is very simple, just want to pop up a hint in all activity.
Source:
Toast.maketext (This, "----", Toast.length_long). Show ();
Approximate steps: 1, unzip the target apk, view the Smali file, find the location to embed.
is generally looking for baseactivity, mainactivity and so on OnCreate method, after the Setcontentview method followed by a line, basically can not be wrong. 2, to obtain the hint of Smali source code, write an empty project, only pop-up hints of a line, easy to get Smali, and then decompile, the corresponding Smali code to take out. Here's a comparison:
Java:
Toast.maketext (This, "----", Toast.length_long). Show ();
Smali
Const-string v0, "----"const/4 v1, 0x1invoke-static {p0, V0, v1}, landroid/widget/ Toast;->maketext (Landroid/content/context; Ljava/lang/charsequence;i) landroid/widget/toast;move-result-object V0invoke-virtual {v0}, Landroid/widget/toast;->show () V
Basically, the variables and declarations are extracted first, and the methods are decomposed separately. 3. Copy this section of Smali source code to the specified location and repackage. Remember that you need a signature. The whole process should be careful, not disorderly line, test pass, to achieve the pre-conceived. Finally, since you can put toast, you can put other code, you enjoy playing!
Android Reverse--Modify Smali