I've been having this problem on and off for a while, mostly I believed it was related to something getting corrupted when I restored my apps to a new Rom with Titanium Backup.
I am happy to say, that after scouring the web for days, and trying a lot of wrong information, I finally figured out how to fix this.
It's real easy. All you need to do is remove any *.apk files located in the /cache directory on your phone (did not even need to remount- though I did it as root just in case).
I never did figure out why only some apps will have this problem or how the problem first comes about, but I have successfully done this twice and have since been able to install/update files that had this error before.
Update (3/3/11): OK - After scouring the Internet for over a month I finally figured it out. My info above was only part right. The problem is specifically with ROMs/Kernels that move the dalvik-cache to the /cache directory (HTC puts it in the /data dir).
In any case, when it's in /data, it is using app space, and therefore you usually run out of app space and know about it. However, because this is in /cache, you don't really know what you are using. As you load up on apps, your dalvik-cache grows, and since these apps need the .dex files in the cache, even if you clear your cache, it will just get re-created.
the /cache dir is also where the apps are temporarily stored while downloading from the market. So....
1. If you are getting immediate download fails, that means that your cache is so full that you don't even have space for the temp file.
2. If you get "Invalid Package" that likely means that there was not enough cache left to install the .dex files (the download is also taking up some of this space).
Unfortunately, the only way to fix this is to either remove some of your apps, or move your cache to your SD card.
HOWEVER, I found this great app on the market called Link2SD, that allows you to only move select apps to the SD card, and you can also move the dalvik-cache files associated with these apps.
see this thread for specifics: http://forum.xda-developers.com/showpost.php?p=10711328&postcount=1
it lets you select which apps to move. You will need to create a new partition on your card, though.
So far results have been great and I can finally update the 30+ apps that have been stuck for me for the last 2 months.
almost forgot, if you adb shell or use terminal emulator, you can type "df" to see how much space is left on all your mounts.
My phone has been doing the same thing with the whole package file is invalid bs. I tried to follow your instructions on going to the /cache folder. When I went to the folder, it was empty, so I wasn't able to remove any .apk files. So now what? How do I fix this?
If you use a File Managemet app like ASTRO, it will show the folder as empty because you need root access to see the dir. However, if you use Terminal Emulator or adb shell (as root) you will see that there are indeed other directories, and probably these orphaned .apk files.
Hi,
I'm also having the same issue with invalid package. I cleared the /cahch direcotry and still have the issue -- Is there something else i can try before wiping and starting over?
thanks
Rudey
It could also be caused by the .android_secure folder on your SD card. Clearing this folder and letting the market restore them solves issues a lot ofthe time.
As always use TiBackup or something to backup all your apps first too to be safe.
As the OP, I can tell you that I have, in fact, been unable to fix this problem.
Initially the suggestion I posted above worked, however a couple of days later is was no longer working again.
I have tried every trick on the web, including:
1. Removing SD card.
2. Deleting the above mentioned folder
3. clearing market cache
4. Clearing all caches in recovery
5. logging out and back in to google talk.
The only thing that fixes it is a complete factory reset.
I currently have a combination of 3 errors:
1. No download at all.
2. Download unsuccessful
3. Invalid Package
some apps will still update, but what is really weird is that I am even getting invalid package on new apps (so its not a corrupt app already installed on the phone).
One last thought. Once I am unable to update an app, even if I remove it, I can no longer restore the backup using Titanium.
oughta try reformating your SD card and let the phone reformat it too.
sgt. slaughter said:
oughta try reformating your SD card and let the phone reformat it too.
Click to expand...
Click to collapse
don't see why this is different than un-mounting the SD which should do the same thing and has been tried.
sw99 said:
don't see why this is different than un-mounting the SD which should do the same thing and has been tried.
Click to expand...
Click to collapse
na actually reformating it will fully wipe everything on the SD and having the phone do it is best always as its always better to format with the device your using the disk on the most in general.
Found the problem, updated in OP.
sw99 said:
I've been having this problem on and off for a while, mostly I believed it was related to something getting corrupted when I restored my apps to a new Rom with Titanium Backup.
I am happy to say, that after scouring the web for days, and trying a lot of wrong information, I finally figured out how to fix this.
It's real easy. All you need to do is remove any *.apk files located in the /cache directory on your phone (did not even need to remount- though I did it as root just in case).
I never did figure out why only some apps will have this problem or how the problem first comes about, but I have successfully done this twice and have since been able to install/update files that had this error before.
Update (3/3/11): OK - After scouring the Internet for over a month I finally figured it out. My info above was only part right. The problem is specifically with ROMs/Kernels that move the dalvik-cache to the /cache directory (HTC puts it in the /data dir).
In any case, when it's in /data, it is using app space, and therefore you usually run out of app space and know about it. However, because this is in /cache, you don't really know what you are using. As you load up on apps, your dalvik-cache grows, and since these apps need the .dex files in the cache, even if you clear your cache, it will just get re-created.
the /cache dir is also where the apps are temporarily stored while downloading from the market. So....
1. If you are getting immediate download fails, that means that your cache is so full that you don't even have space for the temp file.
2. If you get "Invalid Package" that likely means that there was not enough cache left to install the .dex files (the download is also taking up some of this space).
Unfortunately, the only way to fix this is to either remove some of your apps, or move your cache to your SD card.
HOWEVER, I found this great app on the market called Link2SD, that allows you to only move select apps to the SD card, and you can also move the dalvik-cache files associated with these apps.
see this thread for specifics: http://forum.xda-developers.com/showpost.php?p=10711328&postcount=1
it lets you select which apps to move. You will need to create a new partition on your card, though.
So far results have been great and I can finally update the 30+ apps that have been stuck for me for the last 2 months.
almost forgot, if you adb shell or use terminal emulator, you can type "df" to see how much space is left on all your mounts.
Click to expand...
Click to collapse
Didnt solve my issue.. I had reformatted my phone and SD card and reinstalled my apps. It was working fine again but now its back to some apps update fine.. some get DOWNLOAD UNSUCCESSFUL and some get PACKAGE FILE INVALID.. any ideas.. Im on sprint lovers rom (latest)
It appears th LINK 2 SD needs a second partition that I dont have nor use with SPRINT LOVERS ROM and 2.2 .... am I missing something??
To the OP,
The program you linked to seems to be a variation of dark tremor's a2sd method (http://forum.xda-developers.com/showthread.php?t=715116). His lets you move data, cache, and/or dc to the ext partition, but doesn't (at least I don't believe it does) give you granular control over which apps remain in the standard location.
In my own use, I chose to move all user installed apps to sd, but dc remained on the internal memory (albeit, not in /data, but in the /cache partition). I figured this way, even if the sd card is missing, the phone will still boot. I won't have access to anything I installed, but whatever the rom came with will still be accessible.
Follow the instructions on that thread and create the second partition. You won't need more than 500mb. apps2sd or link2sd is the only way you can fix this problem unless you want to remove some of your apps.
Sent from my PC36100 using XDA App
gpz1100 said:
To the OP,
The program you linked to seems to be a variation of dark tremor's a2sd method (http://forum.xda-developers.com/showthread.php?t=715116). His lets you move data, cache, and/or dc to the ext partition, but doesn't (at least I don't believe it does) give you granular control over which apps remain in the standard location.
In my own use, I chose to move all user installed apps to sd, but dc remained on the internal memory (albeit, not in /data, but in the /cache partition). I figured this way, even if the sd card is missing, the phone will still boot. I won't have access to anything I installed, but whatever the rom came with will still be accessible.
Click to expand...
Click to collapse
Yes that's true, and I eventually went the app2sd route. However, I was trying to avoid that because of the slow speed of my sd card.
Sent from my PC36100 using XDA App
sw99 said:
Yes that's true, and I eventually went the app2sd route. However, I was trying to avoid that because of the slow speed of my sd card.
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
I'm not sure which app2sd method you're referring to, but keep the following in mind. I discovered this after my backup images failed to restore properly.
In the past, i'd be backing up boot, system, and data partitions. Obviously with dt's a2sd, I need to include the ext partition now. No problem. BUT, when restoring, i'd run into issues where my apps were present, but all settings were lost. After much confusion and head scratching, I tried wiping cache and dc AFTER the restore, but before the initial boot. The restore was a success now!
Apparently, with a2sd on the ext3, some remnants of cache or dc remain when backing up, even if cache is not selected. As part of any good restore, first thing is to always wipe, so now we end up with a hodge podge of files in the cache which I think causes the OS to revert all the settings back to default.
Just something to keep in mind.
i wanted to go back how my dhd was.. lots of problem.. i havent fix my radio problem yet and now this invaled package thing *face palm*
My phone is HTC G7, and I use data2sd to get 1.5G rom space, now there is still about 1.2G left, but I also met the "invalid package file" problem. I can't find any *.apk in /cache, (root, with "ls -a"). But if I uninstall some apps, I could install or update other apps successfully. I could not use Link2sd for I already have data2sd and I guess it's not a problem of insufficient space, because I still have enough rom space.
Do you have any new solutions?
supericexu said:
My phone is HTC G7, and I use data2sd to get 1.5G rom space, now there is still about 1.2G left, but I also met the "invalid package file" problem. I can't find any *.apk in /cache, (root, with "ls -a"). But if I uninstall some apps, I could install or update other apps successfully. I could not use Link2sd for I already have data2sd and I guess it's not a problem of insufficient space, because I still have enough rom space.
Do you have any new solutions?
Click to expand...
Click to collapse
The problem is not the apps, its the /cache running out of space. I suspect that the app you are using cannot move the dalvik-cache files (and is really just a shortcut to android's app2sd - which is not the same as darktremor or link2sd).
in terminal us df -k to see how much space you have on each mount to confirm that there is little space in cache.
If you really have that much space in your apps mount, then I would suggest moving the dalvik-cache back to its original location (search for instructions, as the only way I know how to do it is by installing darktremor's app2sd). If you are still having problems, you really are limited to either partitioning your SD card and using apps2sd or link2sd or removing apps.
hope this helps.
I have been having this issue for a couple of months now - with a bit of a twist. After wiping my dalvik-cache, my apps began to sucsessfully update - except for Google apps.
I have no idea why just those apps, but going into settings/Applications/Manage applications, and selecting each app, then clearing that apps cache, allowed those apps to sucessfully update also.
I am thankful I did not have to resort to the above fix.
Any solution if not rooted?
I've just started to get this error when trying to update the Google+ app. The error is only happening with Google+, every other app I update/install works fine.
I haven't rooted my device, and I'm hoping there's a way to fix the issue without rooting?
Device: Nexus One
Rom: Stock Android
Version: 2.3.4
Although I couldn't see anything in the cache directories, I checked in /system/app and couldn't find any package that looked like it would be Google+.
Hey.
I just bought HTC HD2 with already installed Android. It's this ROM according to informations i found in Settings > About Phone. It boots normally and run smooth.
I'm facing a few problems but all of them are leading to the one source. The main problem is when I go to the Settings > Storage it shows Internal Storage as follows: the bar is 100% green, Total space shows 0.00B and lower it says Apps (app data & media..) 73.80MB. I think it causes the rest of my problems such as all SMS's are rejected (Text message memory is full. An incoming message was rejected..) or every reboot it resets all the settings. If I cleared all the possible app's data the number under Apps (app data & media..) goes to ~70MB but nothing else changes (the bar is 100% green, and total space shows 0,00B).
This ROM is installed in DataOnEXT option, which I suppose mean I can expand internal memory by making ext4 partition on SD card. I tried it with two cards but it does not work. Here is how it looked after formating. The FAT32 partition is detected without problems, but ext4 not (or I don't understand how it should work?). Anyway it doesn't solve any of my problems.
I tried few other things such as wipes for example (as some suggests in similar problem subjects over few forums) but without results. I'm total beginner with Android system and totally don't know what should I do next. Is it possible to solve those problems without reinstalling Android? I'm a little scared to do it because i have totally no experience in this.
If there are any other informations needed please ask, preferably with a way how to check it. I don't know what else may be important. Also I hope you guys can understand my problem and hold out with such a beginner.
modq said:
Hey.
I just bought HTC HD2 with already installed Android. It's this ROM according to informations i found in Settings > About Phone. It boots normally and run smooth.
I'm facing a few problems but all of them are leading to the one source. The main problem is when I go to the Settings > Storage it shows Internal Storage as follows: the bar is 100% green, Total space shows 0.00B and lower it says Apps (app data & media..) 73.80MB. I think it causes the rest of my problems such as all SMS's are rejected (Text message memory is full. An incoming message was rejected..) or every reboot it resets all the settings. If I cleared all the possible app's data the number under Apps (app data & media..) goes to ~70MB but nothing else changes (the bar is 100% green, and total space shows 0,00B).
This ROM is installed in DataOnEXT option, which I suppose mean I can expand internal memory by making ext4 partition on SD card. I tried it with two cards but it does not work. Here is how it looked after formating. The FAT32 partition is detected without problems, but ext4 not (or I don't understand how it should work?). Anyway it doesn't solve any of my problems.
I tried few other things such as wipes for example (as some suggests in similar problem subjects over few forums) but without results. I'm total beginner with Android system and totally don't know what should I do next. Is it possible to solve those problems without reinstalling Android? I'm a little scared to do it because i have totally no experience in this.
If there are any other informations needed please ask, preferably with a way how to check it. I don't know what else may be important. Also I hope you guys can understand my problem and hold out with such a beginner.
Click to expand...
Click to collapse
How did you install android to begin with?
---------- Post added at 09:55 PM ---------- Previous post was at 09:49 PM ----------
shanman-2 said:
How did you install android to begin with?
Click to expand...
Click to collapse
Edit:
Sorry didn't see the "already installed!!.
You will need to read up a bit if you want to fix this issue.
Have you tried to boot to recovery?..power on device and press and hold the home button immediately afterwards?
Report back?
shanman-2 said:
Have you tried to boot to recovery?..power on device and press and hold the home button immediately afterwards?
Report back?
Click to expand...
Click to collapse
Yes, I booted it to recovery few times in order to make a "wipe" as it was suggested in several threads. It's "CWM-based Recovery v5.0.2.6" if that matters.
modq said:
Yes, I booted it to recovery few times in order to make a "wipe" as it was suggested in several threads. It's "CWM-based Recovery v5.0.2.6" if that matters.
Click to expand...
Click to collapse
You mean a data, cache and dalvic cache wipe?
If that didn't work then download the same rom zip and file place it on the root of your sdcard then boot into recovery and install the rom again, (option install zip from sdcard in recovery), doing the full wipe process beforehand.
.
If you have a tmous handset then select "Nand" install when asked during installation.
Otherwise select" DataOnExt" option. (with this option you need to verify that you have a ext4 partition on your sd card).
Simplest way I could put it!
If you go to the first page of the rom thread you will get all the information you require to install the rom.
Setting partition size could be an issue if the above don't work!
Hi,
It was happening to me and i suspect (not sure) this is the Problem with EXT4 wipe with in CMW recovery.
>Create Partition using PC>Don't insert into Before you do Wipe Data and Factory Reset>And then insert SD card>Flash ROM.
>Otherwise you can user TWRP recovery where there is no issues for me with the WIPE ALL.
This is the way i come-out from the issue.
Thank you @shanman-2 and @[email protected]. It was easier than I thought. Everything works perfect now. Many thanks.
informative
Can someone tell me what's going on? I have plenty of system space and SD space but everytime I try to update any app, I get insufficient storage available. I've cleaned the cache and deleted many apps but still this remains. I even cleared Google Play Store and the data.
Never had this happen before where I couldn't fix it.
Note, this happens when I try to update or install an app from Google Play or if I try to sideload any app
Did you force "install app to sdcard directly"?
"If someone helps, never forget to hit thanks ? "
Install SdMaid Pro app from Play Store.. Then clean your system.
P.s. YOU NEED ROOT ACCESS
I didn't force install or side load. I have root and my system is clean. I cleared almost all caches and cleared data and cache from play store. I even cleared the dalvik cache.
bobstone said:
Can someone tell me what's going on? I have plenty of system space and SD space but everytime I try to update any app, I get insufficient storage available. I've cleaned the cache and deleted many apps but still this remains. I even cleared Google Play Store and the data.
Never had this happen before where I couldn't fix it.
Click to expand...
Click to collapse
Take a look if the apps are in APPLICATION MANAGER -> SD CARD and are moved to the SD CARD.
SOLUTION
1) You can make a test. Take out the SD CARD and try to update one of that apps. Go to point 2 if works and you don't get any message.
2) I had same problem. My solution was change the SD CARD coz was faulty. Good luck :highfive:
bobstone said:
Can someone tell me what's going on? I have plenty of system space and SD space but everytime I try to update any app, I get insufficient storage available. I've cleaned the cache and deleted many apps but still this remains. I even cleared Google Play Store and the data.
Never had this happen before where I couldn't fix it.
Click to expand...
Click to collapse
Hi
i already had this problem on my old s2 because i patched the apps with lucky patcher to remove the adds.
Lucky patcher install an odex file in the system, and this causes the problem.
If you can unpatch the apps you want to update via lucky patcher, do it. (Or maybe remove manually the odex file via an explorer)
As i didn't need to keep the datas for the apps, my solution was to uninstall the apps i wanted to update, launch lucky patcher so that it removes automatically the odex file, and reinstall the app via google play ...
Hi there,
i'm having some trouble with my S4, i9505.
I installed Resurrection Remix last weekend, and it hasn't been stable ever since. (cm-Resurrection_Remix_LP_v5.3.2-20150127)
In the beginning it would hold out for a few hours, but it started to reboot more and more frequently.
Finally, it would start to reboot, even whil rebooting into the recovery. Very annoying, and very hard to do anything.
I managed to restore to a nandroid backup from October 2014, but there's another problem.
I had installed that rom early in October It's Cyanogenmod 11.x.... Not sure exactly which version. I used the installer provided by cyanogenmod.org. That one has served me well for a long time, but lately I was having memory issues. I couldn't install new apps and even updating no longer works. I have >4GB free on my external SD, but installing apps to SD didn;t work. Moving apps to SD to make space was no go either. I kept getting "insufficient space" The operating system showed less than half the space on the internal memory was used. Lots of space left, but no space for apps apparently. ES file explorer doesn't think there's much space left on the internal SD. a few 100 MB max.
That's what tirgered moving to RR, but clearly that did'nt work well. I did a factory wipe from the recovery and cleared the cache.
What struck me is that the factory wipe isn't very thorough. Lots of data from apps was still accessible when Resurrection Remix was still behaving.
I tried to install cm-12-20150420-OPTIMIZED-FINAL-jflte.zip, but the installation quickly aborted saying it couldn't mount /system.
I managed to put my nandroid on the SD card and restored to the old situation, but the memory problems are still there.
In short, any idea what could be causing this behaviour?
and is there a way to do a complete and absolute wipe, so that any errors that may have accumulated over time will be erased?
I get the feeling that some link or redirection is wrong and the installs that I do get botched just a little bit.
Cheers,
Everything you are using is old and highly outdated.
1. Flash the latest TWRP from here:
http://teamw.in/devices/samsunggalaxys4internationalqualcomm.html
2.
Download the rom from my signature.
3.
Flash away and it will work fine.
Cool. Thanks. Will try that!
M
Hmmm. Didn't fix it.
OK. So I did that. ... As my phone thinks it's full, I had to do the install using terminal emulator.
Once that was done, it was smooth sailing.
Just started up again. But I only can get a few of the apps I used to have. I'm getting "device memory full" again.
I did the wipe function from twrp. Including wipe of Dalvik cache.
The "storage" item in settings says I have 397 mb available of 9.13gb, but visually the free space looks about 4 times larger than the .75 or so gb of data used by apps, etc.
Any ideas?
Menno
Mainow said:
OK. So I did that. ... As my phone thinks it's full, I had to do the install using terminal emulator.
Once that was done, it was smooth sailing.
Just started up again. But I only can get a few of the apps I used to have. I'm getting "device memory full" again.
I did the wipe function from twrp. Including wipe of Dalvik cache.
The "storage" item in settings says I have 397 mb available of 9.13gb, but visually the free space looks about 4 times larger than the .75 or so gb of data used by apps, etc.
Any ideas?
Menno
Click to expand...
Click to collapse
The memory full mesages is displayed when your internal storage is full. TWRP never wipes your internal storage. Delete the files manually or in TWRP select advanced wipe and select /data partiton.
Lennyz1988 said:
The memory full mesages is displayed when your internal storage is full. TWRP never wipes your internal storage. Delete the files manually or in TWRP select advanced wipe and select /data partiton.
Click to expand...
Click to collapse
Wow! thanks.
I went into TWRP and used the file manager.
Browsed around a bit and found a folder in /Data which belongs to Clockworkmod. The Cyanogenmod filemanager doesn't get there.
It basically had copies of all the nandroid backups I had made. with Clockworkmod. Not cool. I had made the backups to SD card, so apparently CWM forgot to delete these, or so.
Anyway, I deleted those folders and I'm back in business.
Cheers!
Issues after OtA
So..... just posting on my original thread. Hope someone is seeing this.
Last clean update went well... Apart from a few minor issues the wifi and bluetooth stability.
But since mid August my phone was nagging me about a new update being available. So I went for it finaly. Did OTA update 2 days ago.
Did not go well.
Gmail broken, Google Play crashing and bad wif stability.
Read around a bit on this forum.. Decided to do a clean install. MUCh better! :victory:
But... 2 issues remain...
1. my wifi doesn't seem to want to connect when I want it to. I always had issues with the wifi not connecting when the wifi strenght was not perfect, but since the August update, I can be standing right next to the AP and it's not connecting. My AP shows up right on top, and it just says saved. When I tap it and press connect, nothing happens. It does randomly connect every once in a while, for a couple of minutes... It works perfectly, great bandwitdh... and then nothing. It's not my AP. I'm posting from my laptop which has great connectivity. I put in the neighbour's wifi. Same thing.
2. How do I get rid of the Google search bar on top of the screen. Can't find it in the settings.
Oh. and when I switched over to cM12, I seem to have lost root access. How to get it bacK?
Cheers,
Menno