I create Android images for our dev kit (imx8qxp) for Android versions 9-12. I create the mek_8q userdebug-eng lunch target image.
Under Android versions 9/10, I can disable verity and remount the fs to have write access to the /vendor fs. (I specifically need access to /vendor/etc sub directories). Under Android 11/12, even though I've disabled verity and performed adb remount (tried mount -o rw,remount /vendor as well), I continue to find the file system is read only: "Read-only file system")
How can I make /vendor write-able?
Here is my current mounting of /vendor:
mek_8q:/vendor/etc/bluetooth # touch foo
touch: 'foo': Read-only file system
1|mek_8q:/vendor/etc/bluetooth # mount | grep vendor
/dev/block/dm-1 on /vendor type ext4 (ro,seclabel,noatime,errors=panic,inode_readahead_blks=8)
overlay on /vendor type overlay (rw,seclabel,noatime,lowerdir=/vendor,upperdir=/mnt/scratch/overlay/vendor/upper,workdir=/mnt/scratch/overlay/vendor/work,override_creds=off)
overlay on /vendor/etc type overlay (ro,seclabel,relatime,lowerdir=/vendor/vendor_overlay_soc/imx8qxp/vendor/etc:/vendor/etc,override_creds=off)
Thanks!
I was able to unmount and remount the overlay rw by supplying work and upper directories.
I was also able to prevent the issue by removing the creation of the overlay via mod to init.rc.