[ROOT] [MAGISK] (Without Recovery) Root your device with MAGISK Without Recovery

Did this guide worked for you?

  • Yayy..! Thanks, I am rooted.?

    Votes: 67 65.0%
  • Naahh..! You are useless.?

    Votes: 36 35.0%

  • Total voters
    103

Roviva

Member
Mar 17, 2012
30
1
28
how to install a rom like lineage?

Hello,
I rooted my Mi A2 without a TWRP.
How can I install a ROM like lineage or other?, I dont have a custom recovery installed.
Can I install a custom recovery after root the telephone?
thanks
:rolleyes:
 

sapastre2

New member
Jan 3, 2019
2
0
0
Hello

i have a problem.

By doing fastboot flash boot patched_boot.img I get this error: FAILED (remote: partition length get error)

---------- Post added at 01:29 PM ---------- Previous post was at 01:16 PM ----------

Sorry, i have a device Huawei Mate 8 and EMUI 8
 

_Masked_

Senior Member
I think the thread title should be (without "") "[GUIDE] [ROOT] Patch boot.img to root with Magisk (No Recovery)"

---------- Post added at 05:09 PM ---------- Previous post was at 04:46 PM ----------

Hello,
I rooted my Mi A2 without a TWRP.
How can I install a ROM like lineage or other?, I dont have a custom recovery installed.
Can I install a custom recovery after root the telephone?
thanks
:rolleyes:
Yes you can.

For installing the ROM use my guide, and to install TWRP use my tool.


Hello

i have a problem.

By doing fastboot flash boot patched_boot.img I get this error: FAILED (remote: partition length get error)

---------- Post added at 01:29 PM ---------- Previous post was at 01:16 PM ----------

Sorry, i have a device Huawei Mate 8 and EMUI 8
Use
Code:
fastboot boot patched_boot.img
not "fastboot flash boot patched_boot.img"
 

sapastre2

New member
Jan 3, 2019
2
0
0
I think the thread title should be (without "") "[GUIDE] [ROOT] Patch boot.img to root with Magisk (No Recovery)"

---------- Post added at 05:09 PM ---------- Previous post was at 04:46 PM ----------



Yes you can.

For installing the ROM use my guide, and to install TWRP use my tool.



Use
Code:
fastboot boot patched_boot.img
not "fastboot flash boot patched_boot.img"
Answer:
PS C:\adb> fastboot boot patched_boot.img
downloading 'boot.img'...
OKAY [ 0.631s]
booting...
FAILED (remote: Command not allowed)
finished. total time: 0.652s
PS C:\adb>

Code:
fastboot flash boot patched_boot.img

Answer:
PS C:\adb> fastboot flash boot patched_boot.img
target reported max download size of 471859200 bytes
sending 'boot' (28986 KB)...
OKAY [ 0.633s]
writing 'boot'...
FAILED (remote: partition length get error)
finished. total time: 0.646s
PS C:\adb>
 

_Masked_

Senior Member
Answer:
PS C:\adb> fastboot boot patched_boot.img
downloading 'boot.img'...
OKAY [ 0.631s]
booting...
FAILED (remote: Command not allowed)
finished. total time: 0.652s
PS C:\adb>

Code:
fastboot flash boot patched_boot.img

Answer:
PS C:\adb> fastboot flash boot patched_boot.img
target reported max download size of 471859200 bytes
sending 'boot' (28986 KB)...
OKAY [ 0.633s]
writing 'boot'...
FAILED (remote: partition length get error)
finished. total time: 0.646s
PS C:\adb>
Enable USB Debugging in Developer Options. Is your Bootloader Unlocked?
 

sanjiv204

Member
Mar 3, 2013
22
3
0
Infinix Note 5 Stylus. It worked on first attempt. Just make sure thatall the drivers

Thanks it worked for my Infinix Note 5 Stylus. Thank a lot.:eek:
 

crayg713

Member
Aug 25, 2017
10
2
0
Hi
I have the same problem with Galaxy J4.
Uninstalled/reinstalled magisk manager v6
downloaded exact ver firmware & extracted boot.img
tried to install/patch with magisk but fails at repacking img.
Am also unable to install TWRP recovery so am not able to flash zip file.

