How to increase storage for Android Emulator? (INSTALL_FAILED_INSUFFICIENT_STORAGE)

Viewed 206254

I get this sometimes(not often) for one of my projects, couple of classes only
Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE

How do I increase emulator's storage?

22 Answers

Run AVD Manager

Select your AVD and click "Details..." button.

In my case AVD Manager sets disk size as

disk.dataPartition.size=4000M

This invalid value, disk is approx 500MB despite numbers specified.

Go to AVR's folder by path in "AVD details".

Edit it in config.ini to

disk.dataPartition.size=4000MB

and remove all .img files.

Just start emulator by command line as follow:

emulator -avd <your avd name> -partition-size 1024 -wipe-data

If you have the M1 Mac and the preview version of Android Emulator, then you'll need to go to /Applications/Android Emulator.app/Contents/MacOS/api30-gphone-arm64-v8a/config.ini (as an example) and change the disk.dataPartition.size property to your desired size.

something like this: enter image description here

The reference is in the GitHub repo.

Best regards.

this problem comes with android 1.5 .. try 2.0 or 2.1 or 2.2

I'm a beginner, but I had that problem while playing around with the "Hello Grid View". I was trying to use my own photos, which were all very large in file size.

The quick fix was to reduce the number of photos, thus reducing the size of the APK file.

But, I guess my follow up question for anybody else who hits this thread is this: How do I attach large files like JPGs and MP3s to an app and make sure they save on the SD Card so the APK remains small?

The only time I've seen this happen it was when the host filesystem was basically out of space. Do you have much free space on the filesystem where the VM's filesystem is stored?

It is defenetly not a appropriate answer, but it is a small hint.

If you want to make use of static files in your App. You should put them as resources or as assets. But, if U have memory concerns like to keep your APK small, then you need to change your App design in such a way that,

instead of putting them as resources, while running your App(after installation) you can take the files(defenately different files as user may not keep files what you need) from SD Card. For this U can use ContentResolver to take audio, Image files on user selection.

With this you can give the user another feature like he can load audio/image files to the app on his own choice.

I am using VSCode and my AVD setup is from an older Android Studio setup that I had not used for a while.

I was able to fix this issue by finding the location where the AVD Images are located and then searching for files that had the text

disk.dataPartition.size

Run a find . -name "avd*" and a grep "disk" * once you find the directory for the AVD.

Modifying the disk.dataPartition.size value in the hardware-qemu.ini file worked for me.

The problem can be solved by changing your partition size of emulator.

Go to the your \Android\Sdk\emulator path and type the following command.

emulator -avd android_emulator_name -partition-size 1500 -wipe-data

Now it will work , you have increased the size of your partition size. You can observe the change in size by using the following command before and after running the above command.

adb shell df

Try choosing project -> clean. A simple clean may fix it up.

Related