Patched Magisk v23 for Galaxy A21s (A11/OneUI 3)

Search This thread

DKXC

Senior Member

Patched Magisk v23 for A21s (A11/OneUI 3)​


Since I've seen and tried installing Magisk via the default instructions from the legend topjohnwu himself, I noticed it does not work at all. The phone
just doesn't even boot into Android at all, and after researching I have seen that this is a very specific problem with the phone itself due to weird implementation from Samsung.
Extremely simplified, apparently there is a conflict with skip-initramfs because of System-as-Root and the A/B system partitioning introduced with Project Treble. I will still have to read more into it.

There are already patched Magisk apps/images for this phone available, but I noticed they are not really in active development (last patched Magisk was still v22), so I pulled the latest Magisk from the official repository and implemented the fix from this pull request on the official repo. They are not interested in accepting the pull request, so we'll have to do our own "Magisk" for the time being.

I will try to update this as much as possible and try to incorporate fixes, user feedback and more. This has been only tested on latest A11 and OneUI 3. I will also start working on TWRP soon.

Since the APK isn't signed yet, please uninstall Magisk Manager if present, and install this one. It will display a warning when installing, but don't worry.

Options to install:
  • Flash boot.tar from the ZIP in Odin on AP
  • Install the APK from this thread and patch your own boot image
 

Attachments

  • app-debug.apk
    16.2 MB · Views: 1,215
  • patched_magisk_v23.zip
    13.1 MB · Views: 1,145
Last edited:

Elkingb

Member
May 19, 2021
35
7
magisk app-debug.apk working, but boot.img from
Model Number : SM-A217M
Region Code : COB
Device Version info :->>
BL version : A217MUBS5CUE2
AP version : A217MUBS5CUE2
 

Attachments

  • Screenshot_20210602-133709.jpg
    Screenshot_20210602-133709.jpg
    189.1 KB · Views: 233

Elkingb

Member
May 19, 2021
35
7

Patched Magisk v23 for A21s (A11/OneUI 3)​


Since I've seen and tried installing Magisk via the default instructions from the legend topjohnwu himself, I noticed it does not work at all. The phone
just doesn't even boot into Android at all, and after researching I have seen that this is a very specific problem with the phone itself due to weird implementation from Samsung.
Extremely simplified, apparently there is a conflict with skip-initramfs because of System-as-Root and the A/B system partitioning introduced with Project Treble. I will still have to read more into it.

There are already patched Magisk apps/images for this phone available, but I noticed they are not really in active development (last patched Magisk was still v22), so I pulled the latest Magisk from the official repository and implemented the fix from this pull request on the official repo. They are not interested in accepting the pull request, so we'll have to do our own "Magisk" for the time being.

I will try to update this as much as possible and try to incorporate fixes, user feedback and more. This has been only tested on latest A11 and OneUI 3. I will also start working on TWRP soon.

Since the APK isn't signed yet, please uninstall Magisk Manager if present, and install this one. It will display a warning when installing, but don't worry.

Options to install:
  • Flash boot.tar from the ZIP in Odin on AP
  • Install the APK from this thread and patch your own boot image
Good job. thanks you, i wait updates
 

LonelyCracker

Member
May 4, 2021
28
6
To DKXC:
Hi There Expert,
I Would Recommend You To Upload Your Project To Github,
So Everyone Will Be Able To Give You Feedback
It Will Probably Help You In Developing A Better A21s Community
 

skazi.chris

Member
Feb 27, 2016
5
2
Flashing this patched_magisk_v23\boot.tar ain't working.

Error displayed on the DL screen:
Only official released binaries are allowed to be flashed (BOOT)


My specs:
Loading ADB module.............OK
Starting ADB module...OK
Searching for SAMSUNG ADB device...OK
Checking device authorization...OK
Reading ADB device information...
ADB Serial Number : R58R52BFNKP
Model Name : SM-A217F
Device CodeName : A21S
Hardware : EXYNOS850 EXYNOS850
Modem Board : SHANNON318
HW Version : MP 0.500
BL version : A217FXXU5CUD6
AP version : A217FXXU5CUD6
CP version : A217FXXU5CUD4,A217FXXU5CUD4
CSC version : A217FOXM5CUD6
Android version : 11
Build date : Thu Apr 29 11:41:41 +07 2021
Country : Poland
IMEI : 35xxxxxxxx691
Serial Number : N/A
Carrier : XEO
Unlock by IMEI : Unknown
SIM State : ABSENT,ABSENT
Debug Level : 0x4f4c
CP Debug Level : N/A
Warranty VOID : 1
SIM operator : N/A
USB Settings : MTP,ADB

SamKEY Team (2017)
 

Attachments

  • Screenshot 2021-06-12 at 14.10.10.png
    Screenshot 2021-06-12 at 14.10.10.png
    320.6 KB · Views: 110
  • Like
Reactions: olavar

skazi.chris

Member
Feb 27, 2016
5
2
Installed app-debug.apk (patched Magisk) onto the phone.

Downloaded original XEO firmware.
Samfw.com_SM-A217F_XEO_A217FXXU5CUD6_fac.zip

Unzipped it.
Found AP file inside unzipped folder:
AP_A217FXXU5CUD6_CL21209953_QB39896814_REV00_user_low_ship_MULTI_CERT_meta_RKEY_OS11.tar.md5

Unpacked the AP file.
Contents:
Screenshot 2021-06-12 at 14.24.57.png

Decoded the boot.img.lz4 file using LZ4 tool:
Screenshot 2021-06-12 at 15.01.30.png



Copied boot.img file to the phone internal memory.
Screenshot 2021-06-12 at 15.03.30.png


Opened Magisk and patched the boot.img file, which created magisk_patched-23001_nmETW.img in the phone Downloads folder

Screenshot 2021-06-12 at 15.26.30.png
Screenshot 2021-06-12 at 15.27.00.png


Copied patched file (magisk_patched-23001_nmETW.img) from the phone to my laptop - and changed its name to boot.img
Compressed it into boot.tar file using 7zip.

Screenshot 2021-06-12 at 15.18.58.png



Restarted the phone into DOWNLOAD mode (using SamKey, or adb, or key combinantion, whatever).

Put boot.tar into AP section in ODIN.
Go to Options tab and disable "Auto Reboot", make sure "Re-Partition" is also disabled.

Screenshot 2021-06-12 at 15.20.00.png



Aaand it fails again.
Screenshot 2021-06-12 at 15.24.44.png


And the message in phone DL mode says:
Only official released binaries are allowed to be flashed(boot)
IMG_20210612_153512.png


Perhaps vsmeta.img also needs to be included into the tar file?
No idea how to move on with this subject.
 

Attachments

  • Screenshot 2021-06-12 at 15.20.00.png
    Screenshot 2021-06-12 at 15.20.00.png
    240.9 KB · Views: 76
  • Like
Reactions: olavar

Jukmisael

Senior Member
Installed app-debug.apk (patched Magisk) onto the phone.

Downloaded original XEO firmware.
Samfw.com_SM-A217F_XEO_A217FXXU5CUD6_fac.zip

Unzipped it.
Found AP file inside unzipped folder:
AP_A217FXXU5CUD6_CL21209953_QB39896814_REV00_user_low_ship_MULTI_CERT_meta_RKEY_OS11.tar.md5

Unpacked the AP file.
Contents:
View attachment 5336407

Decoded the boot.img.lz4 file using LZ4 tool:
View attachment 5336525


Copied boot.img file to the phone internal memory.
View attachment 5336527

Opened Magisk and patched the boot.img file, which created magisk_patched-23001_nmETW.img in the phone Downloads folder

View attachment 5336541View attachment 5336543

Copied patched file (magisk_patched-23001_nmETW.img) from the phone to my laptop - and changed its name to boot.img
Compressed it into boot.tar file using 7zip.

