yashsingh1/xdaforums huggingface dataset:
[Magisk] zgfg:
That's why I asked you to test from Terminal - so you do have Magisk v26.1 installed

Don't know why your Magisk app does not recognize - but as answered you earlier, that's usually the case if Magisk was previously installed and "Hide Magisk app" executed from the Magisk app (and in that case the old/hidden/repackaged Magisk app must be manually deleted, and the phone rebooted)

Btw, not only Superuser grayed out, but you cannot manage modules, and also options in Magisk app Settings that require root are not available as long as Magisk app does not recognize Magisk
[Magisk] sunmoon6:
I have rooted my phone last year and everything was great, until it was time to now install an OTA.

When I tried to "uninstall magisk", it said it couldn't not find the boot image. So I "restored" a boot image like so:

su
dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/boot.img

Then I followed this guide to get Magisk to recognize the boot.img so that it can uninstall it. And it did.

However, when it came time to apply the OTA, it keeps saying "Installation Failed". Any ideas?
[Magisk] badabing2003:
You're root, so the dd line is dumping a rooted boot.img

and the Magisk is using that as stock boot.img

which is not stock, OTA only works if you restore stock.

You could check the OS version, and extract a copy from factory image and use that as your stock boot.img

But if you go that far, you might as well use the factory image to update.
[Magisk] sunmoon6:
So I take it that I have to go to OnePlus's website to find the factory image of my $CURRENT_VERSION, then use some sort of payload dumper to get the boot.img out?
[Magisk] zgfg:
Yes, that's nthe point. However, where and how would you find the ROM zip file and how would you extract the boot.img from that archive, depends on your phone vendor and model

Eg, you may easily find boot.img in the zip, or you will find all-in-huge-one payload.bin and you will additionally need Payload Dumper to extract the boot img
[Magisk] badabing2003:
yeah that depends on the format of their firmware.

How did you patch the first time?

There should have been a backup made.

Update: Got Ninja-ed by @zfzg :)
[Magisk] zgfg:
Me? You meant him

But he said that Uninstall Magisk complained that it didn't find backup of the stock boot.img
[Magisk] badabing2003:
Perhaps my understanding of Ninja-ed is off.

I thought it meant: you beat me (saying the same thing) to it by a fraction.
[Magisk] Nergal di Cuthah:
It does :)
[Magisk] sunmoon6:
I didn't, I remembered that I stole it off of an XDA thread.

When I do find the original firmware and extract the boot.img, will I need to pass it over to Magisk to patch it first?
[Magisk] sunmoon6:
Another thing I suspect though is that, even with this correct boot.img sitting in /data/magisk, the Android OTA will still detect it as being invalid and failing the OTA installation, right?
[Magisk] badabing2003:
No.

You still have to gzip and place it in /data as backup (like you did before) so that when you select Magisk to uninstall, it will apply that image.
[Magisk] sunmoon6:
I found the original PATCHED boot.img, ran those steps again via gzip, and mv-ing it. Uninstalled Magisk successfully.

So I went to do OTA and now facing this:
[Magisk] badabing2003:
You can't restore patched, OTA will not work, you need to restore stock
[Magisk] pndwal:
... Johns explanation + extra details might help your understanding... Here:

https://github.com/topjohnwu/Magisk/blob/master/docs/ota.md

Nb. A downloaded full 'OTA' ROM will work like that, but a standard stock delta (incremental/differential) OTA cannot!... If partition digest checks don't prevent it you'll end up with corrupt partitions... 👀 PW
[Magisk] pndwal:
If you know Magisk originally patched only boot.img, just flashing that back should work, but Magisk may have patched vbmeta (especially if pre 25.0) and other partitions in some cases also... You don't technically need Magisk to restore images, but it should retain names and backups of partitions it patched per device case... PW
[Magisk] sunmoon6:
How do I go about restoring stock?

And what other options do I have now?
[Magisk] J.Michael:
You restore stock by doing exactly what you did the first time you installed the ROM.

Alternatively, forget about uninstalling Magisk / restoring stock. As @pndwal said, you might be able to download a full ROM for the new version. (I really hate calling that an "OTA" ROM, but that might be what the distributor calls it.) If you can find a full ROM, you can install it. Once it is installed, you no longer need the OTA update -- you have just installed a ROM that already includes those updates. You install Magisk the same way you did the first time, except you make sure you use the boot image from the new "stock" ROM.
[Magisk] sunmoon6:
I did manage to find a full ROM of an update. It's about 4.7Gb, so it's probably legit.

