System partition locked to read only in Android 10 Help, I don't know what I did but after installing a custom ROM, I noticed that my system partition cannot be mounted as read/write. 

I tried



"mount -o rw,remount /system" command on a terminal emulator, ADB shell, and TWRP terminal

The command shows no feedback showing failure (maybe I succeeded?)



Mount it using the built-in TWRP mount function.

The system check box can be checked out (it doesn't retain its check mark on reboot)



Some apps that actually works according to sources and reviews.

Some say (Failure to mount..) Some say (System mounted as rw) some doesn't have feedback.



I don't know what to do. 

I noticed this when I installed a custom ROM. I tried using another custom ROM but same thing. Also reformatting doesn't help. I don't know if this occur on the stock ROM.



For reference

Device: Xiaomi Mi A2

Android version: Android 10

Custom ROM: AICP nightly build 15.0
Android 10 prevents apps or pretty much anything from mounting system as R/W. Yes, even if you are rooted.

Top John Wu, the creator of Magisk has covered this in a series of tweets. I will link them below for your reference. Your only way of tampering your system now would be using a systemless Magisk module. You can make your own or use some other module and inject files inside its folder before rebooting to apply that module.


Just confirmed that the inability to remount system (the directory "/" in system-as-root) to rw is something new in Android Q, NOT an issue with the new system-as-root approach Magisk is using in the canary builds. Will have to investigate further to find out how to deal with it. Source: https://twitter.com/topjohnwu/status/1169720663201988611
I found out that Android 10's system images are formatted with EXT4_FEATURE_RO_COMPAT_SHARED_BLOCKS. It will deduplicate blocks in the filesystem to reduce the image size. On my Pixel XL, the partition is physically not large enough to successfully run 'e2fsck -E unshare_blocks'. Source: https://twitter.com/topjohnwu/status/1170404631865778177?lang=en
As clearly stated in the name of the feature, that EXT4 shared blocks feature is RO (read-only). The inability to disable this feature due to lack of free space in the partition (at least on my Pixel XL) makes it literally impossible to ever mount the system partition as rw. Source: https://twitter.com/topjohnwu/status/1170404633371525120
I guess Google's justification to format partitions with this feature enabled is the introduction of overlayfs to "simulate" a writable partition.
RIP to any mods or root apps that modify system. On Android 10 it seems system is either formatted as RO or using logical partitions. Source: https://twitter.com/topjohnwu/status/1170404634604658688
BTW, just found this tidbit in Android's source code. They call these kind of filesystems "ext4 dedup". Other read-only filesystems they are aware of is squashfs (widely used in extremely constrained devices) and Huawei's EROFS. Source: https://twitter.com/topjohnwu/status/1170443615077666816


So, in short, you cannot R/W the system partition anymore with Android 10. The argument is just rejected.