[Magisk] Root for the Galaxy S10 Series

Search This thread

didopicha

Senior Member
Aug 8, 2006
53
8
Varna
I also tried rooting my GM-973F with Android 10 using this method - https://topjohnwu.github.io/Magisk/install.html#samsung-system-as-root - and even though I see there are changes in the patched file when I installed it there was no Magisk Manager and I can't install the Magisk zip via recovery because I don't have TWRP yet (I bought the phone a couple of days ago).

Has someone else tried rooting by patching the OneUI 2.0 files?
 

veryape

Member
Feb 1, 2017
18
1
Pax Julia
hello, i was waiting for the 7 days thing for start rooting new s10e. the thing is that i can not get the phone into download mode. the phone came with android 9, and i install the android 10. any thougts on it??? some help!
;P
 

gaglax

Member
Jan 22, 2011
45
4
I am on msgisk rooted and patched Android 9 ASF3 based on the guide jn this thread.
Can somebody list the steps to flash Android 10 magisk root?

Thanks
 
Last edited:

bruram

Member
May 18, 2008
36
4
I am on msgisk rooted and patched Android 9 ASF3 based on the guide jn this thread.
Can somebody list the steps to flash Android 10 magisk root?

Thanks

I decided to start from scratch with a stock Android 10 (downloaded with Frijia) and used the same guide of this thread without problems.
I used Odin3 v3.13.1_3B_PatcheD, Magisk Manager Canary, and flashing Ap Patched, BL, CP, CSC.
All transferred file via adb and verified with 7zip
At the end a new installation of Magisk manager.

Zero problem, other than bluetooth connections
 
  • Like
Reactions: gaglax

jelbo

Senior Member
Jun 20, 2009
642
205
tinyurl.com
Can people with experience with Magisk on S10 tell me how much of a burden the Samsung flashing process is? I can follow the steps, but I'm a bit afraid of all the hurdles you need to go through and the bricking risks.
 
  • Like
Reactions: itzzzmeee

cameronkelley28

Senior Member
Dec 1, 2014
160
96
Samsung Galaxy S10
WilI this method work on the Sm-G975u? Has anyone tried it
The bootloader on the North America snapdragon variants (SM-G973U/W) are not unlockable. This is only for the exynos and the Hong Kong snapdragon variant (SM-G9730)
Can people with experience with Magisk on S10 tell me how much of a burden the Samsung flashing process is? I can follow the steps, but I'm a bit afraid of all the hurdles you need to go through and the bricking risks.
It's definitely a much more involved process than any other phone I've ever rooted. If you want to root yours, I suggest reading the guide thoroughly multiple times as well as reading through this thread to see the issues and solutions others have already dealt with.

There is little to no risk of bricking as you should always be able to get back into download mode, but plan on losing everything on your phone until you're completely finished rooting and everything is working properly.

When I first got mine, it took me about 6 hours and 4 times re-flashing stock through Odin before I finally got it and I'm very experienced with Android and rooting. The process and instructions have definitely improved, but it's still a bit painful the first time. Once you get it rooted though and you understand the process, things such as updating while keeping root are pretty straightforward.

The biggest thing I would say from my own experience is to use a high quality USB cable and verify the firmware files at each step of the process. Files can get corrupted during transfer and banging your head against a wall trying to flash a file you didn't know got currupted is frustrating and exhausting.

In case it helps once you get to the AP patching part of the guide, here's my process for patching the AP file:
1. Get SHA1 checksum for newly downloaded AP file on your computer (I use 7-zip)
2. Transfer the AP file to your phone using ADB push (you can transfer through any means but ADB push is much more reliable to avoid corruption)
3. Get SHA1 checksum for AP file on phone and ensure it matches the checksum from your computer (I use solid explorer)
4. Patch the AP file with Magisk manager
5. Get the SHA1 checksum for the new magisk_patched.tar file (again, I use solid explorer)
6. Transfer to PC using ADB pull (as above, you can use any means to transfer but ADB is more reliable)
7. Get SHA1 checksum of magisk_patched.tar on PC and ensure it matches the checksum from the phone (again, I use 7-zip)
8. Follow the rest of the flashing process
 

jelbo

Senior Member
Jun 20, 2009
642
205
tinyurl.com
It's definitely a much more involved process than any other phone I've ever rooted. If you want to root yours, I suggest reading the guide thoroughly multiple times as well as reading through this thread to see the issues and solutions others have already dealt with.

There is little to no risk of bricking as you should always be able to get back into download mode, but plan on losing everything on your phone until you're completely finished rooting and everything is working properly.

When I first got mine, it took me about 6 hours and 4 times re-flashing stock through Odin before I finally got it and I'm very experienced with Android and rooting. The process and instructions have definitely improved, but it's still a bit painful the first time. Once you get it rooted though and you understand the process, things such as updating while keeping root are pretty straightforward.

The biggest thing I would say from my own experience is to use a high quality USB cable and verify the firmware files at each step of the process. Files can get corrupted during transfer and banging your head against a wall trying to flash a file you didn't know got currupted is frustrating and exhausting.

In case it helps once you get to the AP patching part of the guide, here's my process for patching the AP file:
1. Get SHA1 checksum for newly downloaded AP file on your computer (I use 7-zip)
2. Transfer the AP file to your phone using ADB push (you can transfer through any means but ADB push is much more reliable to avoid corruption)
3. Get SHA1 checksum for AP file on phone and ensure it matches the checksum from your computer (I use solid explorer)
4. Patch the AP file with Magisk manager
5. Get the SHA1 checksum for the new magisk_patched.tar file (again, I use solid explorer)
6. Transfer to PC using ADB pull (as above, you can use any means to transfer but ADB is more reliable)
7. Get SHA1 checksum of magisk_patched.tar on PC and ensure it matches the checksum from the phone (again, I use 7-zip)
8. Follow the rest of the flashing process
Great info, thanks a lot for taking the time to share. I still have a few basic questions.

  1. According to the instructions, '(OEM Recovery Key Combo) → (Splash screen) → (Release all buttons) → (System with Magisk)'. Does this mean I need to do this to boot the S10 with Magisk?
  2. If I'm following the Magisk steps, can or should I so anything with @ianmacd's multidisabler?
 

cameronkelley28

Senior Member
Dec 1, 2014
160
96
Samsung Galaxy S10
Great info, thanks a lot for taking the time to share. I still have a few basic questions.

  1. According to the instructions, '(OEM Recovery Key Combo) → (Splash screen) → (Release all buttons) → (System with Magisk)'. Does this mean I need to do this to boot the S10 with Magisk?
  2. If I'm following the Magisk steps, can or should I so anything with @ianmacd's multidisabler?

1. You will need to do the key combo each time you reboot to keep root as Magisk resides in recovery so it will not be loaded unless the system is booted to recovery. There are a few other options though. One is to use an app that can reboot straight to recovery. Magisk manager has a reboot to recovery option in the three dot menu on the modules page. If you have Xposed, you can use Firefds to customize the power menu and replace reboot with a reboot to recovery button. If you are on One UI 2.0 (Android 10), I don't believe Firefds is working yet.

Another thing to note on this, bluetooth pairings will not persist after reboots with Magisk unless you install the libsecure_storage Magisk module.

2. Multidisabler is only necessary if you will be using TWRP. On that note, you should decide at the beginning if you want to use TWRP or not because adding TWRP into the mix requires a data wipe the first time. It adds another layer of complexity and will most likely cause you some more confusion and headache so be aware of that. Adding TWRP into the mix probably doubled my first setup time due to the lack of good information at the time but there is a lot more info out there now.
 
  • Like
Reactions: gitlygit1 and jelbo

jelbo

Senior Member
Jun 20, 2009
642
205
tinyurl.com
1. You will need to do the key combo each time you reboot to keep root as Magisk resides in recovery so it will not be loaded unless the system is booted to recovery. There are a few other options though. One is to use an app that can reboot straight to recovery. Magisk manager has a reboot to recovery option in the three dot menu on the modules page. If you have Xposed, you can use Firefds to customize the power menu and replace reboot with a reboot to recovery button. If you are on One UI 2.0 (Android 10), I don't believe Firefds is working yet.

Another thing to note on this, bluetooth pairings will not persist after reboots with Magisk unless you install the libsecure_storage Magisk module.

2. Multidisabler is only necessary if you will be using TWRP. On that note, you should decide at the beginning if you want to use TWRP or not because adding TWRP into the mix requires a data wipe the first time. It adds another layer of complexity and will most likely cause you some more confusion and headache so be aware of that. Adding TWRP into the mix probably doubled my first setup time due to the lack of good information at the time but there is a lot more info out there now.
Thanks. I think I'll go down the TWRP route, maybe after having just the Magisk scenario clear. I can't really live without TWRP backups and also I can use TWRP to recover from Magisk fu*kups using Magisk Manager for Recovery Mode (mm). The reason I want to root is actually my current stock setup being messed up after the update to 10, freezing all the time.

