How To Guide How to Root S23 (S91*B/N/0)

Search This thread

BlackMesa123

Recognized Contributor
Aug 29, 2015
1,921
3,635
20
Adrano
Samsung Galaxy S5
Samsung Galaxy J5
Greetings to all and in particular to Dr. Ketan.
I just finished rooting my S23 Ultra 1TB without the slightest problem, so - even if there is no need - I confirm once again the absolute goodness of what our excellent Doctor has produced.
Doctor to whom I address a humble request: I just tried to flash the "Remove Boot Warning" of the S22 Ultra, but it doesn't work: would you be kind enough to compile the same file for the S23 Ultra too?
Thanks in advance and a huge thank you for your precious work!

Unfortunately that's not possible due to how Qcom bootloader binaries are packed compared to Exynos ones.
 
  • Like
Reactions: dr.ketan

pRo_lama

Senior Member
May 10, 2008
1,405
344
Prague
2

Try patching with Magisk with apk posted in post #79
If that doesn't work then let us know.

So as I understand it correctly. All I have to do is install the application from post 79 on my mobile and insert the correct file (from the firmware) into it and it will create a patched file for me. Then I unlock the bootloader, restart the phone in Download mode, flash the patched file via ODIN, reboot into recovery and do a factory reset there. Is that right?
 

dr.ketan

Recognized Developer / Recognized Contributor
So as I understand it correctly. All I have to do is install the application from post 79 on my mobile and insert the correct file (from the firmware) into it and it will create a patched file for me. Then I unlock the bootloader, restart the phone in Download mode, flash the patched file via ODIN, reboot into recovery and do a factory reset there. Is that right?
True. More detailed guide here.
 
  • Like
Reactions: pRo_lama

czipis

New member
Feb 7, 2023
4
2
So as I understand it correctly. All I have to do is install the application from post 79 on my mobile and insert the correct file (from the firmware) into it and it will create a patched file for me. Then I unlock the bootloader, restart the phone in Download mode, flash the patched file via ODIN, reboot into recovery and do a factory reset there. Is that right?

correct.
* unlock bootloader (it will factory reset the phone)
* download the firmware package, unzip it and copy AP_S916BXXU1AWA6....tar.md5 to the phone (916B for S23+, S918B for S32Ultra)
* use the patched magisk apk and modify the tar file in the phone
* download the modified file back to computer
* boot phone into download mode and flash it with odin (AP part)
(I didn't need to factory reset it after all, it was factory reset ater the flashing)
 
  • Like
Reactions: pRo_lama

dodo9123

Member
Mar 26, 2017
10
0
How to Root S918B (S23 Ultra)

Currenltly this project is started as R&D to root S23 Ultra as casual method is not working, Now issue has been fixed and this R&D project will turn down to How to Root guide once new Magisk will be available with S23 support. Meanwhile use below method to root S23U
Curently this method will provide patched files (PreRooted) to root S23U




THIS WIIL VOID WARRANTY



How to root S23 U (S918B)

- You must have S918B with S918BXXU1AWA6 firmware Installed.
- Unlock Bootloader
- Reboot to Download mode
- Flash Root_magisk_25_2_S918*tar.md5 file with Odin for AP slot
- Reboot to Recovery
- Factory reset
- Reboot device to System and Install Magisk apk

In case device bootloops, you can flash Restore file
- Reboot to download mode
- Flash S918B_AP_Stock.tar.md5 with AP slot of Odin
Reboot to Recovery and wipe data

Reboot to System

Download :

ROOT Files

UnRoot Files/Restore



Update : Issue has been fixed and pull request accepted for changes to magisk by @BlackMesa123 app to support S23 devices. You can try app posted here

Credit : topjohnwu


View attachment 5827727
Hello,
when available for small Galaxy S23?
When TWRP available for S23.
On which this thing depend ?
 

dodo9123

Member
Mar 26, 2017
10
0
It works on S916B (23+) so it should work also on "small" S23 (S911B)
Okay, but somebody know, how long it could take to develop TWRP for S23? I prefer to put magisk trought TWRP, than patch Stock files...
I mean 1 week or half od year to develop TWRP? I know that correct date now noobody knows.
 

ounerkouks

Senior Member
Oct 21, 2013
262
33
Hello everyone

I want to test but I can't find the file anymore Root_magisk_25_2_S918 * tar.md5

can you also put the twrp which seems to work? As long as I lose all my data, I might as well put it right away :)

