Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase the storage space in Android emulator? (Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE)

Tags:

android

I am creating an Android application.

My Application has audio and png files which i have saved in res/drawable folder.

When I run the app , its giving error

Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE

and in the logcat it says -

ERROR/PackageManager(54): Couldn't copy package file to temp file.

I tried creating new avd also.But i am getting the same error.

I want all those png and audio files.

I don't want to store them in sdcard.

like image 330
user336070 Avatar asked Dec 09 '22 16:12

user336070


2 Answers

As mentioned in this thread the problem can be solved by increasing the size for your system/data partition. Just add the following parameters to your emulator command line:

-partition-size 2047

2047 is the maximum allowed partition size. Use a smaller value if you want to limit the partition size in order to save disk space.

like image 180
Stefan Endrullis Avatar answered May 31 '23 08:05

Stefan Endrullis


To increase the internal storage of the Android emulator do this: go to AVD Manager,select the Android Virtual Device you want to modify, Edit. On Hardware section check if 'Ideal size of data partition' property is present. If not click New and add it. Edit it's value to 512MB or 1024MB as you wish. (it's important to put 512MB not only 512 otherwise it's value will reset to 0). Now save the changes and launch again the app.

PS. You can also check the .android/avd/[avd_name].avd/config.ini file and check for disk.dataPartition.size=512MB or your desired value. The steps mentioned above will update the disk.dataPartition.size property in config.ini automatically. I also tried just to edit myself the config.ini but doing just that didn't work for me.

like image 21
Marginean Mihai Avatar answered May 31 '23 09:05

Marginean Mihai