I have not been able to trigger breakpoints set in Android source files (framework source files, as opposed to my application's source files). I have attached the Android source files, so I can see them and set breakpoints, but when I run in debug mode, these breakpoints are not triggered. I have also tried adding Class Loader breakpoints: this works fine on Android source classes. I am using Eclipse 3.7.2, and I've tried with several different Android SDK versions.
-
I think, you need to build the SDK in order to do what you describe above! – theAlse Aug 01 '12 at 11:52
-
I was thinking the problem might be that the official build of the SDK has debug flags turned off, which seems silly to me, but anyway...can you point me to a good tutorial on doing a custom build? I've never done this before. Thanks! – robguinness Aug 02 '12 at 07:33
-
A similar question for Android Studio was asked here: http://stackoverflow.com/questions/16832034/breakpoints-in-android-platform-source – Display name Jan 19 '15 at 08:08
1 Answers
Robguinness,
It looks like what you would like to do is debug Android framework, right? The best method of doing this, from what I understand, is to import the AOSP project into Android Studio (only recognizes Java files) by running "make idegen && development/tools/idegen/idegen.sh" and then opening the android.ipr file that it generated in Android Studio. You can then hook up your emulator and set breakpoints in the Java code.
There are also a wide selection of tools to debug the Kernel, C native code, etc. but there it is such a long topic to cover on this site. If you are interested in more specifics, I would highly recommended Karim Yaghmour's class on Android Debugging (http://www.opersys.com/training/android-debug-and-performance). He has also given several talks at AnDevCon that should be freely available on Youtube about AOSP and Android Internals.
Best Wishes!

- 157
- 11