lebigmac1 / OFFICIAL-SYSTEM-RW-SUPER-RW-v1.41-SAMSUNG-GALAXY-S23-ULTRA-by-lebigmac

Official SYSTEM-RW for Samsung Galaxy S23 Ultra by lebigmac
7 stars 0 forks source link

no rw after flashing super_patched.bin #1

Open r00tboi opened 1 year ago

r00tboi commented 1 year ago

After running sysrw_1.41 and flashing the created super_patched.bin file via ODIN, /system is still RO /dev/block/dm-4 on / type ext4 (ro,seclabel,relatime,errors=remount-ro,i_version)

  1. Flash stock firmware
  2. Root w/ magisk
  3. Run sysrw_1.41
  4. Rename output file super_patched.bin into super.img
  5. Compress super.img to .tar
  6. Flash ONLY new super.img.tar file
lebigmac1 commented 1 year ago

Hi. Thanks for trying my program. How did you find out about it? And thanks for your feedback. What device are you using? Were there any errors in the log? I can see that my program successfully converted your erofs sub-partition to ext4 file system. Did you try remounting it as read/write-able yet?

mount -o remount,rw /

r00tboi commented 1 year ago

Hi, thanks for your answer! I found an old thread on XDA after googling the ro problem for days. I use a Samsung Galaxy Tab Active 3 and there weren't any errors in the log. It only said I need to flash the file manually but no error. I did try to remount as rw but it didn't work and that's what makes me wonder. If I put the generated super_patched.bin file into the AP archive and then flash it, i lose root but mount cmnd shows: /dev/block/dm-4 on / type ext4 (ro,seclabel,relatime,i_version) So I assume it'd be theoretically possible to remount rw at this point, but I can't because I lost root. The second I gain root it shows: /dev/block/dm-4 on / type ext4 (ro,seclabel,relatime,errors=remount-ro,i_version)

lebigmac1 commented 1 year ago

Hi. If you want you can send me your logs from /data/local/tmp and I will take a quick look. Samsung Galaxy Tab Active 3 ? What's that? I couldn't find that device online...

If your system sub-partition has been successfully converted from erofs to ext4 by my script, then there should be no more read-only restriction on that particular sub-partition. Was it EROFS to begin with? What Android version are you using?

The only thing that can prevent an EXT4 file system sub-partition from being remounted as rw is either some overlay type of restriction or the shared_blocks read-only feature. You can rule that out by running tune2fs -l /dev/block/dm-4

Maybe something in Android is preventing you from remounting as rw. Try to remount /system_root as rw in custom recovery to confirm that it's actually RW capable :D

You mean this could be the culprit? errors=remount-ro ? I don't think so. This should only remount stuff as read-only if you trigger the panic mode :D I'd still get rid of that too if only I knew where that one is hidden... Maybe in the fstab? :D

r00tboi commented 1 year ago

Hi. Logs are attached, also tune2fs dump. Device: https://www.samsung.com/levant/tablets/galaxy-tab-a/galaxy-tab-active3-8-inch-black-64gb-lte-sm-t575nzkamid/

You're right, the tune2fs output doesn't show the shared_blocks read-only feature: Filesystem features: ext_attr dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize

The system sub-partition is ext4 by default and the device is running on Android 13. For some reason sysrw detects it as Android 14. As far as I know there's no custom recovery available for the device, so unfortunately I can't try to remount /system_root :/

Any ideas what could prevent the filesystem from remounting as rw other than the unshared_blocks feature?

I also found the fstab file, the path depends on the ROM: Do you have any expirience with modifying fstab?

Android fstab file.

The filesystem that contains the filesystem checker binary (typically /system) cannot specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK system /system ext4 ro,barrier=1 wait,avb=vbmeta,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey vendor /vendor ext4 ro,barrier=1 wait,avb,logical,first_stage_mount product /product ext4 ro,errors=panic wait,avb,logical,first_stage_mount odm /odm ext4 ro,errors=panic wait,avb,logical,first_stage_mount /dev/block/by-name/prism /prism ext4 ro,barrier=1 nofail,avb,first_stage_mount /dev/block/by-name/optics /optics ext4 ro,barrier=1 nofail,avb,first_stage_mount /dev/block/by-name/metadata /metadata ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic,sync wait,first_stage_mount,formattable,check /dev/block/by-name/cache /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check /dev/block/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,usrquota,grpquota,fsync_mode=nobarrier,reserve_root=32768,resgid=5678 latemount,wait,check,quota,reservedsize=128M,checkpoint=fs,fileencryption=ice /dev/block/by-name/efs /mnt/vendor/efs ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check /dev/block/by-name/cpefs /mnt/vendor/cpefs ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,nofail /dev/block/by-name/misc /misc emmc defaults defaults,first_stage_mount VOLD:fstab.exynos9810 /dev/block/platform/11120000.ufs/by-name/HIDDEN /preload ext4 defaults voldmanaged=preload:auto /devices/platform/11500000.dwmmc2/mmc_host* auto vfat defaults voldmanaged=sdcard:auto /devices/platform/10c00000.usb/10c00000.dwc3* auto auto defaults voldmanaged=usb:auto Samsung ODE /dev/block/platform/11120000.ufs/by-name/keydata /keydata ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,nofail,fileencryption=ice /dev/block/platform/11120000.ufs/by-name/keyrefuge /keyrefuge ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,nofail,fileencryption=ice
r00tboi commented 1 year ago

Of course i forgot to attach the logs ^^ lpdump.txt lpmake_args.txt sysrw_log.txt tune2fs_log.txt

lebigmac1 commented 1 year ago

Hi thanks for your log files. Also according to your fstab you probably only had the shared_blocks read-only feature to begin with. No EROFS or F2FS file systems in your super.img from what I can tell. Okay try this:

open /data/local/tmp/sysrw_1.41/options/config.ini with notepad and change the exclude value to exclude=

Now save file and run script again. And flash it again to your super partition.

After that please show me the sysrw_log again thanks.

You must know that in my latest sysrw v1.41 release, I optimized the config.ini for the Samsung Galaxy S23 Ultra users. Therefore you might get some unexpected results on other devices :dagger: Don't worry in next version which is due soon, I will make the exclude value empty again so it should make RW all sub-partitions of super.img ;)

r00tboi commented 1 year ago

Hi, thanks for your message. I changed the exclude value but unfortunatelly it didn't help. I couldn't flash the new file. It either showed me a VBmeta mismatch or when I modified vbmeta.img + vbmeta_samsung.img it got me a bootloop. Log are attached. Is there a way to send you an e-mail? sysrw_log.txt

lebigmac1 commented 1 year ago

Hi thanks for the log. I can't see any errors in your log. Your problem is that you are stuck in bootloop after flashing super_patched.bin ? Your vbmeta seems to be patched already according to the log:

Successfully disabled verification. Reboot the device for changes to take effect. Successfully disabled verity. Reboot the device for changes to take effect.

If you still get bootloop after this then formatting /data could help break out of the bootloop? You should make a backup of all your important data first though. Good luck!

my email is lebigmac1@protonmail.com