I built AOSP 8.1.0_r60
from source, and launched it as explained at: https://stackoverflow.com/revisions/48310014/9
. build/envsetup.sh
lunch aosp_x86_64-eng
emulator -show-kernel
Then, I've installed an app with adb install
and played around with it.
Now, I wanted to restore the system to the initial state, before I had installed the app.
By printing the QEMU command line options and using find
in the device, I've noticed that the app was installed inside:
/data
which seems to come from the userdata-qemu.img.qcow2
image:
-drive if=none,index=2,id=userdata,file=/path/to/aosp/8.1.0_r60/out/target/product/generic_x86_64/userdata-qemu.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576
What is the best way to reset that image to it's original state, before I had installed my app?
I even tried to do a full rebuild:
make
but the app was still present afterwards.
I have learned how to clean up /system
quickly with make snod
at: How to just build Android system image but I could not find an analogous option for the user image.