[HowTo] Magisk install without TWRP


katerpanne

Members
Apr 19, 2014
2,541
332
to install magisk for a12 without twrp follow this…

you have to patch boot.img and install it with fastboot

unhide magisk by itself and disable the modules before update and use canary or v24.x build of magisk

Good description:
https://xiaomi.eu/community/threads...cc9-with-magisk-no-ramdisk.64174/#post-639706

Some more descriptions:
https://xiaomi.eu/community/threads/21-6-30.62035/page-2#post-617162

https://www.droidwin.com/root-android-devices-without-twrp-recovery/

use canary version magisk for a12 example links
https://raw.githubusercontent.com/topjohnwu/magisk-files/canary/app-debug.apk
https://www.xda-developers.com/magisk-canary-release-android-12-support/
 
Last edited:

PaoloCosta86

Members
Nov 30, 2018
7
15
Smartphone: Mi 10T Lite
Rom installed: weekly EU (xiaomi.eu_multi_HMNote9Pro5G_MI10TLite_22.1.6_v13-12-fastboot)

Hi guys.
I would like to root my smartphone installing Magisk without recovery.
I installed the Magisk app and I noticed that I have "ramdisk: yes"
Now i was wondering how to find the boot.img file that i need to patch.
Is this the proper file?
 

Attachments

  • Screenshot (3).jpg
    Screenshot (3).jpg
    222.7 KB · Views: 316

katerpanne

Members
Apr 19, 2014
2,541
332
Smartphone: Mi 10T Lite
Rom installed: weekly EU (xiaomi.eu_multi_HMNote9Pro5G_MI10TLite_22.1.6_v13-12-fastboot)

Hi guys.
I would like to root my smartphone installing Magisk without recovery.
I installed the Magisk app and I noticed that I have "ramdisk: yes"
Now i was wondering how to find the boot.img file that i need to patch.
Is this the proper file?
It should be, enable file extension or list directory to be sure I dont have a fastboot image here to validate

The filename is normally boot.img
 
  • Like
Reactions: PaoloCosta86

Vincent.Chan

Members
Aug 28, 2017
17
13
ohno, i need magisk hide .many app check if the phone is rooted,if so it will exit.is it possible to get that back
 

Dragon16

Members
Sep 1, 2019
46
20
I know this is not the right place, I don't know where to post this problem.

I have the Miui 13 with the magisk canary, everything works perfect, except that the Mario Kart Tour game no longer appears in the goolge store.
I tried to download the apk of the game separately, it installs normally but when it enters the game it gives an error and locks the screen.

I formatted and installed Miui 13 without Magisk and Mario Kart returns to the store to download and it works perfectly.

What to do?
 

katerpanne

Members
Apr 19, 2014
2,541
332
I know this is not the right place, I don't know where to post this problem.

I have the Miui 13 with the magisk canary, everything works perfect, except that the Mario Kart Tour game no longer appears in the goolge store.
I tried to download the apk of the game separately, it installs normally but when it enters the game it gives an error and locks the screen.

I formatted and installed Miui 13 without Magisk and Mario Kart returns to the store to download and it works perfectly.

What to do?
 
  • Like
Reactions: Dragon16

katerpanne

Members
Apr 19, 2014
2,541
332

zgfg12

Members
Apr 27, 2021
253
87
Xiaomi 11 Lite 5g NE (Lisa)
Xiaomi.eu Stable 12.5.7 is A/B device
(Similarly all the new A12 fastboot ROMs)

For A/B devices, shouldn't patched boot images be flashed to both slots pls?

fastboot flash boot_a patched_boot.img
fastboot flash boot_b patched_boot.img
 
Last edited:

katerpanne

Members
Apr 19, 2014
2,541
332
Xiaomi 11 Lite 5g (Lisa)
Xiaomi.eu Stable 12.5.7 is A/B device
(Similarly all the new A12 fastboot ROMs)

For A/B devices, shouldn't patched boot images be flashed to both slots pls?

fastboot flash boot_a patched_boot.img
fastboot flash boot_b patched_boot.img
you can do / try it if you want. It was not necessary for me…
 
  • Like
Reactions: zgfg12

dljkacs

Members
May 23, 2020
3
15
Great job, thanks.
 

Attachments

  • Screenshot_2022-01-29-19-26-09-665_com.android.settings.jpg
    Screenshot_2022-01-29-19-26-09-665_com.android.settings.jpg
    268.7 KB · Views: 196
  • Screenshot_2022-01-30-17-15-27-175_com.joeykrim.rootcheck.jpg
    Screenshot_2022-01-30-17-15-27-175_com.joeykrim.rootcheck.jpg
    458.4 KB · Views: 194
  • Like
Reactions: katerpanne

zgfg12

Members
Apr 27, 2021
253
87
Sorry, I'm still new with A/B devices

Is it really that A/B devices do not have Recovery partition and that custom recovery (TWRP) must be flashed to the Boot (being it boot_a or boot_b, depending on which slot is currently active)?

What if I want to permanently have both Magisk and TWRP:

- I have flashed Magisk patched boot.img to boot (active slot) and it works fine

- Should I flash TWRP img to the opposite/inactive Boot slot?

Then, when I want to boot to TWRP, should I force booting to the inactive slot, or how else?

PS:
I tested fastboot boot for temporarily booting to TWRP and it was ok

