top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to Debug Android framework Java code?

+1 vote
479 views

How can we debug the Android framework Java code? i know how I can debug the c/c++ code with the help of GDB server etc, but I searched a lot on Google but did not get the solution, currently i am totally relying on Logs but I really need something to Debug the java code inside framework and etc?
please give me some pointers or some details about debugging AOSP framework java code?

posted Sep 13, 2013 by Garima Jain

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

Can any one please guide me to debug Android code. I tried to use GDB and GDBServer for this but couldn't succeed.

+1 vote

I found that most released apps(including system apps) can be debugged on the emulator by the way following:
1. install the app on the emulator, and launch it
2. run adb shell ps to get the pid of the app
3. run adb jdwp, if you find the pid in the output, then you can attach to the app by running
adb forward tcp:1234 jdwp:$pid_you_find and jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=1234
4. you can use commands such as "classes" to see the classes of the app, even "stop" to set breakpoint and "eval" to run many functions and see the members of the objects.
I have 2 questions:
1. Why these tricks fail on the phones? What's the difference between the rom of emulator and phones?
2. How to avoid my app being debugged through such way?

+1 vote

Hi, Being a learner. I am here to participate just like other android developer forum to enhance my knowledge regarding Android Programming & I would like to know that "how to debug my database and shared preferences in an android application", which has become difficult to debug. I hope any tech developer help me in resolving this issue.

+4 votes

Does anyone know if it is possible to realize the distributed compilation of Java? Are there any limitations or problems of dependencies ? Are there any Open Source tools which could help to do this?

...