[Samsung Galaxy S21 Ultra] jhgiango:
I tried this, but unfortunately it didn't work for me or I may have made a mistake.

Device Info below:

S21 Ultra 5G

SM-998B

CSC: BTU

Current FW: XED

I will try to list the steps I did and hopefully you can tell me what I did wrong.

Samsung USB drivers already installed before this. Also, I used a usb c adapter w/ usb wireless mouse, just to go around, also used phone link app, just to control the phone, since touch doesn't work. Also touch works in TWRP.

Part 1 - Patching via Magisk

1. Downloaded FW from samfw .

2. Extracted zip via 7z.

3. Downloaded Magisk 27.0

4. Copied both AP file from fw package and Magisk APK file to phone storage.

5. Installed Magisk APK.

6. Patched AP file via Magisk app, by clicking Install>Select and Patch a file.

7. Once done. Copied back the patched AP file back to computer to be used later in Odin app.

Part 2 - Unlocking Bootloader (Backed up my stuff before I did this) and reapplied XED fw with patched AP file.

1. Enabled developer options.

2. Enabled OEM unlocking

3. Enabled USB debugging

4. Booted Phone to Download mode, Hold down Volume UP to proceed with Unlocking. Then it proceeded with resetting my phone to factory. By this time, I am getting a warning message that "the phone bootloader is unlock, etc.". Then it proceeded with the usual OOBE. I skipped most of them, and verified again, if OEM unlocking is still enabled and enabled back USB debugging.

5. Downloaded Odin application. Then ran it.

6. Booted phone to Download mode again by shutting it down. Then holding both volume keys and plugging the usb cable that is connected to the PC.

7. Device added to Odin. Then added BL, patched AP file, CSC and CP files.

8. I proceeded with the flashing, successful. Then just let the phone boot.

9. I reinstalled Magisk again and had to connect to wifi and playstore just to download root checker app.

10. After magisk was installed. I installed root checker, ran the checker, granted it. And it said that device has root access in green.

Part 3 - Installing TWRP

1. Booted again to Download Mode

2. Found this link on how to do it.

3. So i downloaded p3s, got it from another site, and vbmeta files.

4. Launched Odin. Unchecked Autoreboot in Odin Options tab.

5. Selected AP slot for p3s file and vbmeta to User Data slot.

6. After it is done flashing. Rebooted to TWRP.

7. Clicked on Advanced>Terminal and typed multidisabler. Then it said Finished.

8. Then I clicked back arrow. Went to Wipe>Format Data>yes. Then reboot to system. I think at this time, I skipped again the settings, and reinstalled Magisk, and checked my root access. Still OK.

Part 4 - ADB stuff

1. Downloaded platform tools for windows from this link . Unzipped it in downloads folder.

2. . Then in my pc, opened CMD and proceeded with going into the folder where I unzipped the platform tools. Looks like this.

4. Then tried to type adb.exe and then it probably installed. I am not so sure.

5. Anyways, I connected my phone while it is running One UI

6. Then I type adb devices. I can see my device but it is unauthorized.

7. So I checked Magisk, and in the SuperUser section, there was SharedUID Shell, and enabled it.

8. Then disconnected device from usb and connected again.

9. This time when I typed adb devices. I see my serial and the device word.

10. Then i typed adb root - no go. It said "adbd cannot run as root in production builds"

11. So I typed adb shell and this one appears.

p3s:/ $

12. then I typed su and it changes from $ to #.

13. I rebooted my device to TWRP

14. Typed adb devices again. It showed the serial of my device and word Recovery.

15. Then typed adb shell again. Shell was already in root so proceeded with command below.

p3s:/ # cp /vendor/firmware/y792_p3.bin /sdcard/

16. No errors.

17. Then rebooted the phone back to system. Then did all the commands on the guide, then rebooted.

View attachment 6123729

18. Unfortunately. It didn't work. Anything that I may have missed? Thanks for reading.