FORUMS

XDA Picks: Best Apps of the Week (Apr 17 – 24)

Apps are at the front and center of any smartphone experience, and with over a … more

Glimpse Notifications: Easier Lockscreen Notifications

Lollipop brought a revamp to the lockscreen, taking away custom widgets but … more

What Are the Best Looking Apps on Android?

As more developers are updating their apps with Material Design elements, we’re … more

Cyngn Explained: Who’s Cyanogen, What’s Cyanogen OS?

While Cyanogen, Inc has been the source of many headlines lately, there … 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
 
More
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
 
 
13th June 2009, 11:58 PM |#2  
theslam08's Avatar
Senior Member
Flag East Coast
Thanks Meter: 210
 
More
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.
14th June 2009, 01:07 AM |#3  
ivanmmj's Avatar
Retired Moderator
Thanks Meter: 40
 
Donate to Me
More
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
 
More
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
14th June 2009, 01:57 AM |#5  
SimonNWalker's Avatar
OP Senior Member
Flag Waxhaw, N.C.
Thanks Meter: 104
 
More
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
 
More
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
 
More
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
14th June 2009, 02:59 AM |#8  
SimonNWalker's Avatar
OP Senior Member
Flag Waxhaw, N.C.
Thanks Meter: 104
 
More
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
 
More
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
 
More
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

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

Advanced Search
Display Modes