I'm very interested in getting ROMs working in the Emulator. I just found this and will try it out shortly. It involves creating a system.img using the mkfs.yaffs2 tool. Basically, it uses the Android OS (emulator) itself to run the tool that then converts zipped roms into a system.img file -- which can then be used in the emulator.
Please post any sucesses! I need to get the N1 2.2 rom working so I can figure out why our app is crashing in 2.2 on certain devices -- works fine in the emulator.
Here's an example of how to use a system.img in the emulator:
From: http://android.modaco.com/content-page/ ... c/page/20/
This is the right way to use the JacxHero system.img on the emulator:http://www.mediafire.com/?f5edzmhh3gt
emulator.exe -avd jacxhero -system system.img -partition-size 150 -sdcard sdcard
previously you have to create an avd named jacxhero and also create a sdcard using mksdcard.exe
Making a system.img
From http://forum.xda-developers.com/archive ... 25930.html
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) (http://openhandsetalliance.org.cn/bbs/v ... a=page%3D1
). 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/
so it seems like it would be just as much fun doing a nandroid backup
so now the real question is, how do we go about ripping out the nandroid functionality to be able to do this locally?
it is the mkfs.yaffs2 tool
mkfs.yaffs2 yourdir yourimage
NANDROID - CYGWIN DIRECTIONS (not not not, I repeat, not fully tested and verified yet)
Changes so far if you are using cygwin:
1) Make sure you have the 'netcat' and 'gcc' packages, else just run cygwin.exe again and get them.
You can test if you have them by running 'which nc' and 'which gcc', both commands should return /usr/bin/<command>
2) Compile the mkyaffs2image executable.
Inside the extracted nandroid archive directory, goto the tartools\yaffs2\utils\ directory (inside a cygwin prompt) and type 'make'.
This should generate a file named "mkyaffs2image.exe" which you need to place somewhere on your path.
(Hint: If you haven't downloaded the Android SDK, abort now. Wait for more explicit directions... Else, place the .exe where adb is, since it should be on your path already)
3) Edit the nandroid.sh script. (else you get a permission denied error when the script tries to run the dump_image-arm file)
Find the line:
adb push ./$tool /cache/$tool
Add the following line after it:
adb shell chmod 777 /cache/$tool
4) Make a managed mount named /tmp (else windows will puke on the long unix filenames with colons, etc)
mount -o managed c:/cygwin/tmp /tmp (Note: change c:/cygwin to be the directory cygwin was installed to, you can find it by typing 'cd /' and then 'explorer .')
5) Follow the standard "tar + mkyaffs2image" directions to generate the last three .img files. They refer to the /tmp directory which you created in the previous step.
Viola! Looks like I have a complete backup image now...
$ ls -l
-rw-r--r-- 1 Osaka None 2621440 Jun 12 21:31 boot.img
-rw------- 1 Osaka None 737088 Jun 12 22:07 cache.img
-rw------- 1 Osaka None 53570880 Jun 12 22:06 data.img
-rw-r--r-- 1 Osaka None 262144 Jun 12 21:31 misc.img
-rw-r--r-- 1 Osaka None 5242880 Jun 12 21:31 recovery.img
-rw------- 1 Osaka None 57885696 Jun 12 22:06 system.img
Now I just need to drink up the courage to test it on my phone!