FORUMS

CloudPlayer: DIY HiFi Music Streaming Solution

In our Helpful Guide to Music Streaming Services, we mentioned several different services … more

Optimize Battery Life with This Useful App

Battery life is an important aspect of your smartphone, especially if you use it for more … more

The OnePlus 2 & The Year of Smartphone Compromises

We are very close to entering the last third of 2015, and we have now seen many of … more

OnePlus 2 Teardown, Major Android Vulnerability – XDA TV

The OnePlus 2 has been officially released. That and much more news is … more

Testing ROM Images in the SDK Emulator!

509 posts
Thanks Meter: 105
 
Post Reply Subscribe to Thread Email Thread
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
The Following User Says Thank You to SimonNWalker For This Useful Post: [ View ]
 
 
13th June 2009, 11:58 PM |#2  
theslam08's Avatar
Senior Member
Flag East Coast
Thanks Meter: 226
 
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: 41
 
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: 105
 
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: 105
 
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: 105
 
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
14th June 2009, 03:03 AM |#11  
SimonNWalker's Avatar
OP Senior Member
Flag Waxhaw, N.C.
Thanks Meter: 105
 
More
Quote:
Originally Posted by ggolemg

whatever you want to do with them, they're all there, even android market works perfectly

OK, Im confused. Can you just unzip the ROM files and place in the folder that you point using the same folder structure?
OR
Do you have to have a system.img ?

Read More
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes