insufficient storage - df - sufficient conditions? 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
There's a related thread on XDA describing a work-around. Adapting it a little so you don't need that "specific tool" (LP):


Set the install location explicitly to internal storage:

pm set-install-location 1 # (0=auto (default), 1=internal, 2=SDCard)

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 :)