Missing com.google.android.maps

Thanks to this post, and a whole heap of other stuff, I finally sorted out a Google Maps problem on my Nexus One.

When trying to install some apps, I would see this error message in logcat:

requires unavailable shared library com.google.android.maps

I had the Google Maps app installed and working, but that didn’t fix the issue. It turns out, I had to add two other files and restart the phone. I found those files in the google zip from Cyanogenmod. It took a little fiddling, but I was able to use these instructions to remount /system in write mode. First step was to take the following two files from the google apps zip (gapps-hdpi-20101114-signed.zip) and put them onto my sd card.


Then to load them onto the phone, I opened the terminal emulator and ran:

mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cp /mnt/sdcard/
com.google.android.maps.xml /system/etc/permissions/
cp /mnt/sdcard/
com.google.android.maps.jar /system/framework/

Then after I rebooted the phone, I was able to install apps that depend on Google Maps. I can now check bus and train times, and do all kinds of other cool stuff with maps! 🙂

Note, this is only relevant if you do not want all Google Apps installed. I only have the map application installed as I don’t sync my phone with any Google services. If you’re using all the Google Apps, I suggest reinstalling as these steps should not be necessary.

To add a little colour, here’s an unrelated picture from flickr, courtesy of epSos.de.

41 thoughts on “Missing com.google.android.maps”

  1. do i have to be s-off to do that? It tells me can´t create system/etc…… cannot allocate memory!
    thx dani

    1. Not sure what s-off is. I think your phone has to be “rooted”, so you can gain root privileges, but I’m assuming that must be the case if you don’t have the stock google apps installed. Have you re-mounted /system as writable? That’s what the mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system command does. But /dev/block/mtdblock3 might be different for your phone, you could run mount to see…

      1. I do not have these folders on my phone to put the files into.

        I run cyanogenmod on my phone. Does it not work there?

  2. htc does this now to protect nand from changing…. but i dont really know what is protected… i found a way around the problem:) new version of the rom… thx for answering:)

  3. I am trying this with my witstech a81e tablet running android 2.2.

    I am getting the same error with some apps i try to install.

    Though i have used root explorer to copy the files to the appropriate paths the files copy fine though after a reboot i still get the same error.

    Is copying through root explorer the same as using the commands through terminal emulator?

    1. I’m not sure what root explorer does. I know that on my Nexus One, the /system filesystem had to be remounted. Does root explorer do that for you?

  4. Root explorer allows you to modify all the directories on the phone (android app) using superuser access.. Have put the files where they belong and edited the permissions though still not working.

    I still get the error about the shared library being unavailable. 🙁

    1. When you reboot the phone, are the files still there? If so, I’m not sure what else to suggest. Do you have the google maps app installed?

  5. Yeah they are still there.. i am trying by an terminal emulator now

    though after typing in the first line after SU i get:

    Usage: mount [-r] etc etc etc.. dont think it likes the command.

  6. just had a look at the source.

    it says:
    (Replace /dev/block/mtdblock3 & /system with appropriate device path and mount point, as obtained from cat /proc/mounts)

    So maybe my path is different..

    just ran it and it shows lots of different paths.. so i guess i need to work which i need to use.

  7. Dude, seriously, you rock. I googled far and wide to figure out why Tasker wouldn’t install on my Notion Ink Adam (shared library error) and this fixed it. I’m ecstatic I got this working, thank you very much!!

  8. Hi Callum,
    Can u please let me know how to compile and generate the maps.jar in the nexus codebase? and also how to add more default applications to the nexus codebase. As AndroidMarket app doesnot exists in the build image for nexus .

    1. I’ve no idea I’m afraid. I haven’t compiled anything for or on android. I haven’t done any android coding of any kind actually. Best of luck.

  9. Terrific. I still couldn’t load from the market but side loading the APK worked fine. I discovered this issue trying to install Foursquare on a rooted/ROM’ed Optimus T.

  10. Thank you very much for your post, really help my problem with foursquare installation…now I can install foursquare on my device flawlessly….

  11. same error I’m also getting
    I’m trying to push to files maps.jar and com.google.android.maps.xml into framework and permission directory respectively int emulator Android 4.0 Google API
    1)adb remount
    2)adb push com.google.android.maps.xml /system/etc/permission
    when I excuting 2 step
    it displaying failed to copy:out of memory
    any soluton?

  12. Special thanks for this. I’ve copy both files to internal sd an moved this with “root explorer” app in the target directory. Reboot and fine. The app “Runtastic” is now successfully installed and working.

    Now I’ve a other problem. I’ve a SGS3 and Cyanogenmod 10.1. I use philz touch Recovery (advanced CWM). So I’m able to use the auto-update function in Cyanogenmod. Problem, after a update the both files are away (Runtastic App also) and I must copy again in target directory. After copy the files and reboot, runtastic app is available and working (without reinstall). Some for Endomondo.

    Is there any way that this 2 files are fixed in the directories? With gapps is working fine. But I’ll not using gapps.

    I’ll not use the google Ad-/Spyware also…Playstore not needed.

    Hope you can understand (German).

    Thank you!

    1. I’m afraid I’m not sure what’s going on here, what the cause is, or what any solution might be. Far beyond my Android hacking experience. Best of luck finding a solution.

  13. Hi Callum,

    thx for sharing! Worked well on my CM10.1!
    I dunno if that’s necessary but I modded your ‘script’ to adapt owner and permissions:
    mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
    cp /storage/sdcard1/Appz/com.google.android.maps.xml /system/etc/permissions/
    chmod 644 /system/etc/permissions/com.google.android.maps.xml
    chown root:root /system/etc/permissions/com.google.android.maps.xml
    cp /storage/sdcard1/Appz/com.google.android.maps.jar /system/framework/
    chmod 644 /system/framework/com.google.android.maps.jar
    chown root:root /system/framework/com.google.android.maps.jar

    All the best!

  14. Thank you Callum for this blog post!

    I ran into trouble installing apps on Cyanogenmod because I don’t use have Google Apps – and I didn’t plan on installing them either.

    Your solution is straightforward.

    I ran the default filemanager that comes with cyanogenmod as root (had to change this from ‘Secure Mode’ in the app settings) and just copied the two files to the same location on my phone:

    After a reboot I could see that some apps were being ‘updated’. Now I was able to install the apps which depended on those two files.

    Thanks again 🙂

  15. Thank you Callum,

    After the mount command I used a file manager to copy the files to the right location because sd cards in my Elephone p10 are a bit different. but it works like a charm!


  16. This post is quite old and some of the links are not working anymore since the CM website does not exist anymore.
    I’m using Lineage 14.1 on a Fairphone 2 with MicroG. Most Apps are working fine, some give me that error message when I try to install them.

    I’m not able to find the mentioned files in the OpenGAPPS package. Are they somewhere hidden or not included?

Leave a Reply

Your email address will not be published. Required fields are marked *