Mr.AndroidShin / Dev Tools

Debugging log · Install

INSTALL_FAILED_INSUFFICIENT_STORAGE

I tried to install a build and it failed with INSTALL_FAILED_INSUFFICIENT_STORAGE — on an emulator that, as far as I could tell, had gigabytes free. The error seems to be lying, and that's what makes it confusing. "Space" here doesn't always mean what the device's storage screen shows, and the usual cause isn't a genuinely full disk.

The short version: the installer couldn't get the room it needed, which on a dev emulator or test device is usually leftover junk, a too-small emulator image, or a stale install state — not a literally full drive. Clear app data, wipe or enlarge the emulator, or uninstall the old copy, and it installs.

The error

adb: failed to install app-debug.apk:
Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]

Why it happens even with space "free"

Installation needs working room beyond the final app size — temporary copies during install, dex optimization, and a safety margin the system insists on. On an emulator the configured storage can be small even when the host machine is huge, and failed or partial installs can leave data behind that eats the margin. So the device-level "free space" number and the space the installer can actually claim aren't the same thing, which is why it fails while the storage screen looks fine.

Fixes on an emulator

Fixes on a real device

Reset a stuck install state

When a prior install went wrong, a clean uninstall-and-reinstall clears the leftover:

adb uninstall com.example.app
adb install app-debug.apk

And restarting the adb server clears a stuck installer connection that sometimes masquerades as a storage problem:

adb kill-server
adb start-server

On an emulator, "wipe data" solves this far more often than anything clever. Reach for it before you start resizing partitions or debugging your app — the app is rarely the cause; the emulator's accumulated state usually is.

Package and file names above are examples — use your own.