Samsung Galaxy A21s root with Magisk 25.00 without Twrp

Search This thread

klarmod

New member
Oct 12, 2022
1
0
i'm a sound lover, so i rooted my Samsung to get Viper4AndroidFx working.
I guess that this method is almost universal for Samsung devices, bit i'm not sure about that so be careful with this.


-you will void warranty for your device-

--Root access on the SM-A21F with the newest Firmware(A217FXXU8DVG4) update and Android 12--

if you are new to all of this search for all the things need first.(I used just heimdall for flashing, because JOdin3CASUAL throws error at me because of a corrupted pit file, don't know how to workaround this)

MAKE SURE YOU HAVE THE RIGHT FIRMWARE FOR THE FLASH!!!

Needs:
-Linux Machine for flashing tool Heimdall(try ubuntu studio for sound experience)
sudo apt install heimdall
There is also a frontend(GUI) for this tool:
sudo apt install heimdall-frontend
(install heimdall first, then the frontend)
-samloader Firmware tool(search for instructions to get the right Firmware)
-lz4 compression librarys to decompress the boot.img from stock firmware
-Magisk app(magisk from f-droid works)
-USB debugging allowed and OEM unlock enabled on your Samsung phone(search for developer options to do this and long press vol-up in Download mode)

1. get the firmware with samloader, decode,decompress,rename to ZIP and open the archive.Decompress the AP section, decompress the boot.img.lz4

2.put the boot.img on your phones storage to patch it with Magisk.

3.put the patched boot.img back on your Computer in a new folder and rename it back to it's original name boot.img


-make sure your phone is charged before you flash the image!


4.connect your device in download mode to the Computer(for SM-A217F:turn off the phone, press vol+ and vol- hold it both and connect the USB cable)

5.open a terminal window in the new folder where the patched and renamed boot.img is placed and type sudo heimdall print-pit, it shows the partition table of your device, for --BOOT you can also type the number of the partition as it's shown in the pit file)

sudo heimdall flash --BOOT boot.img

If anything goes wrong you can always flash back the original boot.img from downloaded stock firmware or unroot your device this way.

After this your device is rooted but there is no Twrp custom recovery for ths model yet.
The unofficial release which can be found on xda doesn't work for me. I've flashed it but got stuck in download mode.
Flashing works fine with other rooting tools but there is no way to get rid of the unrooted stock recovery yet.

I cannot guarantee you that this guide won't Brick your phone. Just be careful with the re-partition options in Odin, if you want to use it. All the work can be done with linux, heimdall and magisk.
heimdall print-pit will show the partititition table from your device.
--+no warranties. What works for me must not work for others.
 
Last edited:

hamada2001

New member
Jan 5, 2023
2
0
For everyone who wants to root and no method has worked for him, or you have errors, or your device has not booted after the root.
You can follow the following explanation

Firstly, I used sm-a217f/ds phone
The baseband version is A217FXXU8DVG4
And its protection is U8
Android 12

First of all, you must disable the bootloader ... and this is very important so that no errors occur ... and also do a factory reset for your phone. So you should transfer all your important files before that

1- Get your official ROM from any trusted site
2- Decompress the ROM file and it will show you all the ROM files AP - BL - CP - CSC - HOME_CSC
3- Take the AP file and transfer it to your phone
4- Then download the latest version of the Magisk application
5- Then open the application and inject the AP file into it
6- The injection process takes a relatively long time. I think it takes five minutes or less, depending on the size of the AP file
7- After the injection process is complete, you will find the file that was injected with Magisk in the download files
8- Take the injected file and put it into the computer
9- Then open the Odin application and put the file that was injected into the AP box
10- Put all the rest of the files in your ROM file into Odin
11- We cancel the autorun mode from Odin
12- Then press Start
13- After the process is completed, restart the phone and remove the USB cable, and the phone will ask you to do a factory reset again, and press OK
14- Now the phone supports root
15- After unlocking the phone, install the Magisk app again
16- The application will ask you to download an additional component, click OK, and the phone will restart again
17- Now you have a rooted phone that has been linked to the Magisk application

I think this is the easiest explanation of rooting in detail
And good luck to all of you.
 

localdemoda

New member
Jan 8, 2023
4
1
For everyone who wants to root and no method has worked for him, or you have errors, or your device has not booted after the root.
You can follow the following explanation

Firstly, I used sm-a217f/ds phone
The baseband version is A217FXXU8DVG4
And its protection is U8
Android 12

First of all, you must disable the bootloader ... and this is very important so that no errors occur ... and also do a factory reset for your phone. So you should transfer all your important files before that

1- Get your official ROM from any trusted site
2- Decompress the ROM file and it will show you all the ROM files AP - BL - CP - CSC - HOME_CSC
3- Take the AP file and transfer it to your phone
4- Then download the latest version of the Magisk application
5- Then open the application and inject the AP file into it
6- The injection process takes a relatively long time. I think it takes five minutes or less, depending on the size of the AP file
7- After the injection process is complete, you will find the file that was injected with Magisk in the download files
8- Take the injected file and put it into the computer
9- Then open the Odin application and put the file that was injected into the AP box
10- Put all the rest of the files in your ROM file into Odin
11- We cancel the autorun mode from Odin
12- Then press Start
13- After the process is completed, restart the phone and remove the USB cable, and the phone will ask you to do a factory reset again, and press OK
14- Now the phone supports root
15- After unlocking the phone, install the Magisk app again
16- The application will ask you to download an additional component, click OK, and the phone will restart again
17- Now you have a rooted phone that has been linked to the Magisk application

I think this is the easiest explanation of rooting in detail
And good luck to all of you.
Root achieved with your method, thanks!

Is there any way to remove software installation warning boot message not recognized by samsung and bootloader unlocked message?
 
Last edited:
Jan 24, 2024
8
0
For everyone who wants to root and no method has worked for him, or you have errors, or your device has not booted after the root.
You can follow the following explanation

Firstly, I used sm-a217f/ds phone
The baseband version is A217FXXU8DVG4
And its protection is U8
Android 12

First of all, you must disable the bootloader ... and this is very important so that no errors occur ... and also do a factory reset for your phone. So you should transfer all your important files before that

1- Get your official ROM from any trusted site
2- Decompress the ROM file and it will show you all the ROM files AP - BL - CP - CSC - HOME_CSC
3- Take the AP file and transfer it to your phone
4- Then download the latest version of the Magisk application
5- Then open the application and inject the AP file into it
6- The injection process takes a relatively long time. I think it takes five minutes or less, depending on the size of the AP file
7- After the injection process is complete, you will find the file that was injected with Magisk in the download files
8- Take the injected file and put it into the computer
9- Then open the Odin application and put the file that was injected into the AP box
10- Put all the rest of the files in your ROM file into Odin
11- We cancel the autorun mode from Odin
12- Then press Start
13- After the process is completed, restart the phone and remove the USB cable, and the phone will ask you to do a factory reset again, and press OK
14- Now the phone supports root
15- After unlocking the phone, install the Magisk app again
16- The application will ask you to download an additional component, click OK, and the phone will restart again
17- Now you have a rooted phone that has been linked to the Magisk application

I think this is the easiest explanation of rooting in detail
And good luck to all of you.
im bootlooping i followed all these steps