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.
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: