Magisk General Support / Discussion

x.trinity

Senior Member
Aug 12, 2016
616
141
53
Europe
Hello, I have a problem with magisk.
This one has mysteriously disappeared, so I wanted to reinstall this one but I can not at all.

Would you have a solution thank you
Check if Hide Magisk Manager/MagiskHide is enabled.

Once the device is stuck in the bootloop state, adb access is lost and unable to get to the bootloader. The only solution I am aware of at that point is to use the SP Flash Tool to interrupt the process and return device to the factory state.
Try with this little tool..Entering EDL mode from fastboot mode.
 
  • Like
Reactions: wars54

FourSilver

Member
Jan 11, 2021
19
3
3
re: "custom recovery"
That's different.
Some Android systems will not support Magisk installing itself in the boot image. On those systems, you let Magisk patch the recovery image. It's still mostly the "stock" recovery image.

On my Samsung, I handed Magisk a tar file with a flock of images. Magisk Manager patched several images, apparently recognizing that most of the work needed to be done on the recovery image.

I'm not sure whether Samsung is the only case where Magisk has to be installed in the recovery partition. In the "pick and patch an image" option, there used to be a checkbox "Recovery", like, in the absence of any other context, the Manager had to be told it was being handed a recovery image.

If you do patch a eecovery image, you have to modify the fastboot command accordingly, saying "recovery" instead of "boot" where that is specifying a partition. (I don't know if anyone would ever "fastboot boot magisk_patched_recovery.img".)

A custom recovery is a replacement for the recovery partition. At the lowest level, it would be a way to boot an alternate system, using the device's established mechanism to "boot to recovery". If it didn't provide recovery-type functions, that's just the way it would be. TWRP is a custom recovery, and *does* provide recovery-type functions. It's conceivable that you could install Magisk *in* a custom recovery. Somebody would have to establish the protocol so you could control which program gets control when you boot a funny way.

Try this: If your device is back to working, try "fastboot flash boot boot.img", using the original, unpatched, "boot.img". If that does not leave you with a working device, I'd say that's the first puzzle to solve. If it *does* leave you with a working device, you can focus on which Magisk, if any, is right for you.

Search this thread for MediaTek, I've seen mentions of special problems. I don't remember if there are solutions.
According to the supported devices list on twrp.me, it appears that there is yet to be a TWRP package for the Atom XL (one is available for the Unihertz Jelly, though.)

I downloaded an earlier version of the Magisk package, and I noticed the "recovery" option you referenced. However, seeing that I did not have Magisk, installed, it didn't seem to be available for me to actually use to create an image. How can I use an earlier version of Magisk without TWRP installed?

I performed the ".\fastboot flash boot .\boot.img" test you suggested, and the device was able to return to a working state -- for the most part (wi-fi is suspect; no network connectivity.) Better than being stuck in a bootloop, I guess...

You mentioned that you were able to hand "Magisk a tar file..." for use in creating a recovery image. How exactly did you pass the file to Magisk?
 

pndwal

Senior Member
Jun 23, 2016
1,850
1,037
113
Sydney
It turns out that Ramdisk = yes is what is reported on the home screen for Magisk Manager. According to the installation instructions, the device "...is perfect for installing Magisk!" I read that as meaning that I can just patch the stock boot image, copy it into the platform-tools folder that holds the adb and fastboot packages. What about my interpretation needs updating?

Regarding entering Fastboot mode: I've been doing a fair amount of button mashing to see what options would take me to that mode once the bootloop is triggered; I've yet to find out what button combo works...
Then patching boot image is the correct method. 👍 ... Nothing above needs updating (unless, of course, it can't be made to work!)... But those helping didn't have this info, therefore asked you to check as this would possibly cause bootloop in case of no Ramdisk in boot image (but I think generally system would still boot without Magisk root).

There are various ways to enter Fastboot. You'd have to do research for you / similar device.I know some report Fastboot connection with completely blank screen under some circumstances. Some devices need a button/ buttons pressed when plugging in pc usb.

Of course, Fastboot could be broken, but what you described doesn't generally cause this. PW
 

pndwal

Senior Member
Jun 23, 2016
1,850
1,037
113
Sydney
Thanks for the information on how to retrieve earlier versions of Magisk. While I was able to install a copy of Magisk Manager 7.5.1, it seems that the package requires network connectivity to be used. Once I establish network connectivity, I am prompted to update to Magisk Manager 8.0.7 (which I guess defeats the purpose.)

Seeing that this is a brand new device and I have no personal data on it, how can I "downgrade" to ensure that I can root the device?
As you said, using latest manager w/ channel set to Beta / Stable / Canary will always use latest Magisk available for each of these respectively if patching image.

Custom channel, However, is not limited to latest. It is just that, 'customisable', and by pointing it to json associated with any public releases (stable or beta), it WILL use the older version you specify as I mentioned. Using older Canary builds is more involved; you need to download, edit and privately host the json to make this work, but downgrading to Canary builds is not generally recommended in any case. PW

Edit: keeping latest manager will ensure greatest compatibility. I doubt there's any need to downgrade Manager to patch images w/ older Magisk unless using extremely old versions which may not be compatible.
 
Last edited:

pndwal

Senior Member
Jun 23, 2016
1,850
1,037
113
Sydney
...How can I use an earlier version of Magisk without TWRP installed?
Point to json in custom channel as I described
I performed the ".\fastboot flash boot .\boot.img" test [you] suggested, and the device was able to return to a working state -- for the most part (wi-fi is suspect; no network connectivity.) Better than being stuck in a bootloop, I guess...
I'm guessing you have / can use Fastboot then?
You mentioned that you were able to hand "Magisk a tar file..." for use in creating a recovery image. How exactly did you pass the file to Magisk?
As seen in installation instructions, this is the method for Samsung devices. I'm unaware of other OEMs packaging boot / recovery images this way. PW
 

ndd53

Member
Mar 7, 2012
29
1
28
Not knowing what version you are running I can't say for sure but for me on my pixel 3xl, I have no issues with direct install, any of my 3 banking apps and I pass safety net. Gotta be something on your end.
I'm using the latest canary magisk on android 11 with edxposed 5.1.4_4669 yahfa master and riru core v23.3.
hmmm. I uninstalled what appeared to be 8.07, rebooted the phone and installed the lastest canary app (downloaded from github). when I run it, it says

latest: f5593e05 (4835)(15)
installed: f5593e05 (4835)

and the install button is there. repeated attempts to install result in the same thing: the manager doesn't think it's up-to-date. I'm hesitant to do a clean reinstall of the factory image; does anyone know of any steps I can take to get past this? I've lost root, so I can't do any further cleaning behind the scenes. and, as the earlier poster said, I'm not able to patch boot.img any more.
 

Lughnasadh

Senior Member
Mar 23, 2015
1,947
1,259
143
hmmm. I uninstalled what appeared to be 8.07, rebooted the phone and installed the lastest canary app (downloaded from github). when I run it, it says

latest: f5593e05 (4835)(15)
installed: f5593e05 (4835)

and the install button is there. repeated attempts to install result in the same thing: the manager doesn't think it's up-to-date. I'm hesitant to do a clean reinstall of the factory image; does anyone know of any steps I can take to get past this? I've lost root, so I can't do any further cleaning behind the scenes. and, as the earlier poster said, I'm not able to patch boot.img any more.
I believe that is the latest Canary manager. If there is an update there will be an "update" button. The install button there is normal.
 

J.Michael

Senior Member
Jan 20, 2018
443
198
43
You mentioned that you were able to hand "Magisk a tar file..." for use in creating a recovery image. How exactly did you pass the file to Magisk?
I think a link is missing... What is the tool?
In the "pick and patch a file" option, you can "pick" a tar file. As @pndwal said, only Samsung seems to deliver software that way, so it's not useful to you. I only mentioned it in passing, because when I used it, I did *not* select the recovery option -- Magisk Manager was fiddling with several images at once, and seemed to know what it was doing. In your case, *if* you were trying to install in recovery, it might be important to check the option when handing Magisk the recovery.img file. Since you have since informed us that your device does *not* require Magisk to be installed in recovery, none of this applies to you.

re: EDL tool: I think he was saying that ADB or fastboot has some option to "boot" into Emergency Download Mode. As someone else mentioned, this might be one of those cases where you have to hold a dead chicken in one hand while connecting a powered down phone to the USB cable already connected to a PC running ADB (or fastboot). If you can find the right ritual, it's probably less frustrating than the "hold three buttons until precisely half-a-second *before* a certain message shows on the screen, at which point switch to four other buttons".
 

J.Michael

Senior Member
Jan 20, 2018
443
198
43
As you said, using latest manager w/ channel set to Beta / Stable / Canary will always use latest Magisk available for each of these respectively if patching image.

Custom channel, However, is not limited to latest. It is just that, 'customisable', and by pointing it to json associated with any public releases (stable or beta), it WILL use the older version you specify as I mentioned. Using older Canary builds is more involved; you need to download, edit and privately host the json to make this work, but downgrading to Canary builds is not generally recommended in any case. PW

Edit: keeping latest manager will ensure greatest compatibility. I doubt there's any need to downgrade Manager to patch images w/ older Magisk unless using extremely old versions which may not be compatible.
Please clarify: Are you saying that it is possible to patch images with an older version of Magisk *without* using an older version of Magisk Manager?

Or were you saying that you did not think he would need to use an older version of Magisk, and so would not need an older version of Magisk Manager?

Like @FourSilver, I had been assuming that if I wanted to use an older version of Magisk, I would have to install an older version of Magisk Manager.
 

Didgeridoohan

Forum Moderator / Developer Relations
Staff member
May 31, 2012
11,221
11,255
263
Gothenburg
Like @FourSilver, I had been assuming that if I wanted to use an older version of Magisk, I would have to install an older version of Magisk Manager.
No. Any older version of the Manager will still use the same update channel as a new version, so it makes no difference. To downgrade Magisk using the Manager you'll have to use a custom update channel (or flash the zip manually as you would a module zip, I'd forgotten about this possibility), and then it doesn't really matter what version of the Manager you use (unless we're talking very old releases of Magisk or Manager).
 

