# Linux Kernel Module Cheat

#### 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

- https://android.stackexchange.com/questions/110927/how-to-mount-system-rewritable-or-read-only-rw-ro/207200#207200

- https://stackoverflow.com/questions/13089694/adb-remount-permission-denied-but-able-to-access-super-user-in-shell-android/43163693#43163693

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`.