"package file is invalid" while trying to update google maps

omarnova

Well-known member
Dec 4, 2010
288
6
0
not sure why i am getting this message...i tried to delete cache and data from google play and tried again but no luck! any fix?
 
I've spent two days prowling the web searching for solutions for the "package file invalid" error. My problem was that maps would not restore from a backup or install from the market. I did one of everything in an attempt to solve it, I'm pretty sure. Since it looks like the cache is simply jammed up, preventing the install of large Google apps, I used a Titanium Backup filter to list all my apps that reside on the phone rather than on the SD card. I uninstalled a few of the bigger ones (actually just three of the biggest) and then went to the market to install maps. Came through without a problem. Strangely, using Titanium again I was able to restore all those apps I'd uninstalled to make room for maps. I have no idea why that worked – it seems spatially impossible – but for now, at least, problem solved. What a total hair-puller the invalid package error is.
 
Last edited:
I'm having this same problem. Damn annoying. I'm on an LG Optimus S running HydroROM (VJ), my internal storage shows 107MB free, my sd card has 27.61GB free.

Google Maps and IMDB both download fine from the Google Play Store but upon install show the "package file invalid" message. Things I have tried:


  • Uninstall both apps, reinstall to internal storage.
  • Clear data / uninstall updates from both apps; reboot to recovery; wipe cache and dalvik cache.
  • Clear data from Google Services Framework; reboot.
  • Revert to earlier, working nandroid backup of HydroROM.
  • Uninstall both apps, restore with Titanium Backup.

Open to other suggestions..... ?
 
I'm having this same problem. Damn annoying. I'm on an LG Optimus S running HydroROM (VJ), my internal storage shows 107MB free, my sd card has 27.61GB free.

Google Maps and IMDB both download fine from the Google Play Store but upon install show the "package file invalid" message. Things I have tried:


  • Uninstall both apps, reinstall to internal storage.
  • Clear data / uninstall updates from both apps; reboot to recovery; wipe cache and dalvik cache.
  • Clear data from Google Services Framework; reboot.
  • Revert to earlier, working nandroid backup of HydroROM.
  • Uninstall both apps, restore with Titanium Backup.

Open to other suggestions..... ?

There are some who swear that deleting 01mvdalvik from system/etc/init.d does the trick. I believe I tried it and got nowhere, but others have had success, so it's worth a shot, I guess.
The following advice, sort of the ultimate fix, is from AC member MasterTec:

There is a script baked into CM7 that moves DALVIK CACHE to the Cache partition (where previously it was located in the Data partition). From what I understand this was done in order to open up more space in the Data partition.

The problem with this is that once you have a certain amount of apps installed the Cache partition gets filled up. Once there is no more room for Cache files then you get the "Insufficient Space" error. Once there is no more room for Dalvik-Cache to expand then you get the "Invalid Package" error.

I tried a "fix" for the OS that uses S2E to move Dalvik Cache to an SD-Ext partition: Moving data and dalvik-cache to sd card to fix market issues. This seemed to work great at first but then I rebooted and my phone kept crashing and only a handful of my apps would appear. For some reason some files got corrupted. I ended up having to restore Harmonia 2 from scratch to get things right again.

Trying that process a second time yielded the same results so it's pretty much a no-go for the OV... at least with Harmonia 2. However I found some information in the S2E thread that did prove to be useful. I figured out how to disable the CM7 script that moves the Dalvik Cache location to begin with!

So if you don't mind losing about half of your internal storage space (not much of an issue for me being I have almost all of my apps installed to SDCard) then you should be able to do the following to get things working correctly again:

1> Make sure USB Debugging is enabled in Applications/Development
2> Boot into recovery and MAKE A NANDROID BACKUP!!!
3> Clear Cache and Dalvik Cache from recovery
4> Go to Mounts and Storage from recovery and make sure all of the partitions are mounted
5> Connect your phone to your computer while it's still in recovery and issue the following commands from ADB Shell (if you do not know how to use ADB then you need to search through these forums to figure out how to set it up. The ZV9 update thread pretty much explains that process):

Code:

rm /system/etc/init.d/01mvdalvik
rm -r /cache/dalvik-cache/
reboot

6> Let the phone boot normally. It will take much longer than normal because it has to rebuild the Dalvik Cache in the Data partition. After that let it sit several minutes after booting to repopulate all of your apps. Once everything is up and running double check how much space you have left in internal storage and reboot yet again for good measure.

This worked for my OV 2.2.2 updated with ZV9 running Harmonia 2.
 
Last edited:
I am sorry but do NOT DO THIS. I will not do anything as hydro ROM already has dalvik moved to cache. First off I would recommend simply booting to recovery and wiping cache.

The error occurs when the cache becomes full and thus no more files can be generated within dalvik (this is needed to install new apps). I am guessing you have over 50+ user apps on your device. Cache is like a record of what you have on your phone and the more apps the more space it needs.