pndwal

Senior Member
Jun 23, 2016
1,850
1,037
113
Sydney
Please clarify: Are you saying that it is possible to patch images with an older version of Magisk *without* using an older version of Magisk Manager?

Or were you saying that you did not think he would need to use an older version of Magisk, and so would not need an older version of Magisk Manager?

Like @FourSilver, I had been assuming that if I wanted to use an older version of Magisk, I would have to install an older version of Magisk Manager.
Yes

No, although he probably doesn't need to. (May be useful to eliminate new commits causing his issue(s) however.)

No, older manager still won't work as it will also show only latest for either Stable, Beta or Canary channels (as per Settings selection). These channels are set to latest builds at server end. Patching function uses this same set channel, assuming it will even allow this to be done before updating Manager. As stated, selecting Custom channel is the way users can set a selected older build, achieved by pointing to a hosted json file containing links to the desired buid. This is easy in the case of archived public (Stable/Beta) builds as these contain preset links set to the location of the specific build files, but more tricky for a debug (Canary) build as the corresponding json file is set to the location of the latest build, not the specific archived build (Likely because John Wu is only interested in receiving debug logs from latest Canary so has never seen a need to make jsons build specific as older builds are effectively redundant as they no longer achieve their intended purpose in any case). To patch images using old Canary build, a user must therefore download the associated json, edit it's link to the Canary Magisk file at the very least, then rehost the file on a server before it will properly point to his selected build.

