HuskyDG / magic_overlayfs

Make system partition become read-write (it is also possible without Magisk)
779 stars 197 forks source link

Possibility of missing 2GB of internal storage space after failed installation attempt of magic_overlayfs module #70

Open rvf16g opened 6 months ago

rvf16g commented 6 months ago

Hello

Thank you for working on this project and providing us means to gain better control of our devices.

I have the following system: Samsung Galaxy A54 5G Android 14 Samsung firmware A546BXXU7BXD8 2024-04-15 Magisk 27.0 rooted

Installed magic_overlayfs 3.2.2 module via magisk with the following error: ! Setup ext4 image failed, abort ! Installation failed

Prior to rebooting I disabled the module with the slider and uninstalled it. Rebooted device with no visible problem. The /data/adb/overlay file is gone but I think I am missing the 2GB of the ext4 partition. Is this possible? If so how can I debug this?

Thank you Regards

rvf16g commented 5 months ago

This was obviously in my imagination.

As seen in magisk-overlayfs-release.zip/customize.sh, if the module fails to install it automatically removes the overlay ext4 file system file /data/adb/overlay (2GB).

In regards to the module installation error, following a thread on XDA forums, I removed the ext4 fs test:

  1. backed up my system in case of boot loop
  2. unzipped magisk-overlayfs-release.zip
  3. edited customize.sh and disabled the test by removing the 2 instances of the following string: || ! test_mount_image
  4. re-zipped the module tree
  5. installed module without any error
  6. enabled persistent rw in file /data/adb/modules(_update)/magisk_overlayfs/mode.sh export OVERLAY_MODE=1
  7. rebooted and I had rw access to the system

Removing the execution of the test function is obviously not a good idea and we need to debug this.