1

I know there're lots of questions about insufficient storage, but no real answer so far ! In particular about /data/app, which has plenty of space in my case. So why can't I install any new app ?! What are the precise conditions that make install fail ? (I don't want tricks like clearing cache or /data/app, which are both fine in my case..., but I'm more interested by a dev answer about how the install process proceeds)

Thanks !

shell@wiko:/ $ df
Filesystem               Size     Used     Free   Blksize
/dev                   235.3M   128.0K   235.2M   4096
/sys/fs/cgroup         235.3M    12.0K   235.3M   4096
/mnt/secure            235.3M     0.0K   235.3M   4096
/mnt/asec              235.3M     0.0K   235.3M   4096
/mnt/obb               235.3M     0.0K   235.3M   4096
/system                787.4M   687.4M   100.0M   4096
/data                    2.5G     1.0G     1.5G   4096
/cache                 221.5M     4.1M   217.3M   4096
/protect_f               8.8M     4.1M     4.8M   4096
/protect_s               8.8M     4.0M     4.8M   4096
/storage/sdcard0         2.3G     1.0G     1.3G   4096

logcat gives:

I/PackageManager(  672): Apk copy done
I/PackageManager(  672): Checking for more work or unbind...
I/PackageManager(  672): Posting delayed MCS_UNBIND
V/PackageManager(  672): + starting restore round-trip 16
V/PackageManager(  672): No restore - queue post-install for 16
V/PackageManager(  672): Handling post-install for 16
V/Provider/Settings(  672): get setting for user 0 by user 0 so skipping cache
V/Provider/Settings(  672):  from settings cache , name = sys_free_storage_log_interval , value = null
V/Provider/Settings(  672): get setting for user 0 by user 0 so skipping cache
V/Provider/Settings(  672):  from settings cache , name = disk_free_change_reporting_threshold , value = null
D/dalvikvm(  672): GC_EXPLICIT freed 579K (8856), 21% free 15405K/19324K, paused 5ms+10ms, total 125ms
I/Finsky  (14148): [15066] com.google.android.finsky.packagemanager.impl.h.a(9): Package install status for fr.smoney.android.izly.REC is -4
W/Finsky  (14148): [1] com.google.android.finsky.installer.a.aa.a(37): Install failure of fr.smoney.android.izly.REC: -4, Exception: n/a
  • Have you already checked with our insufficient-memory tag-wiki for known solutions? And checked with the "related" questions shown next to yours, such as “Insufficient storage” when trying to install new app? Also, taking a look at our heavily frequented questions on this topic might give you some clues. – Izzy Sep 7 '17 at 10:00
  • @Izzi Thank you for reformatting & the links. Yes, I have checked most of these links, but they only give user-level answers that clearly do not apply in my case (like 25MB or 10% limit), or tips to free up memory - but nothing useful for me: not any "developer-aware" cues about the actual install process that may help me to understand... As if nobody really knew how does this install process really work, in the details ! I'd really appreciate to avoid having to dig into android's code to understand it ;-) hoping someone else already did... – xtof54 Sep 7 '17 at 13:24
  • Related thread on XDA. If you want to try that approach, I guess all that LP does is what you also can achieve using pm set-install-location 1 (0=auto, 1=internal, 2=SDCard). – Izzy Sep 7 '17 at 14:49
  • @xtof54 You are welcome for the reformatting! #D – Death Mask Salesman Sep 7 '17 at 19:49
  • @Izzy thanks for the XDA link; I've tried it and this little trick actually works ! After some thinking, it makes sense, because I used to have an SD card that got crazy and I removed it, so I guess Android was always trying to install on sdcard, even though there is none anymore :-/ Please write it as a real answer and I'll tag it as solved. Thanks a lot ! – xtof54 Sep 8 '17 at 7:10
1

There's a related thread on XDA describing a work-around. Adapting it a little so you don't need that "specific tool" (LP):

  1. Set the install location explicitly to internal storage:

    pm set-install-location 1 # (0=auto (default), 1=internal, 2=SDCard)
    
  2. Clear the Play Store settings

Now your install should go through.

As the comment in the code line shows, by default Android is set to automatically chose the storage the install should go to. It seems something is messed up in that evaluation. So by making your wish explicit, that "auto evaluation" routine is skipped, and thus the error avoided. If that's what's behind the issue, it should work as well setting your preferred storage to 2 (SDCard) if you prefer that.

Reading your comment, the culprit might have been a little different at least in your case: If you had set the install location to 2 and then removed the card, it's pretty much clear why there's "insufficient storage" on the empty slot :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.