I tried fastboot flash recovery (like permanent flash) but it failed, target recovery was not recognized.
And indeed, there is no recovery when I look to:
/dev/block/bootdevice/by-name
 

katerpanne

Members
Apr 19, 2014
2,541
332
Sorry, I'm still new with A/B devices

Is it really that A/B devices do not have Recovery partition and that custom recovery (TWRP) must be flashed to the Boot (being it boot_a or boot_b, depending on which slot is currently active)?

What if I want to permanently have both Magisk and TWRP:

- I have flashed Magisk patched boot.img to boot (active slot) and it works fine

- Should I flash TWRP img to the opposite/inactive Boot slot?

Then, when I want to boot to TWRP, should I force booting to the inactive slot, or how else?

PS:
I tested fastboot boot for temporarily booting to TWRP and it was ok

I tried fastboot flash recovery (like permanent flash) but it failed, target recovery was not recognized.
And indeed, there is no recovery when I look to:
/dev/block/bootdevice/by-name
look here… perhaps it will help you…
 

Louisfan123

Members
Feb 14, 2022
6
5
I have difficulties too rooting my Mi 11 Ultra with Android 12. I have installed the latest canary of Magisk and when I patch the boot.img and flash it the device stucks on Android logo. Booting with this Boot Image without flashing isn't possible, too. When I patch the boot.img with Magisk v23 the device starts with this patched boot.img, but I have no root. I have installed the Xiaomi.eu Rom 13.0.9.0 with Android 12.
 

katerpanne

Members
Apr 19, 2014
2,541
332
I have difficulties too rooting my Mi 11 Ultra with Android 12. I have installed the latest canary of Magisk and when I patch the boot.img and flash it the device stucks on Android logo. Booting with this Boot Image without flashing isn't possible, too. When I patch the boot.img with Magisk v23 the device starts with this patched boot.img, but I have no root. I have installed the Xiaomi.eu Rom 13.0.9.0 with Android 12.
did you unhide magisk before and disabled all module before ?
 

Louisfan123

Members
Feb 14, 2022
6
5
There was a second app called "Settings" which was the Magisk app. I just uninstalled Settings and Magisk and installed the newest canary. Now in Magisk Superuser and Modules are greyed out.
 

mikep47

Members
Jul 3, 2021
6
15
I honestly wouldn't bother with v24. V23 worked perfectly and you didn't need to do all this screwing around. All it does is take away the essential functionality of the app. I spent a couple hours on it, still couldn't pass safetynet and said forget it. If you're stuck in the middle somewhere, just use the uninstall function in whatever version you have, and it will unroot your device. Start from scratch and use V23 is my advice.

Basics of install:

1. Find or redownload the zip file for your current ROM (ie. xiaomi.eu_multi_MI11Pro_MI11Ultra_V13.0.9.0.SKACNXM_v13-12-fastboot .zip)
2. Browse inside the zip file and find boot.img under the images folder
3. Copy this file to a temporary location in your PC first, and then transfer it to your phone
4. Install the desired version of Magisk app (i recommend V23)
5. Run the app and choose Install under Magisk
6. Choose Select and Patch a File, then select the boot.img that was transferred earlier
7. A process will run and create a new .img file in the same folder where the original one was
8. Transfer the new file to your PC in the same directory where fastboot.exe is located
9. Open a command prompt window in that same directory
10. Reboot your phone to fastboot mode and connect to PC, suggest USB2.0 port. Check for connection by running command fastboot devices.
11. Run the command fastboot flash boot_ab magiskXXXX.img

Once it's completed, run command fastboot reboot and the phone should boot and be rooted.
 
Last edited:

Louisfan123

Members
Feb 14, 2022
6
5
No success with your method. The device boots with the flashed patched boot.img, but Magisk says "Installed: N/A", so theres no root.

Could you upload your patched boot.img which is working so I can flash this one on my device? Perhaps so I can get root. The last way for me would be flashing the rom again with erasing all my data and try gain to get root. The device is very laggy without root and the battery don't last so long as with my old Android 11 rom with root and some battery optimations.

Does anybody know if EdXposed Manager works again with root so I could get the optimations of CustoMiUizer back?
 

mikep47

Members
Jul 3, 2021
6
15
Are you positive you used the boot.img from your current rom version? I would flash the original boot.img, remove all ylur modules first, remove magisk completely, delete all the files you used from your PC and start at the beginning. This happened to me too, i was using an old boot.img from a previous version by accident, had all kinds of issues.
 

Louisfan123

Members
Feb 14, 2022
6
5
Yes, it's the original boot.img from the Fastboot rom zipfile which I have pacthed and flashed. I have deleted and reinstalled Magisk severall times (v23, v23 Beta, v24, v24.1, the last canary version). I also tried to flash Magisk in TWRP 3.60, my device hasn't started with this method, too.
 

katerpanne

Members
Apr 19, 2014
2,541
332
No success with your method. The device boots with the flashed patched boot.img, but Magisk says "Installed: N/A", so theres no root.

Could you upload your patched boot.img which is working so I can flash this one on my device? Perhaps so I can get root. The last way for me would be flashing the rom again with erasing all my data and try gain to get root. The device is very laggy without root and the battery don't last so long as with my old Android 11 rom with root and some battery optimations.

Does anybody know if EdXposed Manager works again with root so I could get the optimations of CustoMiUizer back?
I use LSPosed and customiuizer...