So I should go ahead and install that, extract boot.img, patch it, then flash it in?
[Magisk] zgfg:
You can try with a full ROM even without flashing boot.img yourself (it may unconditionally flash everything by itself, without checking)
[Magisk] Mord0rr:
Well im back here.....

Phone> OP6 + Pie Rom + xXx Rom + Magisk 19.1 Full Working Safety net pass

Problem:

Have to install Revanced Modules, and only install above 20V Magisk

Did update Magisk some errors and freezes, but finally i have last version 26.1

Again:

Yasnac test full failed.

Always the same crap.....have to unistall Magisk and then a older version of it....

Is there a easy way?
[Magisk] pndwal:
Revanced people?...

Not sure why... Have you analysed why failing?... A bad module?... Made any /system changes?...

Nb most apps have migrated to Play Integrity API now S/N is deprecated... Need to pass deviceIntegrity with Play Integrity API Checker etc... But more stringent than S/N... Can no longer have permissive selinux etc...

If you still want to downgrade:

Rename older Magisk.apk to .zip and flash from App as a module... (Allows downgrade by down-dating Magisk daemon that performs version checks before App)...

To avoid unexpected issues, delete magisk.db and Magisk folder in /data/adb and reboot... Magisk configuration files will be rebuilt...

Uninstall App and install older version...

🤠 PW
[Magisk] Mord0rr:
Hi!

Revanced Yout tube. Its the replace app for the old Vanced You tube.

I do not know how to check errors and i do not now use TErminal. Im old school, Install recovery, rom, Magisk

I notice that i have a backup of the boot.img of my PIE rom on root of the phone...does it helP?

If i donwgrade, if not mistake, i cannot install the modules again! (Every time i install Magisk, i eliminate all installed modules for safety measures).

Yes....im a little basic. I do have root, eveything seems to work, except the Yasnac test.......
[Magisk] J.Michael:
I don't think you get to call yourself "old school" if you don't use a terminal emulator.

I do not understand your point about modules: If you install an older Magisk, you can then install modules that were compatible with that version of Magisk.
[Magisk] pndwal:
Yeah, I know... Just meant other members here (Revanced people) might give qualified help as I don't use it... NewPipe works for me...

Perhaps... But method I gave you doesn't need it...

Why not?

Please say what modules you have... @Displax's fork of Universal SafetyNet Fix (not official) alone should give passing SafetyNet and PI deviceIntegrity even with custom ROMs...try passing with that and all other modules disabled...

Still not sure why you want to downgrade however, or why needed for Revanced...

🙃 PW
[Magisk] ctcx:
I happened to get, even if temporarily, an older device: a Motorola osprey, model 2015.

As far as I could check, this is armeabi-v7a (and thus zygote32), and non-A/B (a.k.a. A-only).

On this one I tried installing Magisk 26.1 (the Github apk, cannot recall what exact version it is...); a very first time installation in this device.

I kind of expected for this one to read "Ramdisk no" in Magisk, but surprise: "Ramdisk yes"...

Also confirmed by getting a copy of last official ROM for this device, and when unpacking, saw that effectively it had boot.img instead of recovery.img.

So I went searching in the entire Magisk Github repo -yes, I did search this time-; tried searching the string "ramdisk". At most I found this

Magisk/app/src/main/res/raw/manager.sh at cdfbc02922908f4fef59f01a50be14f51d63a7ab · topjohnwu/Magisk

The Magic Mask for Android. Contribute to topjohnwu/Magisk development by creating an account on GitHub.

github.com

But those tests do not reflect the truth in this case (they say Ramdisk no); I'm missing more information somewhere

How does Magisk actually determine whether Ramdisk yes or no?

I'm trying/would like to find a way to figure through the shell...

Also, whether a device has ramdisk on boot partition and is system-as-root, does it depends on hardware, or software (the ROM)?

Thanks again.
[Magisk] J.Michael:
Have you looked at @osm0sis' Android Image Kitchen?

That will probably show you how to extract the ramdisk from a boot image.
[Magisk] zgfg:
SAR, Storage encryption and things like that are enforced by Google and vendors must follow them when releasing devices with the newer versions of Android.

