PaulOBrien

[Testing] Getting an emulator up and running a full ROM with the Market etc.

Recommended Posts

PaulOBrien    1,450
androidmarketemulator.png
I am currently using the Android emulator on my machine with a copy of the excellent Cyanogen 3.6.5 ROM I am running on my device.

If you'd like to do the same, here's how (it's a great way to play with things like the Android Market that aren't in the real emulator!)

Windows PC

1. Download the Android SDK (which includes the emulator) from here.
2. Extract the downloaded zip.
3. Run a command prompt, and change to the 'tools' directory of the SDK (or add the tools directory to your path).
4. Type 'android list target'
5. Note the 'id' number of the '1.5' target (in my case it's '2')
6. Type 'android create avd -n enhanced -t 2' (substitute 2 with the target number determined above if required)
7. You will be prompted to create a hardware profile. This is optional, but I selected 'yes' and accepted the defaults for everything except RAM, where I gave it 256MB. ;)
8. Download and unzip this image file.
9. Copy the above file to the location of the enhanced.avd directory ('C:\Documents and Settings\<user>\.android\enhanced.avd' on Windows XP, and 'C:\Users\<user>\.android\enhanced.avd' on Windows Vista).
10. You're ready! Type 'emulator -avd enhanced' to run! Note: inital boot may take a few minutes!

If you get Java errors, you need to download the JDK for your system from here!

Mac OSX

1. Download the Android SDK (which includes the emulator) from here.
2. Extract the downloaded zip.
3. Run Terminal, and change to the 'tools' directory of the SDK (or add the tools directory to the path settings in ~/.profile).
4. Type './android list target'
5. Note the 'id' number of the '1.5' target (in my case it's '2')
6. Type './android create avd -n enhanced -t 2' (substitute 2 with the target number determined above if required)
7. You will be prompted to create a hardware profile. This is optional, but I selected 'yes' and accepted the defaults for everything except RAM, where I gave it 256MB. :D
8. Download and unzip this image file.
9. Copy the above file to ~/.android/avd/enhanced.avd/system.img (e.g. if you saved it to and unzipped it to downloads enter 'cp ~/Downloads/system.img ~/.android/avd/enhanced.avd/system.img')
10. You're ready! Type './emulator -avd enhanced' to run! Note: inital boot may take a few minutes!

If you get Java errors, you need to download the JDK for your system from here!

:)

P

Share this post


Link to post
Share on other sites
zombiefly    0

hi,

followed the instructions, had problems with java so installed from the link provided, however i'm still getting this:

D:\android-sdk-windows-1.5_r2\tools>android list target

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/s

dkmanager/Main (Unsupported major.minor version 49.0)

at java.lang.ClassLoader.defineClass0(Native Method)

at java.lang.ClassLoader.defineClass(Unknown Source)

at java.security.SecureClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.access$100(Unknown Source)

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Tools dir is added to system path variable. I'm using windows xp.

Thanks

ZF

Edited by zombiefly

Share this post


Link to post
Share on other sites
Russ-ST24    0

Hi Paul,

Thank you for putting together this quick tutorial.

I am very tempted by an Android device as I have various WinMo devices with custom ROMs and an iPhone 3Gs but am never satified.

Did you by chance know how I can run a HERO ROM in the emulator? I am very interested in the Hero and would like to play in the emulator.

I can find the ROM just need to know if I need any special settings to get it to work.

Many thanks

Russ

Share this post


Link to post
Share on other sites
PaulOBrien    1,450

I haven't managed to get a Hero ROM running, and I don't actually think it's possible because of the Kernel in use (but I could be wrong)...

P

Share this post


Link to post
Share on other sites
zombiefly    0
Zombiefly, did you install the JDK from above, not just the JRE?

P

I installed the file that I downloaded from the link... which was : jdk-6u14-windows-i586.exe

Do i need to update the JRE too? i'll give that a go now...

edit: nope, that made no difference. Will try this on my home pc this evening ;)

Edited by zombiefly

Share this post


Link to post
Share on other sites
Russ-ST24    0
I haven't managed to get a Hero ROM running, and I don't actually think it's possible because of the Kernel in use (but I could be wrong)...

P

Thats a shame, I will play this rom in the emulator.

Having trouble finding the Calendar on this ROM? I am being thick?

Thanks

Russ

Share this post


Link to post
Share on other sites
Russ-ST24    0
You're right! Where the hell has the Calendar gone!

