I want to change the data mount point into an image inside the actual data partition. My stock fstab has this:

/dev/block/bootdevice/by-name/userdata      /data        ext4   noatime,nosuid,nodev,barrier=0,noauto_da_alloc,discard  wait,check,encryptable=footer,quota

Would it work to do like this ?

/dev/block/bootdevice/by-name/userdata      /pre_data        ext4   
/pre_data/media/0/data.img                  /data            ext4      noatime,nosuid,nodev,barrier=0,noauto_da_alloc,discard  wait,check,encryptable=footer,quota
  • No it won't work that way? There are multiple factors which matter. May I ask what do you want to achieve by doing so? – Irfan Latif Jun 9 '19 at 20:42
  • My phone has two slots for each partition (boot_a and boot_b, system_a and system_b, vendor_a and vendor_b...etc) except for userdata. This feature is only used for updates, but I want to exploit it to dualboot my device, but for that to work each slot needs to have a distinct data. So I thought maybe I could mount an image as /data in one of the two slots ? – Blumer Jun 10 '19 at 22:39
  • If you want to go that far, then divide your userdata in two partitions. – Irfan Latif Jun 12 '19 at 10:51
  • I don't really want to mess up with my partition table. Some utilities (like DualBoot Patcher) make diverse mounts done from folders inside the actual data partition, but I couldn't find out what they exactly modify to do it – Blumer Jun 18 '19 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.