Can't patch boot.img from Magisk - Magisk

I am trying to install root access on a HP Touchpad running Android 9 Pie (Evervolv). I have followed the instructions on: https://topjohnwu.github.io/Magisk/install.html#patching-images
I extracted boot.img from the Evervolv installation zip file: ev_tenderloin-9-userbuild-2019.08.30.zip and uploaded it to the Touchpad.
When I run the Magisk App it confirms Ramdisk: Yes. Then I select "Install" from the Magisk box, select Next, then Select and Patch a File. I then select the boot.img file I just uploaded. Upon clicking LET'S GO I am then presented with:
Code:
- Device platform: arbabi-v7a
- Installing 22.1 (22100)
- Copying image to cache
- Unpacking boot image
! Unsupported/Unknown image format
! Installation failed
The log file simply repeats the above messages.
Searching Google has turned up no applicable answers.
Can anyone suggest a solution or how I might troubleshoot the problem?
Thanks for any help!

Hey!
Don't know if this is still applicable or not or if you have moved on....
I discovered an issue with Magisk, also, when trying to root lineageOS 18.1 on a Nexus 7. It corrupted the flash I had already done (twice) by flashing the latest version, v24.2, and when I tried patching the boot image from the App, it said it was unable to patch the boot image.
However, I did find the solution....
1) Flash the ROM and anything else.
2) Boot into the ROM, get everything set.
3) Install the latest Magisk app.
4) Boot into recovery. Flash Magiskv21.4.zip.
5) This should flash correctly.
6) Re-boot into OS. Go into Magisk app and run the update.
7) Reboot and you should be all set.

Related

Magisk v17 Failed to Install