Magisk Log:
- Copying image to cache
- Device platform: armeabi-v7a
- Existing zip found
- Extracting files
- Unpacking boot image
MagiskBoot v18.0(18000) (by topjohnwu) - Boot Image Modification Tool
Parsing boot image: [/data/user_de/0/com.topjohnwu.magisk/install/boot.img]
HEADER_VER [0]
KERNEL_SZ [15127632]
RAMDISK_SZ [3412340]
SECOND_SZ [4278190336]
EXTRA_SZ [721421400]
RECOV_DTBO_SZ [4026554848]
OS_VERSION [41.68.0]
PATCH_LEVEL [2000-01]
PAGESIZE [8]
NAME [RPRB08A001KU]
CMDLINE [ndroidboot.selinux=permissive X�]
CHECKSUM [8001f60416]
Invalid DTB detection at 0xbe16f1: header tag of first node != FDT_BEGIN_NODE
Invalid DTB detection at 0xbea0c8: header tag of first node != FDT_BEGIN_NODE
Invalid DTB detection at 0xbf2a31: header tag of first node != FDT_BEGIN_NODE
Segmentation fault
- Checking ramdisk status
MagiskBoot v18.0(18000) (by topjohnwu) - Boot Image Modification Tool
- Stock boot image detected
- Backing up stock boot image
MagiskBoot v18.0(18000) (by topjohnwu) - Boot Image Modification Tool
Compressing to [stock_boot_b53de95a792a432a19c66669dc656d327741d9e1.img.gz]
cp: can't stat 'ramdisk.cpio': No such file or directory
- Patching ramdisk
MagiskBoot v18.0(18000) (by topjohnwu) - Boot Image Modification Tool
Add entry [init] (0750)
Patch with flag KEEPVERITY=[false] KEEPFORCEENCRYPT=[true]
Segmentation fault
- Repacking boot image
MagiskBoot v18.0(18000) (by topjohnwu) - Boot Image Modification Tool
Parsing boot image: [/data/user_de/0/com.topjohnwu.magisk/install/boot.img]
HEADER_VER [0]
KERNEL_SZ [15127632]
RAMDISK_SZ [3412340]
SECOND_SZ [4278190336]
EXTRA_SZ [721421400]
RECOV_DTBO_SZ [4026554848]
OS_VERSION [41.68.0]
PATCH_LEVEL [2000-01]
PAGESIZE [8]
NAME [RPRB08A001KU]
CMDLINE [ndroidboot.selinux=permissive X�]
CHECKSUM [8001f60416]
Invalid DTB detection at 0xbe16f1: header tag of first node != FDT_BEGIN_NODE
Invalid DTB detection at 0xbea0c8: header tag of first node != FDT_BEGIN_NODE
Invalid DTB detection at 0xbf2a31: header tag of first node != FDT_BEGIN_NODE
Segmentation fault
! Unable to repack boot image!
! Installation failed
 
Last edited:

matz_92

Member
Jan 29, 2019
9
1
0
Unfortunaly this method does not work for me.

I'm working on a single-board computer i.MX7D with Android Things 1.0.8. I've correctly installed MagiskManager and it has repacked the new image patched_boot.img. Next I have flashed the new image into boot_a and boot_b partitions using fastboot:

  • fastboot flash boot_a patched_boot.img
    Code:
    target reported max download size of 419430400 bytes
    sending 'boot_a' (14720 KB)...
    OKAY [  0.459s]
    writing 'boot_a'...
    OKAY [  0.702s]
    finished. total time: 1.161s
  • fastboot flash boot_b patched_boot.img
    Code:
    target reported max download size of 419430400 bytes
    sending 'boot_b' (14720 KB)...
    OKAY [  0.463s]
    writing 'boot_b'...
    OKAY [  0.702s]
    finished. total time: 1.164s

When I reboot the system Magisk show "Magisk is not installed".
 

StonebridgeGr

Senior Member
Feb 6, 2014
1,218
129
98
23
Athens/Argostoli
www.facebook.com
how to pull from the device the boot.img if the device is not rooted?
it has unlocked BL
But its a huawei p20 pro i dont know how to get it.
Might from the official firmware?

