Android Emulator on Ubuntu

How to Resize Android 4.4 Emulator Internal Storage

Question on StackOverFlow

Problem:

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.

Solution:

  • Now that the emulator file system is ext4 I was able to re-size the userdata.img using standard Linux tools.
  • Even above suggestion can cause to android emulator hang on boot logo. The reason is that resize2fs do the changes thats are right in general but considered as broken fs by android and prevent it to mount it in rw mode, that hangs up the boot process.
  • Event e2fsck does not fix it for android and to workaround it i use tune2fs to change the way how android should continue to mount broken fs.
  1. start emulator
  2. cd ~/.android/avd/emulator_name
  3. rm userdata-qemu.*
  4. resize2fs userdata.img 1024M
  5. start than stop emulator
  6. e2fsck -f userdata-qemu.img
  7. resize2fs userdata-qemu.img 1024M
  8. tune2fs -e continue userdata-qemu.img