It's going to be interesting to learn how both Magisk and TWRP can live alongside in the recovery partition... :cowboy:
 

cameronkelley28

Senior Member
Dec 1, 2014
160
96
Samsung Galaxy S10
Thanks. I think I'll go down the TWRP route, maybe after having just the Magisk scenario clear. I can't really live without TWRP backups and also I can use TWRP to recover from Magisk fu*kups using Magisk Manager for Recovery Mode (mm). The reason I want to root is actually my current stock setup being messed up after the update to 10, freezing all the time.

It's going to be interesting to learn how both Magisk and TWRP can live alongside in the recovery partition... :cowboy:

Those are the exact same reasons I went the TWRP route. Definitely read all the documentation multiple times but here's a basic rundown of the steps for TWRP. Keep in mind what I said before about checksumming every file before and after transferring.

1. Transfer AP and TWRP img file to phone (ensure TWRP kernel base matches firmware version eg. latest TWRP v3.3.1-100 is based on BSKO so that should only be flashed with BSKO firmware)
2. Patch both files with Magisk
3. Transfer back to PC
4. Rename magisk_patched.img (TWRP) to recovery.img
5. Open magisk_patched.tar in 7-zip
6. Drag and drop the TWRP recovery.img that you renamed into the 7-zip window to overwrite the stock recovery.img in the AP tar file
7. Open Odin and uncheck the auto-reboot setting
8. Flash CSC, CP, BL, and patched AP all together
9. Once flash is successful, boot into TWRP by pressing and holding power+vol up to get out of download mode then as soon as the screen turns black, hold power+vol up+bixby and keep holding them until you're booted into TWRP
10. Flash multidisabler (per the multidisabler post, you can rename it to add _btfix to the end to fix bluetooth pairings without needing the Magisk module)
11. Factory reset in TWRP to wipe data which will finalize removing FBE (encrypted /data)
12. Reboot to recovery using the option in TWRP and just let it boot up

Keep in mind that's a very rough overview and there's a chance I misspoke about something.
 

Harvie Almighty

Senior Member
Jan 18, 2017
56
3
Those are the exact same reasons I went the TWRP route. Definitely read all the documentation multiple times but here's a basic rundown of the steps for TWRP. Keep in mind what I said before about checksumming every file before and after transferring.

1. Transfer AP and TWRP img file to phone (ensure TWRP kernel base matches firmware version eg. latest TWRP v3.3.1-100 is based on BSKO so that should only be flashed with BSKO firmware)
2. Patch both files with Magisk
3. Transfer back to PC
4. Rename magisk_patched.img (TWRP) to recovery.img
5. Open magisk_patched.tar in 7-zip
6. Drag and drop the TWRP recovery.img that you renamed into the 7-zip window to overwrite the stock recovery.img in the AP tar file
7. Open Odin and uncheck the auto-reboot setting
8. Flash CSC, CP, BL, and patched AP all together
9. Once flash is successful, boot into TWRP by pressing and holding power+vol up to get out of download mode then as soon as the screen turns black, hold power+vol up+bixby and keep holding them until you're booted into TWRP
10. Flash multidisabler (per the multidisabler post, you can rename it to add _btfix to the end to fix bluetooth pairings without needing the Magisk module)
11. Factory reset in TWRP to wipe data which will finalize removing FBE (encrypted /data)
12. Reboot to recovery using the option in TWRP and just let it boot up

Keep in mind that's a very rough overview and there's a chance I misspoke about something.




Good day,

Does this this Root and TWRP work on G973N?

I have here a screenshot of software info.

Thanks in advance.
 

Attachments

  • Screenshot_20191219-024954_Settings.jpg
    Screenshot_20191219-024954_Settings.jpg
    254.7 KB · Views: 152

cameronkelley28

Senior Member
Dec 1, 2014
160
96
Samsung Galaxy S10
Does this this Root and TWRP work on G973N?

I am not 100% sure but I believe the Magisk root process in the OP should work just fine as it's an exynos variant.

I'm not sure about TWRP either but there's a good chance it will not work. Each build of TWRP is specific to a device due to the kernel sources they're based on. It's possible that the 973N can use the same kernel as the 973F but I wouldn't know unfortunately.
 
  • Like
Reactions: Harvie Almighty