View attachment 5336545


Restarted the phone into DOWNLOAD mode (using SamKey, or adb, or key combinantion, whatever).

Put boot.tar into AP section in ODIN.
Vá para a guia Opções e desative "Reinicialização automática", certifique-se de que "Re-Partição" também esteja desativado.

View attachment 5336551


Aaand ele falha novamente.
View attachment 5336553

E a mensagem no modo DL do telefone diz:
Apenas binários lançados oficialmente podem ser atualizados (boot)
View attachment 5336559

Talvez o vsmeta.img também precise ser incluído no arquivo tar?
Não tenho ideia de como seguir em frente com esse assunto.
Edit3: Use MiracleBox to pass the Prenormal you have to Checking, I had this problem on J7NXT, and I made this post to help.
Edit4: Full AP patch on Magisk, and use full patched on Odin.
First with Unlock, go to developer options and activate Unlock Bootloader, restart in download mode, Press the Vol UP button, if reset only, do it again, Download->VolUP Mode, until formatting, In download mode, with all Unlock, go to Odin. Now with the Magisk patched file modified for the A21s, the entire Magisk .tar, you don't need to unpack boot.img.lz4, After this it is normal to start, it will give you an unlocked system alert, just press the Power button to continue, then an Unofficial System warning will appear and just wait A few seconds it starts normally (first boot takes considerable time)

Some tips:
-With V23 use LsPosed to use Xposed framework, Edxposed has infinite log bugs, which causes conflict and slowdown.

-For SatefyNet, Use MagiskHide only apps needed to avoid unnecessary processes, install Universal SatefyNet Fix module, Only this gets through SafetyNet, you don't need to install additional modules for SafetyNet, it will just slow down the system.

For those who use Lucky Patcher:
-Use in LsPosed, and activate it for System Framework and Play Store, you don't need to activate for each app, it will only slow down. Use CorePatch to go through the signatures as Lucky Patcher cannot do this function on Android 11. Use Lucky Patcher with LsPosed as LP Patch's are not compatible with Android 11 But LSPOSED does, so it can work just fine.

For those who use Game Guardian:
-It is best to use a Virtual System, as its functions on Android 11 are limited as it is not 100% compatible.

All I have from my own experience is:
-Avoid redundant modules as much as possible, as they can affect the battery and the System.
 
Last edited:

marc745

New member
Edit3: Use MiracleBox to pass the Prenormal you have to Checking, I had this problem on J7NXT, and I made this post to help.
Edit4: Full AP patch on Magisk, and use full patched on Odin.
First with Unlock, go to developer options and activate Unlock Bootloader, restart in download mode, Press the Vol UP button, if reset only, do it again, Download->VolUP Mode, until formatting, In download mode, with all Unlock, go to Odin. Now with the Magisk patched file modified for the A21s, the entire Magisk .tar, you don't need to unpack boot.img.lz4, After this it is normal to start, it will give you an unlocked system alert, just press the Power button to continue, then an Unofficial System warning will appear and just wait A few seconds it starts normally (first boot takes considerable time)

Some tips:
-With V23 use LsPosed to use Xposed framework, Edxposed has infinite log bugs, which causes conflict and slowdown.

-For SatefyNet, Use MagiskHide only apps needed to avoid unnecessary processes, install Universal SatefyNet Fix module, Only this gets through SafetyNet, you don't need to install additional modules for SafetyNet, it will just slow down the system.

For those who use Lucky Patcher:
-Use in LsPosed, and activate it for System Framework and Play Store, you don't need to activate for each app, it will only slow down. Use CorePatch to go through the signatures as Lucky Patcher cannot do this function on Android 11. Use Lucky Patcher with LsPosed as LP Patch's are not compatible with Android 11 But LSPOSED does, so it can work just fine.

For those who use Game Guardian:
-It is best to use a Virtual System, as its functions on Android 11 are limited as it is not 100% compatible.

