Development [CLOSED][RECOVERY][UNOFFICIAL] TWRP for Galaxy S22 Ultra (Exynos)

Status
Not open for further replies.
Search This thread

DrewPoss

Member
Nov 1, 2018
8
1
Hi, it may be a very dumb question, but how can I flash the kernel if the device doesn't have sd card support, and adb sideload doesn't work? i followed all the steps but really couldn't flash the kernel. Maybe the solution is so easy but I cannot really figure out how to do it.
I also try adb push to internal storage, then installed twrp and tried to flash it from there, but the file obviously doesn't show up. Any help?
seems like usb otg is the only option, but is there another solution besides that?
 

afaneh92

Account currently disabled
Jul 31, 2012
3,909
5,296
Hi, it may be a very dumb question, but how can I flash the kernel if the device doesn't have sd card support, and adb sideload doesn't work? i followed all the steps but really couldn't flash the kernel. Maybe the solution is so easy but I cannot really figure out how to do it.
I also try adb push to internal storage, then installed twrp and tried to flash it from there, but the file obviously doesn't show up. Any help?
seems like usb otg is the only option, but is there another solution besides that?
adb/mtp/usb-otg many options
 

marqwe

Member
Feb 21, 2011
16
12
Flash twrp-3.7.0_12-2_afaneh92-b0s.tar and vbmeta_disabled_R.tar FAILD with this info on display:
SW REV. CHECK FAIL(VBMETA) DEVICE: 0x6, BINARY: 0x5

I am use ROM: S908BXXS6CWF6/S908BOXM6CWF6/S908BXXS6CWF6/S908BXXS6CWF6
 

marqwe

Member
Feb 21, 2011
16
12
Flash twrp-3.7.0_12-2_afaneh92-b0s.tar and vbmeta_disabled_R.tar FAILD with this info on display:
SW REV. CHECK FAIL(VBMETA) DEVICE: 0x6, BINARY: 0x5

I am use ROM: S908BXXS6CWF6/S908BOXM6CWF6/S908BXXS6CWF6/S908BXXS6CWF6
The solution was to root through Magisk. Where Magisk would patch the AP image (which I understand also includes vbmeta). See:

