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 &

7 comments:

Gary 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

Cheap wedding dresses said...

Very happy to see your article, I very much to like and agree with your point of view. Thank you for sharing. At the same time,i love best pram very much .Welcome to look at my website and blog articles.Hope we can become good friends, and exchange and to help each other! Thanks!!
wedding dresses

Android app development said...

Android is a mobile operating system that has been highly successful because of its incredible features. Most of the smart phones in the market run on Android OS. Since the success of Android, lot of Android Development Companies has spurred up everywhere. We are also putting good logic to develop more in this field.Android app developers

Pharmacy Blogger said...

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

rize wordpress said...

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

Android Development Company

The Geeks said...

hi..Im college student, thanks for sharing :)