Tuesday, January 15, 2008

Customize google android system.img for emulator

The google android emulator included in the google android sdk is limited. Although you can use 'adb push' to upload more tools, but one has to do it again next time. Follow the steps to create a enhanced system.img:

  1. system.img is yaffs2 flash file system, so firstly you need the mkfs.yaffs2 tool, download it in the following link: Release Android Yaffs2 Tool (Both X86 And ARM). One has to be a registered user to download the tools.
  2. use the 'adb push' to upload tools to android emulator, executables in /system/bin/, libraries in /system/lib, one can also create folder. One need change the file mode necessary.
  3. upload the ARM mkfs.yaffs2 tool, use the following command to create system.img: # mkfs.yaffs2 /system /system.img
  4. download the system.img to local with command 'adb pull', replace the system.img in your emulator folder/tools/lib/images/

7 comments:

Anh said...

How to load executabe to /system/bin or library to /system/lib?
When I try ./adb myfile /system/bin, I have this error:
failed to copy ,Read-only file system

rtm said...

Android /system partition is mounted with read only. You can temporary re-mount the /system partition to rw and load your files to that partition.
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# chmod 777 /system
# DO ADB STUFF

John Michelau said...

A much simpler method, and one that doesn't require you to know the actual mountpoint of /system, is to issue the "adb remount" command.

Gary said...

I love cracking stuff!
Thanks a lot for showing how to do this affair.
I am pretty glad about it just what I use some Generic Viagra , which makes me so damn cool!

Scarlett said...

Wow! I'm pretty sure that this caught up plenty of people's attention, Thumbs up for your work and Good writing skills!

i am jayne and i am a freelance writer..
see my related post here ------> Man Suits

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

steve beckam said...

Excellent posts to read keep it up and keep going on this way. And keep sharing these types of things Thanks and I read your article and I keep reading your content.. It’s very interesting..
Amoxicillin Dosage