yashsingh1/xdaforums huggingface dataset:
[Magisk] pndwal:
Well, tried to test dual Magisk on my RN8T (Ramdisk = no), but more surprises: ANY attempt to flash Magisk to recovery finds recovery's 'stock boot image' and patching succeeds, but booting fails with 'System Has Been Destroyed'; Fastboot only available.(flash stock recovery fixes). Not sure what the problem is with recovery-ramdisk, but understand other Xiaomi users have also failed to gain root by official Ramdisk= no method also. Fortunately, it generally works with boot-ramdisk.

I've tried builds from latest back to 20.3 with same results... Must try patching custom recovery.img soon!

I'm not sure of anything either (now more so), but still strongly suspect your device has boot-ramdisk bootloader support (despite no factory boot-ramdisk) like mine, and that after Magisk patching adds basic missing boot-ramdisk with Magisk-init (working since this commit: https://github.com/topjohnwu/Magisk/commit/e72c6685edf81706617a3444575c4500b9b8fe6c ), Magisk in boot works. If reports of .zip installer from twrp working are true I think this MUST be the case.

Not sure if this does account for booting to Magisk without recovery key combo for you, but I think it could.

I noticed using reboot from Magisk App boots to recovery after checking Recovery mode too. I'm guessing that when system is able to boot from recovery w/ Magisk, this should get one back to back to system with Magisk in recovery.

I just can't see how this could work after normal power off. From this state, the kernel directly mounts the system partition as rootdir and exec /init to boot (ie. SAR). Kernel doesn’t need initramfs (ie. ramdisk) to boot Android (because rootdir is in system), and there is NO ramdisk in boot partition to access... unless it is added manually...

But I certainly could be missing something... PW
[Magisk] zgfg:
At the end of 2019, when I got my Xiaomi Mi 9T, I think it was MIUI 10/Pie and Magisk v19 or v20, I searched how to root.

Since it's reporting Ramdisk=No (SAR yes, A/B no - I checked also querying by adb) and by following the Magisk Github documentation it was 'clear' I had to patch recovery, not boot

Fortunately, I found two independent guides for my Mi 9T claiming that for Magisk one must patch boot.img - hence I happilly did the same, specially because I also use TWRP (in Recovery) in parallel

Since then, I do it the same way through all MIUI updates (now on MIUI 12.6/A11 Xiaomi.eu) and all Magisk (Canary) updates

