[Magisk] Root for the Galaxy S10 Series

Search This thread

J.Michael

Senior Member
Jan 20, 2018
760
570
Samsung Galaxy Tab A series
When I have only TWRP without Magisk Root, can I update stock Android without losing TWRP?
Probably not. The usual advice is to restore stock before updating Android.

If by "update" you mean burning a new firmware you've downloaded (rather than accepting an OTA update), maybe you can replace recovery.img in AP.tar with TWRP.img before burning.
 

ZmisiS

Senior Member
Dec 23, 2011
2,594
519
58
Livno
Probably not. The usual advice is to restore stock before updating Android.

If by "update" you mean burning a new firmware you've downloaded (rather than accepting an OTA update), maybe you can replace recovery.img in AP.tar with TWRP.img before burning.
I think on Home CSC. I have TWRP patched with Magisk. When I install TWRP on Odin, I must Format Data and I've all losted.
 

oursgentil

Member
Jan 1, 2011
37
6
Hello,

I had to replace my S10e for a camera problem
I'm trying to root my new S10e (Android 11) and I must miss something but after the odin step with the file modified by Magisk, I come across a boot loop
I manage to get by by forcing the download mode and reflasahnt everything
Any idea to solve my problem?

Thank you
 

ZmisiS

Senior Member
Dec 23, 2011
2,594
519
58
Livno
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.
 
  • Like
Reactions: J.Michael

oursgentil

Member
Jan 1, 2011
37
6
actually by unchecking the auto reset box and by only putting the Ap in Odin I succeeded in attempting the recovery.
The additional lock of the usb-c earphone is also troublesome
 

ZmisiS

Senior Member
Dec 23, 2011
2,594
519
58
Livno
Which PIN code? Whose PIN code? What app is asking for a PIN code?

Have you tried hitting DELETE a bunch of times before entering the PIN the first time?

Is there an option to display the usually hidden whatever you are entering?
PIN code of phone, not of SIM card. After enter PIN code system je on, after some seconds screen ic black and on it says on the screen 'SAMSUNG'. After of it again asks to enter a PIN code and after enter PIN code all works how need.
 
  • Like
Reactions: J.Michael

Ivymike52

Senior Member
May 10, 2010
262
24
Marrara
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
 

patrickneil

Senior Member
Jun 18, 2011
64
24
Help again! I tried to upgrade to Android 11. I downloaded the latest version, FUE6 from the program "Samsung Firmware Downloader". I was on Magisk 20, and thought I could update to Magisk 23 by just clicking Upgrade and giving it the latest AP file, and then flashing in Odin. Everything seemed to work fine, the flash passed, but when I try to reboot (or turn on), I get a bootloop with "rev check fail device 11 binary 8 (DTB)" at the top! Help! Aparently this is what happens when you try to downgrade, but I was upgrading. The CSC should be TPA (Panama), so what I downloaded was "SM-G970F_3_20210527110738_qizm82glev_fac".

What can I do? Did "Samsung Firmware Downloader" download the wrong BL?! Should I try flashing the original AP file? [edit: fails to flash] Can I redownload from another site (like samfirm.com) and flash that with the patched AP, or unpatched from the new download? Would a different CSC work, at least to get the device on? Was the issue trying to upgrade Magisk at the same time? And I have all the files from Android 10, but what will happen if I try to downgrade?

I don't have TWRP, and have done stupid things with this phone before. Please help, I'm in this awful valley of Android smarts where I know just enough to get myself in trouble!

Edit: May have made it worse. I tried to repeat the flash in case it was something simple, and now I'm stuck on the screen that says "An error has occured while updating the device software. Use the Emergency recovery function in the Smart Switch PC software." I understand I can use Odin on this screen, but can't turn it off (what happens when the battery dies?) I see "KERNEL REV CHECK FAIL. DEVICE: 11, BINARY: 8" at the top when I do try flashing my files now, and can get "BINARY: 9" if I try flashing EUB2, so I guess it's an issue with FUE6.

Edit 2: OMG, I think I patched an old AP file, from DTH7, and flashed that. I'm such an idiot. So I tried just flashing the unpatched FUE6 AP file. I thought I could get to unrooted Android, but clearly that doesn't work. Now I see the default Android Recovery. Should I Factory reset? I can get back to the regular download mode too, but now I see another post "Never just flash an AP file".
 
Last edited:

DHGE

Senior Member
Jun 20, 2015
609
292
coastal paradise
Should I Factory reset?
You have to.

On my S10e (other devices where fine) I also had problems with the update to 11 with an earlier revision. I could not even boot to recovery or download anymore and had to wait til the battery died.

Flash your vanilla 11 and have your phone working again.
After that follow the instructions on TopJohnWus site for rooting.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    1. S10 5G has the model number SM-G977U. I don't think there's a USA unlocked version of your model that still uses the Snapdragon processor, but feel free to correct me if I'm mistaken.
    2. Short answer: probably not. Long answer: Check your firmware version in Settings -> About phone. Look at the 5th last digit - you can only flash firmware versions with the same 5th last digit or higher. Now go to the some Samsung firmware website and see which versions have the same or higher 5th last digit and see if there's any that runs Android 10.

    Best of luck!
    1
    Thank. My phone is at&t and they gave for me code unlock. Now i can use any Sim with any Network. But i thinked my phone still have firmware of At&t. I didn't like when i restart my phone. I will see logo of at&t on Startup.... Thank for answer.
    I'll elaborate on the first part a bit more.

    So Samsung phones usually come with different carrier or regional versions. You can flash a different carrier version on your phone as long as it's got the same hardware, generally. As an example, my Note10+ from Canada (N975W) was running USA Unlocked (N975U1) firmware with no carrier bloat. You can do the same thing, but only if there is another available version that you can use. And I think the S10 5G was a carrier exclusive, so this means that there isn't another available firmware version you can try that does not have carrier bloat (like the USA Unlocked variant).

    If it helps, see if there's any G977U firmwares with XAA as the CSC code. That's what USA Unlocked versions use.

    Hope that helps!
    1
    Thank so much. It don't have U1 kaka. But Can i flash it with firmware of T-Mobile or Verizon???
    Your new carrier might show some interest in helping you replace your firmware.

    You might be able to replace your firmware with some other system, like LineageOS.
  • 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.