Archive | Misc

How to debug Android program.

How to debug android program

  1. Go to Run -> debug configuration. Select your application and press debug.
  2. [or] you can right click on your project -> debug as -> Android application.
  3. Before running in debug mode, set break points where all it may be needed for your code. To set break points, go to the line where you need to set the break point, double click on that line -> it will show you blue ball. Once you see that blue ball on that line, it means break point has been set for you.
  4. Once you start debugging, the emulator may show a window showing “waiting for debug to progress” and it may opt you to force close.
  5. Don’t click on force close button. As it will lead to end of your application. Wait for that window get closed automatically by itself
  6. Then your eclipse will get control and will ask you to switch the perspective view of your eclipse editor, so press yes to start debugging.
  7. Once you press yes, it will open debugging mode screen of eclipse.
  8. If you want to run step by step use F6 button
  9. If you want to skip to next debugging point press F8 button.

Posted in Misc0 Comments

Android Initialization Process

  1. The bootloader loads the kernel and starts the init process
  2. Daemons for handling low level hardware interfaces are started up (usb, adb, debugger, radio)
  3. “Zygote”, the initial Dalvik VM process is created
  4. “Runtime” process initiates the “Service Manager”, a key element for “Binders” and IPC communication
  5. “Runtime” process requests “Zygote” to start a new instance of Dalvik for running the “System Server”
  6. The two first processes are able to handle graphic and audio outputs
  7. All the others android components are then started

Posted in Misc0 Comments