This works to install OpenGApps into the Android Emulator
Features:
- uses opengapps installer script (that we patch slightly)
- linux only because we mount the ext2/4 disk images to modify them. Could be adapted for macos if you use hdiutil instead of kpartx and have installed tools to mount ext2/4 filesystems on macos
- root permissions mandatory to mount disk images and enter chroot
- removes verity/verified-boot from the virtual device (so that the AVD can boot, otherwise it would not boot because we didn't update the dm_params)