Sounds like what you need is team hydros dalvik2dev mod. Hold and I will get a link for you

Sent from my Nexus S 4G using Tapatalk 2

Edit: http://forums.androidcentral.com/showthread.php?p=1566525


Here is the thread in question
 
Last edited:
I reread MasterTech's instructions for moving the Dalvik Cache and a light bulb went off. Titanium Backup has the following option and I've always wondered what it was for: menu > more >Integrate Dalvik into ROM. I chose it and got:

Found 146 integratable files in Dalvik Cache (total 49.3MB). Do you want to integrate them into ROM?

I chose "yes", a bunch of system files were apparently shifted around, I rebooted, and suddenly both of my apps installed properly without the "package file invalid" message. Thing is, this didn't cause any loss of internal storage.... I'm still at 107MB. I'm not sure if what I did is a real solution or if it's total coincidence that my problematic apps magically installed properly after doing this, but I figured it's worth posting just in case.

EDIT: hlxanthus -- just read your post. Will look for your link,,,, thanks.
 
I reread MasterTech's instructions for moving the Dalvik Cache and a light bulb went off. Titanium Backup has the following option and I've always wondered what it was for: menu > more >Integrate Dalvik into ROM. I chose it and got:



I chose "yes", a bunch of system files were apparently shifted around, I rebooted, and suddenly both of my apps installed properly without the "package file invalid" message. Thing is, this didn't cause any loss of internal storage.... I'm still at 107MB. I'm not sure if what I did is a real solution or if it's total coincidence that my problematic apps magically installed properly after doing this, but I figured it's worth posting just in case.

EDIT: hlxanthus -- just read your post. Will look for your link,,,, thanks.

Wow. I've always wondered about that maneuver, as well. Glad you were brave enough to try it. Might give that a go myself the next time that invalid package error rears it's hideous head.
 
I added the link to the above post.

Here is the issue in what you did. Your dalvik cache natively lives within the data partition and that is where you sent to back to likely (not sure, never used that feature of TB). But as that fills up you will begin to lose room for apps. The internal space on the optimus s is so limited it is virtually useless without moving dalvik somewhere else if you want more than a hand full of apps. So look I to the dalvik2dev mod. The only drawback there is longer boot times as it has to rebuild every time the phone reboots

Sent from my Nexus S 4G using Tapatalk 2
 
  • Like
Reactions: Dennola4
hlxanthus:

very much appreciate the explanation as well as the link. Will definitely look into dalvik2dev right now. I'm still unclear as to how your solution works (meaning, where does the Dalvik cache go when it is rebuilt? If it is Dalvik to Device, isn't that the same as Dalvik to ROM?)... if you feel like showing off your knowledge I'd love to hear the full explanation. But either way, thanks for the help. By the way, I just counted: 62 user apps.... and I need every one of them. :P

LaFlamme:

I have borked my device enough times now that I am pretty comfortable reinstalling it all from scratch... so I'm not quite as scared to try stuff. Besides, Titanium Backup offers an option to undo the Dalvik system integration, so it's really not that big of a commitment.

EDIT: the dalvik2dev mod is definitely the solution for HydroRom / LG Optimus S. I tried downloading Angry Birds Space (23.80MB) after the TB Dalvik sys integration and I got the message: Insufficient space on device. I tried it after the dalvik2dev mod and it installed. Wish I understood the details. Like, is the Dalvik cache basically swap space? Where is it? Where was it before, why does it work now, etc. Anyway, thanks again for the help (and props to TeamHYDRO).
 
Last edited:
LaFlamme:

I have borked my device enough times now that I am pretty comfortable reinstalling it all from scratch... so I'm not quite as scared to try stuff. Besides, Titanium Backup offers an option to undo the Dalvik system integration, so it's really not that big of a commitment.

I hear ya. Just having a nandroid backup makes it a little easier to go for it, huh? In most cases, you're just a click away from a full return to normal. Love that Android.
 
I have borked my device enough times now that I am pretty comfortable reinstalling it all from scratch... so I'm not quite as scared to try stuff. Besides, Titanium Backup offers an option to undo the Dalvik system integration, so it's really not that big of a commitment.

So um, be careful with that whole TB messing with your dalvik cache business. I played around with it on my first Opti S out of boredom/curiousity/stupidity. It did fine integrating it, but when I tried to later undo it my phone got severely hot during the process and shut itself off. Tried to start it up and it was stuck in a bootloop. :o

Dunno if that would happen to you or not, just a word of warning. It's fixable, but still annoying.

Sent from my SPH-D710
 
So um, be careful with that whole TB messing with your dalvik cache business. I played around with it on my first Opti S out of boredom/curiousity/stupidity. It did fine integrating it, but when I tried to later undo it my phone got severely hot during the process and shut itself off. Tried to start it up and it was stuck in a bootloop. :o

