27 Feb 2015
Fixing Android Insufficient Storage Error
“How to Clear Spurious Insufficient Storage Available Errors on Samsung Android Devices”

This "fix-it" relates specifically to certain rooted Samsung devices [in my case a Galaxy Tab 2 10,1] which under a certain set of circumstances [which I’ll outline shortly] will leave you head-butting walls in sheer frustration, throwing up an 'Insufficient Storage Available' error whenever you try to install any app --this in spite of you having plenty of free space available, both internally [Phone/Tablet]and externally [SD Card].

samsungstorage01

The peculiar set of circumstances in question being any combo or all of:

  • You have at some stage tried an App which promised to move your apps to your SD Cards but then failed miserably to be able to do so.
  • Your SD Card is formatted as exFAT [ie. MSDOS / Windows]
  • Your SD Card is mounted [ie. You can copy files to it using a file manager App]
  • Your Android gadget is rooted

If you want to cut straight to the chase, you can leapt straight to the TL;DR; section at the end. But first I want to indulge myself in a small 'rant-let' against the arse-witted "Internet Experts" who caused me to waste so much time over this, with their useless 'solutions' which seem to litter every internet forum I trawled in search of the answer. So here’s to you:

  • "The Space Junkies" --Bottom of the evolutionary ladder when it comes to suggestions. You can tell these people that you’re trying to install a 1MB App on a phone/tablet with 100GB+ of free space as many times as you want. They’re still going to suggest that "Maybe you should delete some apps and files to free up space"
  • "The Hard Resetters" --The first resort of the clueless internet twat who, in spite of having no relevant knowledge to impart [their replies often begin with "I don’t know anything about…​"] feels compelled to join in the discussion regardless, only to trot out the "Have you tried a hard reset?" suggestion which is nothing more than the old "Have you tried turning it off and on again?" line in slightly different, more technical sounding wording --and usually about as effective.

    Hard-core 'resetters' will probably suggest you completely wipe your phone/tablet and reinstall Android and all your apps and files all over again. Why the hell not? It’s not them that’s going to have to spend the next several hours in this pointless pursuit --and they get to look knowledgeable on the internet!

    Here’s a thought: If you’re prefacing your 'suggestion' with "I don’t know anything about…​" then it might be more productive if you just shut the fuck up! and kept your random guesswork to yourself.

  • "The Cache Clearers" --Another favourite of the internet clueless although, to be fair, clearing stale caches is not in itself a bad thing to do. It frees up disc space and can help speed up Apps which are grinding to a halt under the weight of their stale cached data. It’s just that, in the particular circumstances under which I’ve run into this problem, it won’t do you any good.
  • The Catch-22ers --These people are the ones who, without a trace of irony will point you in the direction of Some-Magic-App© on the Google Play store which will solve all your problems by clearing out stale caches, resetting app permissions and generally making your life blissful. These fuckwitts are presumably too obtuse to be able to make the logical connections necessary to see the ever-so-slight flaw in diagnosing the cure for "I can’t install any Apps" as "First install this App".

Anyway, now I’ve got that off my chest, let me give you my diagnosis of the problem. Again, to re-iterate this is what causes the problem in a certain set of circumstances as outlined above and this solution works for me 100% of the time. YM as ever MV.

Right. The problem here is that there is a system setting within Android [install-location] which tells the OS where to install apps. By default this setting will be set to 'auto' which means that your device will install to the internal memory most of the time but can, on occasion, use the SD Card, if your hardware permits it. As I understand it, certain Samsung devices are a bit picky about installing to the SD card owing a conflict in the way the system also virtualises its internal storage as an 'SD Card'

[SORRY: at the risk of sounding like one of the "I don’t know anything about…​" eejits I denigrated above, I came across a write-up about this 'virtualising the SD card' a very long time ago and I can’t quite remember the nitty-gritty. But the details aren’t that important. On with the show…​]

Now, what happens is that, for whatever reason, the install-location setting on your gadget gets changed from 'auto' to 'external' which means that your Samsung device will henceforth attempt to install any new apps you download to the external SD Card.

My theory is that some of the various apps which claim to allow you to move apps to your SD Card or install them on your SD Card in the first place make this change to the settings without doing any checking as to whether it is going to work or not [nor, more importantly setting it back to 'auto' when it doesn’t!]. So next time you try to install any app, the system tries to install it to the SD Card, finds it can’t and bombs out with a completely misleading 'Insufficient Storage Available' error. You can delete every app on your device and empty every cache in sight. None of it will make any difference because the problem ISN’T a lack of space but is due to the fact that Android is trying to install the app onto your SD Card, which it can’t do because of either:

  • Your particular hardware can’t install apps to external storage
  • The intricacies of Samsung’s SD Card virtualisation
  • The SD Card is not formatted correctly
  • The SD Card is already mounted as conventional storage

In order to fix this problem you’re going to have to reset the install-location flag via the command line. You can either use Android Debug Bridge [ADB] to do this via connected PC, or issue the commands directly in a Terminal Emulator app on your phone/tablet --which, being a 'jailbreaky', 'rooty' type of guy or gal you will have previously installed. Of course, if you’ve not got a Terminal Emulator installed, you’re in the Catch-22 situation I derided earlier and will have to go the ADB route. Unfortunately you’re on your own there as I’ve never used it, so I’ll show you the Terminal method. The commands are the same either way.

TL;DR;

OK. Let’s go. You’re either connected to your phone/tablet by ADB or are in a terminal window on the device itself. First of all, let’s just check the status of our current install location:

$ pm get-install-location
2[external]

As you can see, my Galaxy Tab is reporting that install-location is set to '2[external]' which is the SD Card and why I’m unable to install any apps at all, no matter how small. If your install-location is reporting '0[auto]' or '1[internal]' then on the face of it things are OK and I’m afraid your problem lies elsewhere and this page is not the answer to your prayers, after all!

Sorry!

If you did get a '2[external]' it’s time to reset that mofo. You need to be root to do this, otherwise your changes won’t stick. Terminal Emulator will give you a helpful message overlay on the keyboard when you 'su root':

samsungstorage02
$ su root
$# pm set-install-location 0 #that's a zero

Let’s see if that worked:

$# pm get-install-location
0[auto]

And there you have it. Quit your terminal app / disconnect ADB and try installing some new software. The annoying 'Insufficient Storage Available' error will be gone.

[There’s also an option pm set-install-location 1 which will always try and install on the internal memory, but '[auto]' seems to work OK for me. I’m assuming my Samsung device is smart enough to not try to install to an external SDCard if given the choice].

POSTSCRIPT

The remedy described above will work to fix problems with a device which is trying to install to an SD Card when it shouldn’t be. But what if it’s supposed to be installing to the SD Card, but it’s just not working for some reason?

A couple of things for you to consider here, which I’ll not go into any detail on, as it’s not what this post is about:

  • check the formatting of your SD Card. It will need to be formatted as ext2, ext3 or ext4 to have apps run correctly from the card.
  • Check whether the SD Card is mounted as 'conventional' storage. I’ve seen it suggested that 'unmounting' the card via Settings > Storage > Unmount USB Storage allows Android to install apps on it.
Back to Top