Parts of them (and in less extent, since old hardware may not properly support) are also enforced when vendors upgrade the Android versions.

You will not see them on ancient devices from 2015, they might have been released with Nougat, etc

However, there are many variations possible, eg would the vendor choose A/B design, Boot as part of Recovery, file system format for encryption, etc, etc

Btw, for Xiaomi devices it was usually the case that irregardless of how Magisk shows Ramdisk Yes or No, - as long as you have Boot partition, patch Magisk to boot.img (without enabling Ramdisk) and flash to Boot.

On some Xiaomi devices one could also patch Magisk to ramdisk.img, but if that device also has Boot partition separated, then booting to System with Magisk makes it unneccessarily more complicated (wjen Magisk was patched to Ramdisk instead of to Boot)

Btw, I have both tz6pes of (Xiaomi) devices: one with Boot and Recovery but Magisk says Ramdisk No, and I always (since 2019 when I bought) patch Magisk to Boot (all versions of Magiosk since then, and Android upgrades since A9 till A11).

The other (A/B) that has Boot incorporated to Recovery, of cource I patch to recovery.img (since there is no boot.img) and again everything works ok.

Put it shortly, you have boot.img - patch the boot.img and check what does Magisk write while patching. If it doesn't report an error and shows that Ramdisk was found and patched, fine.

Then go to Fastboot and try. You don't need to flash permanently, just boot temporarily/for one-time:

fastboot boot <patched-boot.img>

and if it boots ok, with Magisk, finish the Magisk installation by Direct install

If it doesn't boot or something, reboot, it will boot with your original/untouched boot.img

(Generally, play yourself - as long as you have the original boot.img, you can always reflash, or you can even dirty flash the whole ROM.

Hence no fear of bricking)
[Magisk] m0han:
Fox's Magisk Module Manager Update

I don't know how many of you have noticed this (I only found this now), but Fox's Magisk Module Manager now has architecture specific apk for install. And, the latest is v2.0.1 (md5: 8b9f75ead70e7ddf1d63d2f9938eee0c - for the ARM64 apk), updated a couple of days back.
[Magisk] zgfg:
Yes, updated yesterday or so.

Actually, upon update, when I opened, I waited but it didn't show anything (modules)

Then I cleaned Data for the app, had to set initial options (good, since I had a chance to disable Analytics, Androidacy repo and so), and since then it works fine again
[Magisk] zgfg:
Dont understand what is your problem with ReVanced.

I run Revanced YT and YT Music on two phones (one with Magisk v26001 and the other with latest Magisk Delta) and everzthing is perfectly ok

I think your (problem and) question is for ReVanced thread, not here for Magisk:

https://xdaforums.com/t/app-8-0-guides-revanced-revanced-extended.4523967/

Btw, since you are rooted, better run ReVanced as Magisk module(s), and hence without MicroG and its troubles (assuming you do have GApps with your ROM)

In the ReVanced thread, OP post #1, you can find where to download from

Eg, I use ReVanced YT and ReVancede Extended YT Music, and just update them when Magisk Modules tab (or Fox MMM) notifies about the new versions.

Install, reboot, and I continue to use (and whenever there is a Magisk update, I update Magisk and no troubles with ReVanced)
[Magisk] pndwal:
Not sure exactly how it's detected, but Magisk is actually checking specifically for a factory/OEM generic ramdisk in boot partition...

Magisk always adds a generic ramdisk CPIO where it's missing to accommodate magiskinit so patching completes successfully regardless of whether Magisk detects Ramdisk Yes or No, but Magisk will continue to indicate Ramdisk = No in cases where Magisk has in fact manually added one.

This manual ramdisk adding function was added for cases like A-only legacy SAR Xiaomi devices where bootloader inexplicably supports ramdisk in boot... The reason Magisk continues to indicate the OEM ramdisk status, which is correctly displayed as 'No', is because only OEM ramdisk is an indicator of expected bootloader support and whether Magisk in recovery mode will be required.

In other words, where OEM has not supplied generic ramdisk in boot we would expect that an added ramdisk would be unusable... Magisk cannot know whether bootloader in fact supports ramdisk in boot, and since there will always be ramdisk in boot after Magisk patching, simply indicating the presence of ramdisk there would be pointless (it would indicate nothing); assumptions can only be based on presence of an OEM supplied ramdisk although, in practice, a No indication is not totally reliable in that ramdisk in boot may still be viable and usable for injecting Magisk root...

