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