2012-03-27

How to use Google Maps API in Android emulator SDK version 17


  1. In Android Virtual Device Manager create an AVD with target "Android 2.3.3 - API Level 10" 
  2. emulator -avd name_of_avd
  3. adb pull /system/etc/permissions/com.google.android.maps.xml
  4. adb pull /system/framework/com.google.android.maps.jar
  5. (optional) Remove the create AVD in Android Virtual Device Manager
  6. In Android Virtual Device Manager create an AVD with target "Intel Atom x86 system Image (Intel Corporation) - API Level 10" 
  7. emulator -avd name_of_avd
  8. adb remount rw
  9. adb push com.google.android.maps.xml /system/etc/permissions
  10. adb push com.google.android.maps.jar /system/framework
  11. Download mkfs.yaffs2.x86
  12. adb push mkfs.yaffs2.x86 /data
  13. adb shell
  14. cd /data
  15. chmod 777 mkfs.yaffs2.x86
  16. ./mkfs.yaffs2.x86 /system system.img
  17. exit
  18. adb pull /data/system.img (...be patient)
  19. Copy system.img into avd directory
  20. Reboot emulator

47 comments:

  1. I have done all of this, but when I try to uploadd app with Google Maps support, I get: Installation error: INSTALL_FAILED_CONTAINER_ERROR.

    ReplyDelete
    Replies
    1. Try add param -partition-size 1024 for start emulator
      emulator -avd "AVD NAME" -partition-size 1024

      Delete
    2. Thanks. This solved my problem.

      Delete
    3. Or:
      emulator -avd name_of_new_x86_avd
      adb remount rw
      adb shell
      cd /data
      rm mkfs.yaffs2.x86
      rm system.img
      exit

      Delete
  2. Excellent! Thank you very much.

    ReplyDelete
  3. Your solution worked for me i was able use Google Map API in Intel Atom x86 API 10.

    I 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

    ReplyDelete
  4. Solved by using -partition-size 512 with emulator

    emulator -avd Atom -partition-size 512

    ReplyDelete
  5. # ./mkfs.yaffs2.x86 /fsys system.img
    ./mkfs.yaffs2.x86 /fsys system.img
    ./mkfs.yaffs2.x86: 1: Syntax error: "(" unexpected

    ... is the online version changed?

    ReplyDelete
    Replies
    1. Did you ever find a solution to this? I get the same error.

      Delete
  6. This comment has been removed by the author.

    ReplyDelete
  7. Reverse 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.

    Any ideas as to what the problem might be?

    Perhaps a reverse geocoding permission file that needs to be pulled/pushed?

    ReplyDelete
  8. Brilliant! You can do the same if you are missing the USB accessory library.

    Thanks a million!

    ReplyDelete
  9. worked great, thanks the help in the comments as well.

    ReplyDelete
  10. Tried 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.

    ReplyDelete
  11. Hi.
    I've just followed this tutorial but the system doesn't start. It's blocked on "Android" splash screen

    ReplyDelete
  12. Trying with API 15, black screen while booting with the new system.img, sometimes GLES errors in the console, adb doesn't connect.

    ReplyDelete
  13. This comment has been removed by the author.

    ReplyDelete
  14. Trying with API 16. I get the black screen while booting, and it's stuck on the Android splash screen.

    ReplyDelete
  15. Getting error!!

    root@android:/data # ./mkfs.yaffs2.x86 /system system.img
    /system/bin/sh: ./mkfs.yaffs2.x86: not executable: magic 7F45

    ReplyDelete
  16. 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.

    has anybody had luck working this with the new SDK Tools version?

    ReplyDelete
  17. This comment has been removed by the author.

    ReplyDelete
  18. btw, 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.

    ReplyDelete
  19. I 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!

    ReplyDelete
  20. Does it work with Maps API v2 ? Cause when I launch my MapsFragment I get a GooglePlayServiceNotAvailableException :-/ Any idea ?

    ReplyDelete

  21. PERMAINAN ONLINE TERBESAR DI INDONESIA

    Website paling ternama dan paling terpercaya di Asia ^^
    Sistem pelayanan 24 Jam Non-Stop bersama dengan CS Berpengalaman respon tercepat :)
    Memiliki 8 Jenis game yang sangat digemari oleh seluruh peminat poker / domino99

    - Adu Q
    - Bandar Q
    - Poker Luck
    - Pai Qiu
    - Texas Hold'em
    - Omaha Poker
    - Domino99
    - Slot Game

    Permainan Judi online yang menggunakan uang asli dan mendapatkan uang asli ^^
    * Minimal Deposit : 10.000
    * Minimal Withdraw : 20.000
    * Deposit dan Withdraw 24 jam Non stop ( Kecuali Bank offline / gangguan )
    * Bonus REFFERAL 20 % Seumur hidup tanpa syarat
    * Bonus Cashback 0.5 % Dibagikan Setiap Hari Senin
    * Proses Deposit & Withdraw PALING CEPAT
    * Sistem keamanan Terbaru & Terjamin
    * Poker Online Terpercaya
    * Live chat yang Responsive
    * Support lebih banyak bank LOKAL

    #agenonline, #agenjudionline, #judionline, #agentaruhanjudionline, #situstaruhanjudi,#situspoker, #judipoker, #pokeronline, #pokerdomino, #agentaruhanpoker, #agentaruhanonline, #agenjuditerpercaya, #agenjudipoker, #agenpoker, #bursataruhan, #taruhanpoker, #taruhanonline, #taruhanjudipoker, #Agen Judi BandarQ, #Bandar Judi AduQQ, #Bandar Taruhan Poker, #Situs Taruhan Poker, #Daftar Poker Online, #Bandar Judi BandarQ, #Bandar #Situs Taruhan Poker, #Agen Poker Terbaik, #Bandar Poker Domino,# Judi Online Indonesia, #Agen Slot, #Slot Machine, #Situs Slot Online, #Agen Domino99, #Agen Judi Online

    ReplyDelete
  22. AGEN BOLA TERPERCAYA
    KAMUBET – SITUS JUDI BOLA, TOGEL ONLINE, DAN AGEN CASINO

    ======SPORTBOOK======
    - SBOBET | AFB88 | IBCBET -
    Minimal Bet Parlay : Rp 3.000
    Minimal Single Bet : Rp 10.000

    ======DISKON TOGEL======
    2D – 29.75% X 70
    3D – 59.50% X 400
    4D – 66.00% X 3000

    ======PROMO=====
    BONUS WELCOME DEPOSIT 50% SLOT GAMES
    BONUS WELCOME DEPOSIT 100% SPORTBOOK
    BONUS WELCOME DEPOSIT 100% SABUNG AYAM
    BONUS CASHBACK MIXPARLAY 100%
    BONUS ROLLINGAN CASINO 1%
    BONUS CASHBACK SLOT GAMES UP TO 20%
    BONUS CASHBACK SPORTBOOK 10%

    =========================
    Minimal Deposit : Rp 10.000
    Minimal Withdraw : Rp 50.000
    Minimal Deposit Pulsa : Rp. 15.000
    Proses Deposit dan Withdraw hanya 2 Menit

    ======HUBUNGI KAMI======
    Link : 178.128.120.230
    Whatsapp - +855882285275
    Instagram : @kamubet77
    Facebook : @kamubet888
    Twitter : @kamubet
    Line – Kamubet
    Wechat – Kamubet

    ReplyDelete
  23. Slot Genting - Agen Slot Online Uang Asli

    ======PROMO=====
    BONUS WELCOME DEPOSIT 50%
    BONUS NEXT DEPOSIT 20%
    BONUS CASHBACK 5%

    =========================
    Minimal Deposit : Rp 10.000,-
    Minimal Withdraw : Rp 50.000,-
    Minimal Deposit Pulsa : Rp 15.000,-
    Proses Deposit dan Withdraw hanya 2 Menit

    ======HUBUNGI KAMI======
    Link Resmi – slotgenting
    Whatsapp +6285740170865
    LIVECHAT ONLINE 24/7
    FB : SlotGenting888

    ReplyDelete
  24. NAGAQQ: AGEN BANDARQ BANDARQ ONLINE ADUQ ONLINE DOMINOQQ TERBAIK

    Yang Merupakan Agen Bandarq, Domino 99, Dan Bandar Poker Online Terpercaya di asia hadir untuk anda semua dengan permainan permainan menarik dan bonus menarik untuk anda semua

    Bonus yang diberikan NagaQQ :
    * Bonus rollingan 0.5%,setiap senin di bagikannya
    * Bonus Refferal 10% + 10%,seumur hidup
    * Bonus Jackpot, yang dapat anda dapatkan dengan mudah
    * Minimal Depo 15.000
    * Minimal WD 20.000
    * Deposit via Pulsa TELKOMSEL & XL
    * 6 JENIS BANK ( BCA , BNI, BRI , MANDIRI , CIMB

    Memegang Gelar atau title sebagai AGEN POKER ONLINE Terbaik di masanya

    Games Yang di Hadirkan NagaQQ :
    * Poker Online
    * BandarQ
    * Domino99
    * Bandar Poker
    * Bandar66
    * Sakong
    * Capsa Susun
    * AduQ
    * Perang Bacarrat (New Game)


    Info Lebih lanjut Kunjungi :
    Website : NAGAQQ
    Facebook : Facebook
    WHATSAPP : +855977509035
    Line : Cs_nagaQQ
    TELEGRAM :+855967014811

    BACA JUGA BLOGSPORT KAMI YANG LAIN:
    Cerita seks
    Winner NagaQQ
    story world
    Daftar NagaQQ

    ReplyDelete