5,606,297 Members 32,688 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 78
Posts: 457
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 171
Posts: 874
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 Vivid
-Provider- ♦T♦Mobile
-------
-Phone: AT&T HTC Vivid Unlocked, S-OFF
-Recovery: TWRP 2.6.3.0
-ROM: CM11! Thanks to albinoman887!
-------
-Phone: ♦T♦Mobile HTC HD2
-Recovery: TouchCWM-B8
-ROM: PAC
-Radio: 2.15.50.14
 
ivanmmj
Old
#3  
ivanmmj's Avatar
Retired Moderator
Thanks Meter 34
Posts: 5,164
Join Date: Jan 2007
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!!!


Try my
JustStableV2 WM6.1 21051
JustHome - Alpha WM6.5
Ivan's Cooking Class
JustStableV2Micro - 73+mb free storage!
SuperJustKitchen - WM6.5 and WM6.1 kitchen for the Herald
JustKitchen.info - My Kitchen blog/site.

If you like my work and wish to donate, click

You don't have to donate to use my ROMs or my EBO kitchen, but any help is appreciated.
 
ggolemg
Old
#4  
Senior Member
Thanks Meter 29
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 78
Posts: 457
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 29
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 78
Posts: 457
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 29
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 78
Posts: 457
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


XDA PORTAL POSTS

Google Glass Now Open to Anyone… with $1500 to Spend (Update: Not Anymore)

Google Glass, which recently received its official update … more

Android 4.4.2 OTA Now Available for the Verizon Droid DNA

A couple of days ago, we talked about how the Android 4.4.2 upgrade for the HTC … more

UnbelovedHosts Uses Xposed to Block Unwanted Connections

First popularized by mvps, hosts-based ad blocking has become the de facto standard … more