0

I need some information related to Android open source project as i have started looking into it for some reverse engineering.

  1. How can we debug Android system services (other than logger option) e.g notification, network (i am using Eclipse Juno). I can debug stock apps but finding hard luck for system services.

  2. Is there a way to view layout XML "Graphical Representational" in Eclipse for AOSP e.g Calendar app, Calculator App etc.

Guys i have already done Google around these but no luck. Need your opinions/insight on these please.

Help Appreciated. Thank you.

user755499
  • 2,241
  • 4
  • 25
  • 34

3 Answers3

1

The debugging depends on what process the service is hosted in.

If you want to debug ActivityManager, Network services, they are hosted in a Java application called system_server.

To debug these types of services, please check Debugging Android Java framework services article.

If the service is hosted in pure native application (i.e. SurfaceFlinger), you need gdb/gdbserver type setup to debug them. Please check Debugging native framework services on how to do this.

videoguy
  • 1,732
  • 2
  • 24
  • 49
0

I'm using Log for debugging system services. If you understand how Android system works, how services work, then Log will be enough for debugging. Seems like there is no alternative for debugging services without running you ROM on real device or emulator (services are started by Zygote process in Dalvik VM sandbox). For better undestanding how application looks and works I'm importing application in IDE (Intellij IDEA for ex.), where I can easily open layouts in Android Designer plugin.

Veaceslav Gaidarji
  • 4,261
  • 3
  • 38
  • 61
0
  1. Import sdk/sources/android-17/ as a project to your IDE
  2. Run emulator
  3. Start Android Debug Monitor
  4. Check list of processes listed by Monitor and their ports
  5. Start remote debugging session using port listed by Monitor e.g in Intellij Remote > change port from 5005 to whatever Monitor is saying e.g 8602
robotoaster
  • 3,082
  • 1
  • 24
  • 23