---------- Post added at 00:02 ---------- Previous post was at 00:01 ----------

can someone plz help im so lost. if you have discord add me abaddon#1503 im trying to root my sm-g530az because i cant install kingroot
here you are
https://forum.xda-developers.com/grand-prime/help/root-success-sm-g530az-5-1-1-t3283888
 

Harshatxda

Senior Member
Jul 5, 2016
158
8
0
Mumbai. India
not working for zenfone 5z

Hello Everyone,
This is my first tutorial here.
So, any mistakes should be reminded in the thread.


==================================================
Guide for rooting with MAGISK
==================================================


This guide is for those devices for which currently there is no custom recovery available. So, don't be sad instead have MAGISK Root for your device and and sleep well.:angel:

Note - USE THIS GUIDE ON YOUR OWN. I AM NOT RESPONSIBLE IF YOU END UP BRICKING YOUR DEVICES.
BETTER KNOW WHAT YOU ARE DOING AND ITS CONSEQUENCES.


==================================================

REQUIREMENTS -
1 - An Android 5.0+ device
2 - PC with working ADB
3 - Stock boot image (boot.img) of your device
4 - Magisk Manager app
5 - A good file browser like Mixplorer, Solid explorer etc..
6 - Active Internet connection
7 - Active mind and patience.

==================================================

Step 1: Patching the stock boot.img

- Install MagiskManager apk on your android device
- Copy the stock boot.img of your device to your phone's internal storage or SD card
- Launch Magisk Manager app
- If prompted to install Magisk, select NO THANKS
- If you are using a samsung device and wish to flash using Odin, then select Options > Settings > Update Settings > Patched Boot Output Format > img.tar )
- Select Install > Install > Patch Boot Image File >
Navigate to the location of the stock boot.img you copied earlier on, then Select it
-Magisk Manager should begin downloading the magisk zip file used for patching
-Once download is complete, MagiskManager will automatically patch the boot file and store it under SDcard/MagiskManager/patched_boot.img[.tar]

Step 2: Flashing the patched boot.img

You have a variety of options to flash the patched boot.img depending on your chipset (e.g Mediatek MTK, Spreadtrum SPD, Qualcomm QLM etc ), the resources you have and your skills. Note that some flashing methods might require you to rename the file to boot.img
- For those using MTK devices and have the specific scatter file for their device, you can flash the patched boot.img using SP flash tool or Miracle Box
-For those using SPD devices and have the PAC file for their device, you can flash the patched boot.img using Research download tool by replacing the stock boot.img with your patched boot.img
- For those using Samsung devices and then use ODIN to flash.
-You could also use Fastboot to flash the patched_boot.img or boot.img (if you've renamed then the command must reflect the file name) as outlined below

How to Flash patched_boot.img using Fastboot

-Setup adb and fastboot on your PC.
-Unlock the phone's Bootloader (if its not unlocked)
-Re-enable USB debugging on the phone
-Connect the phone to the PC via USB cord
-Boot into fastboot mode.
-Flash the patched_boot and reboot by typing in the commands below into adb CMD prompt window and hitting Enter after each line -



-Verify root using Root Checker

Credits goes to topjohnwu of XDA for Magisk
Also to X3non of Hovatek for original guide.
hi,

i have followed your this process for zenfone 5z but this is not working. my stock boot,img is flashed well with magisk but then it does not root. and post this if i flash patched_boot.img then it fails to flash via magisk and via twrp as well. kindly suggest.
 

iTZ saurav

Member
May 26, 2014
26
6
0
Delhi
Hello Everyone,
This is my first tutorial here.
So, any mistakes should be reminded in the thread.


==================================================
Guide for rooting with MAGISK
==================================================


This guide is for those devices for which currently there is no custom recovery available. So, don't be sad instead have MAGISK Root for your device and and sleep well.:angel:

Note - USE THIS GUIDE ON YOUR OWN. I AM NOT RESPONSIBLE IF YOU END UP BRICKING YOUR DEVICES.
BETTER KNOW WHAT YOU ARE DOING AND ITS CONSEQUENCES.


==================================================

REQUIREMENTS -
1 - An Android 5.0+ device
2 - PC with working ADB
3 - Stock boot image (boot.img) of your device
4 - Magisk Manager app
5 - A good file browser like Mixplorer, Solid explorer etc..
6 - Active Internet connection
7 - Active mind and patience.

==================================================

Step 1: Patching the stock boot.img

- Install MagiskManager apk on your android device
- Copy the stock boot.img of your device to your phone's internal storage or SD card
- Launch Magisk Manager app
- If prompted to install Magisk, select NO THANKS
- If you are using a samsung device and wish to flash using Odin, then select Options > Settings > Update Settings > Patched Boot Output Format > img.tar )
- Select Install > Install > Patch Boot Image File >
Navigate to the location of the stock boot.img you copied earlier on, then Select it
-Magisk Manager should begin downloading the magisk zip file used for patching
-Once download is complete, MagiskManager will automatically patch the boot file and store it under SDcard/MagiskManager/patched_boot.img[.tar]