Nb. Cases where archived debug Canary builds will be of more use than an older public release will be rare in any case. PW
 
Last edited:
  • Like
Reactions: J.Michael

zgfg

Senior Member
Oct 10, 2016
4,829
2,139
233
Please clarify: Are you saying that it is possible to patch images with an older version of Magisk *without* using an older version of Magisk Manager?

Or were you saying that you did not think he would need to use an older version of Magisk, and so would not need an older version of Magisk Manager?

Like @FourSilver, I had been assuming that if I wanted to use an older version of Magisk, I would have to install an older version of Magisk Manager.
About preparing a json pointing to an older Canary Magisk versions, to be able to set it up in Custom Update channel has been discussed in this thread several times.
It's possible but it takes time and one must be familiar with e.g. Github

I think it was the last time as below, see my posts when I did it to be able to test some older Canary versions (20422-20427)

Sorry, I'm really not going to write instructions now, but you can rewind back to those posts and go through the conversation (my posts, answers I was given to my questions, my comments, etc), and you will find all ingredients you need for cooking:
Thanks, yes I found there the Magisk Canary zips 20422-20427

Json files point always to the latest, hence here come links to my json files that one can use for Custom channel in Magisk Manager to download or to patch any of those Magisk Canary versions 20422-20427:

20422
20423
20424
20425
20426
20427