All I have from my own experience is:
-Avoid redundant modules as much as possible, as they can affect the battery and the System.
Patching the entire TAR with patched Magisk did the trick. Thank you very much!
 

Olep84

Member
May 6, 2021
7
0
Did this solution also work on the latest SW update?
I tried all, but Stuck at ODIN prism.img

when I use the Magisk tutorial

i get the error Only official released binaries are allowed to be flasehd (boot)

Relock/Unlock Bootloader is necessary, then it work with patching the complete AP file

thanks for the tips
 
Last edited:

sahil_bhandari

Senior Member
Aug 14, 2021
157
14
20
Bombay
www.youtube.com

Patched Magisk v23 for A21s (A11/OneUI 3)​


Since I've seen and tried installing Magisk via the default instructions from the legend topjohnwu himself, I noticed it does not work at all. The phone
just doesn't even boot into Android at all, and after researching I have seen that this is a very specific problem with the phone itself due to weird implementation from Samsung.
Extremely simplified, apparently there is a conflict with skip-initramfs because of System-as-Root and the A/B system partitioning introduced with Project Treble. I will still have to read more into it.

There are already patched Magisk apps/images for this phone available, but I noticed they are not really in active development (last patched Magisk was still v22), so I pulled the latest Magisk from the official repository and implemented the fix from this pull request on the official repo. They are not interested in accepting the pull request, so we'll have to do our own "Magisk" for the time being.

I will try to update this as much as possible and try to incorporate fixes, user feedback and more. This has been only tested on latest A11 and OneUI 3. I will also start working on TWRP soon.

Since the APK isn't signed yet, please uninstall Magisk Manager if present, and install this one. It will display a warning when installing, but don't worry.

Options to install:
  • Flash boot.tar from the ZIP in Odin on AP
  • Install the APK from this thread and patch your own boot image
Haha thank you so much bro it worked for M12 too I took the apk file and flashed :p
 

cater2

Senior Member
Aug 4, 2021
82
23
Samsung Galaxy M12
Did this solution also work on the latest SW update?
I tried all, but Stuck at ODIN prism.img

when I use the Magisk tutorial

i get the error Only official released binaries are allowed to be flasehd (boot)

Relock/Unlock Bootloader is necessary, then it work with patching the complete AP file

thanks for the tips
Are you sure you unlock Bootloader?


====#####=======

In relation to the topic, I think that this one will also be abandoned. Eagerly waiting for a developer to look at the A21S/M12 to finally get Magisk working without a patch
 
Last edited:

sahil_bhandari

Senior Member
Aug 14, 2021
157
14
20
Bombay
www.youtube.com
Did this solution also work on the latest SW update?
I tried all, but Stuck at ODIN prism.img

when I use the Magisk tutorial

i get the error Only official released binaries are allowed to be flasehd (boot)

Relock/Unlock Bootloader is necessary, then it work with patching the complete AP file