Dunno if that would happen to you or not, just a word of warning. It's fixable, but still annoying.

Sent from my SPH-D710
I had heard that the TB integration move could cause problems so I never messed with it. Honestly, I'm waiting to hear if Dennola has problems before I try it myself. Heh.
 
Actually I just found a thread on another Android forum that was pretty informative.... and basically the general consensus was to avoid using it. The guys people discussing it were devs so I feel confident it was good advice.

That said, I am now insatiably curious what will happen if I try to undo it.... so for the sake of experiment I'm going for it now. Will edit this post with either a "yes it worked fine" or a "Dammit, I killed my device."

EDIT: Oh wait. Duh. Since I flashed the HydroROM dalvik2dev mod, which apparently rebuilds the dalvik cache fresh upon each reboot, there are no files to disintegrate from the system.... as Titanium Backup just told me when I tried.

Hope this isn't in poor taste, but this link (from another Android site) is pretty interesting re: TB Dalvik Cache System Integration function.
 
Last edited:
Actually I just found a thread on another Android forum that was pretty informative.... and basically the general consensus was to avoid using it. The guys people discussing it were devs so I feel confident it was good advice.

That said, I am now insatiably curious what will happen if I try to undo it.... so for the sake of experiment I'm going for it now. Will edit this post with either a "yes it worked fine" or a "Dammit, I killed my device."

:confused:

Good luck. We're all counting on you.
 
Okay, to explain these mods, you have to understand a little about how the software is installed on the phone. There are several partitions; boot, system, cache, data, recovery, dev(and an other one of two I might be missing). If you extract a ROM zip you will see some of those that we take for granted like when asked to wipe cache or format system from recovery. While it is all one storage space it has been partitioned to hold exactly sized pieces of the software.

Natively on most android devices the dalvik cache resided within the /data partition (this is the partition that all user data and settings are saved and what is wiped with a factory reset). And so when the dalvik is full it limits what you can download app wise. Now with the dalvik2cache mod it moves where the dalvik resides and places it, you guessed it, within the cache partition. This mod does really well for the average user, but if you have a high number of apps installed or a few that generate an abnormally large cache file the cache partition will become full and again you get those errors.

The dalvik2dev mod moves it to yet another partition. The /dev partition is a relatively large partition that is ONLY used in the service of OTA updates so there is no fear of it becoming full. The draw back? It is this, it is wiped and thus rebuilt with every time the device is rebooted. This means a longer boot time.

Sent from my Nexus S 4G using Tapatalk 2
 
Okay, to explain these mods, you have to understand a little about how the software is installed on the phone. There are several partitions; boot, system, cache, data, recovery, dev(and an other one of two I might be missing). If you extract a ROM zip you will see some of those that we take for granted like when asked to wipe cache or format system from recovery. While it is all one storage space it has been partitioned to hold exactly sized pieces of the software.

Natively on most android devices the dalvik cache resided within the /data partition (this is the partition that all user data and settings are saved and what is wiped with a factory reset). And so when the dalvik is full it limits what you can download app wise. Now with the dalvik2cache mod it moves where the dalvik resides and places it, you guessed it, within the cache partition. This mod does really well for the average user, but if you have a high number of apps installed or a few that generate an abnormally large cache file the cache partition will become full and again you get those errors.

The dalvik2dev mod moves it to yet another partition. The /dev partition is a relatively large partition that is ONLY used in the service of OTA updates so there is no fear of it becoming full. The draw back? It is this, it is wiped and thus rebuilt with every time the device is rebooted. This means a longer boot time.

Sent from my Nexus S 4G using Tapatalk 2

If the lengthy boot is the only downside, then count me in. That sounds like just the thing. Thanks. Grabbing your link from above.
 
hlxanthus:

I get it. Thanks for the down-to-earth explanation. I think the term "/dev" threw me off, since there is a /dev *directory* on a linux file system which contains special device files. But okay, the /dev *partition* serves a completely different function, namely a kind of swap space for extracting over-the-air update packages prior to install, which is then wiped of these temp files on reboot. (Is that about right?)

I think the big picture is that I would like to learn what each partition is, what it contains, and basically how the whole system works. While I understand that "Google is your friend", if you know of or come across a thread, literature, etc that breaks it all down in basic terms I'd be ever grateful.

And again, thanks for the link and the time investment. :cool:

LaFlamme: you do realize that the link is a modification of the original HydoROM, which is a ROM designed for the LG Optimus S? If you aren't running this ROM on this device the link is useless. :confused:
 
Last edited:
Actually, this mod was designed for hydroRom, but it is just an init.d script. Will work the exact same assuming the device has a similar file structure, as the OV does.
 
Actually, this mod was designed for hydroRom, but it is just an init.d script. Will work the exact same assuming the device has a similar file structure, as the OV does.

That's what I was hoping. Thanks for the confirmation. Gonna give the script a go the next time I run into problems.