34.1.1. Android images read-only
From mount
, we can see that some of the mounted images are ro
.
Basically, every image that was given to QEMU as qcow2 is writable, and that qcow2 is an overlay over the actual original image.
In order to make /system
and /vendor
writable by using qcow2 for them as well, we must use the -writable-system
option:
./run-android -- -writable-system
then:
su mount -o rw,remount /system date >/system/a
Now reboot, and relaunch with -writable-system
once again to pick up the modified qcow2 images:
./run-android -- -writable-system
and the newly created file is still there:
date >/system/a
/system
and /vendor
can be nuked quickly with:
./build-android --extra-args snod ./build-android --extra-args vnod
as mentioned at: https://stackoverflow.com/questions/29023406/how-to-just-build-android-system-image and on:
./build-android --extra-args help
Tested on: 8.1.0_r60
.