[Magisk] Root for the Galaxy S10 Series

Search This thread

jediknight111

Senior Member
Feb 28, 2011
221
22
Sorry for the stupid question, but I'm unable to update magisk in the new magisk update 22.0 , any help?

Update the manager fine by restoring manager to default, but magisk won't install, what options do I need to select?
SmartSelect_20210223-181332.jpg
SmartSelect_20210223-181344.jpg
 

robbo1947

Senior Member
Jun 2, 2007
405
269
Manchester
Last edited:
  • Like
Reactions: jediknight111

starbright_

Senior Member
Apr 11, 2010
1,273
207
Coming from unrooted stock I think I followed the instruction (used Magisk 22.0) . But after loading firmware with Odin (patched AP and others) - I am in a bootloop. See this part of instruction:
  • After Odin is done, your device should reboot. You may continue with standard initial setup.
    If you are stuck in a bootloop, agree to do a factory reset if promted.
But while in bootloop there is no question about wipe data! How to get out of this hell?
The only I get is back to download mode but there is question "Lock bootloader + factory reset" or "Don't lock and restart". Finally I go to "Recovery Mode" and did factory reset there to get out of bootloop. After a while Android starts. Magisk is away (because of factory reset). But after installing Magisk again it reports to have no RD installed. ?!?
 
Last edited:

starbright_

Senior Member
Apr 11, 2010
1,273
207
Looking at the result of the magisk_patched...tar I see that only boot.img is changed. Isn't it just enough to flash this with heimdall? (In fact Odin is for me a bigger thing - don't have Windows. Does Odin works with Wine?)
 

starbright_

Senior Member
Apr 11, 2010
1,273
207
Coming from unrooted stock I think I followed the instruction (used Magisk 22.0) . But after loading firmware with Odin (patched AP and others) - I am in a bootloop. See this part of instruction:
  • After Odin is done, your device should reboot. You may continue with standard initial setup.
    If you are stuck in a bootloop, agree to do a factory reset if promted.
But while in bootloop there is no question about wipe data! How to get out of this hell?
The only I get is back to download mode but there is question "Lock bootloader + factory reset" or "Don't lock and restart". Finally I go to "Recovery Mode" and did factory reset there to get out of bootloop. After a while Android starts. Magisk is away (because of factory reset). But after installing Magisk again it reports to have no RD installed. ?!?
Mh, after reading instructions again and again I found the problem. You can either call me stupid or one can think that instructions can have a slight improvement.
So what was problem: At beginning of manual there is mentioned that AFTER installing Magisk with Odin you might boot in a special way, via Recovery.
@topjohnwu: Wouldn't it be better to mentioned that in the line - after odin is done?
Additional it confuses me that nowaday USB cable has to be plugged in addition to the known pushing the Vol+ / Bixby / Power keys.
 
  • Like
Reactions: J.Michael

starbright_

Senior Member
Apr 11, 2010
1,273
207
Finally I flashed a Magisk patched TWRP 3.5. Wow. Difficult for me, but how difficult is it for the dev. Great work!

Is this a known issue that Magisk doesn't boot recovery if requested? Is it something that can be solved in future? It would be much more comfortable than standard way of shutdown and Vol+/Bixby/Power.
 
  • Like
Reactions: jelbo and J.Michael

starbright_

Senior Member
Apr 11, 2010
1,273
207
One more thing: If I see this right - without a PC connected I don't have a chance to boot into Magisk enabled system?
That I think is a really bad thing. Just imaging you have a firewall running and your Phone does a reboot! You phone is not protected anymore.
Is there a chance to modify that logig?
Any way to reboot into Magisk-enabled mode?

I understand that the hack combining Magisk/recovery is required, but could it be solved another way around?

Any chance to revert the need of USB plugged for Recovery?
 

FossaFX

Member
Aug 29, 2010
34
3
Need some help, guys.

I've bought S10+ (Exynos) yesterday, unlocked bootloader, patched stock AP image, flashed it and so on. Everything is working OK (except I need to insert Type-C adapter to be able to boot into rooted mode).

Now I want to install Lineage OS and here comes the trouble.

I've downloaded latest TWRP, patched it, flashed it, booted into it and installed Lineage, again no problems. BUT, if I try to boot into rooted mode, phone freezes on the screen with two warnings (about bootloader and custom software).

What's this? Incompatibility between TWRP and newest Magisk? If so - how could I flash Lineage without TWRP?
 
Last edited:

starbright_

Senior Member
Apr 11, 2010
1,273
207
D
Need some help, guys.

I've bought S10+ (Exynos) yesterday, unlocked bootloader, patched stock AP image, flashed it and so on. Everything is working OK (except I need to insert Type-C adapter to be able to boot into rooted mode).

Now I want to install Lineage OS and here comes the trouble.

I've downloaded latest TWRP, patched it, flashed it, booted into it and installed Lineage, again no problems. BUT, if I try to boot into rooted mode, phone freezes on the screen with two warnings (about bootloader and custom software).

What's this? Incompatibility between TWRP and newest Magisk? If so - how could I flash Lineage without TWRP?
What is newest Magisk and TWRP? More details please. DId you format data? So before you try to flash LOS, do you have a working combination of Stock/Root/TWRP? I found to get that already tricky ;)
 

FossaFX

Member
Aug 29, 2010
34
3
What is newest Magisk and TWRP? More details please. DId you format data? So before you try to flash LOS, do you have a working combination of Stock/Root/TWRP? I found to get that already tricky ;)

Magisk 22.0, TWRP 3.5.0_9-3. Yes, of course I've formatted data.

I didn't had working combination, I had Stock + Root working.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    But i suppose there is now way to downgrade from 11 to 10 since Google has blocked that for security reasons?
    I just dowgraded my S10+ from G975FXXU9FUBD back to G975FXXS9DTK9. Both BL 9, it worked.
    1
    Hi.

    Did anyone "jumped" from Android 9 to 11? Any special nuances that I need to pay attention to?
    The device is rooted, latest Magisk, etc..

    Cheers.
    I did. Just start over. You can follow the steps I explained recently. Booting Android 11 rooted can be a pain, for many people a USB data connection is needed. For me, it's sometimes needed.
    1
    Hello. I cant seem to get both Magisk and TWRP working at the same time.

    I can manage either to get TWRP working but Magisk does not work (not with firmware pre-patched via Magisk app or flashing magisk.zip via TWRP). Magisk app works but never prompts for ROOT installation. Only offers to patch firmware files on phone or SD card or:
    I can get Magisk working including ROOT but as soon as i flash TWRP via Odin i lose ROOT.

    As i understand the problem is that both Magisk and TWRP modify the recovery partition.

    The way i make the flashable package is that i extract boot.img from stock firmware. Then download latest TWRP for my model and rename it to recovery.img and add vbmeta.img (vbmeta-disabled.img). I then use Odin TAR creator to create the TAR package containing these 3 .img files and patch it with Magisk and flash the patched TAR file via Odin using the AP field.

    I assume this is the correct procedure. I just dont know why it does not work. Perhaps i should use the stock recovery.img. Maybe Magisk expects the stock img and does not patch the renamed TWRP correctly? But if i do that i cant properly flash TWRP later. Or do i need some special version of TWRP?
    Currently i trying to use one from here: https://eu.dl.twrp.me/beyond0lte/

    S10e Exynos (beyond0lte). Android 11. Latest versions of Magisk, TWRP and Firmware.
    1
    I need to install AdAway. Does Magisk suffice or do i need TWRP alongside with it ?

    You only need root for AdAway so magisk is sufficient.
    1
    Can someone type galaxy s10 plus model that can be rooted please, I'm looking for a s10 plus online to buy and install root at it
    You're looking for the SM-G975F/DS, which have the Exynos 9820 SoC. The SM-G975U and W variants are Snapdragon 855 models that are exclusive to the US and Canada respectively
  • 236
    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.

    Donations
    For those who don't know, I bought a Galaxy S10 just for adding Magisk support and for future Samsung related development.
    This particular release is extremely difficult. Tons of effort is poured in to figure out ways to workaround these Samsung crazy setups.
    If you appreciate my effort, show some love and support :)
    https://www.patreon.com/topjohnwu
    https://www.paypal.me/topjohnwu
    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.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone