Wednesday, January 16, 2008

Manually start android in the google android emulator

The google android kernel will invoke services listed in the file /etc/init.rc after the kernel is started up. The /etc/init.rc is included in the ramdisk.img. Find the ramdisk.img in $EMULATOR_SDK_FOLDER/tools/lib/images/. One can change the ramdisk.img to change the init.rc and so to change the google android startup sequence.

Follow the tips in Step by step to create/modify ramdisk.img to change ramdisk.img.

Following is the items to comment out in init.rc to stop the android to be loaded at the initial time:
  1. Find the service section in the init.rc (following the startup section)
  2. Comment out the zygote sub-section, and runtime sub-section
  3. Recreate the ramdisk.img and replace the original ramdisk.img (backup the original if you want)
  4. Restart the google android emulator, use -debug-kernel to see more information
Comment out lines are listed for your reference:
#zygote {
#exec /system/bin/app_process
#args {
#0 -Xzygote
#1 /system/bin
#2 --zygote
#}
#autostart 1
#}
#runtime {
#exec /system/bin/runtime
#autostart 1
#}
After the google android emulator is started up, manually start up the google android services below:
  1. # adb shell to create a console
  2. # /system/bin/app_process -Xzygote /system/bin --zygote &
  3. # /system/bin/runtime &
Upload a strace tool to trace the above services:
  1. # strace -ff -F -tt -s 200 -o /tmp/log/zygote /system/bin/app_process -Xzygote /system/bin --zygote &
  2. # strace -ff -F -tt -s 200 -o /tmp/log/runtime /system/bin/runtime &

4 comments:

Unknown said...

I would like to know what is a google android emulator used for. I also would like to know what is Generic Viagra used for
used for too.
There are some very complex topics to understand over the net

sasha said...

It's not tough to spot the best Android app developers. All you need to do is simply look at their applications.

best android apps

best iphone apps

Jasmine Carrel said...

Thanks for sharing an interesting post would like to have an regular visit
Generic Plavix

Unknown said...

Today, Android development is among the core competences within the mobile development area.

Android Development Company