Step 2: Flashing the patched boot.img

You have a variety of options to flash the patched boot.img depending on your chipset (e.g Mediatek MTK, Spreadtrum SPD, Qualcomm QLM etc ), the resources you have and your skills. Note that some flashing methods might require you to rename the file to boot.img
- For those using MTK devices and have the specific scatter file for their device, you can flash the patched boot.img using SP flash tool or Miracle Box
-For those using SPD devices and have the PAC file for their device, you can flash the patched boot.img using Research download tool by replacing the stock boot.img with your patched boot.img
- For those using Samsung devices and then use ODIN to flash.
-You could also use Fastboot to flash the patched_boot.img or boot.img (if you've renamed then the command must reflect the file name) as outlined below

How to Flash patched_boot.img using Fastboot

-Setup adb and fastboot on your PC.
-Unlock the phone's Bootloader (if its not unlocked)
-Re-enable USB debugging on the phone
-Connect the phone to the PC via USB cord
-Boot into fastboot mode.
-Flash the patched_boot and reboot by typing in the commands below into adb CMD prompt window and hitting Enter after each line -



-Verify root using Root Checker

Credits goes to topjohnwu of XDA for Magisk
Also to X3non of Hovatek for original guide.
Not working for me, I've performed exactly the same steps. But still magisk is not installed.

-Nokia 6.1 Plus (BL unlocked)
 

Tenshi7t7

New member
Feb 24, 2019
1
0
0
Hello Everyone,
This is my first tutorial here.
So, any mistakes should be reminded in the thread.


==================================================
Guide for rooting with MAGISK
==================================================


This guide is for those devices for which currently there is no custom recovery available. So, don't be sad instead have MAGISK Root for your device and and sleep well.:angel:

Note - USE THIS GUIDE ON YOUR OWN. I AM NOT RESPONSIBLE IF YOU END UP BRICKING YOUR DEVICES.
BETTER KNOW WHAT YOU ARE DOING AND ITS CONSEQUENCES.

==================================================

REQUIREMENTS -
1 - An Android 5.0+ device
2 - PC with working ADB
3 - Stock boot image (boot.img) of your device
4 - Magisk Manager app
5 - A good file browser like Mixplorer, Solid explorer etc..
6 - Active Internet connection
7 - Active mind and patience.

==================================================

Step 1: Patching the stock boot.img

- Install MagiskManager apk on your android device
- Copy the stock boot.img of your device to your phone's internal storage or SD card
- Launch Magisk Manager app
- If prompted to install Magisk, select NO THANKS
- If you are using a samsung device and wish to flash using Odin, then select Options > Settings > Update Settings > Patched Boot Output Format > img.tar )
- Select Install > Install > Patch Boot Image File >
Navigate to the location of the stock boot.img you copied earlier on, then Select it
-Magisk Manager should begin downloading the magisk zip file used for patching
-Once download is complete, MagiskManager will automatically patch the boot file and store it under SDcard/MagiskManager/patched_boot.img[.tar]

Step 2: Flashing the patched boot.img

