How to install a “real” firmware on your emulator (incl. Android Market)
Yesterday, I’ve tried to find a way to install a firmware with closed source apps on my Android 1.6 emulator. And let me explain why I did it and of course how.
I wanted to have a look at the Android Speech Recognizer API (RecognizerIntent) and was really impressed by the fact that there are only a few lines of code needed to use this feature. But after some digging, I found out that you would need an application on your device to take care of the speech analysis. Only with this app, you’ll be able to use this feature – and yes – there’s no app packaged with the emulator to provide that. The only application I knew was Google Voice… but: Google Voice is closed source and therefore not installed on the emulator. I had to find a way to get it somehow… Android Market? No, closed source -> not available.
So I made up my mind and remembered that someone told me once that the firmware images on the phone and on the emulator are pretty much the same. I’ve checked the AVD (Emulator = AVD = Android Virtual Device) folder to see how it stores its files… and yes, there were *.img files. If you don’t have such a directory, you need to create an Android 1.6 AVD first (you can use eclipse or command line) – I’ve created an AVD with a 1024MB sized SDCard.
You will find this directory in your home folder (e.g. on Linux/Mac):
~/.android/avd/MastiX_Donut.avd/
On HTC’s developer website they offer the Android Dev Phone Firmware (ADP1) to download… So I’ve downloaded the following file:
signed-dream_devphone_userdebug-img-14721.zip
I’ve tried the ION firmware (signed-google_ion-img-14721.zip) as well, but I was not able to get an internet connection. Link seems not work with Firefox (Ubuntu) and Chrome (Mac). But I can download it successfully using Safari 4 on my Macbook. Please try this. The problem is that you have to accept a license agreement, which is why I don’t want to/can’t provide that file. Maybe you need to install Safari 4 to download the files… could someone tell me if it worked with Safari 4 on Windows?
Edit: I’ve found a link that should work – BUT PLEASE READ THE LICENSE AGREEMENT ON HTC’s DEVELOPER SITE BEFORE DOWNLOADING THIS FILE.
http://dl.dropbox.com/u/1676562/signed-dream_devphone_userdebug-img-14721.zip
Ok, let’s continue… After extracting the downloaded file I was able to see that there’s a system.img file in there. This system.img did not exist in my current AVD folder, but I could see that it existed in the SDK folder:
./Development/android-sdk-linux_x86-1.6_r1/platforms/android-1.6/images/system.img
Fortunately the AVD itself supersedes this AVD-wide SDK setting as soon as it includes its own system.img file. The trick is to just copy the system.img file into the MastiX_Donut.avd folder. After that I’ve (of course) tried to run the emulator with the new firmware, but unfortunately it failed with the following exception:
emulator: ERROR: system image file too large for device's hardware configuration (78MB > 72MB)
This error is pretty easy to fix, you just need to put the following line into the AVD config file (.android/avd/MastiX_Donut.avd/config.ini):
disk.systemPartition.size=96MB
That’s it! I’ve started the emulator and after a quick boot sequence it forced me to enter my Google account credentials… (you need to switch to landscape mode to enter them – on a Macbook it would be Fn + Ctrl + F12!).
Now I was able to download Google Voice from the market and tested the speech stuff without any problems.
It also synced my Google contacts to my emulator. Of course, I deleted the firmware after my test phase and returned to the standard emulator ROM!
Happy emulating,
Sascha


hey,
can’t download from htc developer site… links are unavailable…
any mirrors?
Works pretty fine here (Mac/Safari 4.0), but neither does it work on Google Chrome (Mac) nor on Firefox 3.5.x (Ubuntu). Strange…
hmmm… very strange
Maybe you can try to download it using Safari 4 (for Windows).
no…
so, i’ve testet on WinVista – FF 3.5, IE 8, Chrome, Safari 4.
none of them worked!
can you put it on a public share server? or is this illegal?
i’ve found the file somewhere
works fine…
very good how to / description *thumb-up*
Cool nice work, will have to try it out.
i have a mac tastatur and i can’t use the landscape mode.
I press fn+ctrl+F12 but my mac change the speaker volume
What is wrong by me, or can you give me another tip???
ok … ich habe das registrieren abgebrochen und bin dann in den market, da geht es auch mit der “virtuellen” tastatur einzugeben.
aber er sagt nach ner weile das er sich nicht verbinden kann
“Es besteht keine Verbindung zum Netzwerk”
Ich habe beide downloads gezogen, aber irgendwie war mir nicht klar was ich mit dem “signed-dream_devphone_userdebug-img-14721.zip” machen soll.
Die system.img liegt ja in dieser “signed-google_ion-img-14721.zip” Datei.
Ich habe also zuerst nur die system.img rüberkopiert, da ging es nicht. Nun habe ich auch noch die Dateien aus der ersten Datei in den Ordner geschoben, aber da gibt es keine Veränderung.
Wenn Du das Virtuelle Android Device erstellst, was wählst du da genau aus. Android 1.6 – API Level 4 oder Goggle APIs (Google Inc.) – API Level 4 ???
Also hat der Download bei Dir funktioniert? Du findest auch in der “signed-dream_devphone_userdebug-img-14721.zip” eine system.img. Und wie oben beschrieben, mit dem ION image habe ich es auch nicht geschafft ne Internet Verbindung aufzubauen. Deshalb geht nur das devphone image. Und beim Anlegen des AVD habe ich “API Level 4″. Viele Grüße, Sascha
I’ve added a working link to this posting! So all the problems should be gone now.