I always wanted to test but never really tried what would happen if I patch Recovery instead (cannot test now since I'm now on weekly Xiaomi.eu beta that distributes without recovery.img in the zip, and their firmwares must be flashed through TWRP)

I only tested updating Magisk by flashing the zip from TWRP, and it properly found and re-patched the Boot - however I never tried cold installation of Magisk from TWRP, would it properly imstall to Boot (but I think I've seen other users for my Mi 9T confirming it working well)

Ofc, I don't know does it work the same way or 'all' Xiaomi phones
[Magisk] schmeggy929:
Does anyone know which version of Magisk still has the "Install in to inactive Slot (AfterOTA)? I know it was removed temporarily, having a difficult time finding the version before it it was removed.
[Magisk] Lughnasadh:
I believe it was 20.4
[Magisk] schmeggy929:
Thank you
[Magisk] schmeggy929:
That didn't work as we don't have TWRP for the OnePlus 9 Pro yet. Uninstalled Magisk. Downloaded Magisk Manager 7.5.1 and Magisk 20.4.zip. Installed Manager and went to click install Magisk and it already shows 22.1 to install. No worries. I will have to do a few more steps when it is system update time.
[Magisk] mixlex:
I have 22.1 installed and it's there
[Magisk] J.Michael:
@zgfg Did you say that Xiaomi delivers firmware that *must* be installed using TWRP?

Does a new phone come with TWRP?
[Magisk] HippoMan:
I'm using 22.1, and I still have that "Install in to inactive Slot (AfterOTA)" functionality. However, I haven't tried it on Android 11. It has worked for me on Android 10 with 22.1: OnePlus 7Pro (GM-1917) running OOS 10.3.8.
[Magisk] schmeggy929:
That's weird I'm on stable 22.1 (22100) and it is not there.

That may be it. I'm Android 11 OnePlus 9 Pro.
[Magisk] mixlex:
Maybe so..I'm on 10 and still have it
[Magisk] Lughnasadh:
I'm on a Pixel 4 XL on Android 11 and it's not there for me with 22.1. I know he removed it in the 21.0 release b/c it was giving Pixels bootloop problems. 21.0 was also the 1st release that supported Android 11. Maybe he just removed it for Android 11? Not sure. Don't see any mention of it in the changelogs except for 17.0/1 where he added it back.

https://twitter.com/i/web/status/1303574238796808192
[Magisk] J.Michael:
"dual Magisk": Did you try to put Magisk in *both* boot and recovery?

I do not understand "ANY attempt to flash Magisk to recovery finds recovery's 'stock boot image' and patching succeeds": What is "find", and what is "succeeds"?

You said Xiaomi. I have a Samsung.

I agree the bootloader supports ramdisk. As I quibbled with you earlier, I believe that it is the kernel that may or may not look for / use a ramdisk: it's the same bootloader, whether you boot boot or boot recovery, so if recovery always has a ramdisk, the bootloader always supports ramdisk. Or the bootloader doesn't even know about ramdisk, and the kernel finds the ramdisk at the end of what the bootloader thought was kernel. Of course, there could be a flag in the kernel's meta-data that tells the bootloader not to bother doing ramdisk stuff, but that would still be a matter of the *kernel* choosing to not allow ramdisk.

I agree that it seems to be possible to install Magisk in boot on my device.

I do not believe that I have Magisk in boot -- I told you I had to boot repeatedly before hitting the sweet spot that caused Magisk to activate.

I do not know if my version of Magisk Manager has a reboot option, but I would be afraid to try to use it to get back to Magisk active from Magisk inactive. I would expect the Manager to need root privilege to trigger a reboot, let alone to trigger a reboot to recovery. Are those really things that Android will allow an unprivileged app to do?
[Magisk] zgfg:
Xiaomi.eu firmwares (not the official Xiaomi firmwares but based on weekly Xiaomi beta builds) MUST be installed by TWRP:

MIUI 12.6 - 21.4.7/8

Status: RELEASED RULES WHEN POSTING 1. If a ROM is not published DONT ASK ABOUT ITS ETA 2. If a ROM is not published DONT ASK why! 3. If a ROM is available, download it and use it 4. If a ROM has bugs, post the bug to the bug section if the BUG is not already listed 5. If you use any form of...

xiaomi.eu
[Magisk] zgfg:
If I recall correctly, all Magisk Manager versions had Reboot button but not on all screens.

Currently it's on the Home screen - see the screenshot

Even programmatically rebooting from Magisk Manager/app (not to Recovery or Fastboot) requires root. If you only install Magisk app but no Magisk/root, any attempt to reboot will fail (same for the various Reboot apps available from Google Play - they require root privileges)
[Magisk] J.Michael:
As @zgfg opined, I have that option. I thought the snake-chasing-its-tail was to refresh the screen.
[Magisk] pndwal:
Nb. Xiaomi.eu is not (affiliated with) Xiaomi. PW
[Magisk] jcmm11:
Quick question for anyone who knows. I'm trying to resurrect a Nexus 5x which currently has 17.4 on it. What's the easiest way to upgrade to the latest canary ( 17.4 -> 20.1 -> Canary? )
[Magisk] ineedroot69:
complete uninstall Magisk then install 20.1?

also why 20.1 that's really old version you mean 22.1?
[Magisk] m8822:
Magisk is failing safetynet all over the place. it passed before.

is this related to my devices or magisk itself?

when will it be resolved?
[Magisk] martyfender:
Without more information, it is hard to say, but you could try this module in the mean time, if your Android version is new enough, Android versions 8–11 are supported:

https://xdaforums.com/t/magisk-module-universal-safetynet-fix-1-1-0.4217823/
[Magisk] djjohnnyblaze:
I am running the latest magisk canary and latest universal safetynet fix and started failing safety net today. Included screenshot of error. I am running pixel 3a April security patch.
[Magisk] martyfender:
Wow! You are right, now both of my Onn 8, Android 9 tablets with the previously mentioned module are failing the safetynet check. It looks like Google is trying to foil us again!

UPDATE: I found out after my post through testing in SafetyNet Attest and Root Checker, that SafetyNet does actually pass in the latest Canary build, so it may be a new bug in Magisk Canary??? My Android 6 tablets have the same failures.
[Magisk] hachamacha:
I meant to post this in here -- Oops: https://xdaforums.com/t/magisk-module-universal-safetynet-fix-1-1-0.4217823/post-84839539

It's about safety net attest working when the internal magisk stuff doesn't.
[Magisk] TheRedmiBuddy:
safety net api errror after updating from 22.0 to 22.1 on oneplus 7
[Magisk] pndwal:
Re Google SafetyNet changes:

Not sure what's going on yet, but basicIntegrity fail imay be good sign fix may not be too difficult; this has usually been achieved fairly easily.

Of course, it may well be Bootloader / Hardware key Attestation related too. In this case, the fun may well be over... PW
[Magisk] BillGoss:
My SafetyNet check in Magisk is showing the same. But...

Google Pay still works (I did a transaction just now).

I'm on Magisk 22.1 stable and have been for a week.
[Magisk] dr4go:
See that here as well: https://xdaforums.com/t/magisk-module-universal-safetynet-fix-1-1-0.4217823/post-84839769
[Magisk] zgfg:
Strange, see the three screenshots - faiing only when testing by Magisk app (yesterday was stil green there) - Canary 22202

Still passing with SafetyNet Check and SafetyNet Attest apps
[Magisk] HippoMan:
Same here. Only Magisk's check shows SafetyNet failure for me. I also have two other SafetyNet checker apps which show it as passing.
[Magisk] ipdev:
Magisk shows Error when checking SafetyNet, not Fail.

Might be everyone checking SafetyNet recently using Magisk's API key?

¯\_(ツ)_/¯

If the device shows as certified in PlayStore, you are currently passing SafetyNet. ;)

Cheers all. :cowboy:
[Magisk] H4X0R46:
Yeah it's so weird! If you guys try and use an app that checks safetynet, your device is very much passing, Magisk app seems to be having the issue checking the api 🤔 Same for me.
[Magisk] J.Michael:
@pndwal How do you know recovery "has clearly been Patched / altered"?

Have you extracted the recovery image from your phone and compared to stock?

Re: bootloader vs kernel as determining whether ramdisk can be added: I still think it makes more sense that it is up to the kernel. I don't understand your statement that "recovery ramdisk and boot ramdisk are implemented differently." I can understand that the filesystems might be different enough so that you could look at a TOC and tell which kind you're looking at. It just seems easier to explain the different combinations of behavior as some kernels do not use ramdisk, even if it is offered/available. That's easier to imagine than that the bootloader does something drastically different depending on whether it is booting from the recovery partition. As you said, boot and recovery are both boot images.
[Magisk] maquille:
My problem is resolved.

I just flash my room with Odin - I flash BL + CP + CSC HOME (and not CSC to preserve my data) + the AP (magisk patched tar created during my first root with magisk, which included TWRP) - at the end of the flash, I enter into the TWRP mode and flash the multi disabler - then I restarted the phone and I found all my data and settings.
[Magisk] Didgeridoohan:
As other's have stated, the Magisk apps SafetyNet check showing API error doesn't mean that SafetyNet is failing. Just that the app can't get a proper response from Google's servers. There's probably been some kind of API update...

https://www.didgeridoohan.com/magisk/MagiskHide#hn_SafetyNet_API_error
[Magisk] pndwal:
Yep!

I'd just checked and concluded it was probably a Magisk anomaly also as Play protect still says device is certified.

If I'm not wrong, this will necessarily fail certification shortly after a real ctsProfile fail. 👍 😛 PW
[Magisk] pndwal:
Haha, Hehe ... think April 1 got delayed 2 weeks ... April 1's just t o e a s y ! 🥳 🙃 PW
[Magisk] Bblatt:
I have a feature request where can I post it

I feel it would be very useful to be able to ignore module update as well as skip specific updates I have for instance a phone that will bootloop if I install a certain version of a module and it is next version so I feel it would be very useful to be able to blacklisted that version and if necessary blacklist updates for that module
[Magisk] briandmiller:
I can confirm that after failing the SafetyNet test in Magisk Manager I downloaded SafetyNet Test app from Playstore and it passed. I had tried clearing cache in Magisk Manager but am reluctant to clear memory because I don't want to have to set everything back up in it.
[Magisk] martyfender:
Update snet.jar extension

The existing API key was revoked for some reason.

Release an updated extension jar with a new API key.

In addition, add some offline signature verification and change how

results are parsed to workaround some dumbass Xposed module "faking"

success results, since many users really don't know better.

topjohnwu committed 19 minutes ago
[Magisk] pndwal:
Well, as I said, while TWRP boots normally after direct Install w/ Recovery mode selected, ANY changes to boot.img (flashing stock image etc) result in 'System Has Been Destroyed', Fastboot mode only available, and this is fixed ONLY by flashing unpatched recovery image. This doesn't occur with the same unpatched TWRP installed, so Magisk patching HAS done it's work.

Similarly, flashing patched stock recovery images or patched TWRP w/ fastboot always results in 'system has been destroyed' on booting. Again, this is fixed ONLY by flashing unpatched recovery image, indicating alterations were made.

Bootloader (vendor-proprietary image) is responsible for bringing up the kernel on a device. It guards device state and initializes the Trusted Execution Environment, binds its root of trust, and verifies the integrity of the boot and recovery partitions before moving execution to the kernel, as indicated here:

https://source.android.com/devices/bootloader

There are various ramdisks implemented too, with unique load addresses in Vendor partition, and this is accessed by Bootloader. Bootloader handling summary here:

https://source.android.com/devices/bootloader/partitions/vendor-boot-partitions#bootloader-support

Differences between recovery-ramdisk and boot-ramdisk implementation explained here:

https://source.android.com/devices/bootloader/partitions/ramdisk-partitions

Interestingly, in A/B devices (BOARD_USES_RECOVERY_AS_BOOT), recovery-ramdisk may reside in boot.img (as recovery partition has been removed), and A10 Launch Version devices can boot into both recovery and Android from recovery-ramdisk; Non A/B device boot.img may contain boot-ramdisk, as one might expect.

According to John Wu, an additional 'hybrid-ramdisk' can also reside in boot-image in type IV devices (that boot from from ramdisk as initial rootdir - a form of SAR according to John, as final rootdir = system, but not according to Google; they only consider types II & III devices that boot from system as initial rootdir to be SAR). See table here:

https://topjohnwu.github.io/Magisk/boot.html#piecing-things-together

Hope this helps! ... or not. 😬 PW
[Magisk] pndwal:
Gotta love that! ... And the extra lengths John will go to to cover our a a a aa, backsides.

... New API key incoming... Let's not all get our dumb a a a aa, posteriors XPosed by fakers is what I say! 😜

Must be the thrill of the chase... 5 commits following John's in the same hour! 👍 PW
[Magisk] hkjo:
Why does AP patching happen on the phone rather than on the PC?

Seems roundabout to copy 4GB to phone, patch there, then copy back to PC.
[Magisk] zgfg:
You can request a feature (on Github), but that will mean that developers would have to maintain also a Windows application

4 GB is maybe an extreme case on Samsung. For the most of us, it's only 16-128 KB, not the whole firmware but only the boot.img or recovery.img

In my case I download the whole firmware (cca 3 GB) on the phone (using ADM to speed up downloading), extract boot.img by MiXplorer (no problem opening the 3 GB zip), patch and then flash (by TWRP) hence everything on the phone, no need for PC
[Magisk] hkjo:
@zgfg

I'm not sure actually if (or why) patching only boot.img would be a problem, but some anecdotes claimed only whole-AP patching works for this specific model.

Maybe the info is outdated, but I'd rather minimize experimentation.
[Magisk] jcmm11:
I meant 20.4. That's the oldest version current Canary supports. Complete uninstall isn't an option at the moment (no computer currently available). I guess the real question is can I upgrade to 20.4 without a problem. I'm leary of just trying it since I don't want even a soft brick given the computer situation. I'll figure something out
[Magisk] zputnyq:
If there's twrp on your device, you can do complete uninstall by flashing 20.4 uninstaller.zip. However, since magisk 21.xx (I forgot the exact version, it's stated on github & in this thread iirc) you need to rename its apk file to zip to be able to be flashed in twrp then rename it back to apk & install it, if the apk isn't installed it can't work properly probably on some android version . For unintalling only need to rename its apk to uninstaller.zip. On my android 6 xperia M4, I haven't had installation & unstallation from twrp issue yet so far, only problem with some modules.
[Magisk] J.Michael:
@pndwal When you quote John Wu, can you cause the time stamp in the quote to be absolute?
[Magisk] zgfg:
That's the point - sorry but I don't know for which specific brand and model are you talking

