Turn on Android device system debugging

Source: Internet
Author: User

When we dynamically debug the app, we need to add android:debuggable= "true" to the app's Androidmanifest.xml file and then re-package the APK after installation for debugging.


How can I debug an app without repackaging it? Here are two main approaches:

1. Modify Boot.img

Not crooked classmate in http://bbs.pediy.com/showthread.php?t=197334 this post refers to modify boot.img, thus open the system debugging, so you can save the app to add android:debuggable= " True "to re-package the steps again. (This method is not crooked students speak very detailed, I will not expand)


2. Modify System Properties directly

Use the Setpropex tool to modify the read-only system properties on a device that is already rooted. Use this tool to modify the values of Ro.secure and ro.debuggable.

Tool Address: HTTPS://GITHUB.COM/POLIVA/ROOTADB


System Original Value:



Use the Setpropex tool to modify:



Call the ADB root command to restart the ADBD process in your phone.



After we have done the above steps, we can debug the process. Just restart the process that we want to debug.

Of course, if you need to debug a long-standing system of services and processes, etc., then we can force restart Android Dalvik layer, can simply end the system_server process.



When the KILL command executes, the device restarts at this point, indicating that the system is restarting the Dalvki layer. After the reboot is complete, we can see all the processes.



Pros and cons of two scenarios

The first solution is persistent, one modification, lifetime benefit, system restart does not affect, but the operation is more troublesome.

The second option restarts after the restart, but the operation is relatively convenient.



Turn on Android device system debugging

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.