Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android 4.4 Virtual Device Internal Storage Will Not Resize

When creating a new Android 4.4 Virtual Device using the AVD Manager, I cannot get the internal storage to be anything larger than 200MB.

512MB is the internal storage size I would like to set.

I've tried:

  • Setting the internal storage of the device in the AVD Manager to 512MB.
  • In Eclipse project Debug Configurations, under the Target tab, setting Additional Emulator Command Line Options to -partition-size 512.
  • In the Eclipse Preferences, under Android, I set the Default emulator options to -partition-size 512.
  • Editing the config file for my virtual device under (User)/.android/avd/(device).avd/config.ini
    • Then setting disk.dataPartition.size to disk.dataPartition.size=512M
    • Also tried setting it to disk.dataPartition.size=512MB
    • Also tried setting it to data.dataPartition.size=512M

This happens on both ARM and Intel Atom x86 CPUs.

Now when I switch over to Android 3.0 (ARM), I can resize it simply using the AVD Manager to my hearts content. Is there an issue with Android 4.4? Is there something I missed? Or a possible work around?

like image 925
Someone13 Avatar asked Dec 14 '13 04:12

Someone13


People also ask

How can I increase internal memory of AVD?

On Android Studio Click Edit Icon to edit the AVD. Click Show Advanced settings. Change the Internal Storage, Ram, SD Card size as necessary. Click Finish.

Why the virtual device is not working in Android Studio?

If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.


1 Answers

Now that the emulator file system is ext4 I was able to re-size the userdata.img using standard Linux tools.

# Navigate to AVD cd ~/.android/avd/Nexus5 # Delete old image rm userdata-qemu.* # Re-size the image resize2fs userdata.img 512M # Start the emulator and enjoy emulator @Nexus5 

Edit I was also able to re-size userdata-qemu.img directly but I had to run e2fsck first.

 e2fsck -f userdata-qemu.img  resize2fs userdata-qemu.img 512M 
like image 137
Frohnzie Avatar answered Sep 19 '22 18:09

Frohnzie