;)

Investigating!

P

Web browsers seems to have done a runner too!

When I use the google search bar it just crashes with acore.

Russ

Share this post


Link to post
Share on other sites
Blinkerz    0

I think you can try out several Hero roms that has been "Cyanogenized" (they have the Cyanogen Kernel)

Share this post


Link to post
Share on other sites
l3v5y    0
Oops, needs some work methinks! ;)

P

Is it due to the Apps2SD thing used in quite a lot of android ROMs?

Share this post


Link to post
Share on other sites
Russ-ST24    0

Ok, So have anyone got a fully working ROM for this emulator? I just want to test out IMAP Secure mail etc before I buy a Hero.

Thanks

Russ

Share this post


Link to post
Share on other sites
Russ-ST24    0

Hi,

I am using this for some testing and I need to connect to an IMAP server on port 993 for SSL IMAP but with a self signed cert.

The OS is too protective and says security issue! and wont let me past.

Anyone know how to add your own trusted certs into android?

Also I guess as the brower is missing it wont download anything from the marketplace :-(

Thanks

Russ

Dont care about the emulator just want to know if its possible on the real deal.

Share this post


Link to post
Share on other sites
baka_neko    0

i tried this but i got stuck at boot loop. it brought me up to the page where it says click on android to continue setup of google account. i try to click on the android, nothing happens. the hardware buttons work but the touch screen does not. After 1min or so it reboots.

FYI it works perfectly without the cyanogen's image

Share this post


Link to post
Share on other sites
zencloud    0

Paul,

Many thanks for this very usefull guide :-)

Is there a way to create an update-cm-3.9.1-signed.system.img.zip for current cyanogen version ?

http://forum.xda-developers.com/showthread.php?t=539744

It would be great to find a way to test cyanogen versions on the emulator

Edited by zencloud

Share this post


Link to post
Share on other sites
reesd    0
Here you have 3.9.1 thanks to Bavilo:

http://sharebee.com/7b5ff589

it works fine in the emulator :-)

Can someone point me to the steps for how to create a system.img from a custom ROM like cyanogen? I've been surfing around and am obviously missing some key understanding about how the system.img relates to the updates.zip these guys are now distributing their ROMs as.

Thanks,

d

Share this post


Link to post
Share on other sites
reesd    0

Using this system.img in the emulator I am having two issues that are keeping me from getting through the initial setup. I am first getting the error message "google talk service (process com.google.process.gapps) has stopped unexpectedly" and my only choice is to Force Close. Then after I enter my gmail info I get the error message "Can't establish a reliable data connection to the server."

I am using target 2 with SDK 1.5r3. I have successfully used the Cyanogen 3.9.1 a few times with other AVDs, so I think I have the process right and its something different with this image.

I've attached a screenshot of each error and the log from ddms.

Anyone have any suggestions on what I can try?

Thanks,

dave

jackhero.log.txt

post-573101-1250175015_thumb.png

post-573101-1250175044_thumb.png

Share this post


Link to post
Share on other sites
PaulOBrien    1,450

Best way is probably to create a nandroid backup from your modified recovery image, then copy the system.img that it creates from your SD card?

P

Share this post


Link to post
Share on other sites
reesd    0
Can someone point me to the steps for how to create a system.img from a custom ROM like cyanogen? I've been surfing around and am obviously missing some key understanding about how the system.img relates to the updates.zip these guys are now distributing their ROMs as.

Best way is probably to create a nandroid backup from your modified recovery image, then copy the system.img that it creates from your SD card?

Thanks, I was wondering if there is someway to do it without installing it on a device first. Or is there a way to run a recovery.img on the emulator?

d

Edited by reesd

Share this post


Link to post
Share on other sites
zencloud    0

This is the right way to use the JacxHero system.img on the emulator:

http://www.mediafire.com/?f5edzmhh3gt

emulator.exe -avd jacxhero -system system.img -partition-size 150 -sdcard sdcard

previously you have to create an avd named jacxhero and also create a sdcard using mksdcard.exe

capturexas.jpg

Edited by zencloud

Share this post


Link to post
Share on other sites
Misiek_ud    0

I have question to the author of this thread. How did you run market service, I can't log in using emulator?

And one more question. How should I use mksdcard.exe? When I start it, it shows for a second and disapear. :)

Edited by Misiek_ud

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2016. MoDaCo uses IntelliTxt technology.