1

I have an android system.img I want to remove the read-only flag so that I can mount and edit it I once saw it somewhere but I can't seem to find the article. maybe it has to do with removing shared_blocks?! I can mount -o ro system.img but when I do mount -o rw I get

mount: /mnt/system: wrong fs type, bad option, bad superblock on

I tried tune2fs -O ^read-only system.img and e2fsck -fy -E unshare_blocks system.img it still doesn't mount rw

3
  • inverse of unix.stackexchange.com/questions/208851/… Commented Dec 23, 2021 at 1:44
  • Your system.img file isn't an ext4 partition. ext4 tools won't work. Use file -k system.img to investigate. While it's mounted, mount | grep system. Read man mount file. Commented Dec 23, 2021 at 6:13
  • 1
    @waltinator it is ext4 formated with EXT4_FEATURE_RO_COMPAT_SHARED_BLOCKS Commented Dec 23, 2021 at 7:37

1 Answer 1

1

It turns out resize2fs temporarily fixes the problem. I had to run resize2fs system.img size with a size to grow the partition.

Instead I did grow the partition by double its size and performed e2fsck -fy -E unshare_blocks system.img now when I mount it works fine

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.