You have a variety of options to flash the patched boot.img depending on your chipset (e.g Mediatek MTK, Spreadtrum SPD, Qualcomm QLM etc ), the resources you have and your skills. Note that some flashing methods might require you to rename the file to boot.img
- For those using MTK devices and have the specific scatter file for their device, you can flash the patched boot.img using SP flash tool or Miracle Box
-For those using SPD devices and have the PAC file for their device, you can flash the patched boot.img using Research download tool by replacing the stock boot.img with your patched boot.img
- For those using Samsung devices and then use ODIN to flash.
-You could also use Fastboot to flash the patched_boot.img or boot.img (if you've renamed then the command must reflect the file name) as outlined below

How to Flash patched_boot.img using Fastboot

-Setup adb and fastboot on your PC.
-Unlock the phone's Bootloader (if its not unlocked)
-Re-enable USB debugging on the phone
-Connect the phone to the PC via USB cord
-Boot into fastboot mode.
-Flash the patched_boot and reboot by typing in the commands below into adb CMD prompt window and hitting Enter after each line -



-Verify root using Root Checker

Credits goes to topjohnwu of XDA for Magisk
Also to X3non of Hovatek for original guide.

Hi. I have a lgl212vl running oreo 8.1.0 I have tried multiple one touch root and no results. I am new to rooting and code. Very new. I cant find any roms for my phone or a way to root without pc. Please help
 

vittorio99

New member
Mar 22, 2019
3
1
0
Hello Everyone,
This is my first tutorial here.
So, any mistakes should be reminded in the thread.


==================================================
Guide for rooting with MAGISK
==================================================


This guide is for those devices for which currently there is no custom recovery available. So, don't be sad instead have MAGISK Root for your device and and sleep well.:angel:

Note - USE THIS GUIDE ON YOUR OWN. I AM NOT RESPONSIBLE IF YOU END UP BRICKING YOUR DEVICES.
BETTER KNOW WHAT YOU ARE DOING AND ITS CONSEQUENCES.

==================================================

REQUIREMENTS -
1 - An Android 5.0+ device
2 - PC with working ADB
3 - Stock boot image (boot.img) of your device
4 - Magisk Manager app
5 - A good file browser like Mixplorer, Solid explorer etc..
6 - Active Internet connection
7 - Active mind and patience.

==================================================

Step 1: Patching the stock boot.img

- Install MagiskManager apk on your android device
- Copy the stock boot.img of your device to your phone's internal storage or SD card
- Launch Magisk Manager app
- If prompted to install Magisk, select NO THANKS
- If you are using a samsung device and wish to flash using Odin, then select Options > Settings > Update Settings > Patched Boot Output Format > img.tar )
- Select Install > Install > Patch Boot Image File >
Navigate to the location of the stock boot.img you copied earlier on, then Select it
-Magisk Manager should begin downloading the magisk zip file used for patching
-Once download is complete, MagiskManager will automatically patch the boot file and store it under SDcard/MagiskManager/patched_boot.img[.tar]

Step 2: Flashing the patched boot.img

You have a variety of options to flash the patched boot.img depending on your chipset (e.g Mediatek MTK, Spreadtrum SPD, Qualcomm QLM etc ), the resources you have and your skills. Note that some flashing methods might require you to rename the file to boot.img
- For those using MTK devices and have the specific scatter file for their device, you can flash the patched boot.img using SP flash tool or Miracle Box
-For those using SPD devices and have the PAC file for their device, you can flash the patched boot.img using Research download tool by replacing the stock boot.img with your patched boot.img
- For those using Samsung devices and then use ODIN to flash.
-You could also use Fastboot to flash the patched_boot.img or boot.img (if you've renamed then the command must reflect the file name) as outlined below

How to Flash patched_boot.img using Fastboot

-Setup adb and fastboot on your PC.
-Unlock the phone's Bootloader (if its not unlocked)
-Re-enable USB debugging on the phone
-Connect the phone to the PC via USB cord
-Boot into fastboot mode.
-Flash the patched_boot and reboot by typing in the commands below into adb CMD prompt window and hitting Enter after each line -



-Verify root using Root Checker

Credits goes to topjohnwu of XDA for Magisk
Also to X3non of Hovatek for original guide.

i have to flag keep dm verity?