MisterZtr / PixelOS_gsi

Script and patches for building PHH-Treble based PixelOS GSI
90 stars 11 forks source link

Why PixelOS images are RO? #10

Closed muhammadbahaa2001 closed 8 months ago

muhammadbahaa2001 commented 8 months ago

Why PixelOS images are SO not RW? I know, to reduce it's size but, is not there any way to make it RW? I like to modify system freely.

SowTag commented 8 months ago

Images are RO due to a filesystem-level feature called Block Sharing. This can be disabled using e2fsck in UNIX-based systems. That is, Linux, MacOS and Windows on WSL.

To convert an image to RW:

e2fsck -yf image.img resize2fs image.img 7500M e2fsck -yf -E unshare_blocks image.img

And done. You should be able to mount the image.

If you mean live RW permissions as in the old days of Android when you could just edit files from your /system partition, I'd strongly discourage doing so. I don't think it's even possible in modern Android versions.

If you want to edit files do so systemlessly using Magisk or KernelSU.