Under Windows 10, in Android Studio, I create a virtual device - Nexus 5X, with the system image of Android 6.0, x86_64, API v 23. Tried with two sets of parameters: with all defaults (RAM 1536 MB, VM heap 228 MB, Internal Storage 800 MB, SD 512 MB - below called "Nexus5Xv23small"), and with all sizes increased (RAM 3 GB, VM heap 512 MB, Internal Storage 2 GB, SD 1 GB - below called "Nexus5Xv23big"). Then I run it with the following parameters:
emulator.exe -avd Nexus5Xv23small -no-audio -no-boot-anim -writable-system
Then I run
adb root
adb remount
Then, in adb shell
, I check sizes with df
:
root@generic_x86_64:/ # df
Filesystem Size Used Free Blksize
/dev 749.2M 52.0K 749.2M 4096
/sys/fs/cgroup 749.2M 12.0K 749.2M 4096
/mnt 749.2M 0.0K 749.2M 4096
/system 1.5G 1.4G 71.3M 4096
/cache 61.0M 64.0K 60.9M 4096
/storage 749.2M 0.0K 749.2M 4096
/data 774.9M 235.5M 539.4M 4096
/mnt/runtime/default/emulated 774.9M 235.5M 539.4M 4096
/storage/emulated 774.9M 235.5M 539.4M 4096
/mnt/runtime/read/emulated 774.9M 235.5M 539.4M 4096
/mnt/runtime/write/emulated 774.9M 235.5M 539.4M 4096
/mnt/media_rw/0808-4103 510.0M 22.0K 510.0M 2048
/mnt/runtime/default/0808-4103 510.0M 22.0K 510.0M 2048
/storage/0808-4103 510.0M 22.0K 510.0M 2048
/mnt/runtime/read/0808-4103 510.0M 22.0K 510.0M 2048
/mnt/runtime/write/0808-4103 510.0M 22.0K 510.0M 2048
/system
has only 71M free left. To my surprise, "bigger" image didn't solve this problem:
root@generic_x86_64:/ # df
Filesystem Size Used Free Blksize
/dev 1.5G 52.0K 1.5G 4096
/sys/fs/cgroup 1.5G 12.0K 1.5G 4096
/mnt 1.5G 0.0K 1.5G 4096
/system 1.5G 1.4G 71.3M 4096
/cache 61.0M 64.0K 60.9M 4096
/storage 1.5G 0.0K 1.5G 4096
/mnt/runtime/default/emulated 1.9G 156.6M 1.8G 4096
/storage/emulated 1.9G 156.6M 1.8G 4096
/mnt/runtime/read/emulated 1.9G 156.6M 1.8G 4096
/mnt/runtime/write/emulated 1.9G 156.6M 1.8G 4096
/mnt/media_rw/080B-3903 1020.0M 4.0K 1020.0M 2048
/mnt/runtime/default/080B-3903 1020.0M 4.0K 1020.0M 2048
/storage/080B-3903 1020.0M 4.0K 1020.0M 2048
/mnt/runtime/read/080B-3903 1020.0M 4.0K 1020.0M 2048
/mnt/runtime/write/080B-3903 1020.0M 4.0K 1020.0M 2048
/data 1.9G 156.6M 1.8G 4096
You can see that /dev
, /mnt
, /storage
, /data
are indeed increased, but /system
remains the same.
I tried running with -partition-size
parameter, something like this:
emulator -avd Nexus5Xv23small -partition-size 2047 -no-audio -no-boot-anim -writable-system -no-snapshot-load
- but this seems to affect only /data
, /storage/emulated
and /mnt/runtime/*/emulated
.
I found an old SO post "Android emulator system partition no space from start" where one of the answers says that "Nowadays, -partition-size
changes the /system/data
partition, but not the /system
partition space" and suggests manually increasing the size of system.img
. Well, in my case I don't see neither /system/data
at my device nor system.img
in my avd (I have cache.img, encryptionkey.img, sdcard.img, userdata.img, userdata-qemu.img).
Would be grateful for any hints.