For most brands (and devices) it is only needed to patch the boot or recovery, and in that case even if flashing by Fastboot it's not that big deal to transfer the boot/recovery img to phone, patch it and transfer back to PC

Besides, when people only update Magisk by Direct method, then specially there is no need for PC

For all of that plus Hide, SuperUser grants, modules and so, the Android application is a must.

Windows app, IMO, will be more as a commidity (with limited use only by some)

But if you would like to develop the PC version, naybe TJW will be happy if you join the team 😁

PS: If I correctly understand some issues reported on Github, there are users who branch the Magisk source and make their own programs (but for Linux), including for patching and so.

By the open source model, one is free to make his own application for PC and publish (bigger part will become permanently supporting the users 😠)
[Magisk] DiamondJohn:
If I understand your question correctly, I would assume it has to do with not having to install a patching software on both the PC and the phone. PC's could be Windows, Linux or MAC. Where the phone is only Android.
[Magisk] hkjo:
If that's the reason, it shouldn't be too difficult to make it cross-platform.

Anyway, I have a guess why patching boot.img by itself isn't enough. Magisk also modifies vbmeta.img. Though perhaps a TAR that includes only boot and vbmeta would do just as well? Then on the PC, you could merge all other files from the original ap.tar.
[Magisk] pndwal:
You mean this?

https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-84840741

Time reflects comment was current at time of my post.

It's STILL his most current Tweet thread, and is found at the top of his Twitter with no difficulty!

Readers can easily find tweets retrospectively by searching using post dates for quotes that were originally up to the minute (/ very recent).

Re quotes incl. old postings:

https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-84312597

Source will necessarily include time info. 👍 PW
[Magisk] Ps24u:
How can I check for updates manually in Magisk app 22.1 ?

In Manager 7.51 that I updated from, you could pull down the screen to manually check whenever you wished. I can't find the equivalent in 22.1...?

Also who designed 22.1 app and thought it'd be a good idea to have a big "uninstall magisk" button 3 milimeters from the big "check safety net" button. Does the designer want people to remove Magisk by mistake ?

Imho "uninstall magisk" should be at the bottom of the settings page, not the first thing you see when you open the app.

I really wished there was an updated 7.51-style Manager/App with the new hiding stub technique.
[Magisk] martyfender:
As long as you have a good internet connection, the app checks for updates when you launch it, unless you have certain ad blocking apps that could interfere with it.

I agree with you that the uninstall button should not be so close to the other buttons and I have 8" tablets, it may potentially be worse on a phone screen. Just making the separator wider could be sufficient.
[Magisk] pndwal:
That's progress! 😜

Re. Uninstall, you can back out if accidentally selected. Just touch OUTSIDE following option screen. 👍 PW
[Magisk] pndwal:
Latest Debug (Canary)

Changelog and Release Notes

https://github.com/topjohnwu/magisk-files/blob/ea57c9b33b3a6ce2e0e65ce4c33dfb1c01552fcb/notes.md :

Magisk (f49966d8) (22103)​

[App] Update snet extension. This fixes SafetyNet API errors.

[App] Fix a bug in the stub app that causes APK installation to fail

[General] Fix a C++ bug that causes undefined behavior

[MagiskHide] Update package and process name validation logic

Diffs to v22.1​

[General] Remove all pre Android 5.0 support

[MagiskPolicy] Remove unnecessary sepolicy rules

[App] Update snet extension. This fixes SafetyNet API errors.

[App] Fix a bug in the stub app that causes APK installation to fail

[General] Fix a C++ bug that causes undefined behavior

[MagiskHide] Update package and process name validation logic

👍 ...And things are all Rosy 'n Safe in the Custom Mod. world once again... but ironically, only on the bleeding edge... (Confirmed on my RN8T. 🙂 )

News for those not wanting to get cut (Public Stable / Beta users) below. 😜

Thanks John... And other collaborators for additional fixes! PW
[Magisk] pndwal:
Fix and news:

... So imminent SafetyNet checking fix for public Stable / Beta (still has SafetyNet API errors) users is likely... No ETA of course! 😉

👍 PW
[Magisk] Jarek84:
I'm on oos11 and today I got an API error in the magisk. Any ideas ?
[Magisk] pndwal:
Yes. Just read last page! 😉 PW
[Magisk] hachamacha:
I just tried Canary on an OP7T Global running OOS 11 (Stable..) and am getting positive results from the built-in checks now.
[Magisk] hkjo:
If I got it right, Magisk's installation instructions for SAR aren't up-to-date for v22?

The final steps currently say:

(Is "Connect to the internet" needed, or is it just the need to install the apk?)

What I did in actuality is:

* Install and run Magisk.

* In the "Magisk" box, choose "Install".

* On the next screen, choose "Direct Install", then "Let's Go".

* Reboot the phone.

Is that what's actually needed?

And there's another unclear aspect. Even after "Direct Install" and reboot, the Install->Direct Install option remains available, and runs just the same, without complaining. Shouldn't it be greyed out if unneeded rather than be allowed to run multiple times?
[Magisk] 3mel:
@hkjo does the magisk app show anything under installed for you ?
[Magisk] hkjo:
@3mel

Yeah, it's installed fine (under "Magisk"), and su works.

I don't remember if it showed "installed" the first run after flashing, but I've logged the two "Direct Install" attempts, and both logs are practically the same. This suggest also the first time it may not have needed any further install action?
[Magisk] hachamacha:
The apk part did show 22103 under installed for me, and the other one just was asking me to update which was fine. After the update and direct choice and let's go then it all showed as in my screenies a few posts up.
[Magisk] curiousrom:
Thanks but you forgot to include a link to where that changelog comes from. ¯\_(ツ)_/¯

***