I've checked and that (in)famous MagiskR.zip as used elswhere for installing Magisk to my Mi 9T (and probably some others) Xiaomi.eu A11 beta firmwares is exactly Magisk-61599059(20422).zip (the same checksums)

If I patch my A11 boot.img with v20422, I can boot and I have root

If I patch with v20423 or any newer, then (ofc, upon flashing the patched img) it boots to Fastboot.
(Good thing is that I can still reboot to TWRP and reflash another boot image)

If I first patch the boot.img with v20422 and then re-patch that patched img with v21101 (v20423 or any higher) then everything is also ok, I boot to Magisk v21101

Hence the issue was introduced with certain v20423 commit(s)

Tested also that Magisk alpha build from @wb2060 on my Mi 9T Xiaomi.eu A11 beta (20.12.10) - Qualcomm Snapdragon 730, not MTK

Again, to use for Custom channel, one needs a json file with working URLs, like this:

Patching the originall Xiaomi.eu boot.img works (like with 20422),not causing bootloop to Fastboot (like 20423-21101)

For the moment I don't observe other differences compared to v21101 (it was branched from)
Thanks, yes I found there the Magisk Canary zips 20422-20427



Json files point always to the latest, hence here come links to my json files that one can use for Custom channel in Magisk Manager to download or to patch any of those Magisk Canary versions 20422-20427:



20422


20423


20424


20425


20426


20427




I've checked and that (in)famous MagiskR.zip as used elswhere for installing Magisk to my Mi 9T (and probably some others) Xiaomi.eu A11 beta firmwares is exactly Magisk-61599059(20422).zip (the same checksums)



If I patch my A11 boot.img with v20422, I can boot and I have root



If I patch with v20423 or any newer, then (ofc, upon flashing the patched img) it boots to Fastboot.

(Good thing is that I can still reboot to TWRP and reflash another boot image)



If I first patch the boot.img with v20422 and then re-patch that patched img with v21101 (v20423 or any higher) then everything is also ok, I boot to Magisk v21101



Hence the issue was introduced with certain v20423 commit(s)





Tested also that Magisk alpha build from @wb2060 on my Mi 9T Xiaomi.eu A11 beta (20.12.10) - Qualcomm Snapdragon 730, not MTK



Again, to use for Custom channel, one needs a json file with working URLs, like this:




Patching the originall Xiaomi.eu boot.img works (like with 20422),not causing bootloop to Fastboot (like 20423-21101)



For the moment I don't observe other differences compared to v21101 (it was branched from)
It will 'work' but it will not install particular magisk_debug.zip (old, custom), instead it will install the latest official Canary



Open e.g. in browser alpha.json from wb2060:




and observe that 'link'

"link": "magisk-debug.zip"

is not a valid URL to his




If you use Install in Magisk manager, Download zip only, Manager will download the official Canary 21101, not his custom one

(maybe his own app_debug.apk manager would have hardcoded proper link, but it does not work for Custom URL in the official Manager, using Custom channel).

Download that way and download tjw's official v21101, compare the sizes and checksums



When you open 'my' json you will see:

"link": "https://github.com/vvb2060/magisk_files/raw/alpha/app-debug.apk"

and that will force downliading and patching really magisk_debug.zip from wb2060



And that's anothet problem that was introduced two months ago to Canary jsons - previously canary.json had a proper URL to the particular magisk_debug.zip, now debug.json does not and Manager itself uses the hardcoded link to the latest magisk_debug.zip



Similarly, go to


take it for Custom channel in Manager 315 any of those debug.json files - use Install and Download or Patch, Manager will do it but using the latest v21101, not that v2042x whose json you used for Custom channel



QUOTE="pndwal, post: 84136657, member: 7550078"]

