Magisk Manager not detecting Magisk


cnterr

Members
Aug 6, 2020
9
5
After installing the rom 12.1 I tried to install Magisk in the following ways:

Flash via TWRP of version 20.4.
Bootloop.

Flash via tool integrated in TWRP of version 20.3.
Bootloop.

Same as above but installing before or after (I tried both ways) no-verity-opt-encrypt-6.1.zip
It always boot in FASTBOOT only.

At each attempt I also deleted the DATA partition and reinstalled the ROM.

I was able to install ROM and Magisk without errors and startup problems only using the procedure described on the official Magisk troubleshooting, and that is by typing from the TWRP terminal...

echo KEEPVERITY=true>>/cache/.magisk
echo KEEPFORCEENCRYPT=true>>/cache/.magisk

...before the Magisk flash. However, the problem is that the Magisk Manager does not detect it and tells me that it is not installed.
I also tried to flash it again and in the log I read that the flash procedure opened a boot image previously patched by Magisk.

As a last attempt I patched the boot.bin extracted from the original ROM image and flashed from fastboot, same result, the Magisk Manager does not detect the root.

What am I doing wrong?
 
  • Like
Reactions: Pelayo

cnterr

Members
Aug 6, 2020
9
5
Yes, I realized this morning that in fact the problem was that but the Canary release shouldn't be? Because I tried everything again now with Canary and the result is always the same.
 

underlines

Members
Feb 19, 2013
11
23
Yes, I realized this morning that in fact the problem was that but the Canary release shouldn't be? Because I tried everything again now with Canary and the result is always the same.
Yes Magisk Canary has Android 11 support. Did you try this?
 

cnterr

Members
Aug 6, 2020
9
5
I did not specify that when I asked if Canary worked it was because I had already tried and in fact without success.
Eventually I switched to the stable release.
 

katerpanne

Members
Apr 19, 2014
791
192
I did not specify that when I asked if Canary worked it was because I had already tried and in fact without success.
Eventually I switched to the stable release.
You can switch to android10 / MIUI11 weekly as well. It is up to you
 
Last edited:

B!GBOY

Members
Dec 27, 2010
112
40
So I built a working build of Magisk canary. Thanks to Simonsmh for finding out the problem.
This is not an official release! it is a debug build for people who cannot live without magisk/root ( myself included )
It works on the latest weekly rom (tested on Mi 10 Pro)

instruction: flash in recovery

I have not tested everything but I'm using it since yesterday and my phone still not exploded!
If you do not know how to fix your phone if anything goes wrong do not use this!
It is your choice to use it and your responsibility.

it can be found here use magisk canary the bug is fixed in 20421

photo_2020-08-23_10-57-52.jpgphoto_2020-08-23_10-57-48.jpgphoto_2020-08-23_10-57-43.jpg

if anyone interested, what i did was force SARFirstStageInit and used 3096 pull request by Simonsmh that uses sepolicy cil in system_ext (this is new in xiaomi's android 11 builds)
 
Last edited:

Mali2

Members
Jan 3, 2017
150
40
So I built a working build of Magisk canary. Thanks to Simonsmh for finding out the problem.
This is not an official release! it is a debug build for people who cannot live without magisk/root ( myself included )
It works on the latest weekly rom (tested on Mi 10 Pro)

instruction: flash in recovery

I have not tested everything but I'm using it since yesterday and my phone still not exploded!
If you do not know how to fix your phone if anything goes wrong do not use this!
It is your choice to use it and your responsibility.

it can be found here

View attachment 31600View attachment 31601View attachment 31602

if anyone interested, what i did was force SARFirstStageInit and used 3096 pull request by Simonsmh that uses sepolicy cil in system_ext (this is new in xiaomi's android 11 builds)

You are my greatest hero, dear!!!! Thank you so much

works like charme with Mi 10 (Global) with xiaomi.eu 20.8.20, installed in twrp, managed with canary manager ...
 

katerpanne

Members
Apr 19, 2014
791
192
So I built a working build of Magisk canary. Thanks to Simonsmh for finding out the problem.
This is not an official release! it is a debug build for people who cannot live without magisk/root ( myself included )
It works on the latest weekly rom (tested on Mi 10 Pro)

instruction: flash in recovery

I have not tested everything but I'm using it since yesterday and my phone still not exploded!
If you do not know how to fix your phone if anything goes wrong do not use this!
It is your choice to use it and your responsibility.

it can be found here

View attachment 31600View attachment 31601View attachment 31602

if anyone interested, what i did was force SARFirstStageInit and used 3096 pull request by Simonsmh that uses sepolicy cil in system_ext (this is new in xiaomi's android 11 builds)
Respekt! Do you have the source code as well?
 
  • Like
Reactions: B!GBOY

B!GBOY

Members
Dec 27, 2010
112
40
Respekt! Do you have the source code as well?
Sure.
Clone magisk repo: https://github.com/topjohnwu/Magisk.git
use this patch: https://patch-diff.githubusercontent.com/raw/topjohnwu/Magisk/pull/3096.patch
(assuming the patch is saved in a file called "3096.patch")
$ git am 3096.patch
and change this line : https://github.com/topjohnwu/Magisk/blob/7fc9b908d447691253b55f09d358412b2025ca50/native/jni/init/init.cpp#L177-L177
from:
Code:
bool two_stage = access("/apex", F_OK) == 0;
to
Code:
bool two_stage = true;
I basically just changed a single variable to true :D The guy mentioned earlier did all the work
 
  • Love
Reactions: katerpanne

marcel112

Members
Jun 2, 2011
438
52
Sure.
Clone magisk repo: https://github.com/topjohnwu/Magisk.git
use this patch: https://patch-diff.githubusercontent.com/raw/topjohnwu/Magisk/pull/3096.patch
(assuming the patch is saved in a file called "3096.patch")
$ git am 3096.patch
and change this line : https://github.com/topjohnwu/Magisk/blob/7fc9b908d447691253b55f09d358412b2025ca50/native/jni/init/init.cpp#L177-L177
from:
Code:
bool two_stage = access("/apex", F_OK) == 0;
to
Code:
bool two_stage = true;
I basically just changed a single variable to true :D The guy mentioned earlier did all the work
When i used this, and "normal" magisk is working on A11, can i easyly switch or do i need to stay on canary then. I am using 10 pro global version
 

B!GBOY

Members
Dec 27, 2010
112
40
When i used this, and "normal" magisk is working on A11, can i easyly switch or do i need to stay on canary then. I am using 10 pro global version
Yes you can easily switch by flashing the official builds on top or use magisk uninstaller or restore boot image....

The mentioned pull request will probably be merged in the official magisk soon. And topjohnwu has already said that he will implement a better check to identify the system correctly even if it does not have /apex in ramdisk.
 
  • Like
Reactions: marcel112