I then installed a Magisk patched ROM through Odin. Subsequently, after rebooting and performing the "Factory data reset" (apparently in stock recovery), I installed via Download mode TWRP (without vbmeta_disabled_R.tar).
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    home.png
    backupname.png

    Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.

    Code:
     * Your warranty is now void.
    * I am not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or your getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this ROM
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at me for messing up your device, I will laugh at you.

    Supported Models:
    Galaxy S22 Ultra S908B

    Download & Guide:
    1. Unlock your bootloader.
    2. Downloads for S22 Ultra: b0s twrp and kernel
    3. Reboot to download mode
    4. Put the TWRP TAR for your device with Odin in the AP slot, vbmeta_disabled_R.tar in USERDATA slot and click start.
    5. Reboot to recovery via recovery key combo (Vol up + power + USB connected).
    6. Disable encryption:
    - Go to Advanced > Terminal, type: multidisabler.​
    If vendor complain about free space left on device, will attempt to resize vendor. and it ask to - Run multidisabler again!.​
    - Type: multidisabler again. will see - Finished. when done.​
    - Go back to Wipe > Format Data > type yes.​
    - Reboot to recovery.​
    7. Flash custom kernel and magisk apk in twrp.
    8. Reboot to system, Enjoy.



    Bugs:
    - Encryption not fully working.

    Thanks:
    TWRP team
    @ianmacd for multidisabler
    @Dan_FFM (David Dean) for helping with convert readonly f2fs vendor to readwrite
    Donators

    Sources:
    Kernel tree
    Device tree
    5
    I was able to create a bootable rw system (from the original ro system). The problem was that the command "cp -rp /system_root/* system-rw" is insufficient and does not transfer everything needed.

    For my progress from the post above, you need to change the last steps:

    Code:
    cd /sdcard/sunpack
    mount /system_root
    truncate -s 7800M system-rw-cpapa-mychcon.img
    toybox blkid /dev/block/dm-0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' -o
    make_f2fs -g android -O project_quota,extra_attr,inode_checksum,sb_checksum,compression,flexible_inline_xattr,verity,inode_crtime -U 26d6704a-2659-478c-805f-ec7d567357d0 -f -l system system-rw-cpapa-mychcon.img
    mkdir -p system-rw
    mount system-rw-cpapa-mychcon.img system-rw
    cp -a --preserve=a /system_root/* system-rw
    chcon u:object_r:rootfs:s0 system-rw

    I have also taken the following steps, but they do not seem to be necessary:

    Code:
    cd /system_root
    chmod 700 /sdcard/sunpack/mychcon
    find . -type d -exec /sdcard/sunpack/mychcon {} \;
    cd /sdcard/sunpack

    For the previous commands you need to create a script /sdcard/sunpack/mychcon, with the following content:

    Code:
    #!/system/bin/sh
    FILE=$1
    CON=`ls -adZ1 $FILE | cut -d' ' -f1`
    #echo "chcon $CON '/sdcard/sunpack/system-rw/$FILE'"
    #ls -adZ1 "/sdcard/sunpack/system-rw/$FILE"
    chcon $CON "/sdcard/sunpack/system-rw/$FILE"

    Final steps:
    Code:
    umount system-rw
    umount /system_root
    fsck.f2fs -f system-rw-cpapa-mychcon.img
    dd if=system-rw-cpapa-mychcon.img of=/dev/block/dm-0 bs=1M

    So far I have only successfully changed the build.prop file within Total Commander. I will see if there is any problem.
    4
    Hi,

    Have you done this procedure only for system.img or for all 4 partitions (system, vendor, odm and product)?
    Have you tried to boot rooted on these rw images with latest magisk?

    Thanks.

    First I applied TWRP according to the procedure in this forum. Part of this procedure is running script "multidisabler" (2x), which converts "vendor" to rw. Part of the procedure is also application of modified kernel with selinux in "permissive" mode.

    The script "multidisabler" was my main inspiration when converting "system" to rw. And I created the rw image "system" from it. Unfortunately, this image is much larger than the original ro "system" and it is not possible to apply it to the original /dev/block/dm-0. I was looking for a way to change the location and size of dm-X partitions - I was able to do that with the "lptools". I think that the rw image "system" doesn't do compressions unlike the ro image and that's why it's so big. It's quite lucky that after rearranging the partitions (inside "super") everything fits - there's not much extra space left.

    Unfortunately, it turned out that with rw "system" the phone wouldn't start (boot loop). I did a little research on /proc/last_kmsg (see: https://android.stackexchange.com/questions/213722/how-to-debug-boot-loop) and concluded that the problem could be that rw "system" doesn't have everything well migrated compared to ro. Command:

    Code:
    cp -rp /system_root/* system-rw

    is insufficient. That's why I replaced it:

    Code:
    cp -a --preserve=a /system_root/* system-rw

    Subsequently, I found the listings:

    Code:
    ls -laZ /system_root
    ls -laZ system-rw

    that the security context data did not transfer well. Therefore, I manually applied the command to the root of the new rw "system":

    Code:
    chcon u:object_r:rootfs:s0 system-rw

    and created the "mychcon" script with which I used "find" to correctly transfer the security context to all files.

    With the resulting rw system, the phone was already starting. Later I tried to skip the "find" start with "mychcon" and even here the start took place, but I went back to the image where I used "find" because I believe it is more faithful to the original ro.

    For a working boot all you need is only cp -a --preserve=a /system_root/* system-rw and chcon u:object_r:rootfs:s0 system-rw . I didn't try to see if everything would work after skipping chcon u:object_r:rootfs:s0 system-rw.

    It might be a good idea to make changes to "multidisabler" when converting "vendor" to rw, but so far there doesn't seem to be any problem.

    I haven't done the conversion of "odn" and "product" yet. So far I'm trying to get my bearings on a number of different partitions - for my planned modifications I'll hopefully make do with the rw "system". With the conversion of "product" to rw on the S22 Ultra there would be a problem with its magnification and it might be a problem to fit all the partitions into "super".

    Already before the transfer I had a Magisk 25.2.

    I'm not an expert - I'm trying to get my bearings so I can make some adjustments to the "system".
    2
    Thank you @afaneh92 and @marqwe
    Just made S908E system rw

    I have abandon project just beacuse of couldn't figure out issue was causing by
    Code:
    cp -rp /system_root/* system-rw

    Thanks you once again @marqwe for great sharing!

    Screenshot_20220909-231950_Settings.jpg