thanks for the tips
Have you used the patched magisk or official one; see official one doesn't work on a21s and m12 i was getting that error before but it solved by using patched one see the first post and download the .apk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3

    Patched Magisk v23 for A21s (A11/OneUI 3)​


    Since I've seen and tried installing Magisk via the default instructions from the legend topjohnwu himself, I noticed it does not work at all. The phone
    just doesn't even boot into Android at all, and after researching I have seen that this is a very specific problem with the phone itself due to weird implementation from Samsung.
    Extremely simplified, apparently there is a conflict with skip-initramfs because of System-as-Root and the A/B system partitioning introduced with Project Treble. I will still have to read more into it.

    There are already patched Magisk apps/images for this phone available, but I noticed they are not really in active development (last patched Magisk was still v22), so I pulled the latest Magisk from the official repository and implemented the fix from this pull request on the official repo. They are not interested in accepting the pull request, so we'll have to do our own "Magisk" for the time being.

    I will try to update this as much as possible and try to incorporate fixes, user feedback and more. This has been only tested on latest A11 and OneUI 3. I will also start working on TWRP soon.

    Since the APK isn't signed yet, please uninstall Magisk Manager if present, and install this one. It will display a warning when installing, but don't worry.

    Options to install:
    • Flash boot.tar from the ZIP in Odin on AP
    • Install the APK from this thread and patch your own boot image
    2
    magisk app-debug.apk working, but boot.img from
    Model Number : SM-A217M
    Region Code : COB
    Device Version info :->>
    BL version : A217MUBS5CUE2
    AP version : A217MUBS5CUE2
    1
    Flashing this patched_magisk_v23\boot.tar ain't working.

    Error displayed on the DL screen:
    Only official released binaries are allowed to be flashed (BOOT)


    My specs:
    Loading ADB module.............OK
    Starting ADB module...OK
    Searching for SAMSUNG ADB device...OK
    Checking device authorization...OK
    Reading ADB device information...
    ADB Serial Number : R58R52BFNKP
    Model Name : SM-A217F
    Device CodeName : A21S
    Hardware : EXYNOS850 EXYNOS850
    Modem Board : SHANNON318
    HW Version : MP 0.500
    BL version : A217FXXU5CUD6
    AP version : A217FXXU5CUD6
    CP version : A217FXXU5CUD4,A217FXXU5CUD4
    CSC version : A217FOXM5CUD6
    Android version : 11
    Build date : Thu Apr 29 11:41:41 +07 2021
    Country : Poland
    IMEI : 35xxxxxxxx691
    Serial Number : N/A
    Carrier : XEO
    Unlock by IMEI : Unknown
    SIM State : ABSENT,ABSENT
    Debug Level : 0x4f4c
    CP Debug Level : N/A
    Warranty VOID : 1
    SIM operator : N/A
    USB Settings : MTP,ADB

    SamKEY Team (2017)
    1
    Installed app-debug.apk (patched Magisk) onto the phone.

    Downloaded original XEO firmware.
    Samfw.com_SM-A217F_XEO_A217FXXU5CUD6_fac.zip

    Unzipped it.
    Found AP file inside unzipped folder:
    AP_A217FXXU5CUD6_CL21209953_QB39896814_REV00_user_low_ship_MULTI_CERT_meta_RKEY_OS11.tar.md5

    Unpacked the AP file.
    Contents:
    Screenshot 2021-06-12 at 14.24.57.png

    Decoded the boot.img.lz4 file using LZ4 tool:
    Screenshot 2021-06-12 at 15.01.30.png



    Copied boot.img file to the phone internal memory.
    Screenshot 2021-06-12 at 15.03.30.png


    Opened Magisk and patched the boot.img file, which created magisk_patched-23001_nmETW.img in the phone Downloads folder

    Screenshot 2021-06-12 at 15.26.30.png
    Screenshot 2021-06-12 at 15.27.00.png


    Copied patched file (magisk_patched-23001_nmETW.img) from the phone to my laptop - and changed its name to boot.img
    Compressed it into boot.tar file using 7zip.

    Screenshot 2021-06-12 at 15.18.58.png



    Restarted the phone into DOWNLOAD mode (using SamKey, or adb, or key combinantion, whatever).

    Put boot.tar into AP section in ODIN.
    Go to Options tab and disable "Auto Reboot", make sure "Re-Partition" is also disabled.

    Screenshot 2021-06-12 at 15.20.00.png



    Aaand it fails again.
    Screenshot 2021-06-12 at 15.24.44.png


    And the message in phone DL mode says:
    Only official released binaries are allowed to be flashed(boot)
    IMG_20210612_153512.png


    Perhaps vsmeta.img also needs to be included into the tar file?
    No idea how to move on with this subject.
    1
    I have the SM-A215U. I get the impression this method won't work for me.
    I have Developers Options, but do NOT have the OEM option in that menu.
    Is there anyway to unlock it without that menu item?