XDA Recap: This Week In Android (May 17 – 23)

Another week, another recap. The Sunday tradition marches on this week with a fresh … more

Huawei To Sell Honor Smartphones Via Indian Retail Outlets

World’s fourth largest smartphone maker Huawei plans to now sell its … more

Sunday Debate: Are Smaller Bezels Better or Worth It?

Bezels have been getting smaller and smaller as the years go by, and while devices … more

LG G4 First Impressions and Unboxing – XDA TV

The latest in LG’s signature line of “G phones” has been released. … more
Post Reply Subscribe to Thread Email Thread

Testing ROM Images in the SDK Emulator!

13th June 2009, 11:37 PM |#1  
SimonNWalker's Avatar
OP Senior Member
Flag Waxhaw, N.C.
Thanks Meter: 104
I started looking at Android Development and got the whole Dev kit and the Eclipse enrionment setup and working fine.

The question I have is that I would try different apps I develop on the different ROMs available.
How do I get any of the new ROMs, like the HERO ROM ZIP files I can download to run in the emulator or is it even possible?

Im assuming that the system.img file in the SDK id the file I need to replace or re-create, but how is this done?

I am a noob to the develop stuff so step by step instructions would be much appreciated.

I also think this would be great for other developers and ROM makers to be able to test in this way.

13th June 2009, 11:58 PM |#2  
theslam08's Avatar
Senior Member
Flag East Coast
Thanks Meter: 212
Hopefully THIS one dont get closed, it IS asking a development question...anyway,

I would like to know this as well. I would like to test things myself (getting better at manipulating them), and would like to know what he is asking as well.

14th June 2009, 01:07 AM |#3  
ivanmmj's Avatar
Retired Moderator
Thanks Meter: 40
Donate to Me
I don't think this would work, as the ROMs are hardware depending, me thinks. Or at the least the kernel and drivers are.
14th June 2009, 01:42 AM |#4  
Senior Member
Flag naperville il
Thanks Meter: 30
maybe this will help, maybe not, just an emulator primer, so maybe people can jump on board with this

under <sdk path>/tools

to list out your AVD(android virtual device)
android list targets

will return:
Available Android targets:
Name: Android 1.1
Type: platform
API level: 2
Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
Name: Android 1.5
Type: platform
API level: 3
Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
Name: Google APIs
Type: add-on
Vendor: Google Inc.
Description: Android + Google APIs
Based on Android 1.5 (API level 3)
* (maps.jar)
API for Google Maps
Skins: HVGA (default), HVGA-L, QVGA-P, HVGA-P, QVGA-L

from here we choose our integer target, lets say 2

creating an AVD:
android create avd -n your_chosen_name_here -t 2


When you create an AVD, the android tool creates a dedicated directory for it on your development computer. The directory contains the AVD configuration file, the user data image and SD card image (if available), and any other files associated with the device. Note that the directory does not contain a system image instead, the AVD configuration file contains a mapping to the system image, which it loads when the AVD is launched.

By default, the android tool creates the AVD directory inside ~/.android/avd/ (on Linux/Mac), C:\Documents and Settings\<user>\.android\ on Windows XP, and C:\Users\<user>\.android\ on Windows Vista

to run your newly created AVD:
emulator -avd your_chosen_name_here

maybe this will help, but I'm guessing everyone here already knows all of this.

14th June 2009, 01:57 AM |#5  
SimonNWalker's Avatar
OP Senior Member
Flag Waxhaw, N.C.
Thanks Meter: 104
Yeah, I understand that you can specify the AVD.
The only thing now is to edit the AVD to point to a different image. This is easy!
The system image file is a *.img file.
So how do we get our ROM images compiled into the IMG file format?
There must be a tool, but I cant find anything.
And what hardware does the emulator, emulate? Maybe it ignores the hardware specific calls throu an API so the ROM image target hardware shouldn't matter.
14th June 2009, 02:13 AM |#6  
Junior Member
Thanks Meter: 0
I just started messing around with rom's and after I build one I put system.img userdata.img and ramdisk.img from my /mydroid/out folder into the sdk's image folder and start the and it uses the new rom when I start the emulator
14th June 2009, 02:31 AM |#7  
Senior Member
Flag naperville il
Thanks Meter: 30
thats the easy part

do a nandroid backup

copy the sdk/platforms/android-1.5

to something like sdk/platforms/MINE

go to your AVD directory AVD/whateveryoucalledit

open up the config.ini


go to your nandroid backup on your sdcard
copy system.img

go to sdk/platforms/MINE/images/
and paste the nandroid system.img

now run your AVD and it will boot that system.img

im running CyanogenMod rom right now in the emulator

hint* number pad 7 with numlock off in the emulator is how to open up the hardware keyboard
14th June 2009, 02:59 AM |#8  
SimonNWalker's Avatar
OP Senior Member
Flag Waxhaw, N.C.
Thanks Meter: 104
Awesome. I'll be giving this a try later.
One question: The apps are in the system.img file on the SDK images as far as I can tell. What do you do with all the apps in the new ROMs?
14th June 2009, 03:00 AM |#9  
Senior Member
Flag naperville il
Thanks Meter: 30
whatever you want to do with them, they're all there, even android market works perfectly
14th June 2009, 03:01 AM |#10  
SimonNWalker's Avatar
OP Senior Member
Flag Waxhaw, N.C.
Thanks Meter: 104
And where are you guys getting the system.img file from?
The ROM zip files dont have them.
Sorry....Im noob to this. LOL
Post Reply Subscribe to Thread

Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes