yashsingh1/xdaforums huggingface dataset:
[Magisk] wedgehog:
Yes, definitely. Some "booting" takes place as the normal boot screen shows for 1-2 minutes if you wipe cache +dalvik before boot with either the patched boot.img or the patched recovery.img . If no wipe, then it crashes back to recovery after a few seconds with either patched boot.img or recovery.img

Before this rom upgrade I've always installed magisk through TWRP on this device with no problems.

"Patched boot.img with Recovery Mode UNCHECKED right?" Yes OFC, when patching boot.img and trying that. When I've tried patching recovery.img instead, Recovery Mode have been CHECKED.

"I'd try w/ TWRP fastboot booted only for best chance." Yes, I haven't had TWRP "installed" since android 9 on this device, since then only stock recovery.img INSTALLED (used fastboot boot twrp.img through cable when needed). Later today I will try patching boot.img and thereafter recovery.img again, but flashing them throug TWRP booted through fastboot instead of flashing patched img through fastboot flash.

"Assuming you had stock recovery when taking OTA too then?" Yes, on this device since over a year back, have only had stock recovery installed (maybe patched by magisk by installing magisk.zip through fastboot booted TWRP - haven't cared to read what the TWRP log have said upuntil these problems so no idea if magisk have patched boot.img or recovery.img through TWRP before this)

"I'd try with canary 22005 too, as canary has many recent fixes, but 22006 does have some major issues / regressions currently being addressed." I'll try this too later today

"Hope something here helps, PW" A million thx so far! As said, I have a few more things to try later today. Will report back.
[Magisk] booneb50:
I have a Lenovo Yoga Book tablet running Android 7.1 and was able to root it using Magisk, all has been well until v22. I updated the Magisk Manager from v21.4 to v22, no problem but when I tried to update Magisk, the install failed with a signature check error. This was done from the Manager app. So I decided to install Magisk v22 using TWRP, the installation went fine. Magisk shows v22 and the App shows v22.

The issues I am having now are, the SafetyNet test fails, installing the safetyNet fix fails, installing any module fails, uninstalling trying to perform complete uninstall of Magisk fails, renamed the Magisk-v22.APK to uninstall.zip and installed it using TWRP fails. It says to uninstall using Magisk Manager!

The only good thing is Root is still active, the machine boots without any problems and update the installed apps when available. I don't want to perform a factory reset and re-install everything. Any ideas how to resolve these issues are appreciated.
[Magisk] io2345:
I tried installing latest canary from recovery as ZIP-file, and it works now (originally reported here Link). But I'm not sure, if the rest of the behaviour is supposed to be that way: After boot-up instead of Magisk logo there is only a green android symbol named "Magisk". When you click on it there is a message "Upgrade to full Magisk to finish the setup. Download and install?" I click yes, it says "downloading" and after a short while "There was a problem while parsing the package".

Could access the log only from within recovery, as SU-functionality doesn't work:

Spoiler content hidden.

Upon each log entry saying "su: request from pid=" there is a message on the screen "Magisk has stopped"
[Magisk] J.Michael:
@booneb50 Check your apps drawer, see how many instances of Magisk (by any name), uninstall each instance. Reboot before try install new copy of Magisk manager app.
[Magisk] io2345:
Thank you for suggesting. That can't be a problem. Those are tests for a ROM-release (you couldn't know that), each with a fresh installation. So there can't be more instances than the one I just installed.

In fact "ps |grep magisk" gives me

root 238 1 18708 1740 __skb_recv 00000000 S magiskd

u0_a83 7730 337 707192 45440 sys_epoll_ 00000000 S com.topjohnwu.magisk

Of course I can uninstall magisk and install it again using the canary APK (works without issues) - but this test intentionally was about installing Magisk from recovery as ZIP.
[Magisk] wedgehog:
I've now tested through also canary 22005, and flashed patched boot.img or recovery.img through twrp instead of flashing through fastboot as I did yesterday (TWRP booted through fastboot, NOT INSTALLED), unfortunately with the same result. System stops on MIUI-screen, colors in the MIUI text changing a bit once in a while (as with normal boot) but after 1-2 minutes, system crashes to stock recovery (normal boot time a couple of seconds, with wiped cache and dalvik normal boot time maybe 20 seconds)

(Short summary of what was done now:

Patch 3 versions of stock boot.img and recovery.img with magisk 22.0, canary 22005 and canary 22006, boot.img with recovery button UNCHECKED, recovery.img with recovery button CHECKED.

boot phone into TWRP through fastboot boot twrp.img a couple of hundred times =)

twrp flash patched boot.img, wipe dalvik+cache, reboot

wait 1-2 minutes

restore stock boot.img, reboot check that device boots now (works everytime)

twrp flash patched recovery.img, wipe dalvik+cache, reboot, boot recovery

wait 1-2 minutes

restore stock recovery.img, reboot, check that device boots now (works everytime)

repeat above six times for 22.0, 22005, 22006

as a last test, flashing canary_22005.apk.zip as a zip through fastboot booted TWRP, boot.img and recovery.img restored to stock before that, also didn't work, fails in same way as everything else

)

Anything else I should try?

I tried search through this thread and read at least 50 pages yesterday before posting. Have any reports come through regarding MIUI on Android 11 on any Xiaomi devices with similar problems?

If definitely no on that question, then I guess this HOPEFULLY is a stock rom problem on just this 12.1.2.0-release which gets solved by itself the next time Xiaomi release a new MIUI Global rom (happens a couple of times a year with new security patches).
[Magisk] J.Michael:
Are @io2345 and @booneb50 the same person?
[Magisk] io2345:
Not as far as I know

Why? Does he have the same issue?
[Magisk] pndwal:
The reply re. hidden Magisk app was for @booneb50, not you. 😉 🙃 PW
[Magisk] pndwal:
I understand @zgfg is running XiaomiEU custom MIUI Android 11 w/ Magisk root without issue, but don't know of stock A11 MIUI & root.

If no other members have suggestions, it's probably worth opening an issue on GitHub for this. Be sure to follow John's issue template... PW
[Magisk] zgfg:
My Xiaomi.eu is also A11 but MIUI 12.5, his above is MIUI 12.1

I've seen also the official CN version MIUI 21.1/A11 for Mi 9T but it was rolled-back (and afaik, people were reporting issues with GApps)

@wedgehog - do you have your boot img (for the same firmware) that was patched by e.g. 22005 or an older Magisk and that worked.

Then, that you re-patch that one with 22006, instead of patching the pristine boot img
[Magisk] wedgehog:
My MIUI is 12.1.2, not 21.1, I'm on Global V12.1.2.0.RFDMIXM.

Currently actually I'm trying ut region EEA (another region, EEA not Global) V12.1.3.0.RFDEUXM but seems to be same issues (which probably is mentioned by another user in thread https://xdaforums.com/t/can-not-install-magisk-after-12-1-3-update.4243775/#post-84720905 ).

When I'm finished testing throug magisk 20.0 - 22.0 and canary 22005 and 22006 I'll probably give up, and try a Xiaomi.EU "stock custom" rom.

Unfortunately I don't have access to a patched boot.img or recovery.img from the old Android 10 (before this upgrade latest stable Global rom) that worked - didnt do any TWRP backups before my upgrade. ATM I haven't had any success getting a Magisk to work on Android 11 latest Global or EEA (soon finished with EEA).
[Magisk] pndwal:
He had working Magisk w/ MIUI A10, but not since update to A11... PW

Edit: As per response above.
[Magisk] zgfg:
I meant that you have 12.1, it was typo when I wrote 21.1

Hence, you're trying older Magisk versions but no success

Is your boot.img 128 MB?

Have you tried an older Magisk (maybe v20 or so) that patches to 16-20 MB, not to 128 MB (since everything above are zero byte fillers)?
[Magisk] wedgehog:
I've tried through Magisk 21.0-21.4, 22.0, canary 22006 and 22005 now with all different install methods, on 12.1.2 Global and 12.1.3 EEA.

All boot.img and recovery.img on 12.1.2 Global and 12.1.3 EEA is 128MB, correct. When trying older 20.0 - 20.X, it goes into a real bootloop. Also tried as old as magisk 11, also bootloop.

If you don't mind me asking, could you post your complete Xiaomi.EU rom version which is supposed to work with (current 22.0?) magisk? I'll try that one out as soon as xiaomi.eu let me get it. Really slow servers today (500 kbyte/s)
[Magisk] zgfg:
Don't know what is your model.

Below are AFH links with 21.3.18 and 21.3.17 releases (for some phones it was released on 17th, for the others on 18th):

Downloads for : -Android- Generic Device/Other | AndroidFileHost.com | Download GApps, Roms, Kernels, Themes, Firmware and more. Free file hosting for all Android developers.

Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.

androidfilehost.com

Downloads for : -Android- Generic Device/Other | AndroidFileHost.com | Download GApps, Roms, Kernels, Themes, Firmware and more. Free file hosting for all Android developers.

Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.

androidfilehost.com

Those firmwares ending wth 12-10 are A10 (older phones), the others ending with 12-11 are A11

When switching from the other ROM, FORMAT (not Wipe) Data and Wipe Cache (Dalwik and Cache but Dalwik will be already wiped by formatting Data).

Do not wipe System, Vendor, Persists or so
[Magisk] wedgehog:
If I understood correctly we're on the same device, Xiaomi Mi Note 10 (tucana). Which rom are you on with working Magisk (if you're on a tucana)?
[Magisk] zgfg:
No, I'm on Mi 9T, davinci:

xiaomi.eu_multi_HMK20MI9T_21.3.18_v12-11.zip

For you it should probably be:

xiaomi.eu_multi_MINote10_MICC9Pro_21.3.18_v12-11.zip
[Magisk] xonich:
I think you can use heimdall to flash

example

heimdall flash --RECOVERY <recovery_filename>.img

heimdall flash --BOOT <boot_filename>.img
[Magisk] pndwal:
ODIN is actually specified in Installation Instruction doc for SAR devices, but I think this part actually applies to legacy Sammy devices too:

https://topjohnwu.github.io/Magisk/install.html#samsung-system-as-root

(Not sure about need to flash BL, CP, and CSC on legacy devices.) 👍 PW
[Magisk] KRafi:
Device: Redmi 8A

OS: MIUI 12

Magisk app main screen is attached with this comment.

Issue: Magisk app not detecting Magisk.
[Magisk] ineedroot69:
you installed Magisk already and Magisk app say N/A?
[Magisk] pndwal:
Ok, please say how you've tried to install Magisk (ie. flash zip in TWRP, patch boot.img or recovery.img and flash that in TWRP or via fastboot etc), and what errors occurred etc. PW
[Magisk] booneb50:
We are two different people.
[Magisk] booneb50:
I verified there is only one instance of the manager installed. I uninstalled the app installed then rebooted, then reinstalled the manager. I checked to make sure it wasn't hidden, same issue. Also, I am not the same person as io2345.
[Magisk] KRafi:
So far, I've tried flashing patched boot.img via fastboot and flashing magisk zip in TWRP. No errors occured. Only Magisk app says, "N/A"
[Magisk] zgfg:
#Xiaomi.eu, #OTA, #Magisk 22006, #Viper4Android, #sepolicy.rule

This week, Xiaomi.eu weekly update 21.3.24 (MIUI 12.5, A11) was late a day and a half, hence I upgraded yesterday night

As usual:

- I downloaded the zip, extracted boot.img and patched (already from my previous Xiaomi.eu 21.3.18, rooted by Magisk 22006)

- Flashed the Xiaomi.eu zip from TWRP, wiped Dalwik and Cache and rebooted

- Then rebooted once again to TWRP and flashed the boot.img that was patched in advance

I could probably flash its patched boot img right after flashing the 'OTA' zip (saving one time booting to the not-rooted system and rebooting to TWRP), but I rather play the safe and many times proven game

Upon rebooting with the patched boot img, I have Magisk 22006 root again, with all modules (except V4A), root granted apps snd apps enabled for Magisk hide

This time the old trick to make V4A did not work. Maybe because of the known sepolicy.rule bug in Magisk 22006, or maybe I was not 'patient' enough and made a mistake in steps

Anyway, I also wanted to test, hence I modified V4A's post-fs-data.sh in accordance to:

https://xdaforums.com/t/app-all-root-solutions-6-0-viper4android-fx-2-7.3774651/post-84121895

rebooted, and it did the trick 👍

The modified post-fs-data.sh for:

/data/adb/modules/ViPER4AndroidFX

is zipped and attached

The zip also contains DDC and Kernel folders to be copied ton Internalmemory: /Android/data/com.pittvandewitt.viperfx/files

for V4A Convolvers and headphone profiles

Hence now I have again AML, V4A plus another audio mode (320 kbps bitrate for my phone) and V4A is happilly again Supported and Proccessing (still in the Legacy mode)
[Magisk] io2345:
@Didgeridoohan : Don't know if you can help me to get more information. Just wanted to know if that (hopefully) will be fixed for the next offical release. If not, it wouldn't make sense waiting. Installing as APK from running system is fine, only ZIP fails somehow (see above).

Log is here, but doesn't tell too much (I think)
[Magisk] pndwal:
Ramdisk = no indicates likely bootloader incompatibility, and, therefore that Magisk 'should' be installed in recovery.img, not boot image. However, experience shows that Xiaomi devices in fact generally retain bootloader compatibility, and Magisk in boot.img still works.

It may be that your device does in fact have incompatible boot loader, and you need to patch/flash RECOVERY image. If this is the case, TWRP zip flash will fail because it patches boot image.