John puts it this way in Installation Instruction page:

Nb. That final statement is in error; there are a number of devices aside from Xiaomi where ramdisk/Magisk in boot can work despite OEM Ramdisk in boot = No.

Depends on Android launch version (SDK) and 'slot' architecture...

All original SAR (legacy SAR) A-only devices are Ramdisk = No (ie. no OEM ramdisk in boot supplied) devices, so it's pretty simple to determine which...

They are all circa 2018, 2019 single 'slot' devices launching with Android 9...

AFAIK there were no legacy SAR A-only devices launched with Android earlier than 9 although first Pixel launched with 7.1 and OnePlus 6 w/ 8.1... These pre A9 SAR models were all A/B devices however... All devices launched with Android 10+ are 2SI Ramdisk SAR devices and necessarily have generic ramdisk in boot partition...

Further, such A-only legacy SAR devices are Type III devices as treated in John's Android Booting Shenanigans doc:

https://topjohnwu.github.io/Magisk/boot.html

🤠 PW
[Magisk] Mord0rr:
Hi!

To install Revanced module and Mindetach, you need Magisk V20 or +.

I was on V19.

So, to install at least Midetach module, that breaks conection of Google Youtube updates, i did have to update Magisk.....hope now its more clear.

Apart this Module, i have xXx Rom 8.6.

My way of return to old Magisk, (maybe there is another one, i dont know), is unistall all modules, unistall present Magisk, go to TWRP and flash Magisk i want, for exemple 19., and then again, xXx rom.

I do remenber after some point, Magisk updates start breaking Safetynet test......

Again, thank you!
[Magisk] zgfg:
Magisk does not 'break' SafetyNet

There is much more about that. Like, SN is deprecated and (most) apps now already use Play Integrity API instead. You have to install a proper version of USNF module to spoof SN and PI API, etc, etc

Friendly advice - search on XDA for Play Integrity API thread, read the OP posts there (and recent posts), find what you need to do, etc