I attempted to go from Magisk v16 to Magisk v17 from the app, Install > Patch Boot Image File > Magisk-v17(1700).zip and I get the below .
I opened up Root Checker and it let me know that the device no longer has Root.
- Copying image to cache
- Device platform: arm64-v8a
- Existing zip found
- Extracting files
! Installation Failed
Magisk Log File
- Copying image to cache
- Device platform: arm64-v8a
- Existing zip found
- Extracting files
boot_patch.sh[73]: can't create /proc/self/fd/: Is a directory
MagiskBoot v17.0(17000) (by topjohnwu) - Boot Image Modification Tool
Parsing boot image: [/data/user_de/0/com.topjohnwu.magisk/install/boot.img]
No boot image magic found!
boot_patch.sh[91]: can't create /proc/self/fd/: Is a directory
boot_patch.sh[91]: can't create /proc/self/fd/: Is a directory
! Installation failed
Device Stats
Nexus 6P
Lineage 15.1
TWRP - latest
Any help would be greatly appreciated.
monteie2016 said:
I attempted to go from Magisk v16 to Magisk v17 from the app, Install > Patch Boot Image File > Magisk-v17(1700).zip and I get the below .
I opened up Root Checker and it let me know that the device no longer has Root.
- Copying image to cache
- Device platform: arm64-v8a
- Existing zip found
- Extracting files
! Installation Failed
Magisk Log File
- Copying image to cache
- Device platform: arm64-v8a
- Existing zip found
- Extracting files
boot_patch.sh[73]: can't create /proc/self/fd/: Is a directory
MagiskBoot v17.0(17000) (by topjohnwu) - Boot Image Modification Tool
Parsing boot image: [/data/user_de/0/com.topjohnwu.magisk/install/boot.img]
No boot image magic found!
boot_patch.sh[91]: can't create /proc/self/fd/: Is a directory
boot_patch.sh[91]: can't create /proc/self/fd/: Is a directory
! Installation failed
Device Stats
Nexus 6P
Lineage 15.1
TWRP - latest
Any help would be greatly appreciated.
Click to expand...
Click to collapse
Happened with me also...i gues the only solution is you have to uninstall mafisk via magisk uninstaller and flash it once again via whatever recovery you are using...i am also using lineage os 15.1 but with RN4....
Happened to me as well. HTC u11, ViperU 1.8.0, Android 7.1.1, TWRP 3.2.2. Tried flashing it though TWRP got a bootloop. Had to revert back to my previous nan which luckily I made yesterday.
I attempted the same, now my galaxy s6 is in a boot loop
Look other posts in this section - you should flash latest uninstaller before Magisk v17 package. It seems that some residues from v16 prevent v17 from installing correctly.
^^^^^^^^^^
how to uninstall magisk completely without custom recoery
Hello Guys
I can not install Magisk v17.1
I delete it complete with the uninstaller
And then flashed again in TWRP, but dont work
Magisk icon is not visible and I can not manually install the Magisk Manager
Pls Help
edkmho said:
how to uninstall magisk completely without custom recoery
Click to expand...
Click to collapse
I had to reflash stock (OTA sideload version, in stock recovery) via adb sideload. Essential phone. Wifi is working now, didn't lose any data.
I'm also having the issue on my OnePlus 5T. I was running v16.0, and when I tried to flash the v17.1 zip in TWRP like usual, but it said zip signature verification failed. I flashed the Magisk uninstaller zip and tried again, but still had the same problem. I've lost root, but all my data is still intact and it never had boot issues.
After using uninstaller in recovery, restart into recovery to flash v17
aydinbahadir88 said:
And then flashed again in TWRP, but dont work
Magisk icon is not visible and I can not manually install the Magisk Manager
Click to expand...
Click to collapse
Do you update from 16.0? If Yes test following:
Download the seperate MagiskManager-v5.9.1.apk
Make sure that you adb is working, connect your phone to computer
Code:
adb devices
must show your phone, if not adb is not proper set
Code:
adb install MagiskManager-v5.9.1.apk
if you get a error message like
the sign with the installed apk has not matsched..aborted
Click to expand...
Click to collapse
the uninstaller not proper delete the old magisk manager
try
Code:
adb uninstall com.topjohnwu.magisk
the result must be an sucess
then again
Code:
adb install MagiskManager-v5.9.1.apk
result must also sucess
Reboot, voiala its done....
You see the Magisk Manager
Does anyone have a working solution?
1.download magisk 17.zip from inside magisk 16
2. uninstall magisk 16 (i do from inside, not twrp)
3. instal magisk 17.zip from twrp
4. open magisk 17 and get notification for downloaded magisk 17.apk
5. download and instal it,
tested by my phone
mi5 Lineage Os 15.1
How I recovered from this on a Pixel 2 XL
I'll chime in with my experience here, as it might save someone else a lot of time if they are at my skill level with this stuff (which is only moderate, I suppose, although I do always get things to work eventually!).
As of yesterday, I had a Pixel 2 XL, rooted with Magisk, and working great. This morning, during the middle of the night, Magisk innocently asks if I want to upgrade to a new version. I was very tired (in fact, I think I was sleeping when my phone buzzed to alert me of the upgrade message) and don't even know how I responded except that it was "yes" to the upgrade part. By the time I'd fully awakened, I had a phone that waw in a boot loop. I went back to sleep, figuring I'd have better luck looking at it after a little rest.
Getting out of the boot loop was easy: I just reinstalled the August 2018 factory image for the phone. However, getting Magisk reinstalled was an adventure. I saw posts that said I should run the Magisk uninstaller, but when I did it just said that Magisk was already uninstalled. And yet, whenever I tried to apply either v16.0 or v17.1, I got errors (error codes 1, 2, and 255 at different times).
Up until this event, I'd always upgraded Magisk by installing it via TWRP. However, that was not working, so I thought I needed to try patching the boot image, something I'd never done before. Because I'd never done it before, it took me a while to understand the steps, which are actually quite simple. This is where I'm hoping I might save someone some time. Basically, my fear was not knowing which file the "boot image" was. Seasoned Android veterans might get a chuckle out of this, and that's fine, but I was looking at the file in the factory image download and basically saw only two image files: bootloader-taimen-tmz20j.img and radio-taimen-g8998-00253-1805232234.img. I was trying to figure out if either of those could be the boot image, and they both seemed pretty big to be a boot image! Finally it dawned on me that the much larger file in the directory was a zip archive (named image-taimen-ppr1.180610.009.zip). I looked inside there, and sure enough, there was a rather small file named boot.img. I was pretty sure that was the "boot image" file!
Here's what I did after that, again just hoping to help anyone who finds themselves in the same predicament I was in: Magisk is broken, root isn't working, and I can't install any of the Magisk *.zip images via TWRP.
- First, I downloaded a copy of Magisk Manager: this version is named MagiskManager-v5.9.1.apk.
- Next, I ran a couple adb commands to send the Magisk Manager apk and the stock boot.img to my phone:
Code:
adb push MagiskManager-v5.9.1.apk /sdcard/Download
adb push boot.img /sdcard/Download
- Next, I installed /sdcard/Download/Magisk-Manager-v5.9.1.apk by nagivating to it (I use ES File Manager) and launching it from there.
- Next I opened Magisk Manager
- Magisk Manager detects that there is a newer version available and asks if I want to upgrade
- I said yes
- I told it that I wanted to patch a boot image
- I chose /sdcard/Download/boot.img as the "unpatched" (stock) boot image
- Magisk Manager churned away for maybe half a minute and then produced a new file called patched_boot.img, saved in the same directory as boot.img.
After that, all I had to do was run these commands:
Code:
adb reboot bootloader
fastboot flash boot patched_boot.img
fastboot reboot
As soon as the phone restarted, I opened Magisk Manager again and it verified that its upgrade was successful, and root began working for me again also.
Like I said, I hope this helps someone else. If not, it's probably good for me to just write it all out anyway.
Cheers,
Sky Captain
_sky.captain_ said:
I'll chime in with my experience here, as it might save someone else a lot of time if they are at my skill level with this stuff (which is only moderate, I suppose, although I do always get things to work eventually!).
As of yesterday, I had a Pixel 2 XL, rooted with Magisk, and working great. This morning, during the middle of the night, Magisk innocently asks if I want to upgrade to a new version. I was very tired (in fact, I think I was sleeping when my phone buzzed to alert me of the upgrade message) and don't even know how I responded except that it was "yes" to the upgrade part. By the time I'd fully awakened, I had a phone that waw in a boot loop. I went back to sleep, figuring I'd have better luck looking at it after a little rest.
Getting out of the boot loop was easy: I just reinstalled the August 2018 factory image for the phone. However, getting Magisk reinstalled was an adventure. I saw posts that said I should run the Magisk uninstaller, but when I did it just said that Magisk was already uninstalled. And yet, whenever I tried to apply either v16.0 or v17.1, I got errors (error codes 1, 2, and 255 at different times).
Up until this event, I'd always upgraded Magisk by installing it via TWRP. However, that was not working, so I thought I needed to try patching the boot image, something I'd never done before. Because I'd never done it before, it took me a while to understand the steps, which are actually quite simple. This is where I'm hoping I might save someone some time. Basically, my fear was not knowing which file the "boot image" was. Seasoned Android veterans might get a chuckle out of this, and that's fine, but I was looking at the file in the factory image download and basically saw only two image files: bootloader-taimen-tmz20j.img and radio-taimen-g8998-00253-1805232234.img. I was trying to figure out if either of those could be the boot imag, and they both seemed pretty big to be a boot image! Finally it dawned on me that the much larger file in the directory was a zip archive (named image-taimen-ppr1.180610.009.zip). I looked inside there, and sure enough, there was a rather small file named boot.img. I was pretty sure that was the "boot image" file!
Here's what I did after that, again just hoping to help anyone who finds themselves in the same predicament I was in: Magisk is broken, root isn't working, and I can't install any of the Magisk *.zip images via TWRP.
- First, I downloaded a copy of Magisk Manager: this version is named MagiskManager-v5.9.1.apk.
- Next, I ran a couple adb commands to send the Magisk Manager apk and the stock boot.img to my phone:
Code:
adb push MagiskManager-v5.9.1.apk /sdcard/Download
adb push boot.img /sdcard/Download
- Next, I installed /sdcard/Download/Magisk-Manager-v5.9.1.apk by nagivating to it (I use ES File Manager) and launching it from there.
- Next I opened Magisk Manager
- Magisk Manager detects that there is a newer version available and asks if I want to upgrade
- I said yes
- I told it that I wanted to patch a boot image
- I chose /sdcard/Download/ as the "unpatched" (stock) boot image
- Magisk Manager churned away for maybe half a minute and then produced a new file called patched_boot.img, saved in the same directory as boot.img.
After that, all I had to do was run these commands:
Code:
adb reboot bootloader
fastboot flash boot patched_boot.img
fastboot reboot
As soon as the phone restarted, I opened Magisk Manager again and it verified that its upgrade was successful, and root began working for me again also.
Like I said, I hope this helps someone else. If not, it's probably good for me to just write it all out anyway.
Cheers,
Sky Captain
Click to expand...
Click to collapse
I too have a Pixel 2XL but had a much easier upgrade experience. I downloaded the latest version of Magisk files (3 files: MagiskManager-v5.9.1.apk, Magisk-uninstaller-20180901, and Magisk-v17.1 from here https://www.xda-developers.com/magisk-v17-1-android-pie-a-b-support/) and put them on my phone.
Rebooted into recovery TWRP run the Magisk-uninstaller-2018090 file, then ran Magisk-v17.1 rebooted and all worked (thanks to ALL the developers out there!!!)
I'm running rooted Pie (standard google Pie) with Rootchecker, 4.4.153-FlashKernal-Wahoo-v3.06, Greenify, AdAway, and of course Magisk 17.1.
Hope this helps.
akohle said:
After using uninstaller in recovery, restart into recovery to flash v17
Click to expand...
Click to collapse
flashed uninstaller in recovery
flashed v17
rebooted
it worked
If patch boot image is getting failed in magisk latest version v17.1 then enable storage permission for magisk app manually in Device/OS setting. Now patch boot image again, It will get patched successfully.
I
pierro78 said:
flashed uninstaller in recovery
flashed v17
rebooted
it worked
Click to expand...
Click to collapse
OK...im a relative newbie here...first post actually....but Im a bit stuck in a fastboot boot loop
LG G5 tmobile running fulmics
I decided to try this exact process to get my root back by updating Magisk
booted into TWRP through ADB
flashed uninstaller using TWRP
(cleared cache/dalvik)
flashed v 17.1 (not 17) using TWRP
(cleared cache/dalvik)
rebooted
now i'm stuck in fastboot bootloop….can reboot from fastboot but nothing else
any advice would be appreciated!
update: I am able to get to TWRP using reboot command and holding power and volume down. flashed uninstaller wiped cache/dalvik...rebooted into TWRP long way and then installed 17....still fastboot at startup again
Art1mis said:
If patch boot image is getting failed in magisk latest version v17.1 then enable storage permission for magisk app manually in Device/OS setting. Now patch boot image again, It will get patched successfully.
Click to expand...
Click to collapse
many thanks for the tip!!
spent like an hour trying to figure out why my pixel 2 was failing to patch the boot image.
Allowed storage permissions, flashed the patched boot and now im rooted

Android 4.2 and 4.4 Mediatek bootloop after installing Magisk 18.1

Hello everybody.
I've read that 18.1 supports 4.2+ so I've tried to install in two MTK6589T devices I've. One running 4.2, the other running 4.4
CMW/TWRP gave an error mounting system, so I mounted system manually and it started flashing. Firstly it detected old root installed and disabled the old root. But when it tried to find the boot, installation was aborted because installator claims cannot find the boot on both phones.
Then I though, okay, lets reboot back to android, I will try to install a few days later, maybe its buggy now, but both phones cannot boot.
I can easily fix them by flashing rom again I guess, but I would like to know where's the issue and also post it for more people could face the same problem.
Any idea where's the problem/how to fix without rom reflashing? I've tried magisk uninstaller but after mounting system in recovery it is also giving error.
Thanks
UPDATE: For now, if no other solution is found, bootloop can be bypassed by dirty installing the rom again. But it has to be an easier workaround...
We know now that the problem is caused because of two factors merging:
1- Using Magisk.zip installer through custom recovery
2-In the case that the custom recovery CMW/TWRP installed in the phone is very old (for instance, CMW automade for MTK6589X or TWRP 2.5.0).
While installing, Magisk tries to send commands to the custom recovery that cant be understood by it, leaving the installation incomplete after some modifications in /system (read below recovery log).
Acording to the recovery, it seems that Magisk did some modifications without running correctly survival script - Adding addon.d survival script ("Unrecognized option '-Xnodex2oat'") and .zip installer is not designed to revert actions in this case.
Also, Magisk couldn't reach the boot modification step, so boot is not damaged, therefore workarounds for restoring boot won't work.
Using Magisk Unistaller.zip is also not possible as the uninstaller is mainly designed for boot backup restoration, and again, this is not the case.
Currently needed: Find what's wrong in system due to the incomplete Magisk installation to revert it back to the original state (before faulty magisk.zip installation).
Recovery log:
************************
* Magisk v18.1 Installer
************************
- Mounting /system, /vendor
- Target image: /dev/bootimg
- Device platform: arm
- Removing system installed root
- Constructing environment
- Adding addon.d survival script
Unrecognized option '-Xnodex2oat'
up!
I' also having the same problem. My Samsung J2 Prime stuck at logo after updating to 18.1. Any tips on how to fix it without resetting my phone? Thanks.
Update: Bootloop fixed. I used TWRP to restore boot image. I then update Magisk by flashing zip file from TWRP. Everything went back to normal. Hope this help.
trol_sg said:
Hello everybody.
I've read that 18.1 supports 4.2+ so I've tried to install in two MTK6589T devices I've. One running 4.2, the other running 4.4
CMW/TWRP gave an error mounting system, so I mounted system manually and it started flashing. Firstly it detected old root installed and disabled the old root. But when it tried to find the boot, installation was aborted because installator claims cannot find the boot on both phones.
Then I though, okay, lets reboot back to android, I will try to install a few days later, maybe its buggy now, but both phones cannot boot.
I can easily fix them by flashing rom again I guess, but I would like to know where's the issue and also post it for more people could face the same problem.
Any idea where's the problem/how to fix without rom reflashing? I've tried magisk uninstaller but after mounting system in recovery it is also giving error.
Thanks
Click to expand...
Click to collapse
If you have a backup of your boot image, you can just restore it using TWRP. But in case that you have no backup of boot image, you can try to get boot image from the internet and restoring using it. In my case, this is what I did.
1. Go to TWRP and then make backup of boot image of the faulty phone*. (Folder 1)
2. I used another J2 prime to create a boot image backup. (Folder 2)
3. Once that is done, copy and replace the files inside the Folder 2 into Folder 1.
4. Reboot to TWRP again then use that to restore the boot image on my stuck J2.
Tips: make backup in SD card so you can easily swap it in between the bad and good phone.
*This is to create a folder of the backup file. I did tried to directly copy and paste the backup boot image file from another good phone but TWRP didn't detect it. So this is the workaround that I come with. And it worked for me.
Thanks for your answer but I doubt your case is mine. Your device is much newer than mine and according to your comment, you've sucesfully installed previous version of Magisk without issues. This is not a problem while updating, as Magisk v. earlier than 18.1 was not compatible with android 4.2+. I think Magisk is not compatible with MT6589T even if they run 4.2 or 4.4.
I think that it cannot be a boot problem as TWRP/CWM displayed msg 'Boot cannot be found' while installing Magisk, so that I don't think boot was replaced or modified in any ways. Moreover, the bootloop is not in the boot loading, as phone can pass boot image without any problem, but it is stuck in android loading image. I'm thinking in some script or root modification that Magisk did before trying to unpack the boot, however I'm not that deep into the Magisk install to find the proper workaround.
I can restore boot backup and also I can take boot file from the original rom and flash, because in Mediatek-based devices, boot.img is inside de zip, but I dont think it will solve the problem. Anyhow I'll get back ASAP with the answer.
Any more ideas??
Nothing, boot/uboot restoration or flashing again just the boot won't fix the problem, so it's something that Magisk installator touch in /system or /data I guess, but what?
trol_sg said:
Nothing, boot/uboot restoration or flashing again just the boot won't fix the problem, so it's something that Magisk installator touch in /system or /data I guess, but what?
Click to expand...
Click to collapse
Have you read/tried this?
didgeridoohan(dot)com/magisk/MagiskIssues
Ato09 said:
Have you read/tried this?
didgeridoohan(dot)com/magisk/MagiskIssues
Click to expand...
Click to collapse
Yes, I've read them before I made the post. I've also looked for a solution in some of the threads and using search, but couldn't find a way.
Here I attach recovery.log if someone is interested to see the detailed problem.
Also, here below I attach the lines concerning the installation. All other is uninstallation tries and so on:
************************
* Magisk v18.1 Installer
************************
- Mounting /system, /vendor
- Target image: /dev/bootimg
- Device platform: arm
- Removing system installed root
- Constructing environment
- Adding addon.d survival script
Unrecognized option '-Xnodex2oat'
dalvikvm: [options] class [argument ...]
dalvikvm: [options] -jar file.jar [argument ...]
The following standard options are recognized:
-classpath classpath
-Dproperty=value
-verbose:tag ('gc', 'jni', or 'class')
-ea[:<package name>... |:<class name>]
-da[:<package name>... |:<class name>]
(-enableassertions, -disableassertions)
-esa
-dsa
(-enablesystemassertions, -disablesystemassertions)
-showversion
-help
The following extended options are recognized:
-Xrunjdwp:<options>
-Xbootclasspath:bootclasspath
-Xcheck:tag (e.g. 'jni')
-XmsN (min heap, must be multiple of 1K, >= 1MB)
-XmxN (max heap, must be multiple of 1K, >= 2MB)
-XssN (stack size, >= 1KB, <= 256KB)
-Xverify:{none,remote,all}
-Xrs
-Xint (extended to accept 'ortable', ':fast' and ':jit')
These are unique to Dalvik:
-Xzygote
-Xdexopt:{none,verified,all,full}
-Xnoquithandler
-Xjniopts:{warnonly,forcecopy}
-Xjnitrace:substring (eg NativeClass or nativeMethod)
-Xstacktracefile:<filename>
-Xgc:[no]precise
-Xgc:[no]preverify
-Xgc:[no]postverify
-Xgc:[no]concurrent
-Xgc:[no]verifycardtable
-XX:+DisableExplicitGC
-X[no]genregmap
-Xverifyopt:[no]checkmon
-Xcheckdexsum
-Xincludeselectedop
-Xjitop:hexopvalue[-endvalue][,hexopvalue[-endvalue]]*
-Xincludeselectedmethod
-Xjitthreshold:decimalvalue
-Xjitcodecachesize:decimalvalueofkbytes
-Xjitblocking
-Xjitmethod:signature[,signature]* (eg Ljava/lang/String\;replace)
-Xjitclass:classname[,classname]*
-Xjitoffsetffset[,offset]
-Xjitconfig:filename
-Xjitcheckcg
-Xjitverbose
-Xjitprofile
-Xjitdisableopt
-Xjitsuspendpoll
Configured with: debugger profiler hprof jit(armv7-a-neon) smp show_exception=1
Failed to initialize runtime (check log for details)
- Unpacking boot image
MagiskBoot v18.1(18100) (by topjohnwu) - Boot Image Modification Tool
Parsing boot image: [/dev/bootimg]
No boot image magic found!
! Unable to unpack boot image
- Unmounting partitions
E:Error executing updater binary in zip '/sdcard/Magisk-v18.1.zip'
Error flashing zip '/sdcard/Magisk-v18.1.zip'
@trol_sg I'm gonna guess it's got to do with the absolutely ancient TWRP you're using. It just can't handle everything that the Magisk installation script is trying to do...
Your best bet (if Magisk will work at all on your device) is to patch the boot image with the Magisk Manager and then flash the patched image manually. There are new and shiny installation instructions available here: https://topjohnwu.github.io/Magisk/
Didgeridoohan said:
@trol_sg I'm gonna guess it's got to do with the absolutely ancient TWRP you're using. It just can't handle everything that the Magisk installation script is trying to do...
Your best bet (if Magisk will work at all on your device) is to patch the boot image with the Magisk Manager and then flash the patched image manually. There are new and shiny installation instructions available here: https://topjohnwu.github.io/Magisk/
Click to expand...
Click to collapse
Thank you so much for your answer. So it's the recovery, but can't find newer ones, sadly. Too old phones I know, but just curious if I could make Magisk working on them, lol.
I was going into the boot modification manually right now, but in order to patch the boot I need manager installed first, and phone couldn't boot so I did dirty flash of the rom to be able to boot into it again.
Lets see what happens then. I'll be right back.
Anyhow, this is not a solution to fix the problem of bootloop that I am requesting help in case someone could face the same and did not make a backup of the phone and didn't want to make dirty re-flash. Any idea?
Update: After I did dirty flash of the rom, and now Jiayu g3s android 4.4 booted.
UPDATE: So, after patching manually boot and installing (using restore in TWRP 2.5 as image flash is not yet implemented AFAIK), phone booted and yes Magisk is working.
Magisk installation .zip through a very old recovery is making the bootloop. So that, a thing learnt now.
But, for other people facing this bootloop, can we do a research to find what magisk.zip did to the phones to leave them in bootloop? Maybe we can revert without rom flashing easily if we knew what's the issue...
Thanks in advance!
Doing a bit more tests I found that magisk.zip did something in /system so that it is left in bootloop, but still no idea why/whats causing that...
There are delay complete boot like 4 5 second in j7 prime. I didn't love this version
any more help?? up!!
trol_sg said:
Yes, I've read them before I made the post. I've also looked for a solution in some of the threads and using search, but couldn't find a way.
Click to expand...
Click to collapse
Try this.
Quote:
Originally Posted by void74
I faced this problem too this morning.
I have a Redmi Note 5 with AOSiP ROM, I don't know if it's the right way to do it, but I solved the bootloop problem this way:
- volume up and then boot to TWRP
- copied magisk uninstall to phone memory
- installed magisk uninstall
- rebooted in fastboot/bootloader mode
- flashed original boot.img extracted from stock image zip file ("fastboot flash boot boot.img")
- rebooted to TWRP
- installed magisk 17.0 zip file
- rebooted to system, all OK!
Only problem is that I lost previous magisk configuration, but it's a snap to reconfigure it!
Quote:
Originally Posted by Mangraviti
Here is what to do, if you HAVE NOT installed the new version:
1) Do not update via Magisk Manager.
2) Do not update via TWRP using the zip you can download via Magisk Manager.
3) Uninstall Magisk using Magisk uninstaller (ZIP).
4) Boot to Android.
5) Reboot to TWRP
6) Install V17 ZIP via TWRP and boot to Android.
If you HAVE INSTALLED and got a bootloop:
1) Download the uninstaller ZIP.
2) Enter TWRP during the bootloop.
3) Uninstall using the uninstaller ZIP.
4) Boot to Android.
5) Download V17.
6) Reboot to TWRP and flash the V17.
7) Boot to Android it it should be working.
-------------
Original post. https://forum.xda-developers.com/apps/magisk/bootloop-magisk-update-t3836904
Hope it help.
Ato09 said:
Try this.
Quote:
Originally Posted by void74
I faced this problem too this morning.
I have a Redmi Note 5 with AOSiP ROM, I don't know if it's the right way to do it, but I solved the bootloop problem this way:
- volume up and then boot to TWRP
- copied magisk uninstall to phone memory
- installed magisk uninstall
- rebooted in fastboot/bootloader mode
- flashed original boot.img extracted from stock image zip file ("fastboot flash boot boot.img")
- rebooted to TWRP
- installed magisk 17.0 zip file
- rebooted to system, all OK!
Only problem is that I lost previous magisk configuration, but it's a snap to reconfigure it!
Quote:
Originally Posted by Mangraviti
Here is what to do, if you HAVE NOT installed the new version:
1) Do not update via Magisk Manager.
2) Do not update via TWRP using the zip you can download via Magisk Manager.
3) Uninstall Magisk using Magisk uninstaller (ZIP).
4) Boot to Android.
5) Reboot to TWRP
6) Install V17 ZIP via TWRP and boot to Android.
If you HAVE INSTALLED and got a bootloop:
1) Download the uninstaller ZIP.
2) Enter TWRP during the bootloop.
3) Uninstall using the uninstaller ZIP.
4) Boot to Android.
5) Download V17.
6) Reboot to TWRP and flash the V17.
7) Boot to Android it it should be working.
-------------
Original post. https://forum.xda-developers.com/apps/magisk/bootloop-magisk-update-t3836904
Hope it help.
Click to expand...
Click to collapse
Hello, thanks
This method won't work in my case as in the step:
- installed magisk uninstall = gives error
Note 5 is much newer phone with a recent recovery TWRP that allows all Magisk.zips commands, but unluckyly not this case.
Also, this method is for wrong boot installation/damaged boot. In my case what Magisk damage is /system, not boot.
I wish it could be boot, because that is very easy to fix (flashing through fastboot/SP Flash tools in the case of MTK, recovering boot twrp "backup" even if you didn't make backup...) as you mentioned.
Hope someone have a great idea to revert system to origin, then we could post the solution for those who would like to install Magisk in 4.2+ old phones, and instead of doing boot flash manually, they try to flash magisk.zip and they got bootloop.
Main post updated with all thread information. Up!
Nothing?? Up!!
trol_sg said:
Hope someone have a great idea to revert system to origin, then we could post the solution for those who would like to install Magisk in 4.2+ old phones, and instead of doing boot flash manually, they try to flash magisk.zip and they got bootloop.
Click to expand...
Click to collapse
The only part of the Magisk installation that actually touches /system is if it installs the addon.d survival script. The log you posted earlier shows that it's trying to do this, for some reason, and failiing. I'd start looking there...

Unable to install Magisk - getting "Unable to repack boot image!" error

Good evening lads. I've been having problems installing Magisk.
I've successfully rooted my device (a Samsung J5 2016) and installed Magisk Manager. From there, I selected "Install" and after the confirmation that I want to install Magisk v20.4(204000) I choose "Direct Install" , which is also the recommended option but get an installation error.
Here's my log:
Code:
- Target image: /dev/block/mmcblk0p16
- Device platform: armeabi-v7a
- Unpacking boot image
- Checking ramdisk status
- Stock boot image detected
- Patching ramdisk
- Repacking boot image
! Unable to repack boot image!
! Installation failed
I'm very noob at this and barely have any idea with what I'm doing, so I'm asking you, what can I do? I checked other threads but their logs was very different.
I've never had any other problem with other root apps (Lucky Patcher, Titanium Backup, Root checker etc.) and all I want to do is hide my root so I can use the Nintendo Switch app, lol.
Thanks in advance for your help.
The usual answer is, into Recovery and flash Magisk Uninstaller, then install the Magisk file in Recovery.
I can't give any guarantees, but that always used to be the way to go, if Magisk did not install with Direct Install option.
Like I say, no guarantees.
Should have said, make a Recovery Backup before attempting.
Second thoughts, another poster has just reported a problem installing 20.4 in TWRP, so maybe it's not such a good idea after all.
I don't advise.
Sorry for wrong advice.
Sent from my SM-G965F using Tapatalk
if anyone is having trouble while installing magisk I have come up with solutions.​
if you have installed magisk but it never detects as it is installed the following would be solutions i have found for my self​
install magisk that is older than the one you are going to install in recovery with sideload for eg. to install magisk 25.00 from the recovery you need to install magisk 24.1 apk before that without shutting down your phone.​
the second step you need to do is you have to side-load the latest version after you have installed the older version from the recovery​
that is it simple as it is​

[UPDATE/KEEP ROOT GUIDE] OCT 2020 (RP1A.201005.004) "FLAME" Magisk/Stock Boot Images

[UPDATE/KEEP ROOT GUIDE] OCT 2020 (RP1A.201005.004) "FLAME" Magisk/Stock Boot Images
IF YOU ARE STILL ON AUGUST (ANDROID 10/Q) BUILD, PLEASE FOLLOW THE SEPTEMBER GUIDE (click here) FIRST! AND READ ALL WARNINGS AND ADDITIONAL INFO IN FIRST 2 POSTS!
PLEASE NOTE: I STILL HAVE NOT UPDATED TO ANDROID 11 YET, SO PLEASE FLASH AT YOUR OWN RISK AS ASSISTANCE FROM ME WILL BE VERY LIMITED. PLEASE BE KIND TO ONE ANOTHER AND HELP EACH OTHER OUT!
PLEASE DROP A THANKS IF YOU STILL FIND THESE GUIDES HELPFUL! :good:​
IMPORTANT!! THESE FILES / THIS THREAD IS FOR PIXEL 4 "FLAME" ONLY, NOT PIXEL 4 XL "CORAL"!!
**IT IS HIGHLY RECOMMENDED TO PATCH THE STOCK BOOT IMAGE YOURSELF, FROM YOUR OWN DEVICE, USING MAGISK MANAGER. WHILE THERE'S A GOOD CHANCE THE FILE I PROVIDED BELOW WILL BE IDENTICAL (USE A FILE HASH CHECKSUM TOOL IF YOU'RE CURIOUS), THERE IS ALSO A CHANCE THEY MAY HAVE SMALL, BUT SIGNIFICANT, VARIANCES**
Thanks for the info and link, @wrongway213
Link to @topjohnwu's post: https://twitter.com/topjohnwu/status/1272136975022084097?s=19
ALL FILES BELOW ARE FOR "RP1A.201005.004, Oct 2020"!
Magisk Canary v21.0 Patched Boot Image: https://www.androidfilehost.com/?fid=10763459528675562385
Factory Untouched Boot Image: https://www.androidfilehost.com/?fid=10763459528675562112
Factory Untouched DTBO Image: https://www.androidfilehost.com/?fid=10763459528675562113
[SAFETYNET INFO]: Again, I'm not updating myself yet, so I'm not sure about this. I will update this info as others report back. On Android 10, using the MagiskHide Props Config module (or an alternate module created by Displax, though I prefer Didgeridoohan's module) and choosing option 2 - Force BASIC key attestation would force BASIC HW attestation and allow SafetyNet to pass again. This works perfectly for me, and I even run additional mods including EdXposed. I'm not sure if this works on Android 11, and I won't be able to confirm myself for a while. If anybody tries it, please let me know and I'll update this section. The module and info on using it can be found here: https://forum.xda-developers.com/ap...just search for it in the Magisk Manager app.
EASY UPDATE / SEAMLESS KEEP-ROOT UPDATE PROCESS (using a PC - a very intuitive, effective, and relatively safe method).
** You can only follow this guide verbatim if coming EXACTLY from build "11.0.0 (RP1A.200720.009, Sep 2020)". But the general idea is the same for other builds, you just need the correct files for your device.
flame-rp1a.200720.009-factory-dtbo.img: https://www.androidfilehost.com/?fid=10763459528675562111
flame-rp1a.200720.009-factory-boot.img: https://www.androidfilehost.com/?fid=10763459528675562110
September 2020 sideload OTA zip: https://dl.google.com/dl/android/aosp/flame-ota-rp1a.201005.004-9e17c7b4.zip
DO NOT BOOT BACK INTO O/S UNTIL ALL STEPS ARE COMPLETED - THIS ENSURES EVERYTHING BOOTS BACK UP WITH MAGISK / EDXPOSED ALL RUNNING PROPERLY RIGHT AWAY
1. boot into bootloader
----------------
** I was on custom kernel, so I needed to flash BOTH the stock boot and dtbo images
2. fastboot flash boot flame-rp1a.200720.009-factory-boot.img
3. fastboot flash dtbo flame-rp1a.200720.009-factory-dtbo.img
......* these steps to restore stock recovery; dtbo.img also necessary for some kernel installations.
......* won't hurt to flash both anyway, so if you're unsure, go ahead and do both.
-----------------
4. use volume keys to change selection to boot to Recovery Mode
......- when you reach the android symbol with No Command, hold power button, tap volume up, in case you've forgotten
5. choose option "Apply update from ADB"
6. adb sideload flame-ota-rp1a.201005.004-9e17c7b4.zip
7. Once the OTA sideload is done, Reboot to bootloader (you'll also notice it's now on the other slot after OTA flashed)
8. fastboot flash boot flame-rp1a.201005.004-magisk_patched-21.0.img
9. done, start the phone
(Optional - Flash custom kernel. If you had a custom kernel, you need to re-flash it)
This is a 100% seamless update that requires no additional / re-setup of any of my Magisk or EdXposed setups. All of the factory files can be found here https://developers.google.com/android/images. boot.img and dtbo.img are in their corresponding full Factory Image zips, and the ota zip is under Full OTA Images.
-------------------​
Issues after updating?
If you end up unable to boot or bootlooping afterwards, you most likely have an old Magisk module that isn't playing nice with the new build. There are 2 main things you can do:
1. Flash the new factory untouched boot image. You will of course lose root, and all modules will be disabled. However, it should at least get you able to boot back up quickly and have a working phone if you're in a bind.
2. I would recommend checking Tulsadiver's thread: https://forum.xda-developers.com/pixel-4/how-to/magisk-modules-disabler-booting-magisk-t3991739
Instead of reverting to stock boot image, fastboot boot (NOT FLASH) Tulsadiver's boot image. This will boot your phone in Magisk Core-Only Mode, with all modules disabled but root retained. From here you can open Magisk Manager and disable suspect modules. Before rebooting, go to Magisk Manager's settings and disable Magisk Core-Only Mode. Once you disable the incompatible module, the phone should boot back up.
- See this post (or thread) for more tips / context / an example: https://forum.xda-developers.com/showpost.php?p=82509691&postcount=16
just want to report happily that i waas able to update to october with no problems using your guide. followed your september guide yesterday and then october today. no problems at all, buttery smooth mate! thanx..!
The instructions are great as a reminder,
I only work on the console every month or two and without the bullet points I wouldn't always be able to finish the update so quickly.
Thank you very much ?
So.. I've rooted and taken OTA's and rerooted dozens of times.. But I finally got around to factory resetting now stable is here. On OCT build, i flash the patched boot img and upon rebooting, Magisk shows I'm still not rooted. Any advice?
Update: Flashed canary debug apk. patched stock boot img, and flashed. now rooted. wierd
What about if I'm not rooted and on the October update for Android 11? I've tried a couple different times to root and I always get a fail when I try to flash the patched boot image.
Hey,
here is a quick guide:
=== you need these websites ===
https://developers.google.com/android/images
https://developers.google.com/android/ota
https://github.com/topjohnwu/magisk_files/tree/canary
step by step
1. download https://github.com/topjohnwu/magisk_files/archive/canary.zip
that's Magisk
2. copy app-debug.apk on your Pixel 4 (XL) and install the app
3. Open an Image (NOT OTA!) with 7-zip, there is another big zip-file inside, extract boot.img and dtbo.img
4. Copy boot.img on your Phone, download-folder, just like Magisk.apk
5. Open Magisk and Patch boot.img -> magisk-patched.img
6. Copy magisk-patched.img on your PC
7. now simply proceed as described in the instructions above.
Nothing can go wrong with these self-patched files
i5lee8bit said:
8. fastboot flash boot flame-rp1a.201005.004-magisk_patched-21.0.img
Click to expand...
Click to collapse
Hey guys, novice rooter here:
Can someone explain this step to me? Where do I get this file from if im on the beta version of Magisk?
Fwaiiiz said:
Hey guys, novice rooter here:
Can someone explain this step to me? Where do I get this file from if im on the beta version of Magisk?
Click to expand...
Click to collapse
load canary magisk apk: https://github.com/topjohnwu/magisk_files/blob/canary/app-debug.apk and install, then update magisk in the app
go to: https://developers.google.com/android/images
read
and download factory image for your pixel phone - 11.0.0 (RP1A.201105.002, Nov 2020) is last image for flame https://dl.google.com/dl/android/aosp/flame-rp1a.201105.002-factory-351561c6.zip
unzip the image, and you get another zip file: image-flame-rp1a.201105.002.zip
unzip image-flame-rp1a.201105.002.zip and you get a file named boot.img
copy boot image to your phone
patch boot image with magisk - you have made the magisk patch yourself ? now copy the magisk-patched.img from your phone to your pc, that's the file you ask for, but for the November Update
I hope you can now Update all you want

MAGISK unable to repack

Hi, i tried many times to use MAGISK app on a tablet ASUS FONEPAD 7 (model K00E) with Lollipop in order to patch the BOOT.IMG.
Always failed during the patching, with the messages:
DEVICE PLATFORM: x86
COPYING IMAGE TO CACHE
UNPACKING BOOT IMAGE
CHECKING RAMDISK STATUS
STOCK BOOT IMAGE DETECTED
PATCHING RAMDISK
REPACKING BOOT IMAGEUNABLE TO REPACK BOOT IMAGE!
INSTALLATION FAILED
I have searched for all the possible articles etc, without success.
I have tried many different versione of MAGISK, the last 20.4 and MANAGER 8.0.2 (i have used MAGISK install >> go >> method select and file update >> boot.img)
Obviously i have the original BOOT.IMG file, loaded on internal memory.
Please, may you help me?
Thanks in advance
Marco G
That's a pretty old device, and since Asus has been known to not quite follow Android standards I wouldn't be surprised if it's simply not compatible...
Since you say that you used Magisk v20.4 it might be worth it to try the Canary build (just in case there's been some kind of improvement upstream). You can find the Canary Manager on GitHub:
https://github.com/topjohnwu/Magisk
And providing the actual installation log is always a good idea (there's a disc icon in the flashing window).

Categories

Resources