Top Liked Posts

  • 1
    is it my problem or with last firmware usb tweak, doesn't works anymore and every time i boot phone, i lose root?
    For restart phone use Root Essentials. For back Root, connect phone and PC with USB cable and use ADB and use ' adb reboot recovery' and press Enter.
    1
    yes i can use magisk and select reboot in recovery but in case i want to shut off my phone or if it shutting down, i should reflashing firmware, instead before it was enought turning on phone with something plugged in usb
    I don't know. I have not problems with last firmware. Last firmware I have updated, not installed.
  • 2
    Hi!
    Can I root latest Android 11 with One UI 3.1 and security updates from June 1. 2021?
    Yes. I have update on Android patched 1. june 2021.
    1
    Thanks for the tip!

    I am indeed using the AP_* file extracted from the firmware zip. I had been transferring it to the device via FTP, I hadn't thought of using adb for this purpose.

    I've just given it a go and sure enough it is working now. Thank you very much for the assistance cameronkelley28!

    A gold star for you.
    1
    It was this one I'm pretty sure.

    I will just be using adb going forward.
    1
    When you are in Odin try Press buttons Vol Down + Power together, when black screen, press Vol Up + Bixby + Power buttons for open Recoveri. In Recoveri Factori Data reset and retart phone. It do after install firmware in Odin. Phone need be connected with PC on USB cable.
    1
    @topjohnwu advised against only specifying AP in Odin.
    I know, but when i use all the files, i go into bootloop
  • 239
    Here comes official Magisk support for the Galaxy S10!
    Let's get Magisk to kick start the development of these Samsung devices!

    Link to Instructions
    Carefully read through everything in the page linked above! Follow the instructions closely so you don't end up bricking your device

    Technical Details
    Google enforces all devices that ships with Android 9.0 to use system-as-root in part of "Project Treble", so Samsung finally introduced their own "flavor" of the implementation. More details regarding system-as-root can be found in the official Google dev site. Samsung is using the A-only system-as-root setup, meaning that its boot image will only contain the kernel binary without ramdisk included. Similar setup has already been deployed on many new devices, and the solutions for those devices are rather simple: add a new ramdisk section into the boot image and hexpatch the kernel to always use ramdisk as rootfs. However in Samsung's case, the bootloader simply does not load anything other than the kernel binary to the memory, meaning no matter what we do the kernel will always use the system partition as root directory. This leaves us no option but to install Magisk onto the recovery partition.

    Installing to the recovery partition have its own issues: first is that a service called "flash_recovery" will run when the system starts up, which will restore the recovery image back to stock on startup. This is unacceptable because not only does it uninstall Magisk in the process, the data encryption key will also be changed due to fact that Samsung's data encryption keys are tied to the bootloader status and boot/recovery image signatures, and thus causing the device unable to boot in following reboots unless factory reset. The solution to this problem is to simply repack the boot image to remove the binary integrity and also the signature of the partition. The second issue is that since Magisk and recovery shares the same partition, how can we actually boot into recovery? (e.g. to factory reset your device, or have custom recovery co-exist with Magisk) Fortunately a solution that detects button key presses is introduced, which details are already provided in instructions.

    To make matters even worse, Samsung introduced a "VaultKeeper" service, which adds another "lock" on top of the OEM lock of the bootloader. By default the service will "relock" the bootloader after data is wiped. Only after the initial setup will it verify the OEM lock option and changes the bootloader state accordingly. If you are running custom firmware with stock system, DO NOT try to wipe data or else you might end up bricking your device due to vaultkeeper locking your bootloader up, which will eventually lead to bootloader refusing to boot because unofficial partitions are detected.

    For custom ROM developers, the first few things you would want to remove is VaultKeeper to protect your users from bricking their devices. For stock ROM users, just make sure to always boot to Magisk after a data wipe, or never power off your device before finishing the initial setup and verify OEM lock is enabled.
    21
    OK guys, @PillowCake[/MENTI[SIZE="3"][/SIZE]ON] [MENTION=5902940]bininga59 @Norup58
    In the interests of accuracy for everyone, afterall this what XDA is all about isn't it, I am scrubbing previous post and re-worded a new one.

    ---------- Post added at 06:24 PM ---------- Previous post was at 06:14 PM ----------

    Firmware updates and keeping your data,
    for phones Magisk rooted without TWRP.

    Just download new firmware, copy the AP file of the new firmware to your phone.
    Open Magisk Manager, ensure Magisk is up to date, if not, update it.
    When Magisk is up to date, if you have any Magisk Modules running, go into Modules and disable them (no need to uninstall them). Then reboot and go back into Magisk Manager.
    Hit the top INSTALL, select INSTALL again then select 'Select and Patch a File'
    Locate the new AP file from your new firmware and patch it. Then copy the magisk_patched.tar back to your computer, preferably with ADB to minimize corruption during transfer.
    Power off phone and reboot to Download mode.
    Open Odin 3.13.1 on your computer, and
    deselect Reboot under Options tab. Now use the new magisk_patched file in the AP slot, the BL and CP from your new firmware into their respective slots and importantly HOME_CSC into the CSC slot. Press start and let Odin do it's stuff.

    When flashed, do not wipe. Press and hold Vol-down and Power, when screen goes off, quickly change to Vol-up, Bixby button and Power. As soon as screen appears, let go of all buttons.
    Within moments without any further user intervention your phone will reboot into your updated Magisk rooted mode, data intact.
    Just re-enable your previously disabled Magisk modules.
    16
    Hi guys!!
    Got a S10, rooted with magisk, no TWRP installed.
    I want to update to the latest Firmware with magisk, but without wipe everything , is it possible?
    What are the steps please?

    Galaxy S10 Firmware update.
    The Galaxy S10 May firmware update has started to appear and users will be wanting to update their firmware without losing their data and keep their Magisk root.

    For phones with Magisk root only without TWRP.
    The process is similar to when you first rooted your phone but you need all the firmware files and DO NOT wipe.
    Download your new firmwware using Frija or Samfirm, making absolutely sure it is the correct version for your phone model and region (csc), you can use an app such as 'Phone INFO' to help here.
    Unzip the downloaded file to an easy place to find on your computer.
    From this unzipped folder locate the file name beginning AP and copy this file to your phone.
    On your phone open Magisk Manager and hit INSTALL against Magisk, prompt will come up, hit INSTALL, Select Method - Select and Patch a File, then choose the AP file you have just copied to your phone. Let Magisk process complete.
    Copy the new magisk_patched file on your phone back to your computer, preferably the same folder you copied the AP from.
    Open Odin (use Odin3_v3.13.1) On Odin Option tab untick Auto Reboot.
    Power off your phone and connect it to your computer. Press and hold volume-down until Download screen appears then volume-up to continue. On Odin the box below ID:COM should turn blue.
    For the AP option select the magisk_patched file, then select the BL file and the CP file, then the HOME_CSC file.
    Click Start and let the process complete - several minutes.
    Now the nimble fingers bit, remember NO WIPE. Press and hold Bixby button, (Bixby is superfluous but convenient at this first point) Vol-down and Power, when screen goes off, quickly change to Vol-up button whilst still holding Bixby and Power. As soon as screen appears, let go of all buttons.
    Your phone will now reboot into Magisk rooted mode with all your data intact.
    14
    Hi John (@topjohnwu),

    Great job with this find & guide for it. It works flawlessly if all the steps are followed 100%. Thanks!

    I've made a full video tutorial (including ROM downloading and everything), maybe it'll help others who have had problems or just want to see the process while or before they perform it.

    Feel free to post it in the OP if you think it helps in any way.

    The video link is as follows: https://youtu.be/o3a8YnWT3yk

    Thanks!
    12
    Last night, I used Magisk Manager to patch the AP file from the ASD5 firmware. This is actually the first time I have upgraded in this way, and I must say that John has made life extremely easy for all of us.

    I just wanted to give a tip for anyone who is already running TWRP on their device at the time they need to update their firmware.

    Using John's procedure, you'll have to enter download mode a second time to re-install TWRP and re-disable encryption. Since I screw up getting into download mode once in a while, I find it a nerve-racking experience, since failing to boot into download mode at this juncture could initiate a system reboot that would re-encrypt /data.

    So, before you flash the patched AP, you can make a copy of your existing Magisk-rooted TWRP recovery. For example, a quick way to do it is by typing this in a root shell:

    Code:
    # dd if=/dev/block/sda15 of=recovery.img

    Next, replace the stock recovery image in the AP file that you patched using Magisk Manager. On Linux, that would look something like this. Adapt these commands for whichever platform you use.

    Code:
    $ tar f magisk_patched.tar --delete recovery.img
    $ tar rf magisk_patched.tar recovery.img

    Now, when you flash the resulting file in Odin and reboot, all you have to do is hold the recovery combo down until you reach TWRP. Then, simply disable encryption again (e.g. by flashing my own multidisabler zip) and reboot.

    I followed the above procedure myself last night and it worked like a charm.