Btw, instead of MinDetach (it didn't work fully properly for me) I use LSPosed module UpdateLocker
[Magisk] Mord0rr:
Thank you Sensei!

I will look it!

This is ok for me since all my APPSs work flawless and i dont use bank apps on phone.
[Magisk] ctcx:
Thanks everyone.

The Motorola osprey, model 2015, was originally released with Android 5, later officially updatable up to Android 6. So it should really be "Ramdisk no" originally...

Even after search I couldn't find whether this was legacy SAR, or no SAR at all...

However, this device in particular has a custom ROM based on Android 10; which, ROM-wise, now uses 2SI

I'm still confused. Would all of this tell you something else?

Thanks.
[Magisk] zgfg:
Answered you previously to try installing Magisk and how
[Magisk] pndwal:
Please read my response to you above...

It's originally a Legacy Ramdisk boot type device... Everything launched prior to Android 7 was... ie. no SAR at all until you update to Android 10... Ramdisk = Yes (always for these devices)...

This I didn't explain as you hadn't asked:

Any Legacy Ramdisk type device remains such unless updated to A10+ at which point it is automatically upgraded to 2SI Ramdisk SAR...

Anything launched with Legacy SAR remains 'stuck' with that (they cannot be converted without a major retrofit), and this includes all Ramdisk = No devices (They are all Android 9 launch version A-only devices as I explained in post above.)

Ramdisk = No doesn't ever change...

🤠 PW
[Magisk] ctcx:
Thanks, and again sorry everyone. I needed to re-read well the explanations.

So, if I understood correctly, Magisk's "Ramdisk Yes/No" is not even 100% accurate: first indicator it uses is whether there's a ramdisk inside boot partition or not; but this is still not 100% reliable, and in practice one should check for either boot.img or recovery.img inside ROM's zip, give priority to boot.img if it exists, and just test. Right?

Thanks.
[Magisk] J.Michael:
No.

Magisk's "Ramdisk: No" means there is no ramdisk in the boot image before Magisk patching. There is no "first indicator", there is only one "indicator".

Whether Magisk can be installed in the boot image is "if Ramdisk: Yes" then Yes else usually No". It is not whether there was originally a ramdisk in the boot image that is uncertain. What is uncertain is whether you will succeed in installing Magisk in the boot image if there was no ramdisk in the original boot image.
[Magisk] zgfg:
Sorry but have you ever had a phone where Magisk all the time says Ramdisk No, before you patch and later after you install the Magisk?

Almost all older Xiaomi phones are like that (and there were also other phones from that time with the same). It has been mentioned here many times

In that case it simply means - ignore Ramdisk No indicator and what TJW says in his Magisk Installation Guide (that un that case Magisk 'must' be patched to Recovery)

As I already answered to the guy (I will absolutely no more waste time on that saga

- He can try to patch boot IMG

- He should observe what Magisk prints while patching

- Then test by fastboot boot not fastboot flash boot

- If it works fine, finish with Direct Install

- If not fine, just reboots to the untouched Boot (since it was not flashed) and no fear of the nuke bomb or whatever

On the screenshot you can see that Magisk (although already installed), shows Ramdisk No

While patching the stock boot IMG it finds Ramdisk and patches - another screenshot.

And even after the installation, Magisk still claims Ramdisk No - although it patched Magisk to boot.img

Hence putting it once again and rhe LAST TIME from me, try patching the boot IMG as described above. If it will work - perfect.

If not (and only if not) bother with patching recovery.img in which case he will later have to boot to Magisk with Vol+ together with Power (since by default, his phone will boot to the not-patched Boot)
[Magisk] m0han:
Good for you. Guess you're aware of this issue: https://github.com/Fox2Code/FoxMagiskModuleManager/issues/303
[Magisk] ctcx:
Ok, I'm tired

I tried re-searching the Magisk entire repo, fought with adb shell, searched on source.android.com about the "official" docs about partitions...

Nothing

@osm0sis :

So I need to spit the originally intended question now:

How on hell does Magisk manager get the "Ramdisk Yes/No" value from the device itself and not having to download OEM's original boot/ROM image?

How can I check that myself through the shell?

Just for the record (and for "lols"): the LOS people have an unwritten rule of all Magisk and implying stuff talks forbidden.

@zgfg :

Really sorry for having annoyed you.

Just curious, do you happen to be chinese?
[Magisk] zgfg:
Actually I did update Fox MMM but didn't test it - besides simply opening

Now I tested more.

Screenshot shows it showing that root was granted

And I can disable or uninstall modules, Fox MMM properly marks the modules in /data/adb/modules

But when I try to install a module, then Fox MMM reports an error - screenshot attached

Xiaomi, MIUI 12, Magisk Delta

And I see that another user already reported that kind of bug (that nodules cannot be installed)

[BUG] Crash on installing any module · Issue #309 · Fox2Code/FoxMagiskModuleManager

Stacktrace: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.fox2code.mmm/com.fox2code.mmm.installer.InstallerActivity}: java.lang.ClassCastException: com.google.android.mater...

github.com

Btw, previous version of Fox MMM was pretty good, now these regression bugs

Edit: The bug is already fixed in their Action build:

(misc) fix race condition · Fox2Code/FoxMagiskModuleManager@702048e

A module manager for Magisk because the official app dropped support for it - (misc) fix race condition · Fox2Code/FoxMagiskModuleManager@702048e

github.com
[Magisk] zgfg:
No, not even close
[Magisk] J.Michael:
Did you find Android Image Kitchen?

Maybe the piece you are missing: While on a running device, the boot partition *is* the boot image most recently written to it. With the right privilege, you can read directly from the boot partition. So if you have found a script that knows how to extract the ramdisk from a boot image, you can change the way it reads from the boot image to instead read directly from the boot partition.

Or you can copy from the boot partition to a temporary file, then treat that file as a "boot image".

Or maybe there is something left lying around in Android recording the fact that there was a ramdisk at boot.
[Magisk] zgfg:
Real thinking outside the box, or it was so close and yet so far

Unfortunately, we have no OP post to mention it there, and Wiki pages were also gone

Anyway, maybe TB Checker could generally help for Alzheimer's?
[Magisk] ctcx:
Trying " find / -name '*ramdisk*' ", and also with '*boot*'

Also searching in /proc/mounts, df -h...

Nothing

(I had to start from something)

Should not need root privileges, since Magisk manager doesn't have it neither, and it displays its famous "Ramdisk Yes/No"