[Magisk] Root for the Galaxy S10 Series

Search This thread

ZmisiS

Senior Member
Dec 23, 2011
2,802
668
59
Livno
@ZmisiS @malcolmy Thanks for your answers !

It finally worked with 24.3 ! I probably should have rebooted as you said @malcolmy
BUT
I just realized that flashing the AP(patched) just reinstalled the stock rom ... (obvious)
Any idea of what is the method in my special case ? Some kind on patching of the custom ROM ? (I'd like also to have TWRP)
I used Magisk 25.1. I have not TWRP. I do not intend to use Custom ROM until it is Android 13.
 

ZmisiS

Senior Member
Dec 23, 2011
2,802
668
59
Livno

For TWRP follow this thread, but the jist of it is:

1. Flash TWRP mage and avb disabled vbmeta in odin
2. After booting into TWRP format /data
3. Flash the multidisabler.zip

I think you should patch the TWRP image with magisk first or else you'll loose root and magisk.

Alternatively, you could use the latest Cruel Kernel that includes magisk v24.3 in the kernel. This way you don't have to use the combo buttons to boot eve
Format/data in TWRP will delete everything that is installed. How then to save root?
 

ZmisiS

Senior Member
Dec 23, 2011
2,802
668
59
Livno
No it will format the /data partition only. Have a backup, this goes without saying. Always have a backup.

All this is tangled for me. I don’t even know where to start. Nowhere not have chronologically list for this to do.
 

malcolmy

Senior Member
Oct 28, 2010
93
13

All this is tangled for me. I don’t even know where to start. Nowhere not have chronologically list for this to do.


If you follow the ODIN section, you'll have TWRP.

For having magisk root you have two options:

1. Follow the instructions here:


2. Flash a kernel that includes magisk files inside it:


Or

 
  • Like
Reactions: ZmisiS

ZmisiS

Senior Member
Dec 23, 2011
2,802
668
59
Livno
If you follow the ODIN section, you'll have TWRP.

For having magisk root you have two options:

1. Follow the instructions here:


2. Flash a kernel that includes magisk files inside it:


Or

Thanks, but my English is very bad. I don't understand much. I have installed Android 12, last version HVE1. It is rooted with Magisk 25.1. Can I install TWRP without losing everything I installed? If so, what should I download, how it to install and in what order?

Installation Instructions
First of all, TWRP Recovery + multidisabler should be installed in all cases. This is a preliminary step. Backup your existing kernel. You will be able to restore it in TWRP Recovery in case of any problems. Download an *.zip file. Reboot to TWRP. Install > Install ZIP > Flash CruelKernel.zip. Reboot to system.

If I have installed TWRP, what do I need a kernel for? I thought I needed to install the kernel to install TWRP. I don't understand anything now.
 
Last edited:

malcolmy

Senior Member
Oct 28, 2010
93
13
Thanks, but my English is very bad. I don't understand much. I have installed Android 12, last version HVE1. It is rooted with Magisk 25.1. Can I install TWRP without losing everything I installed? If so, what should I download, how it to install and in what order?

Installation Instructions
First of all, TWRP Recovery + multidisabler should be installed in all cases. This is a preliminary step. Backup your existing kernel. You will be able to restore it in TWRP Recovery in case of any problems. Download an *.zip file. Reboot to TWRP. Install > Install ZIP > Flash CruelKernel.zip. Reboot to system.

If I have installed TWRP, what do I need a kernel for? I thought I needed to install the kernel to install TWRP. I don't understand anything now.
Okay I see your confusion.

1. If you install TWRP you will lose data because you have to format /data because it's encrypted. It's an important step of installing TWRP. You will also loose magisk root.

2. You don't need the cruel kernel, I just mentioned it as an option. I think using the kernel is easier for having root and magisk files inside the kernel rather than following the official magisk guide (which was the first option I gave you). Using the kernel also allows you to start the phone with root without using combo keys, which I like. If you don't care about any of that don't use the kernel.

So what you have to do now is: backup your data, install TWRP (including /data format). Then you have to decide which root method you want to use, the official guide or using a the cruel kernel.
 

ZmisiS

Senior Member
Dec 23, 2011
2,802
668
59
Livno
Okay I see your confusion.

1. If you install TWRP you will lose data because you have to format /data because it's encrypted. It's an important step of installing TWRP. You will also loose magisk root.

2. You don't need the cruel kernel, I just mentioned it as an option. I think using the kernel is easier for having root and magisk files inside the kernel rather than following the official magisk guide (which was the first option I gave you). Using the kernel also allows you to start the phone with root without using combo keys, which I like. If you don't care about any of that don't use the kernel.

So what you have to do now is: backup your data, install TWRP (including /data format). Then you have to decide which root method you want to use, the official guide or using a the cruel kernel.
If I use a custom kernel, I don't know in what order what to install and how. I want to have both TWRP and rooted system. I want last Stock ROM, HVE1.

I downloaded: CrualKernel v.3.9, Magisk 25.1.zip, multidisabler-samsung-3.5-corsicanu, twrp-3.6.2_9-0-beyond1lte.img.tar and vbmeta.
 
Last edited:

J.Michael

Recognized Contributor
Jan 20, 2018
1,267
1,202
Samsung Galaxy Tab A series
If I use a custom kernel, I don't know in what order what to install and how. I want to have both TWRP and rooted system. I want last Stock ROM, HVE1.

I downloaded: CrualKernel v.3.9, Magisk 25.1.zip, multidisabler-samsung-3.5-corsicanu, twrp-3.6.2_9-0-beyond1lte.img.tar and vbmeta.
If you want stock ROM, stop thinking about kernel. Stock ROM has its own kernel. If you change the kernel, you do not have stock ROM anymore.

You start with a working tablet. You can boot it and Android will run.

The advice was, next install TWRP. Part of that step will erase all data from the (regular) Android part of the tablet.

Then the instructions describe using TWRP to install a custom ROM.

If instead of a custom ROM, you just want to install Magisk in the stock ROM then, sorry, more decisions.

The standard way to install Magisk is to use the Magisk Manager app to patch the AP.tar file corresponding to your ROM, then use Odin to "flash" the patched ROM. There are other details. Do not try to use just what I have written in this paragraph. Where I'm going with this is, if you patch the original AP.tar and flash it, you will lose TWRP. The original AP.tar file contains a "recovery". TWRP is an alternate "recovery". Flashing the original AP.tar, with or without patching with Magisk, will overwrite TWRP with the original recovery.

I cannot keep straight what has gone on in this thread. I do not know if people have successfully built a new AP.tar with the original "recovery.img" replaced by TWRP (renamed, because the name in the tar file must match the partition name), then use Magisk to patch the 2nd AP.tar, then flash the 3rd AP.tar.

You have to understand that, depending on details of which device you have, Magisk might need to be installed in different places. I believe that if Magisk Manager app is told to patch an AP.tar file for a Samsung device, at least some of the patching is done to the recovery. I believe there are times when it just will not work if that recovery is TWRP.

A way to install Magisk, if you have TWRP, is to take the "magisk.apk" file you chose (again, choices: stable, canary, beta), rename it to (or make a copy with the name) "magisk.zip", and "flash" it through TWRP. I have never done this, I assume somewhere in TWRP there is an option "install a ZIP file".

I do not know if this has any chance of working on a Samsung.

It sounds like @malcolmy has had great success with a custom ROM. He sees benefits to using the custom kernel that comes with the custom ROM. What is not clear to me is whether he is really free to replace the kernel in any other ROM.

TL;DR (yeah, like I suddenly learned to be succinct)
Do not waste time setting up your tablet until you are ready to stop flashing. Many times, flashing requires wiping data. All the time you spent adjusting the font size and installing your 18 favorite apps will be lost.

Read this thread and figure out the most recent recommended way to install Magisk. If you can't imagine living without TWRP, or if everybody in this thread starts by installing TWRP, pick those instructions.

If, once you have Magisk (not just the Magisk Manager app, but Magisk) running, you can't stand having to dance the buttons every time you reboot if you want Magisk again active after the boot, *then* revisit @malcolmy's instructions to install a custom ROM that, among other things, makes it easier to reboot to a Magisk-controlled system.
 
  • Like
Reactions: ZmisiS

ZmisiS

Senior Member
Dec 23, 2011
2,802
668
59
Livno
If you want stock ROM, stop thinking about kernel. Stock ROM has its own kernel. If you change the kernel, you do not have stock ROM anymore.

You start with a working tablet. You can boot it and Android will run.

The advice was, next install TWRP. Part of that step will erase all data from the (regular) Android part of the tablet.

Then the instructions describe using TWRP to install a custom ROM.

If instead of a custom ROM, you just want to install Magisk in the stock ROM then, sorry, more decisions.

The standard way to install Magisk is to use the Magisk Manager app to patch the AP.tar file corresponding to your ROM, then use Odin to "flash" the patched ROM. There are other details. Do not try to use just what I have written in this paragraph. Where I'm going with this is, if you patch the original AP.tar and flash it, you will lose TWRP. The original AP.tar file contains a "recovery". TWRP is an alternate "recovery". Flashing the original AP.tar, with or without patching with Magisk, will overwrite TWRP with the original recovery.

I cannot keep straight what has gone on in this thread. I do not know if people have successfully built a new AP.tar with the original "recovery.img" replaced by TWRP (renamed, because the name in the tar file must match the partition name), then use Magisk to patch the 2nd AP.tar, then flash the 3rd AP.tar.

You have to understand that, depending on details of which device you have, Magisk might need to be installed in different places. I believe that if Magisk Manager app is told to patch an AP.tar file for a Samsung device, at least some of the patching is done to the recovery. I believe there are times when it just will not work if that recovery is TWRP.

A way to install Magisk, if you have TWRP, is to take the "magisk.apk" file you chose (again, choices: stable, canary, beta), rename it to (or make a copy with the name) "magisk.zip", and "flash" it through TWRP. I have never done this, I assume somewhere in TWRP there is an option "install a ZIP file".

I do not know if this has any chance of working on a Samsung.

It sounds like @malcolmy has had great success with a custom ROM. He sees benefits to using the custom kernel that comes with the custom ROM. What is not clear to me is whether he is really free to replace the kernel in any other ROM.

TL;DR (yeah, like I suddenly learned to be succinct)
Do not waste time setting up your tablet until you are ready to stop flashing. Many times, flashing requires wiping data. All the time you spent adjusting the font size and installing your 18 favorite apps will be lost.

Read this thread and figure out the most recent recommended way to install Magisk. If you can't imagine living without TWRP, or if everybody in this thread starts by installing TWRP, pick those instructions.

If, once you have Magisk (not just the Magisk Manager app, but Magisk) running, you can't stand having to dance the buttons every time you reboot if you want Magisk again active after the boot, *then* revisit @malcolmy's instructions to install a custom ROM that, among other things, makes it easier to reboot to a Magisk-controlled system.
I know less now than I knew before. I have not tablet. I have phone Samsuing Galaxy S10 (SM-G973F). I am giving up TWRP. Maybe when will be Android 13 custom rom? Can a Stock Kernel be backuped?

Thanks.
 
Last edited:

J.Michael

Recognized Contributor
Jan 20, 2018
1,267
1,202
Samsung Galaxy Tab A series
I know less now than I knew before. I have not tablet. I have phone Samsuing Galaxy S10 (SM-G973F). I am giving up TWRP. Maybe when will be Android 13 custom rom? Can a Stock Kernel be backuped?

Thanks.
You do not need to backup the stock kernel.
What version of Android do you have now?

As I said, flashing frequently requires wiping data. If you plan to wait for an Android 13 custom ROM, either do not fiddle with your phone, or keep extensive notes on all the settings you change.
 

ZmisiS

Senior Member
Dec 23, 2011
2,802
668
59
Livno
You do not need to backup the stock kernel.
What version of Android do you have now?

As I said, flashing frequently requires wiping data. If you plan to wait for an Android 13 custom ROM, either do not fiddle with your phone, or keep extensive notes on all the settings you change.
Version je G973FXXUFHVE1.

Regarding Kernel you wrote this: "If you want stock ROM, stop thinking about kernel. Stock ROM has its own kernel. If you change the kernel, you do not have stock ROM anymore."

If can, I want have rooted Stock ROM and TWRP.
 

J.Michael

Recognized Contributor
Jan 20, 2018
1,267
1,202
Samsung Galaxy Tab A series
Version je G973FXXUFHVE1.

Regarding Kernel you wrote this: "If you want stock ROM, stop thinking about kernel. Stock ROM has its own kernel. If you change the kernel, you do not have stock ROM anymore."

If can, I want have rooted Stock ROM and TWRP.
When I asked what version of Android you have, I was expecting a number. Do you already have Android 13?

TWRP and rooted, stock, ROM is probably target of most of this thread.

@malcolmy told you how to install TWRP. Even if it is not the right TWRP, it will give you the experience of installing *a* TWRP. And a big rush.

After that, download a "magisk.apk", rename it to "magisk.zip", install it through TWRP. What's the worst thing that can happen? (Did I mention that you should have the files for your stock ROM, in case you need to flash them to recover your phone?)
 

ZmisiS

Senior Member
Dec 23, 2011
2,802
668
59
Livno
When I asked what version of Android you have, I was expecting a number. Do you already have Android 13?

TWRP and rooted, stock, ROM is probably target of most of this thread.

@malcolmy told you how to install TWRP. Even if it is not the right TWRP, it will give you the experience of installing *a* TWRP. And a big rush.

After that, download a "magisk.apk", rename it to "magisk.zip", install it through TWRP. What's the worst thing that can happen? (Did I mention that you should have the files for your stock ROM, in case you need to flash them to recover your phone?)
Android 12. Version G973FXXUFHVE1 is Android 12. Last version for Samsung Galaxy S10 (SM-G973F).

Which TWRP? There have are more. Which Magisk? Magisk 24.3 or 25.1? Should TWRP be patched with Magisk? If yes, TWRP .tar or .img? How to install Kernel and everything that needs to be installed? In what order? It's all tangled up for me.

If everything was written chronologically it would be much simpler. I don't know where to start.
 

J.Michael

Recognized Contributor
Jan 20, 2018
1,267
1,202
Samsung Galaxy Tab A series
Android 12. Version G973FXXUFHVE1 is Android 12. Last version for Samsung Galaxy S10 (SM-G973F).

Which TWRP? There have are more. Which Magisk? Magisk 24.3 or 25.1? Should TWRP be patched with Magisk? If yes, TWRP .tar or .img? How to install Kernel and everything that needs to be installed? In what order? It's all tangled up for me.

If everything was written chronologically it would be much simpler. I don't know where to start.
There is no one, best, right answer.
I was suggesting that you install whichever TWRP @malcolmy recommended. Just to get the experience of installing *a* TWRP.

Read this thread. If people seem to be using Magisk 25.1 (maybe 25.3 by now), try it. If you keep reading "24.3 was working fine, 25.1 will not work", then just use 24.3. You do not need the very latest. You just need to install something so you can see what success looks like.
 

meric57

Senior Member
Oct 2, 2017
194
36
Oeutrange
Samsung Galaxy Tab E
Hello, can you explain to me why I switch to magisk yes and Zigisk yes to magisk no and Zygisk no see screenshot
 

Attachments

  • Resize_20220627_193718_8887.jpg
    Resize_20220627_193718_8887.jpg
    152.2 KB · Views: 14
  • 76cfe2722f36d7fe8410429813f6db91.jpg
    76cfe2722f36d7fe8410429813f6db91.jpg
    29.6 KB · Views: 14

ZmisiS

Senior Member
Dec 23, 2011
2,802
668
59
Livno
There is no one, best, right answer.
I was suggesting that you install whichever TWRP @malcolmy recommended. Just to get the experience of installing *a* TWRP.

Read this thread. If people seem to be using Magisk 25.1 (maybe 25.3 by now), try it. If you keep reading "24.3 was working fine, 25.1 will not work", then just use 24.3. You do not need the very latest. You just need to install something so you can see what success looks like.
I just asked if I could have TWRP with Stock ROM which is rooted. If so, how?
 

meric57

Senior Member
Oct 2, 2017
194
36
Oeutrange
Samsung Galaxy Tab E
Hello, The concern that has these all is to install rooting done. I don't touch anything just updated shamiko at the restart paf magisk not available, I don't see why its doing this I then reflash the 4 files that I used for rooting , it takes root again.
 

ZmisiS

Senior Member
Dec 23, 2011
2,802
668
59
Livno
I have rooted Android 12 with Magisk. Android 12 is last version G973FXXUFHVE1. I want install TWRP and I want have rooted Android and TWRP. I need tutorial for make it. I need list what I need download and haw install it.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hey folks!

    I've just installed my first ever Custom ROM to a phone (S10+ Exynos) - Lineage 19.1 from here - and super stoked that I actually managed that without problems. :D Now I'm wanting to add Magisk, and feeling a bit confused by the installation instructions provided.

    Specifically, my main question is whether I should follow the general section or the Samsung section , i.e. is that Samsung section hardware specific (so that I should use it) or software specific for phones running the Stock OneUI (so that I should not use it)?

    What's causing me additional confusion is that when I was searching this thread and XDA overall for similar questions, among other things I found suggestions to install via recovery (e.g. here) which seems to be working for some people, yet also seems actively discouraged in the installation guide itself.

    Would appreciate any pointers as to what the best practice would be, and apologies if that's a silly question and/or has been answered before - tried my best at searching this thread but couldn't locate an answer.

    Cheers! :giggle:
    You still need to follow Samsung instructions, at least as far as using Odin -- you still won't have fastboot.

    Whether to install in boot or recovery always depended on whether the bootloader and kernel would support an initrd in the boot image. That note on Magisk manager app front page "Ramdisk: yes/no" tells you whether the original boot image included a ramdisk. If there was a ramdisk, Magisk can patch it. If there was not, Magisk will add one, but it is not certain that it will be used.

    It is possible that the stock boot image did not support a ramdisk, while the LineageOS boot image does.

    I don't think patching recovery was actively discouraged, it just wasn't the first approach, and there is no reason to use it unless you have to.

    Is LOS distributed as .tar files, suitable for Odin? If you hand AP.tar to Magisk, it will patch what it wants to. Why not try that?

    Just don't waste time setting up the tablet every time it boots -- you will be wiping it a lot.
    1
    Thank you J.Michael for the detailed response! Definitely helps my understanding along quite a bit.



    Oh of course, that makes sense - I skimmed the instructions for the non-Samsung section and missed the reference to fastboot. 😅



    That indeed does appear to be the case, I have downloaded the Magisk .apk and checked, I am seeing "Ramdisk: yes" for Lineage. (And believe from a tutorial I saw running through the installation on a stock S10+ that it's a "no" for that.)

    That was certainly one of the sources for my confusion, had assumed Ramdisk is a hardware property, but turns out that I assumed wrongly.



    Yes maybe I was exaggerating by that choice of words. :D It does say 'deprecated' on the installation guide. In any case I'm probably feeling better following the image patching approach.



    So I downloaded LOS from here and it's provided as a .zip file with a recovery image as an .img file. My understanding is that is can be made suitable for installing with Odin by simply renaming the recovery image to recovery.img and packing it into a tar archive (many people in the relevant thread for the ROM and more so the previous version report so, and the maintainer specifically says so), however I used Heimdall (following these instructions).

    The main reason I got confused which path to follow was that the Samsung section specifically talks about using Frija or similar to donwload a Samsung firmware and I assumed some of the following steps are specific to it - namely, looking into that Lineage .zip archive there don't appear to be AP, BL, CP, CSC files inside it, so I'm not sure how exactly that would work with Odin – will need to read up on that, but it's definitely a thing people successfully do - so I'll attempt to educate myself and try that. :giggle:

    (I think a similar question was asked earlier in this thread but don't think that was answered.)



    I'm not sure I follow this last sentence - what do you mean by the 'tablet'?
    Maybe I should have asked if you used Odin. Odin is the Windows program to download to a device. The device is supposed to be in "download mode". This is the "flashing" step.

    Odin expects four tar files. John Wu's instructions emphasize the importance of always providing four files to Odin. They also emphasize the importance of not having too little in the AP.tar file. I think at some point he says if you want to make a smaller AP file, at least have boot, recovery, and vbmeta in it. Other posts I've read describe people successfully ignoring this advice. I don't know if the problems only occur on certain hardware, or if the problems used to occur but the real reason for the problem has since been corrected. I did this once, with a new tablet, got it to work, and will not be experimenting with that tablet ever again.

    I said tablet because I have a tablet and I get tired of typing "device" to avoid offending people with phones.

    If you were able to install LineageOS following instructions and using Heimdall, then just stick with what works. When I was doing this, Magisk manager app had an option checkbox "patch Recovery". I think I found that it did not matter when I handed the manager a tar file to patch. I do not know if that checkbox is still available. As I understand it, the manager displays only those options it thinks relevant. It will cost you nothing to perform the patching step -- you can always choose to delete the patched file.

    Shirley somebody in a LineageOS oriented thread mentions which piece they patch, but if you say Magisk manager app now says "Ramdisk: Yes", I say patch the boot image. And don't change any names. Or be careful. I think I remember Heimdall having much more explicit specification of what goes where, so do not change the part that says "flash this to the recovery partition", but you are probably free to change the actual file being flashed; then again, why bother. Stick with what worked the first time you installed LineageOS, just use a patched boot image.

    And read those instructions another four times. They have to read in a spiral to get the steps in the right order. And the special instructions for Samsung, like "don't let it boot after Odin finishes, but instead force it to boot to recovery so you can wipe the data", may still apply. Again, Lineage-focused threads probably have more reliable advice.
    1
    @J.Michael that sounds neat indeed. Not equivalent then, but the best replacement for fastboot we have I guess. :LOL: I've posted in the relevant forum for my ROM (here if anybody comes here in the future with the same question). Cheers again!
  • 246
    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.