...

https://raw.githubusercontent.com/vvb2060/magisk_files/alpha/alpha.json), paste this! Doesn't that work for you?
It will 'work' but it will not install particular magisk_debug.zip (old, custom), instead it will install the latest official Canary
So did you open yourself that your own json you mention in browser, where do you see the valid URL to the particular version - check the screenshot?!

Instead, there must be the URL like on the second screenshot to force it to really use particular msgisk_debug.zip for Install (Download, Patch or Direct)
I thought it would be more complicated to overcome that problem with nissing URLs in json files (need to setup my own web server), but this was an excellent tip:



Plus, you gave me the links for Magisk zip files, and I spent half a Saturday locked to the couch, testing with my A11 - #stayhome 😷
 
Last edited:

Sideburnt

Senior Member
Nov 15, 2006
266
4
38
Leeds
Magisk manager after updating through the app now hangs at the loading flash screen. I've uninstalled a few times and tried re-install but that didn't work.

It worked before, strange. I'm using a LEMFO LEM4 PRO which has a really old stripped back 5.1 OS so no option to clear data.

It's there anything I can try? I'd like to root again.
 

daddylonglegs

Senior Member
Oct 23, 2009
486
101
63
Vermont
So since it took me 4 days of research and investigating, I finally got Magisk working properly on my Pixel 3A . Not only that, but i got it working with SystemlessHosts without crashes. Also edXposed is installed, and I am using GravityBox and my phone is passing SafetyNet! So here is a guide in case it helps someone else:

Code:
1) Update OS via flash-all.bat with -w removed if you aren't on the newest Android release.
2) patch boot created by magisk via Powershell and not Command Prompt.
2b) you might have to have a kernel like EX Kernel installed because of a glitch, Systemless Hosts enabled causes Android 11+ to crash. EX Kernel prevents Android from crashing with Systemless Hosts enabled.
3) Enable Maigsk Hide and hide the Magisk Manager app itself. Rename it to something like MnM instead of the default "Manager" it tries to rename itself. Nintendo app is detecting the name "Manager".
3b) make sure you have this Magisk module installed: https://forum.xda-developers.com/t/magisk-module-universal-safetynet-fix-1-1-0.4217823/
4) Inside of edXposed, enable "pass safetynet option". The option should be third from the bottom or so.
5) To be able to do number 4, you will have to enable "App list mode". Enable it, and then also enable right below it "white list mode".
6) Then in EdXposed, go back to main screen and press the hamburger menu and choose "Applications".
7) This is the white list. For Gravitybox to work, enable the following:

- Android System (android)
- System UI (com.android.systemui)
- Call Management (com.android.server.telecom)
- Download Manager (com.android.providers.downloads)
- Phone (com.android.dialer or com.google.android.dialer)
- Phone Services (com.android.phone)

8) Go into settings in Android and Clear the play store and play services cache and data and reboot.

Device should now pass safetynet while rooted and with edXposed/Gravitybox installed :)

Apps such as "Netflix" should finally show up in search again, too. To be sure, check the following:

Open the Google Play Store app.

Select the Menu  icon.

Select Settings.

Under Play Protect certification, you'll see if your device is Play Protect certified.
Hope this helps anyone else out there!!
 

ndd53

Member
Mar 7, 2012
29
1
28
I believe that is the latest Canary manager. If there is an update there will be an "update" button. The install button there is normal.
oh. okay. that's embarrassing. somehow I thought that was different behavior.

but that still leaves me unable to patch boot.img: I try to use 'select and patch a file' and get

Process error
Installation failed

does anyone know how I can move on from that?

never mind, I figured it out. I was trying to select the boot.img file through the Astro file manager; for some reason that didn't work. once I found boot.img through the magisk manager, it patched it just fine and I have root back. I think that what helped was changing the timestamp on boot.img so magisk manager could find it in 'recent files'. thanks for the help.
 
Last edited by a moderator:

matth76

Member
Sep 26, 2016
22
2
8
44
Hi,
I'm with manager 8.0.7 and magisk 21.4 on a mi8 // android 11 evolution rom

I can't find where to instal modules nor where i gave root access, i only see the frontpage and the settings icon .. can someone tell me what i'm missing ?