Please check that you UNSELECTED Recovery mode when patching boot.img as failure to do this could also explain patching failure. If you didn't deselect it, do so, patch and flash boot partition from PC / FASTBOOT, not TWRP.

Failing this, try patching / fastboot flashing recovery.img (with Recovery mode selected) as prescribed by Ramdisk = no. Flash to recovery partition.

Please read Installation Instruction section 'Magisk in Recovery' also. PW
[Magisk] pndwal:
Thanks for zip upload! 👍

I hope we can assume that overall enforcing SEPolicy will be unaffected by changes, and that it just creates exceptions for audio mods.

Anyway, assuming it's quite 'safe', this Magisk module mod would undoubtedly be a valuable asset for V4A users. Perhaps you could post it in those forums to. PW
[Magisk] pndwal:
Hi. Did you EVER hide Magisk app/manager?

Also, seems you may have TWRP issues. Have you tried preferred method of patching boot image, then flashing from PC with fastboot? PW
[Magisk] mamba76:
Any ideas as to why you would get "Magisk is not activated" ?

I have a Mediatech device, Android 10, Magisk 22 and only module installed is MagiskHide (from the repo). I do not have TWRP.

Can I install a module via ADB / fastboot env?
[Magisk] zgfg:
Can't do that, it's not my work.

Changes needed for post-fs-data.sh were precisely described in the cited post - I simply attached the resulting file

For IRS filters and headphone profiles, it's only my choices merged from couple of other similar collections on the Net.

Real work did the experts knowledgeable in DSP and audio who created them

It's just that V4A changes the path from version to version - then users get stumbled, they have their old preferred IRS filters but don't know where to put them
[Magisk] pndwal:
When do you get that message?

What device?

What shows as 'Installed' under Magisk on app home screen?

Do you mean 'MagiskHide Props Config' module? (MagiskHide toggle simply adds Google Play Services to MagiskHide list, etc).

Have you EVER toggled on 'Hide the Magisk app / manager' in settings?

I've never considered doing this, and I'm not sure, but I doubt it. PW
[Magisk] mamba76:
Theres 2 third party modules for magisk called VolumeStepsExtender (by FabIO) and another called MediaVolumeStepsExtender (by Miicdu70). They are on GIT so I downloaded the zip file for one or both, can't remember now, and first tried installing this via magisk - modules - install from storage by directing it to the location of the zip file. This is where the 'Magisk is not activated' come from. Obviously this is not the way to install a magisk module.

I then tried unpacking the zip to a new file and then moving that file to modules folder in the magisk location. Yes the only file showing there was MagiskHide as its the only one I installed and it works fine - safetyNet passes etc. The file contents of the two modules (now in magisk-modules folder) looked similar so thought this would work. It showed up under 'installed' within the magisk app alongside magiskHide but with a ? mark next to name. Rebooted, it does absolutely nothing.

ps. MagiskHide is off by default when installed so I had to turn in on/toggle.
[Magisk] KRafi:
I have no doubt that I deselected Recovery Method and I also flashed via fastboot. As, I'm using TWRP, will I patch it to flash magisk via Recovery Method?
[Magisk] pndwal:
I misunderstood; thought you meant you had no active Magisk root...

Method above should work; worked for me w/ VolumeStepsExtender - loaded, active, no errors.

Don't need to unpack compatible module zips; probably not working as installer scripts weren't run.

Yes, been off by default since 20.4.

https://topjohnwu.github.io/Magisk/releases/20400.html PW
[Magisk] pndwal:
I believe so, but hold fire on that.

I checked Redmi 8a forums here, and it appears you need special patching originally from Russian 4PDA (sorry mods... I know you hate mention of such non-English sites 😬 ).

It appears by using this 'patcher', users can successfully flash and use Magisk in boot.img.

https://xdaforums.com/t/guide-how-to-install-magisk-on-miui-and-how-to-install-gsi-roms.4030175/

I haven't checked sources, nor do I have any knowledge of this fix. Please research carefully yourself (check old and recent posts there).

Seems this is the type of fix John would have liked input on to integrate officially, but I've seen patches/fixes like this before, and guess the language barrier (not to mention anti 4PDA sentiment here) doesn't help. Users also often settle for a solution from independent Dev(s) that works, rather than posting issues on Magisk GitHub. PW
[Magisk] KRafi:
So, shall i get an official solution for this issue? If yes, then I'll wait.
[Magisk] booneb50:
Magisk was hidden before upgrading from v21.4 via the Manager but it was unhidden before upgraging Magisk. I only fastboot TWRP not installed. I have not tried patching boot.img. What is the preferred method to uninstall Magisk?
[Magisk] mamba76:
@pndwal

