[Development] How to use Magisk Manager & boot.img to root Android
[Development] How to use Magisk Manager & boot.img to root Android
fastboot devices
fastboot flash boot patched_boot.img
fastboot reboot
fastboot reboot fastboot
adb remount
adb shell
mv /system/xbin/su /system/xbin/subk
Quote:In this video tutorial, I'll be explaining how to root an Android device using magisk manager and a boot.img. Now you need to get the boot.img for your phone either from the firmware which you downloaded online or from a rom which you backed up or extracted from your phone. You can backup your phone using a variety of tools depending on your chipset but anyway you either get the boot.img from the firmware or extracted from your phone.
Now, once you have your boot.img, you need to copy to your phone storage because you're going to be working on that on the device. Now I have my magisk installed and I'm also going to check my root status to show that the phone is not rooted okay? so I'm starting from the very beginning, from scratch. So you can see I do not have root access on this phone so I will be rooting the phone using magisk and my boot.img. Now, its very important you get a boot.img for your variant. You know, when it comes to Android, there are number of variants so you just can't use any boot.img on your device. You need to get one that is for your variant or close to your build number even for your build number okay?
So once you have that in place, you're going to launch magisk manager. On this screen, you just select NO THANKS. Now, if you're using a Samsung device you might want to change your settings. You come under Patch Boot Output Format. Now, you'll want to change yours to .img.tar that is for Samsung users who want to flash their patched boot.img using Odin okay? but I want to use in .img format so I'll just leave it as it is ok? Samsung users just take note of that alright? So now at this screen, you're going to tap Install then you tap Install again.
Now you're going to select Patch Boot Image File. Now, I'm going to locate my stock boot.img, I saved that to the Hovatek folder on my internal storage. Okay, I have it here. I'm going to select it now so I'm going to allow. So now you'll notice that magisk is going to download the zip file and then begin patching alright? So I'll just wait a couple of seconds for okay it's almost done, I think I can just slide off so you can see. So now what is happening right now is that magisk is now patching the boot image which I just loaded and then it's going to produce the patched boot.img for me, its going to save it to the phone storage for me alright?
So once that is done, I'll just head over to flashing the patched boot.img to my device okay? packing boot image. You might be wondering why I have adb opened here. Its because I want to flash using fastboot. Alright! so it says patched boot image is placed here so I'm going to actually verify that by launching my file manager. Internal storage. I'm looking for Magisk Manager. As you can see, I have my patched boot.img, its 11.43 MB. So now, I'm going to copy this file to my PC from which I'm going to flash. Now, at this point, you now need to flash your boot.img .There's a lot of ways you can flash your boot image depending on your kind of chipset and what you have. You might decide to flash using a tool, maybe like Odin, SP Flash tool, Research Download tool, Miracle box, depending on what you have at the moment or for most devices, you can flash using fastboot.
Now, I'm going to be demonstrating how to flash using fastboot okay because that's quite general for devices alright? So first off, I need to copy this patched boot image to my device and that would take a couple of seconds so let me just do that quickly. Alright so I've copied the patched boot.img to my adb folder and that is what I have over here as you can see so now I'm going to be flashing this using fastboot. Don't forget, you can flash your boot image using a variety of methods, it depends on your chipset but I'm using fastboot because that's actually quite general alright? So now, before you can use fastboot on your device, you need to have unlocked your bootloader.
We have a guide on how to unlock your bootloader. Just check our forum, search for how to unlock the bootloader of an Android device, we have a guide on that. Follow the guide unlock your bootloader. Don't forget that unlocking your bootloader wipes your data so ensure you have your stuff backed up alright? Now, once your bootloader is unlocked , you're going to boot up the device again and setup your ADB. So I'm going to be testing ADB connection to my phone by typing adb devices .So you can see I have a detection. So now, I'm going to be booting my phone into fastboot which is bootloader so I'm going to type in adb reboot-bootloader .
Now, you're going to see that the screen is going to go off. The Android emulator is closed already since I don't have adb connection to my device anymore. so now you will be able to see my screen because it's no longer an ADB mood so I can't broadcast the screen to you but my phone is in fastboot mode so I'm going to test connection in fastboot by typing fastboot devices . Okay so I have a connection in fastboot. So now I'm going to be flashing the patched. Now, some tools require you to rename your patched boot, that's patched_boot to just boot like when you're flashing with SP flash tool, Research Download tool and some other tools, you need to actually rename your boot but I don't have to rename it in fastboot.
I just have to make sure I type the name correctly. So to flash the boot in fastboot, don't forget you need to have your bootloader unlocked so if your bootloader is not unlocked, make sure you unlock it. Now, just to verify my bootloader status, I will type fastboot getvar unlocked My bootloader is unlocked so now I'm going to flash the boot image by typing fastboot flash boot patched_boot.img which is the file name so whatever you name it, make sure you type that correctly. Alright! so that is done. Now, I'm going to reboot the device to the normal Android screen so fastboot reboot
Alright! so my phone is restarting. I'll just give it a couple of seconds to come up. Once it boots up now. I'm going to be testing root status using the root checker application Alright! booted up and should be coming up any moment Alright! So I'm going to come back to my root checker and check my root status so I'm going to be verifying root. Alright! so I can see I already have a sign of root access. By an app asking for root permission, that means I have root on my device
Alright! so my device is rooted That's how to root an Android device using magisk manager and stock boot.img
(21-12-2017, 05:48 AM)kaew158 Have any software to flash patched boot.img for Qualcomm chipset ?
(06-01-2018, 02:56 AM)noelstelrooy` Hi Hovatec
I tried your method to root my Vivo Y21
When i installed Magisk.apk in my vivo it says nothing but "Magisk Not Installed" so i can not patch my boot.img
So i installed magisk.apk in my other device Redmi 4X and it run just like in your video, i copy my Vivo boot.img to my Redmi 4X and patched it through Magisk
I flashed the boot.img to my vivo and it bootloop
What when wrong? Do i must patched my boot.img in my vivo??
Thanks
(06-01-2018, 05:25 PM)X3non(06-01-2018, 02:56 AM)noelstelrooy` Hi Hovatec
I tried your method to root my Vivo Y21
When i installed Magisk.apk in my vivo it says nothing but "Magisk Not Installed" so i can not patch my boot.img
So i installed magisk.apk in my other device Redmi 4X and it run just like in your video, i copy my Vivo boot.img to my Redmi 4X and patched it through Magisk
I flashed the boot.img to my vivo and it bootloop
What when wrong? Do i must patched my boot.img in my vivo??
Thanks
no its not compulsory to patch boot using the same device.
where did you get the boot.img you used from?
and have you flashed the device back to stock; ie can the device now boot into homescreen?
(08-01-2018, 03:37 AM)noelstelrooy` I got the boot.img from my Vivo Y21 stock firmware, which i flased into my Device
Actually no one rooted their Vivo Y21 or atleast not posted it yet anywhere
Can you help me is there other stratefy to root Vivo Y21
Thanks