Android Reverse--Modify Smali

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.