Android emulator version 16.0 persistant / system / storage?

In the past, I was able to create an AVD with a permanent / system / storage by copying the system.img file from the base directory (for example: $ ANDROID_HOME / platform / android-10 / images / system.img) in the AVD directory (for example: ~ / .android /avd/wuntee.avd/), then remount / system / partition as rw and finally change the files to / system / partition. This will be saved in the local system.img AVD file and after the reboot, the changes will still exist. This process does not work with emulator version 16 ...

The emulator has options, in particular:

-sysdir <dir> search for system disk images in <dir> -system <file> read initial system image from <file> 

that I would prefer to write the changes back to the file, but no luck. Has anyone experienced this and has a workaround (without unyaffs'ing .img files)? Is this something that was intentionally done by Android / emulator developers?

+4
source share
1 answer

obviously rev. 16 copies the system.img file to your temporary OS folder (in my Linux window, in / tmp / android -username / emulator- *). Changes made to the / system partition are reflected on this copy instead of the one in the avds folder.

I remounted / the system, changed some files, and then before closing the emulator instance, I copied the tmp file to my avd folder. The emulator rebooted and my modifications are saved.

+5
source

Source: https://habr.com/ru/post/1388380/


All Articles