insufficient storage - df - sufficient conditions?


Question

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

Answer

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


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes