[Magisk] Root for the Galaxy S10 Series

Search This thread

J.Michael

Senior Member
Jan 20, 2018
704
498
Samsung Galaxy Tab A series
Maybe I'm doing something wrong, but using the HOME_CSC file has consistently led to bootloop, which can only be resolved by wiping /data in the recovery mode, which then breaks root. This occurs whether I re-partition the device or not. In both those cases, however, the storage remains at full capacity (128GB).

After successfully rooting, storage capacity was once again reduced to 32GB. I know I'm not crazy, so this rooting method definitely has bugs.

Another odd thing to note: The "System" section of storage says that 19GB have been used... The firmware is only 5GB and change, and I did a nand erase and re-partition... Where did the extra 11GB of used space come from?

Attempting with a fresh firmware copy led to the same outcome.
Could you say more about "nand erase" and "re-partition"?

Does Odin default to "nand erase"?
Where did you read that you should "nand erase" or "re-partition"?

Wu's notes warn about Odin shrinking /data if you don't give Odin four files. I haven't seen any other reference.
 
Could you say more about "nand erase" and "re-partition"?

Does Odin default to "nand erase"?
Where did you read that you should "nand erase" or "re-partition"?

Wu's notes warn about Odin shrinking /data if you don't give Odin four files. I haven't seen any other reference.
Odin does not default to "nand erase", but it's the only way to restore your storage system back to the correct size if you mess it up. You need to select both "nand erase" and "re-partition", and use the appropriate PIT file, which you extract from the CSC file.

Just flashing the PIT file alone does nothing, at least in my testing it did not.
 
  • Like
Reactions: J.Michael

J.Michael

Senior Member
Jan 20, 2018
704
498
Samsung Galaxy Tab A series
Odin does not default to "nand erase", but it's the only way to restore your storage system back to the correct size if you mess it up. You need to select both "nand erase" and "re-partition", and use the appropriate PIT file, which you extract from the CSC file.

Just flashing the PIT file alone does nothing, at least in my testing it did not.
So, do you only use "nand erase" and the PIT file when recovering from this "data shrunk" condition? Do you use either when trying to "flash" Magisk?
 
So, do you only use "nand erase" and the PIT file when recovering from this "data shrunk" condition? Do you use either when trying to "flash" Magisk?
It is used for recovering from a shrunk data partition, yes. You don't have to use the option when flashing, but it can be a help when going for a completely fresh install.

However, even with this, data on my S10 is still only 32GB.
 

caccamo88

Member
Sep 21, 2014
20
0
hi guys
in a couple of days I will have a s10e and even if was used to root and customize any of my past phones I am thinking to surrender this time, give up....also because always many app do not want customized OS to work (example banking application) kindly can confirm:

1) at every future rom upgrade will have to repeat the process (download firmware, patch with Magisk, flash patched one, FORMAT DATA/LOSE DATA etc.)
2) have to live with warning screen on boot, push power button to forward, and to have finally root on reboot have to press a combination of keys while having some device plugged in usb port

3) and other bad things come in mind to you
Regards
 
Last edited:

jelbo

Senior Member
Jun 20, 2009
642
205
tinyurl.com
hi guys
in a couple of days I will have a s10e and even if was used to root and customize any of my past phones I am thinking to surrender this time, give up....also because always many app do not want customized OS to work (example banking application) kindly can confirm:

1) at every future rom upgrade will have to repeat the process (download firmware, patch with Magisk, flash patched one, FORMAT DATA/LOSE DATA etc.)
2) have to live with warning screen on boot, push power button to forward, and to have finally root on reboot have to press a combination of keys while having some device plugged in usb port

3) and other bad things come in mind to you
Regards

Apps refusing to work on rooted systems are increasing in numbers. Hardware checks are hard to circumvent. If you want to stay up-to-date, yes, a few manual steps are needed each time. It's cumbersome, but if it works, you won't have to lose any data.

Warning screen at boot can be patched away. Key combo is needed. Since Android 11, a USB-OTG data connection is also needed, always, most of the time, or sometimes, depending on something weird unknown.

No other bad things come to mind, but if I could choose again now, I wouldn't bother anymore. Too many headaches and lost time.
 

ZmisiS

Senior Member
Dec 23, 2011
2,592
519
58
Livno
Samsung galaxy S10 (Exyinos), SM-G973F.

I can't install 'magic_patched.img' (Recovery) with ADB on my Windows 10 x64 Pro.

1.png



Driver is this:

2.png


With ADB I've get 'Mode By Param'. When open with 'Vol Down + Bixby + Power' phone connenct with PC used USB, I've get Fast Boot.

Please help.
 
Last edited:

J.Michael

Senior Member
Jan 20, 2018
704
498
Samsung Galaxy Tab A series
Samsung galaxy S10 (Exyinos), SM-G973F.

I can't install 'magic_patched.img' (Recovery) with ADB on my Windows 10 x64 Pro.

View attachment 5304065


Driver is this:

View attachment 5304069

With ADB I've get 'Mode By Param'. When open with 'Vol Down + Bixby + Power' phone connenct with PC used USB, I've get Fast Boot.

Please help.
If that screenshot of a command prompt window shows exactly what you did, then you didn't enter the name of the patched file correctly.

Where did you put the file when you copied it to your PC. If you put it in C:\adb, then you don't need to specify its path. Otherwise, you need to specify the correct path. "/path/to/magisk_patched.img" is a placeholder. You need to replace it with an actual path on your PC.

Also, recent versions of Magisk Manager will give the image file a name like "magisk-patched-iAQzdv.img". Unless you renamed the file, you need to enter the ugly name.
 
  • Like
Reactions: ZmisiS

J.Michael

Senior Member
Jan 20, 2018
704
498
Samsung Galaxy Tab A series
It is C:\adb. I don't know command for install this .img. Command is from here:

What I was trying to say was, your screenshot makes it look like you typed
Code:
fastboot flash recovery /path/to/magisk_patched.img
If you are sitting in "C:\adb", then you don't need to specify the path, so all you need is
Code:
fastboot flash recovery magisk_patched.img
EXCEPT I have read that magisk started putting a random looking string on the end of the name of the patched image file, so you need to put that on your command, because it is part of the name of the file.

You copied the file from your device to your PC. You should be able to find its name. If you have moved Magisk patched images to your PC before, you may have more than one on your PC, so you will have to figure out which one you really want to use.

Try
Code:
DIR /S \*magisk*
Look at all the results. Pick the latest.
 
  • Like
Reactions: ZmisiS

ZmisiS

Senior Member
Dec 23, 2011
2,592
519
58
Livno
With ADB I've get 'Mode By Param'. When open with 'Vol Down + Bixby + Power' phone connenct with PC used USB, I've get Fast Boot.

1.JPEG


2.JPEG



I don’t know if this has anything to do with the problem I have?
 

J.Michael

Senior Member
Jan 20, 2018
704
498
Samsung Galaxy Tab A series
With ADB I've get 'Mode By Param'. When open with 'Vol Down + Bixby + Power' phone connenct with PC used USB, I've get Fast Boot.

View attachment 5305343

View attachment 5305345


I don’t know if this has anything to do with the problem I have?
I'm sorry, I wasn't paying attention to the forum name.

I don't think Samsung supports fastboot. I don't know what instructions you are following, but they probably are not the instructions from this thread.

The ROM you downloaded should have been a .zip file. When you unpack the .zip file, you should get five .tar files. The AP.tar is the one you move to your phone to patch with Magisk. The file you bring back should be magisk_patched-something.tar. You use that .tar in the AP slot in Odin. You use three of the original .tar files in the other slots in Odin.
 

ZmisiS

Senior Member
Dec 23, 2011
2,592
519
58
Livno
On this web page is this:


  • Use either samfirm.js, Frija, or Samloader to download the latest firmware zip of your device directly from Samsung servers.
This is AP file: AP_G973FXXU9FUCD_CL21324211_QB39036441_REV01_user_low_ship_meta_OS11.tar.md5

I've did it.

Is there any other way to install recovery.img?

With Vol Dovn + Bixby + Pover Samsung open Fastboot Mode.

3.png
 
Last edited:
I installed Firmware with magisk patched AP with ODIN, after restart phone I've get rooted phone.

Is it, it?
Reinstall the magisk app, and check. If you are rooted, the app will need to install an extra component, and restart your phone. Let it do it's thing, and remember that you'll need to restart your phone in "recovery" mode to keep root. You can install an app like "Root Essentials", and use it's rebooter interface, just select "Recovery mode" anytime you need to restart your phone.
 
  • Like
Reactions: ZmisiS

ZmisiS

Senior Member
Dec 23, 2011
2,592
519
58
Livno
Reinstall the magisk app, and check. If you are rooted, the app will need to install an extra component, and restart your phone. Let it do it's thing, and remember that you'll need to restart your phone in "recovery" mode to keep root. You can install an app like "Root Essentials", and use it's rebooter interface, just select "Recovery mode" anytime you need to restart your phone.

I reinstalled the magisk app, magisk app needed restart, and I clicked on magisk and phone restarted. I installed Root Essentials, but I can't see Recovery mode.

I tried install TWRP and phone bootloop in TWRP. I again installed frimware with patched AP and it is O.K.

I've not flashed recovery magisk_patched.img.
 
Last edited:
  • Like
Reactions: J.Michael
I reinstall the magisk app, magisk app need restart, and I click on magisk and phone restart. I installed Root Essentials, but I can't see Recovery mode.

I tried install TWRP and phone bootloop in TWRP. Again install frimware with patched AP and it is O.K.

I've not flashed recovery magisk_patched.img.
Oh man... DON'T do that! You cannot have TWRP and Magisk installed at the same time with this root method, as Magisk takes over the recovery slot normally taken up by TWRP.

If you've installed Root Essentials correctly, the rebooter option is partway down on the main "Tools" tab. Tapping on it will show you the various reboot options.

"Quick Reboot" will in theory reboot your device, while maintaining rooted status. If it doesn't, just hook up a USB cable, and use the ADB command: "adb reboot recovery"

"Reboot Recovery" will do exactly as it says, except since the magisk method was used to root, this will reboot your phone in rooted mode.

The app itself will not open correctly if your device is not rooted successfully.
 

ZmisiS

Senior Member
Dec 23, 2011
2,592
519
58
Livno
Oh man... DON'T do that! You cannot have TWRP and Magisk installed at the same time with this root method, as Magisk takes over the recovery slot normally taken up by TWRP.

If you've installed Root Essentials correctly, the rebooter option is partway down on the main (red) tab. Tapping on it will show you the various reboot options.

"Quick Reboot" will in theory reboot your device, while maintaining rooted status. If it doesn't, just hook up a USB cable, and use the ADB command: "adb reboot recovery"

"Reboot Recovery" will do exactly as it says, except since the magisk method was used to root, this will reboot your phone in rooted mode.

The app itself will not open correctly if your device is not rooted successfully.
For install TWRP I need root? It's all tangled up for me. I need and root and TWRP. My English not O.K.

Application open. I click on Reboter, after I click Reboot Recovery and phone rstart. Not open Recovery.
 
For install TWRP I need root? It's all tangled up for me. I need and root and TWRP. My English not O.K.

Application open. I click on Reboter, after I click Reboot Recovery and phone rstart. Not open Recovery.
Once you've rooted your phone with Magisk, just stop. That's as far as you can go, you *cannot* install TWRP.

The rebooter is working correctly, when Magisk is installed, this is the intended method of operation.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Hi!
    Can I root latest Android 11 with One UI 3.1 and security updates from June 1. 2021?
    Yes. I have update on Android patched 1. june 2021.
    1
    Thanks for the tip!

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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