a big thank you to all of you, I can't wait to find viper4android :)
 

BlackMesa123

Recognized Contributor
Aug 29, 2015
1,921
3,635
20
Adrano
Samsung Galaxy S5
Samsung Galaxy J5
Okay, but somebody know, how long it could take to develop TWRP for S23? I prefer to put magisk trought TWRP, than patch Stock files...
I mean 1 week or half od year to develop TWRP? I know that correct date now noobody knows.

Creating a device tree shouldn't take much, expecially since this device still has the legacy recovery partition scheme due to missing seamless updates feature. But we must wait for Samsung to release the kernel source code since stock prebuilt kernel will probably give some issue due to the security drivers implemented on purpose by Samsung
 
  • Like
Reactions: dodo9123

dr.ketan

Recognized Developer / Recognized Contributor
Hello everyone

I want to test but I can't find the file anymore Root_magisk_25_2_S918 * tar.md5

can you also put the twrp which seems to work? As long as I lose all my data, I might as well put it right away :)

a big thank you to all of you, I can't wait to find viper4android :)
Download root files (link in op) extract and flash *.tar.md5 for AP slot
TWRP as of now won't work properly on stock rom, it needs modified ROM, which is under internal testing
 

BlackMesa123

Recognized Contributor
Aug 29, 2015
1,921
3,635
20
Adrano
Samsung Galaxy S5
Samsung Galaxy J5
No issue but twrp can't mount data before decryption. For that we needs vendor rw or pre-built encryption removed ro vendor
So no meaning of twrp that can only use to backup some system partition on USB storage just
Can't you just add decrypt support in the device tree itself? I did that on A52s even though it has ext4 vendor and it works great. The big deal is decrypt won't work on OneUI if lockscreen protection is set in the OS because Samsung is still using Android 11< code due to a feature called Knox SDP. I still haven't figured out how to fix this mess but the only way seems to add support for Samsung's devices with SDP in TWRP's vold
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    OP updated for How to Root S23 (SM-S91**) (except devices that doesn't support unlocking bootloader like S91*U)

    Also no more pre patched files will be provided so moving this thread to "How to Guide" section.
    2
    in most apps, usually you can choose to toggle on/off for each notification category, but not in the System UI app
    you can't toggle them off because the components are disabled (only Screenshot can be toggled off/on as you wish)
    thanks
    That's same since oneui 5.0
    It requires patching core app, instead easiest way is to install NCleaner from play store, remove all unwanted notifications and then Uninstall NCleaner
    1
    What is the background?
    Could the use of a stock AP tar file lead to a brick or would there just be no root available?
    If on rooted device, It will remove root. Just needs to factory reset after stock AP.
    1
    Hello ,
    I'm sorry, but I don't understand when you tell us to download Magisk and install it. There are 2 files : release and debug. How do we do it ? one first and the other one later ? Thank you for your answer.
    You can use any one
    1
    Would anyone know how to update rom and retain root? TIA
    Already mentioned in OP under "Upgrading the OS"
  • 31
    How to Root Samsung S23 (SM-S91*B/N/0)



    WARNING!


    Before you root your device you must be aware that

    • This will void warranty.
    • As of now you will lose Samsung Pay and Samsung Pass forever if you root once, even unrooting won't help.
    • There are many features stop working when you unlock bootloader other than S pay/Pass like Samsung Health, Secure Folder, Galaxy Watch pairing issue, Issue connecting old gear watch (S3 or earlier), Google Pay etc but some ROMs are patched for all these mentioned features, you can use custom ROM or patch it yourself for stock ROM. Still you may trouble using some bank apps and these may fixed by adding these apps to Magisk Hide
    • There may be some knox features there which you may not able to use but I can't list those as I never used. Just Google It
    • Patched featurs are working today when writing this, No idea if it may stop working next moment/tomorrow or later
    • Also to note, once you root, you can't go back to "pre-rooted" state completely. It is one way!
    • OTA won't work once you root device.
    • ROOT with caution.
    • You can unroot & Relock bootloader after flashing stock firmware, but still your warranty flag remain 0x1 and most of countries it still voids warranty. Also after unrooting & relocking bootloader, some knox features never work again.

    How to Unlock Bootloader

    Follow below four steps to ulock the bootloader

    1.Enable Developer Option
    • Open the Settings app on your Galaxy device.
    • Choose About > Software Information.
    • Now tap on Build Number 7 times to enable the developer option.
    • You’ll get a message “You’re now a developer.”
    • Now Developer option has been enabled.
    2: Enable OEM Unlock
    • Go to the Settings app again on your device.
    • Navigate to the Developer option.
    • Enable the toggle next to OEM Unlocking.
    • Tap YES to turn on the confirmation dialog box.
    3: Boot Your device to Download Mode
    • While device is booted → Connect device to PC → Select to Restart → As soon as device screen turns off, Press and hold Volume Up + Volume Down simultaneously OR In case device is powered off Press and hold Volume Up + Volume Down simultaneously and connect your device to the PC via a USB Cable.
    • You can see the warning message on your device and release the pressed keys.
    • Finally, press the Volume Up key once, and you will be booted into Download Mode.
    4: Unlock Bootloader
    • Once device booted into Download Mode, you will see option to long press Volume up to unlock bootloader,Now, press and hold the Volume Up key for a few seconds., Here, you’ll get a confirmation whether you are sure to proceed.
    • Use the Volume Up button to reply to the confirmation.
    • This will erase all the data on your device and unlock the bootloader.
    • Once completed, your device will automatically boot up to the OS.

    Now you have successfully unlocked the bootloader


    How to root S23


    Instructions for stock non rooted ROM​

    • Use either samfirm.js, Frija, or Samloader to download the latest firmware zip of your device directly from Samsung servers.
    • Unzip the firmware and copy the AP tar file to your device. It is normally named as AP_[device_model_sw_ver].tar.md5
    • Install Magisk apk ( IMPORTANT : Currently stable Magisk doesn't support S23 so use from here)
    • Press the Install button in the Magisk card
    • Choose “Select and Patch a File” in method, and select the AP tar file
    • When done, copy patched file to PC
    • Reboot to download mode. Open Odin on your PC, and flash magisk_patched.tar as AP, together with BL, CP, and CSC (NOT HOME_CSC because we want to wipe data) from the original firmware.
    • Your device should reboot automatically once Odin finished flashing. Agree to do a factory reset if asked.
    • Install the Magisk app you’ve already downloaded above and launch the app. It should show a dialog asking for additional setup.
    • Let the app do its job and automatically reboot the device. Voila!

    Upgrading the OS​

    Once you have rooted your Samsung device, you can no longer upgrade your Android OS through OTA. To upgrade your device’s OS, you have to manually download the new firmware zip file and go through the same AP patching process written in the previous section. The only difference here is in the Odin flashing step: do NOT use the CSC tar, but instead use the HOME_CSC tar as we are performing an upgrade, not the initial install.

    Important Notes​

    • Never, ever try to restore either boot, recovery, or vbmeta partitions back to stock! You can brick your device by doing so, and the only way to recover from this is to do a full Odin restore with data wipe.
    • To upgrade your device with a new firmware, NEVER directly use the stock AP tar file with reasons mentioned above. Always patch AP in the Magisk app and use that instead.
    • Never just flash only AP, or else Odin may shrink your /data filesystem size. Flash AP + BL + CP + HOME_CSC when upgrading.

    PS : It is strongly recommended to make EFS backup once you root device and save to safer place like on cloud or PC

    For TWRP
    : Read here

    Credit : topjohnwu Guide part taken from Origin guide here


    S23U_root.jpg
    12
    For those interested I've made a pull request that has been approved (not pushed to the master branch tho) to add support for Samsung devices that shipped/will ship with Android 13 (like the S23 family) in the Magisk repository (https://github.com/topjohnwu/Magisk/pull/6586). You can find a test apk in the attachments to test yourself whether or not you can now patch stock firmware tar packages to install Magisk.
    9
    Glad to share, Internal testing for TWRP started now!
    Big thanks to @afaneh92



    S23_TWRP.jpg
    6
    TWRP seems working fine with Test version of DrKetanROM


    4
    This one gave me the "Magisk needs additional setup" prompt. After accepting + reboot, Manager detects magisk correctly and root is functional. Great work!
    Would you be able to upload a release kernel too? Thanks so much!