How to Resize Android 4.4 Emulator Internal Storage
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.
- start emulator
- cd ~/.android/avd/emulator_name
- rm userdata-qemu.*
- resize2fs userdata.img 1024M
- start than stop emulator
- e2fsck -f userdata-qemu.img
- resize2fs userdata-qemu.img 1024M
- tune2fs -e continue userdata-qemu.img