- In Android Virtual Device Manager create an AVD with target "Android 2.3.3 - API Level 10"
- emulator -avd name_of_avd
- adb pull /system/etc/permissions/com.google.android.maps.xml
- adb pull /system/framework/com.google.android.maps.jar
- (optional) Remove the create AVD in Android Virtual Device Manager
- In Android Virtual Device Manager create an AVD with target "Intel Atom x86 system Image (Intel Corporation) - API Level 10"
- emulator -avd name_of_avd
- adb remount rw
- adb push com.google.android.maps.xml /system/etc/permissions
- adb push com.google.android.maps.jar /system/framework
- Download mkfs.yaffs2.x86
- adb push mkfs.yaffs2.x86 /data
- adb shell
- cd /data
- chmod 777 mkfs.yaffs2.x86
- ./mkfs.yaffs2.x86 /system system.img
- exit
- adb pull /data/system.img (...be patient)
- Copy system.img into avd directory
- Reboot emulator
2012-03-27
How to use Google Maps API in Android emulator SDK version 17
Subscribe to:
Post Comments (Atom)
Brilliant!
ReplyDeleteI have done all of this, but when I try to uploadd app with Google Maps support, I get: Installation error: INSTALL_FAILED_CONTAINER_ERROR.
ReplyDeleteTry add param -partition-size 1024 for start emulator
Deleteemulator -avd "AVD NAME" -partition-size 1024
Thanks. This solved my problem.
DeleteOr:
Deleteemulator -avd name_of_new_x86_avd
adb remount rw
adb shell
cd /data
rm mkfs.yaffs2.x86
rm system.img
exit
Nice. Thanks!
DeleteExcellent! Thank you very much.
ReplyDeleteYour solution worked for me i was able use Google Map API in Intel Atom x86 API 10.
ReplyDeleteI also wanted to work it for Intel Atom x86 API 15. But it gave me error when i performed
adb push com.google.android.maps.xml /system/etc/permissions
failed to copy 'com.google.android.maps.xml' to '/system/etc/permissions/com.google.android.maps.xml': Out of memory
Solved by using -partition-size 512 with emulator
ReplyDeleteemulator -avd Atom -partition-size 512
# ./mkfs.yaffs2.x86 /fsys system.img
ReplyDelete./mkfs.yaffs2.x86 /fsys system.img
./mkfs.yaffs2.x86: 1: Syntax error: "(" unexpected
... is the online version changed?
Did you ever find a solution to this? I get the same error.
DeleteThis comment has been removed by the author.
ReplyDeleteNice work!
ReplyDeleteReverse geocoding on an emulator configured as described on this blog always seems to return an empty list. But the same app on an Android 4.0.3/ARM/Google APIs emulator returns addresses correctly.
ReplyDeleteAny ideas as to what the problem might be?
Perhaps a reverse geocoding permission file that needs to be pulled/pushed?
Brilliant! You can do the same if you are missing the USB accessory library.
ReplyDeleteThanks a million!
worked great, thanks the help in the comments as well.
ReplyDeleteTried this and the steps worked well for maps. Any idea where the Google account authenticator lives? This would be the piece that allows AccountManager to understand com.google account types.
ReplyDeleteHi.
ReplyDeleteI've just followed this tutorial but the system doesn't start. It's blocked on "Android" splash screen
Trying with API 15, black screen while booting with the new system.img, sometimes GLES errors in the console, adb doesn't connect.
ReplyDeleteAwesome, worked like a charm!
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteTrying with API 16. I get the black screen while booting, and it's stuck on the Android splash screen.
ReplyDeleteGetting error!!
ReplyDeleteroot@android:/data # ./mkfs.yaffs2.x86 /system system.img
/system/bin/sh: ./mkfs.yaffs2.x86: not executable: magic 7F45
hey everybody ... the new SDK Tools v21 seems to break this hack. I've created new emulators, and they begin the bootup process, say haxm enabled, and then stop with a blank screen.
ReplyDeletehas anybody had luck working this with the new SDK Tools version?
This comment has been removed by the author.
ReplyDeletebtw, if you are using ARM emulator, remember to use mkfs.yaffs2.arm instead of x86. You can download mkfs.yaffs2.arm from the same google group's download page of mkfs.yaffs2.x86.
ReplyDeleteI had the same problem with system stucking on android screen and i did the same process but change the default internal storage from 200 to 512MB and after it worked fine, thank you!
ReplyDeleteDoes it work with Maps API v2 ? Cause when I launch my MapsFragment I get a GooglePlayServiceNotAvailableException :-/ Any idea ?
ReplyDelete