Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,782,164 Members 50,105 Now Online
XDA Developers Android and Mobile Development Forum

Testing ROM Images in the SDK Emulator!

Tip us?
 
SimonNWalker
Old
#1  
SimonNWalker's Avatar
Senior Member - OP
Thanks Meter 103
Posts: 505
Join Date: Sep 2007
Location: Waxhaw, N.C.
Default Testing ROM Images in the SDK Emulator!

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.

Thanks
Simon
Current: AT&T Samsung Galaxy Note II


Follow us on Twitter, Facebook, Google+ and YouTube
Home of TheMandroidShow

Get yourself a DropBox account
 
theslam08
Old
#2  
theslam08's Avatar
Senior Member
Thanks Meter 175
Posts: 894
Join Date: Oct 2008
Location: East Coast
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.

Thanks.
Google Nexus One → HTC HD2 → HTC VividHTC One
-Provider- ♦T♦Mobile
-------
-Phone: ♦T♦Mobile HTC One Dev-Unlocked, S-OFF (ViperRom/Firewater)
-Recovery: TWRP 2.7.1.1
-ROM: Latest Sense 6
-FW: 6.07.1540.1
-HBOOT: 1.57.000
-------
-Phone: AT&T HTC Vivid Dev-Unlocked, S-OFF
-Recovery: TWRP 2.6.3.0
-ROM: CM11!
 
ivanmmj
Old
#3  
ivanmmj's Avatar
Retired Moderator
Thanks Meter 36
Posts: 5,164
Join Date: Jan 2007

 
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.
God bless you!!!
 
ggolemg
Old
#4  
Senior Member
Thanks Meter 30
Posts: 154
Join Date: Feb 2009
Location: naperville il
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:
id:1
Name: Android 1.1
Type: platform
API level: 2
Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
id:2
Name: Android 1.5
Type: platform
API level: 3
Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
id:3
Name: Google APIs
Type: add-on
Vendor: Google Inc.
Description: Android + Google APIs
Based on Android 1.5 (API level 3)
Libraries:
* com.google.android.maps (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

Quote:
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.


references:
http://developer.android.com/guide/d....html#starting
 
SimonNWalker
Old
#5  
SimonNWalker's Avatar
Senior Member - OP
Thanks Meter 103
Posts: 505
Join Date: Sep 2007
Location: Waxhaw, N.C.
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.
Current: AT&T Samsung Galaxy Note II


Follow us on Twitter, Facebook, Google+ and YouTube
Home of TheMandroidShow

Get yourself a DropBox account
 
ross75
Old
#6  
Junior Member
Thanks Meter 0
Posts: 13
Join Date: Jan 2009
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
 
ggolemg
Old
#7  
Senior Member
Thanks Meter 30
Posts: 154
Join Date: Feb 2009
Location: naperville il
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

edit:
skin.name=HVGA
skin.path=platforms\MINE\skins\HVGA
image.sysdir.1=platforms\MINE\images\

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
 
SimonNWalker
Old
#8  
SimonNWalker's Avatar
Senior Member - OP
Thanks Meter 103
Posts: 505
Join Date: Sep 2007
Location: Waxhaw, N.C.
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?
Current: AT&T Samsung Galaxy Note II


Follow us on Twitter, Facebook, Google+ and YouTube
Home of TheMandroidShow

Get yourself a DropBox account
 
ggolemg
Old
#9  
Senior Member
Thanks Meter 30
Posts: 154
Join Date: Feb 2009
Location: naperville il
whatever you want to do with them, they're all there, even android market works perfectly
 
SimonNWalker
Old
#10  
SimonNWalker's Avatar
Senior Member - OP
Thanks Meter 103
Posts: 505
Join Date: Sep 2007
Location: Waxhaw, N.C.
And where are you guys getting the system.img file from?
The ROM zip files dont have them.
Sorry....Im noob to this. LOL
Current: AT&T Samsung Galaxy Note II


Follow us on Twitter, Facebook, Google+ and YouTube
Home of TheMandroidShow

Get yourself a DropBox account

Tags
boot.img
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top 5 LG G3 MODs – XDA Developer TV

The LG G3 has been LG’s breakout hit of the summer. Using their knowledge frombuilding some … more

Make Your Calendar Widget Beautiful with Month

For some of us, summer vacation is alreadyover. For those getting ready to school, work, or … more

Integrate Social Networks Into Your Project With ASNE Library

Social network applications and services have developed into major parts ofour … more

Give Your Android Wear Device a Lock Screen with Lockable

Without a doubt,Android Wear is one of the most frequently talked abouttopics of … more