4

Google has recently changed the way to mount system and introduced Dynamic Partitions. Previously in a rooted adb shell, I used to run mount -o rw,remount /system to mount system in read-write mode. They introduced a new super.img that contains system, vendor, odm, product, etc.

I have a simple question: How can I mount a system from a rooted adb shell in recovery?

After reading the Implementing Dynamic Partitions guide it looks like I have to

  1. create system partition dynamically
  2. need an entry somewhere where mount point exists
  3. mount the system after the above steps.

I don't know how I can do the first step. As the information on the mounting location is inside super.img meta-data and I am unable to read it.

Anyone can put some more light here?

4
  • 2
    android.stackexchange.com/q/220892
    – alecxs
    Mar 11, 2020 at 18:49
  • @alecxs any link to modify system system-less way but without using Magisk? I just want to add chmod 777 /dev/diag in init.rc? I read Magisk code but it uses prebuilt-binary so not able to figure out how exactly it patches init. Mar 12, 2020 at 5:51
  • Moreover, I have tried to unpack ramdisk and modify recovery init.rc but that didn't work. boot.img doesn't have init.rc strange! Mar 12, 2020 at 5:52
  • I mean on a non-system-as-root device. Seeing the same content as android.stackexchange.com/questions/221180/… here.. Mar 12, 2020 at 6:07

1 Answer 1

2

On devices with enough disk space one can convert ext4-dedup dynamic partition into r/w system partition.

This can be done

  1. offline on linux computer using (official) Dynamic Partition Tools lpunpack and lpmake for which precompiled binaries are available from (unofficial) OTA Tools
  2. offline on device from TWRP recovery with 3rd party tool super image dumper for which precompiled binaries can be downloaded from XDA super image tools
  3. online on device via 3rd party bash script SystemRW running entirely from /data/local/tmp

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .