[Magisk] Root for the Galaxy S10 Series

Search This thread

meric57

Senior Member
Oct 2, 2017
194
36
Oeutrange
Samsung Galaxy Tab E
So is why this answer, I know what I'm doing I'm rooted like you did without TRWP , just magisk and modified AP flashed with odin then once rooted flashed up-param with odi demarage rooted with no message

There is no way to do with ramdisk, I know some people don't have ramdisk like this S10 exynos yet lineage when I installed I had ramdisk yes in magisk.
 

ZmisiS

Senior Member
Dec 23, 2011
2,802
668
59
Livno
Problem solved. I have rooted System and TWRP. I found instructions on another portal that were written in chronological order and all in one place. I used the latest Android 12, the latest Magisk and the latest TWRP.
 
  • Like
Reactions: J.Michael

J.Michael

Recognized Contributor
Jan 20, 2018
1,261
1,201
Samsung Galaxy Tab A series
So is why this answer, I know what I'm doing I'm rooted like you did without TRWP , just magisk and modified AP flashed with odin then once rooted flashed up-param with odi demarage rooted with no message

There is no way to do with ramdisk, I know some people don't have ramdisk like this S10 exynos yet lineage when I installed I had ramdisk yes in magisk.
What is your question?
 

ZmisiS

Senior Member
Dec 23, 2011
2,802
668
59
Livno
So is why this answer, I know what I'm doing I'm rooted like you did without TRWP , just magisk and modified AP flashed with odin then once rooted flashed up-param with odi demarage rooted with no message

There is no way to do with ramdisk, I know some people don't have ramdisk like this S10 exynos yet lineage when I installed I had ramdisk yes in magisk.
I have not Ramdisk. You have been rooting Android these days and have successfully installed up-param. What's the problem now?
 
  • Like
Reactions: J.Michael

ZmisiS

Senior Member
Dec 23, 2011
2,802
668
59
Livno
In TWRP for Backup I have onley this options. Not have System.
 

Attachments

  • Screenshot_2022-06-29-21-38-23.png
    Screenshot_2022-06-29-21-38-23.png
    209.5 KB · Views: 16
why are there root methods using such long paths? actually there are much simpler root methods?
Here's how I did it: I'm running the latest software, I'm installing the latest version of twrp and vbmeta with odin. Then I open twrp and format the data, on another device, I patch the latest version twrp.img file with magisk and flash it with twrp, then I open it with root using a key combination. I don't use kernel or multidisabler or ap file patch (6gb file is very big),
I guess files like multidisabler are not needed?
is not it right?
 
Last edited:

J.Michael

Recognized Contributor
Jan 20, 2018
1,261
1,201
Samsung Galaxy Tab A series
In TWRP for Backup I have onley this options. Not have System.
It is naming partitions.
The "data" partition is where your changes will be.
I notice it says "excluding storage". I assume "storage" is the part called "internal storage". This part is accessible from a PC. You can use a more normal way to save it. Then, between the TWRP backup of most of the "data" partition, and your backup of internal storage, you would have all of "data" backed up.
I do not understand why they save "data" "excluding storage". That is not a very "image backup" sort of thing to do.
 

J.Michael

Recognized Contributor
Jan 20, 2018
1,261
1,201
Samsung Galaxy Tab A series
why are there root methods using such long paths? actually there are much simpler root methods?
Here's how I did it: I'm running the latest software, I'm installing the latest version of twrp and vbmeta with odin. Then I open twrp and format the data, on another device, I patch the latest version twrp.img file with magisk and flash it with twrp, then I open it with root using a key combination. I don't use kernel or multidisabler or ap file patch (6gb file is very big),
I guess files like multidisabler are not needed?
is not it right?
You are cutting corners. You are getting away with it.
I believe newer TWRPs include what used to be done by the multidisablers.
As for patching TWRP instead of the AP: If Magisk needs to be installed in recovery, and you want TWRP to be your recovery, then TWRP needs to be patched. It could have been done by building a new AP.tar file in which you replaced recovery.img with a renamed copy of TWRP.img. That is what I would have tried, because I do not know what other files in AP.tar get fiddled by Magisk patching. John Wu warns against having less than {boot.img, recovery.img, vbmeta.img} in what you use for an AP.tar. He also warns against not flashing all four files in each use of Odin. These warnings are not "it will fail if you do not heed my warnings", they are "it *might* fail...".

You got lucky. Yay you.
 

meric57

Senior Member
Oct 2, 2017
194
36
Oeutrange
Samsung Galaxy Tab E
Hello ZmisiS, I am rooted its works well or almost.

Why rooting jumps like on put 2 screenshot?

I did nothing else I updated shamiko redmarer as requested, then I look in magisk or setting as I hid magisk.
I see magisk not available and Zygisk not and application ok still install.
So each time I reflash with the 4 file don the patched _magisk -BL-CP-Home CSC, then once rooted restart I reflash up_param.tar and I'm rooted.

Also ramdisk these possible only with lineage 18.1 or we can find a module or do with adb for which works
 

ZmisiS

Senior Member
Dec 23, 2011
2,802
668
59
Livno
Hello ZmisiS, I am rooted its works well or almost.

Why rooting jumps like on put 2 screenshot?

I did nothing else I updated shamiko redmarer as requested, then I look in magisk or setting as I hid magisk.
I see magisk not available and Zygisk not and application ok still install.
So each time I reflash with the 4 file don the patched _magisk -BL-CP-Home CSC, then once rooted restart I reflash up_param.tar and I'm rooted.

Also ramdisk these possible only with lineage 18.1 or we can find a module or do with adb for which works
I have not problem. I installed patched AP, CP, BL and CSC. It is the first installation. When I update new firmware, I use HOME CSC, not CSC. Before root, I install Magisk. After install firmware, if in system not have Magisk, I install Magisk again and follow the instructions. System restart and I have rooted system.

After, I install up_param for logo withaut notifications.

Magisk in my system is this:
 

Attachments

  • Screenshot_20220630-083014.jpg
    Screenshot_20220630-083014.jpg
    512.2 KB · Views: 12
Last edited:
  • Like
Reactions: meric57

ZmisiS

Senior Member
Dec 23, 2011
2,802
668
59
Livno
It is naming partitions.
The "data" partition is where your changes will be.
I notice it says "excluding storage". I assume "storage" is the part called "internal storage". This part is accessible from a PC. You can use a more normal way to save it. Then, between the TWRP backup of most of the "data" partition, and your backup of internal storage, you would have all of "data" backed up.
I do not understand why they save "data" "excluding storage". That is not a very "image backup" sort of thing to do.
If I use Boot and Data, will the backup be worth anything?
 

J.Michael

Recognized Contributor
Jan 20, 2018
1,261
1,201
Samsung Galaxy Tab A series
If I use Boot and Data, will the backup be worth anything?
I think so.
Data should be all installed apps, all settings. (Unless an app saves something on external SD-card, or in "internal memory".)
Boot is less useful: Before you install Magisk, boot partition is as in stock ROM AP.tar file. After you install Magisk, boot partition is the magisk-patched.img. Either way, you already have it.

What is correct spelling of "redmarer"?
 

ZmisiS

Senior Member
Dec 23, 2011
2,802
668
59
Livno
I think so.
Data should be all installed apps, all settings. (Unless an app saves something on external SD-card, or in "internal memory".)
Boot is less useful: Before you install Magisk, boot partition is as in stock ROM AP.tar file. After you install Magisk, boot partition is the magisk-patched.img. Either way, you already have it.

What is correct spelling of "redmarer"?
I don't know what is it "redmarer".
 
  • Like
Reactions: J.Michael

ZmisiS

Senior Member
Dec 23, 2011
2,802
668
59
Livno
I maked screenshot when Backup with TWRP.
 

Attachments

  • 1..png
    1..png
    118.2 KB · Views: 14
  • 2..png
    2..png
    120.9 KB · Views: 14
You are cutting corners. You are getting away with it.
I believe newer TWRPs include what used to be done by the multidisablers.
As for patching TWRP instead of the AP: If Magisk needs to be installed in recovery, and you want TWRP to be your recovery, then TWRP needs to be patched. It could have been done by building a new AP.tar file in which you replaced recovery.img with a renamed copy of TWRP.img. That is what I would have tried, because I do not know what other files in AP.tar get fiddled by Magisk patching. John Wu warns against having less than {boot.img, recovery.img, vbmeta.img} in what you use for an AP.tar. He also warns against not flashing all four files in each use of Odin. These warnings are not "it will fail if you do not heed my warnings", they are "it *might* fail...".

You got lucky. Yay you.
by the way, with my method, there is no need to connect to the computer to boot with root. Just go to phone settings and choose factory reset. it says the phone will be reset, but because I rooted the recovery mode, it opens with root :)
 
  • Like
Reactions: J.Michael

Hykosit

Member
Dec 22, 2021
30
3
Huawei P8lite/P8 Lite

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 every time.

Thanks again (with some time) !
In the end, none of these solutions worked with me, so I currently use an pre-magiskrooted boot image that I found (magisk 23)
 

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.