I downloaded android source code and set up the development environment in eclipse. I wanted to debug some system apps(like mms, etc). But when I attached my galaxy nexus into my laptop, I can't see any thread in the ddms. I have already enabled debug mode in the setting page. The Android version of my device is 4.2.1. I wonder if the 4.2.1 needs additional drivers or something when debugging? You can refer the image here: http://i48.tinypic.com/32zj19h.png
Asked
Active
Viewed 1,359 times
0
-
4System apps are not accessible for you to debug on the stock roms. You should build Android from source code and sign the rom with your own key to be able to debug the code you have built. – Robert Estivill Dec 15 '12 at 16:47
-
you should build android in eng mode to do this, the stock rom will be built in user mode, in which case the system apps cannot be attached to debugger unless debuggable is true – nandeesh Dec 15 '12 at 18:41
-
1You don't actually have to rebuild; you just have to get ADBD running as root. However rebuilding may be useful if you want to have any debug information to aid in interpreting those apps. If the apps of interest exist on the emulator that would be the fastest route to attempting this at least on a trial basis. Even if they don't, try it with some that do to get an idea of the limitations on what you will be able to see. – Chris Stratton Dec 15 '12 at 18:43
1 Answers
4
You can only debug debuggable apps. All apps are debuggable on an emulator; only apps with android:debuggable="true"
or build by Eclipse in debug mode are debuggable on production hardware.
There is no such concept as "debug some system apps(like mms, etc)" except in the context of building your own version of Android and rolling that into a ROM mod. As Mr. Estivill notes, you will have to do just that if you wish to "debug some system apps" on a Galaxy Nexus.

CommonsWare
- 986,068
- 189
- 2,389
- 2,491
-
Then if want to debug the system apps, i need a self-build rom for android? – kyoraku Dec 16 '12 at 01:54
-
1@user1906569: There is absolutely no point in trying to "debug the system apps" unless you can change the code of the "system apps", and to do that, you need to be able to run your own customized version of Android that contains your changed code. – CommonsWare Dec 16 '12 at 11:41