# Linux Kernel Module Cheat

#### 34.1.2. Android /data partition

When I install an app like F-Droid, it goes under `/data` according to:

    find / -iname '*fdroid*'

and it persists across boots.

`/data` is behind a RW LVM device:

    /dev/block/dm-0 on /data type ext4 (rw,seclabel,nosuid,nodev,noatime,errors=panic,data=ordered)

but TODO I can’t find where it comes from since I don’t have the CLI tools mentioned at:

- https://superuser.com/questions/131519/what-is-this-dm-0-device

- https://unix.stackexchange.com/questions/185057/where-does-lvm-store-its-configuration

However, by looking at:

    ./run-android -- -help

we see:

    -data <file>                   data image (default <datadir>/userdata-qemu.img

which confirms the suspicion that this data goes in `userdata-qemu.img`.

To reset images to their original state, just remove the qcow2 overlay and regenerate it: https://stackoverflow.com/questions/54446680/how-to-reset-the-userdata-image-when-building-android-aosp-and-running-it-on-the

Tested on: `8.1.0_r60`.