8.eclipse Debug Smali

Source: Internet
Author: User
Tags python script
I. Re-opening the package apk 1.apktool unpacking file apktool d-d xxx.apk Note here that using the-d parameter, the generated Smali file ends in Java to be recognized by eclipse
2. Locate the Androidmanifest file, set allow debugging to locate the Androidmanifest.xml file, set the property in the application node android:debuggable= "true"
Or when you add the-D parameter back to the compilation, the property is automatically set, and the feature is canceled by the high version Apktool
3. Add the OnCreate function (not included)invoke-static {}, Landroid/os/debug;->waitfordebugger () V
4. Recompile the package
5. Signature APK The above process is too cumbersome, I have written a Python script to complete a key operation, the use of the need to configure the config.py environment Https://github.com/bingghost/apk_repack

Run the program after installation, you can see we need to debug the program's port number is 8620


Create a new project with Eclipse and then import the SRC directory after unpacking


Power Down Under the OnCreate function of the main activity

Configuring debugging Options Project Right-click->debug as->debug config->remote Java application->new-> Port 8620 then click Debug, Exit the program to the main interface, and then go in, and the breakpoint breaks down.


And then you can start one-step debugging.





From for notes (Wiz)

8.eclipse Debug Smali

Related Article

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.