Your the first person Iv heard from after countless posts whos confirmed it worked. I cleaned up my dlds folder, re downloaded FabIO volSteps (from GIT, possibly got it elsewhere first time) and it installed without problems. Unfortunately this has the exact same effect on my device as just adding ro.config.media_vols_steps=30 to /system/ build.prop.

Its a lenovo m8 FHD (Mediatek). It now has 30 steps but has 2 seperate ranges. steps 0 - 15 is mute to full vol and steps 16 - 30 is also mute to full vol. So as you increase volume from 0 it goes up as you'd expect then when the volume bars are exactly half way up it mutes and starts increasing the volume again.

maxVolume = SystemProperties.getInt("[B]ro.config.media_vol_steps[/B]",
MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]);
if (maxVolume != MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]) {
MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = maxVolume;
AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = (maxVolume * 3) / 4;
}

This is the relevent chunk from AudioService.java. Where ever the ro.config line above is being installed its not replacing the original. It done something so the location seems correct. Its something to do with the way it interacts with the HAL on Android source. There must be two refernces to a memory location where this value is stored so I really need to understand android better, work in progress...

To me the line (maxVolume * 3) / 4; seems like the one that needs changing but where the fek is the audioService.java file on my device ?
[Magisk] ineedroot69:
preferred method to uninstall is using the Magisk app itself
[Magisk] booneb50:
I tried that but it fails. No other information posted, the log file is empty.
[Magisk] mamba76:
Im guessing complete uninstall removes the magisk app as well where as the other option just replaces the original boot image you patched and keeps magisk app. But I don't know for sure!
[Magisk] ineedroot69:
by default complete uninstall would replace the partition that magisk has attached itself(boot.img or recovery.img) to stock hence removing you from being rooted also the module themself would be remove... also i notice if you do "pm uninstall -k --user 0 " command to remove bloatware and you "complete uninstall" magisk expect the app to comeback too
[Magisk] mamba76:
When it boots it will use the first boot image it finds (or since boot is a partition there will only ever be one image) this would be magisk's modified version Im sure magisk has access to the original boot image as backup that needs to be reflashed to restore device to stock. Magisk doesn't alter the system files. Just 'Bombs' the boot process. I have had to restore to stock twice now and lost all my sh1t (tho wasn't much) don't know yet the best way to backup so this don't happen again, i guess save / flash user data. Im sure someone here can help more.
[Magisk] pndwal:
Frankly, unless you, or someone with 8a device creates a GitHub issue folowing John's template and including required Logcat, logs etc, I think you'll be waiting a long time.

PLEASE, consider doing this.

In the meantime, I'd be tempted to try patcher from Russian site.

I see there are boot images hosted in 8a thread I linked for patched images for MIUI 11 (A9) versions, but didn't see any for MIUI 12., so you will likely need to run his Python script yourself.

Both the Russian Boot Image Patching Dev (posted it initially for Redmi 7a) and the 4PDA member who hosted it on thread for 8a, have been active in @Ga_hap_la_chanh's 8a XDA thread I linked. They are @YaAlex (Dev), and @dmitrypershin2015 respectively.

Patcher script incl. instructions is on GitHub:

GitHub - YaAlex3/patcher-oss: ARM32 zImage Patcher

ARM32 zImage Patcher. Contribute to YaAlex3/patcher-oss development by creating an account on GitHub.

github.com

I checked information on Redmi 8a, 7a 4PDA threads s too, and details are much the same. PW
[Magisk] ineedroot69:
idk what are topic for this conversation but you can view the partition that magisk has backed up using any root file explorer by going /data/magisk_backup_???
[Magisk] pndwal:
Not sure of any of this; just wanted to eliminate module incompatibility with latest Magisk, and it loads fine (physical vol. steps changed too). 😉 PW
[Magisk] pndwal:
Pull requests just committed by John... here we go! PW
[Magisk] pndwal:
Should have unhidden old 'Manager' before updating app as per Release Notes:

https://topjohnwu.github.io/Magisk/releases/22000.html

It's a MANAGER/APP hiding incompatibility, not Magisk in ramdisk!

I still strongly suspect you have a hidden version of manager Installed, and you only need to find/remember the name you chose, remove BOTH this and current app (normal app uninstalls), and reinstall app to fix conflicts. Nb. module /setting data witll be unaffected as it is in /data/adb.

Uninstall zip, or Uninstall Magisk from app, but this won't remove hidden Manager anyway. PW
[Magisk] mamba76:
Did you actually test the physical volume by playing spotify etc. and checking it works as expected?? Thought Id cracked it only to discover it was wasn't! 😭