yashsingh1/xdaforums huggingface dataset:
[Magisk] zgfg:
So we are coming back to what I said - if when patching it knows to recognize the existence of ramdisk it could do it later as well. And it should not 'remember' incorrectly

Btw, if you later try to do Update by Direct Install, then it also knows/remembers correctly (and it does so) that it has to update to boot.img and not to recovery

All together, behavior is not logical and not consistent. In one case it checks one way, in the other it checks the other way, it 'remembers' one thing but then still does it differently

If the world is not ideal (quirks) that is not an excuse for an app for not to be consistent.

But at least it is good that it does attempt to patch and that it finds the ramdisk then, otherwise we could not be able to install Magisk (btw, Xiaoimi is the third biggest producer, actually the second for Android, therefore it is not a marginal number of users - putting also into the account that Xiaomi phones are still open for unlocking Bootloaders).

Btw, there are some other quirks supported or properly described in the docs for few other phones that are significantly less present on the market or among the root users

It is only bad that it causes troubles to new users who try to follow what they see or read
[Magisk] Newtype14:
Tried restoring my backup again, didn't work. In the end, I downloaded a stock rom for my model/carrier, wiped everything and flashed that. Phone booted.

Out of curiosity, I then wiped my phone and tried once again to restore my backup. Phone doesn't boot! It must be a problem with my backup. However, what I don't understand is that I did use that backup three weeks ago and it worked flawlessly. Also, I still don't know why updating Magisk caused my phone to not being able to boot anymore. It was a fresh install of Magisk, nothing hidden, no modules installed. I saw that there was an update, selected Direct Install and Preserve Dm-Verity. Phone then rebooted after installing and that's when the problem occured. Strange.
[Magisk] enotar:
I just updated to Magisk 22.0 and now Netflix install but doesn't open. Am I the only one ?

Redmi note 9S rom Xiaomi.EU Android 10 MIUI 12.0.3

I tried to install older version of Netflix without success.

Safetynet pass

Any idea?

Thank you
[Magisk] Didgeridoohan:
It doesn't find any ramdisk in these devices, because there isn't one (again, see the "boot shenanigans" document and the description of type III devices).
[Magisk] zgfg:
Screenshot: patching the stock boot.img, it says PATCHING RAMDISK

Upon flashing that patched img it still displays: Ramdisk No

But the attached log from repatching parses that the same patched img and finds the (not existing?!) ramdisk:

Parsing boot image:

...

RAMDISK_SZ [713664]

...

RAMDISK_FMT [raw]
[Magisk] Zoki88:
Can anyone please help me figure this out, or at least tell me what steps to do/check?
[Magisk] zgfg:
Did you read the Magisk Wiki (find it from Magisk Github, link to Github is right on the Magisk app main window), and did you try the suggestions there

If you don't pass SafetyNet you maybe need to install SafetyNet fix.

Apps you want to hide from must be enabled for under the the Magisk Hide

But some apps could look for something benign, like TWRP folder and just because of that they declare that the phone is rooted

Etc
[Magisk] pndwal:
I've thought about a similar way to get ramdisk= yes on such devices too, but it would be a little messy, and can't be the way you described, simply 'recognizing the existence of ramdisk when patching and remembering', because existence of ramdisk is not the problem (and nothing is 'remembered').

The problem is that such devices did NOT use ramdisk in boot image, so generally they use a bootloader that is no longer compatible w/ ramdisk, so even if ramdisk is ADDED SUCCESSFULLY to boot image, (and I believe this is always done if ramdisk is not present), and Magisk is successfully added to boot image also (ie patching is wholly successful), the Magisk Installation will STILL fail due to bootloader, and, as John says, Magisk has no way to see bootloader compatibility.

Xiaomi devices just happen to use ramdisk compatible bootloaders, probably because they never rewrote the code fully, which is to our advantage because John has done us (Xiaomi etc users) a favour by adding a 'manually add initramfs if not present' feature to Magisk.

So Ramdisk= no correctly means no FACTORY ramdisk in boot image. To make it mean no ramdisk without qualification WOULD involve adding a memory feature to remember a successful boot with root before changing this flag... as I said, could get a bit messy (otherwise I might have suggested this as a feature also). PW
[Magisk] HippoMan:
Is this a fair intepretation of the point you are making?

* Before flashing a patched img: Magisk's Ramdisk detection method used at that time (call it "detection method 1") shows that there is no Ramdisk on the given device.

* After flashing a patched img: Magisk's same detection method 1 shows that there is still no Ramdisk of the type that it is looking for, but there is now another version of a Ramdisk which is present on the device which shows up as a result of a different mechanism for detecting a Ramdisk (call this "detection method 2").

* After the patched image has been flashed, the results of detection method 2 should be presented to the user, because there now is at least some form of Ramdisk that is being used, even though it isn't detectable by detection method 1.

Did I understand your point correctly?
[Magisk] zgfg:
Flashing DOES NOT fail, we patch and flash the patched boot img and have the Magisk up and running

About 'remembering', finding and declaring that there is no Ramdisk, look at my previous post and the log attached there
[Magisk] zgfg:
And what is unfair when I said earlier - not consistensy, using one method here, the other method there...
[Magisk] HippoMan:
I see it as the same as what you said earlier. I'm just saying it in a different way to perhaps make it more understandable to those who seem to be missing your point.
[Magisk] HippoMan:
... and to be clear, I agree with the point you are making, and this is just an attempt to support it.

And I used the word "fair" to mean "accurate" (i.e., fair to you by my attempt to accurately represent your point).
[Magisk] pndwal:
As mentioned, making it say ramdisk = yes for manually added ramdisk would be misleading as Magisk will now always add ramdisk support to a boot image lacking it, but this will usually not help anyway.

A bootloader compatibility flag, if only it were possible, would be the true indicator of success BOOTING a boot image with Magisk and ramdisk. Successful patching of Magisk to boot image is simply not enough. (Users of type III devices without compatible bootloaders will see ramdisk exists in logs after Magisk adds initramfs too, but it won't be usable. Ours is, but there is apparently no way to tell other than to try...) PW
[Magisk] zgfg:
Ok so maybe there is another bug then - Magisk app just incorrectly declares that Magisk is installed 🤓

And maybe I was wrong all the time thinking that I'm using Magisk, while I could not be, because the way it was installed must fail

Then sorry for spamming in this thread, if not running Magisk my opinions are not relevant😷
[Magisk] Zoki88:
i didn't read it, i'll head now there and take a look, but yes, i pass safetynet every time, have those apps under magisk hide, and also magisk manager itself hiden with random named data folder, and still didn't help. Thx for magisk github, hope there will find solution
[Magisk] pndwal:
Please read carefully what I said. It WILL fail for these devices (w/ non ramdisk compatible bootloaders)! This is the whole reason John added Magisk in Recovery option.

And of course there is now ramdisk; Magisk adds it! ... But this DOES NOT mean it's usable (unless OEM happens to leave legacy support in bootloader, as does Xiaomi)... It's simply reporting no FACTORY ramdisk as this is the only one sure to work. (Factory ramdisk present indicates compatible bootloader. Manually added ramdisk indicates nothing!) PW
[Magisk] nowster:
Reboot. You'll probably find MagiskHide has turned itself off. Turn it back on.

It sometimes happens with the recent update.
[Magisk] pndwal:
Of course it's not incorrect, you have Magisk, and no-one said it must fail w/ this Installation method, and please don't make out I did! ☹

It's just as John said:

And no need to apologize for all that spam! 😉 FWIW I quite enjoy your opinions. Seriously; all learn from each other here!

PW
[Magisk] Newtype14:
Writing this to avoid any confusion:

Device: Samsung Galaxy S7, Stock Android 8.0.

Context: Updated to latest version of Magisk, then phone wouldn't boot past the Samsung logo.

So I found what the issue is. It seems that on my device, if I install TWRP without Magisk, my phone will bootloop.

Installing Magisk through TWRP fixed the issue. (I tried installing it with ADB/Fastboot like the instructions say, but Fastboot couldn't detect my device; I don't even think the S7 has a Fastboot mode, or if it has one it's different.)

What I think happened is that when I updated Magisk, the phone then rebooted, but Magisk stopped preventing my phone from bootlooping. I'm not knowledgeable enough about this to know why.

So now everything works fine. Phone is restored with my old Backup too, but I'm worried if the same thing will happen again every time there's a new Magisk update.

Thanks to everyone who tried to help.
[Magisk] pndwal:
FWIW, John gave some clarification on why Magisk "Says Ramdisk No, but still works, annoyingly" last October:

topjohnwu commented on 5 Oct 2020

In the last section in Android Booting Shenanigans is your answer. And I quote:

It is literally impossible for Magisk to know whether a device bootloader accepts ramdisk, so the assumption is to always inform the user to use recovery mode

This and other details:

https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-83987947 PW
[Magisk] ineedroot69:
So anybody experience this after a failed Magisk v22.0 installation attempt ??

my phone is 100% fully operational but everytime i boot up my device or access recovery mode (I can access recovery mode ) this thing always shows up but my device is 100% fully operational IDK should i try to fix it or just leave it there?? :unsure: :unsure: :unsure:
[Magisk] ineedroot69:
update::

So i did some searching and apparently dm-verity is a feature that verify Android partition( system, vendor, and optionally oem partitions ) with SHA256 checksum hash. and due to the fact that i tried fixing Magisk 22.0 installation issue by flashing my "dumped" stock "system.img" (i'm the one who dumped it i'm pretty sure its stock version) . I guess you could say my device is Stock ROM but since SHA256 checksum didn't match dm-verity is triggered .. well fuk me then
[Magisk] pixbuf:
My device is a Sony Z2 tablet running AICP, android version 10. For years up to now I have had no trouble with Magisk. But when I updated to v22 the Magisk app says Magisk is not installed. I followed the "100% guaranteed to work method":

extracted boot.img from ROM

patched boot.img with Magisk

copied magisk_patched_*.img to PC

fastboot flash boot magisk_patched_*.img

Magisk still says it's not installed. I tried changing .apk to .zip and flashing it in TWRP. Nope. I tried uninstalling and reinstalling magisk_v22.0.apk. Nope.

Any ideas?

TIA
[Magisk] pndwal:
Did you previously have a hidden Manager? Did you restore it first? PW
[Magisk] jelly_jeremy:
The problem is, we tap the update notification pushed out by the old magisk app without reading the changelog because there isn't one in the notification. Not everyone is free to look at the changelog on GitHub or here before installing every version. We only found out that we have to unhide magisk manager before installing the new app, after installing the new app.

So maybe it's a new circumstances where no one is at fault here? Maybe the users will have to adopt the new habit of reading changelog before installing EVERY VERSION. Or maybe the developers can learn to not push out notifications to ask users to update directly without warning when there is some big change like this in the future? No?
[Magisk] tramp20:
Magisk versions > 20.4 are incompatible with Sony Xperias :-(

Please read https://github.com/topjohnwu/Magisk/issues/3636

You can either update your old previous version with Magisk app (Manager) v.22.0 or try the patched boot.img (this does work) and then update.
[Magisk] DiamondJohn:
I have a Pixel 4a running A11. From what I have found, there is no TWRP for this device on this firware. So, if a Magisc module creates a bootloop, I do not know how to resolve it. by deleting or disabling the speific module

If I flash the stock boot image, Magisk is gone and so the bootloop stops, HOWEVER, I also loose root, and so I cant manually disable the offending module manually.

How do I disable a module triggering a bootloop, without TWRP?
[Magisk] kiwigi:
I've got the same phone and the same stock version.

To be able to use ADB you need to have the drivers installed on the PC( and I'm sure you have done that) . Then connect via usb from the motherboard port( better).

In Android make sure it is connected for charging, not for file transfer.

Use command prompt on the PC and use the ADB commands.

It took me ages to find this out.

I've got a file somewhere with a few command samples if you need.

Does the above make sense?

Good luck.
[Magisk] ineedroot69:
Great question

On my experience i had bootloop while installing EdXposed module i just did hard reset(wipe data/factory reset via recovery mode) and it's pretty much uninstall "Magisk Manager" and remove all Module while leaving "Magisk" installed so i remain rooted but there should more efficient way like removing Modules installation directory via ADB

Now i would like to know from an actual knowledgeable person does Uninstalling "Magisk Manager" would remove all Modules installed??
[Magisk] Didgeridoohan:
There are two ways of dealing with troublesome modules, either by removing or disabling them. Use the "magisk --remove-modules" adb command to remove, or boot to Android Safe Mode to disable:

https://www.didgeridoohan.com/magisk/Magisk#hn_Disablinguninstalling_modules_manually

@ineedroot69 Uninstalling just the Magisk app will not remove any modules.
[Magisk] ineedroot69:
ohhh safe mode i never thought of that
[Magisk] Didgeridoohan:
It's very handy. Once you've booted to Safe Mode you can boot back to regular Android and the Magisk modules will remain disabled.
[Magisk] DiamondJohn:
That worries me, in that I would be waiting for the possibly very short (if at all) time window between adb being available and the reboot being triggered.

I have previously used a Magisk script (with respect to boot order) that would remove the module on the third boot. So if it does not bootloop, I can remove the delete on next boot (i.e. the latest one I added that is obviously triggering the bootloop). I tried getting to adb in stock recovery, but from memory, it said the device wasnt accepting my unauthorised request. I feel more comfortable with my script method (and I have tested it) and keep your adb wiait for device as a backup method in case of emergency.

Sorry, I am sure this has been covered 000's of times before, but do the post-fs scripts run before or after the module mounts are done?

As @Didgeridoohan said, I can attest that it doesnt work. I tried flashing the stock boot image, and it booted fine, but as soon as I re-flashed the magisk boot image, the bootloop was back. i.e. module was still there :(

PS: safe mode is not my first choice. Historically when comming out of it on heavily costomized device, I lost a lot of configuration.

Can I boot to safemode with a fastboot command?
[Magisk] Didgeridoohan:
If it's a module causing the problem the device should be far enough into the boot process for adb to be available and the "wait for device" means that the command should be picked up.

Post-fs scripts run before everything else, so if you have a script tailored to your liking that's a great option.

Safe Mode can be reached through a button combo or from the reboot menu, that's it (as far as I know). But you're right about a lot of customisation likely will be reset by booting to Safe Mode. Very annoying...
[Magisk] Nivan0611:
Hi . . .

Many Thanks for your responce, much appreciated (y)
[Magisk] BBxda1X:
Can anyone help me here.

I bricked my oneplus 6t due magisk v22.

was first still able to go into twrp, but tried flash 21.4.zip file

now im stuck with bootloop only fastboot mode.

install adb drivers on pc but cant run adb fastboot due unable to check USB debugging.

my idea was to flash stock boot.img .

is there anyway to resolve?

)':
[Magisk] dan60:
C3k, I used TWRP to restore a previous system backup img (Moto Z Play - Oreo). But, also, I did have to flash (through TWRP) Magisk manager.zip (v. 8.0.7) and reinstall Magisk apk (v.20.4). Well, Magisk's back again. Hope you can do the same or let's wait for next Magisk's new release. 💡
[Magisk] dan60:
The same I said to C3k.

I used TWRP to restore a previous system backup img (Moto Z Play - Oreo). But, also, I did have to flash (through TWRP) Magisk manager.zip (v. 8.0.7) and reinstall Magisk apk (v.20.4).

Try the following steps:

1. Reboot to recovery.

2. Recover a previous system backup img with TWRP

3. Start and reboot again to TWRP

4. Flash Magisk Manager.zip v. 8.0.7

5. Start system

6. Install Magisk.apk v20.4

You should be done!

Otherwise let's wait for next Magisk's new release. 💡
[Magisk] BBxda1X:
Thanks for your reply.

even i press volume down trying to access twrp, no longer able to, no stock recovery. it kept redirects back to same 'fastboot mode' menu.

i remember my usb debugging was off too.

-------update: just managed to get phone detected in fastboot mode.

-------update: when trying to Flashing TWRP Recovery it shown following errors

C:\adb>fastboot boot twrp.img

downloading 'boot.img'...

OKAY [ 0.666s]

booting...

FAILED (remote: Failed to load/authenticate boot image: Load Error)

finished. total time: 0.679s
[Magisk] BBxda1X:
actually i have similar case to this

WARNING Magisk v22 soft bricks Oneplus 6T !!!! · Issue #3924 · topjohnwu/Magisk

Hey guys. Was running magisk over years without major issue. Sadly v22 bricked my Oneplus 6T phone and others: https://forum.xda-developers.com/t/rom-stock-fastboot-op6t-stock-fastboot-roms-for-one...

github.com

stucked in fastboot mode:

In the fastboot menu:

reboot bootloader -> brings it back straight to fastboot mode

Power off and on -> brings it back straight to fastboot mode

Start recovery -> brings it back straight to fastboot mode

Just fastboot working.

but mine was using last version of android 9 on my Oneplus 6T .

i have tried flash twrp-3.3.1-27-fajita-Pie-mauronofrio.img from fast boot which return this error

C:\adb>fastboot boot twrp-3.3.1-27-fajita-Pie-mauronofrio.img

downloading 'twrp-3.3.1-27-fajita-Pie-mauronofrio.img'...

OKAY [ 0.666s]

booting...

FAILED (remote: Failed to load/authenticate boot image: Load Error)

finished. total time: 0.679s

Anyone can solve without losing data? :cry::cry:
[Magisk] Lord Sithek:
flashing stock boot image?
[Magisk] BBxda1X:
still cant.
[Magisk] J.Michael:
@zgfg, @pndwal: It may not be the bootloader that supports initrd. Some manufacturers might go to the trouble of deleting the kernel's ability to use an initrd.

As for the confusion about the meaning of "Ramdisk: No", someone could open an issue requesting that that entire block of information be more clearly labeled "State of system before Magisk tried to patch anything". Maybe also add an indication of where Magisk is installed. But please remember to use the proper template.
[Magisk] frazelle09:
i've used this before but now that we have a OnePlus5 we have tried to use it. It seems to work with, for example, Titanium Backup alright. However i can't get "root" access for the ES-FileExplorer application. It goes through the motions and says that "root" access has been granted. Then, a couple of seconds later, it reports that it does not have root access.

i installed Magisk by downloading and using the file manager to find it and to "install" it. No problems reported.

Have a great day and stay safe!
[Magisk] Sakasuko:
Xiaomi mi 9t with TWRP 3.9 and HavocOS4.2+Gapps

I had to patch boot image and flash. It didn't work with twrp recovery image.

Now it always boots with magisk.

But the path was a bit longer than that...

I started with a working unlocked+TWRP+HavocOS3.9(android 10)+magisk (previous version)

Updated Magisk from app to 22 -> reboot -> bootloop, finally it booted, strange screen colors -> Magisk install from app -> bootloop to recovery or fastboot don't remember, Stuck there forever. I should have tried a data wipe but didn't remembered that step.

Installed latest stock rom with XMTv2 (Global 12.0-0 something(android 11)) and then TWRP3.9 and HavoOS 4.2(android 11) -> OK again.

I patched recovery(TWRP 3.9.) with magisk 22 app, installed with fastboot tool -> I could boot to system and to recovery but when trying to boot to system+magisk (Vol+Power and release after splash screen) it just get stuck there.

Installed fresh unpatched TWRP. Ok again.

I patched boot from HavocOS 4.2. flashed patched boot with fastboot.

It boots to recovery and to system always with magisk.
[Magisk] DiamondJohn:
This is something I am going to have to test next time I get myself into the situation. But I am planning for multiple ways out, this now being added to that list of outs.

I realised after I walked away from my PC, that it was probably the case that Post-Fs runs before the mounts, and s=Service.d after the mounts. Which also then raised the folloowing question in my mind.

Does magisk --remove-modules disable the boot scripts in post-fs and service.d? These are a possible source of a bootloop also.

Its a little interesting that I have not read from anyone else that they loose customizations. I have booted to safe mode using the long press on the reboot from within the ROM, but I have never used or heard of a button combination. It seems like a VERY logical option, but what is the combination? And I do understand it will be different on each phone.
[Magisk] ineedroot69:
lmao
[Magisk] curiousrom:
Root Enabled File Explorer

I was a root enabled ES File Explorer Pro 1.1.4.1 user for a couple of years while blocking it's internet access to prevent it from sending data to the mothership but it's broken on my Galaxy S5 G900M LineageOS 17.1 (Android 10).

OTOH @HootanParsa's [APP][2.0+] MiXplorer v6.x Released (fully-featured file manager) rooted with Magisk works really well with advanced features & nice optional add-ons.

***
[Magisk] Rhoban:
Well, there must be something wrong with the file manager you are using.
[Magisk] teddy0209:
Flash supersu, flash magisk, boot to sytem to verify root, if you receive a notification that su binary is not installed reboot, open magisk manager and install xposed, reboot and let it optimized, flash suhide... You can also flash xposed after suhide but you have to disable suhide first prior to flashing xposed to let it properly optimize...
[Magisk] ericotena:
Btw how to read log?
[Magisk] ericotena:
Redid the whole thing. Looks like its grayed out. But safetynet results still shows this.
[Magisk] Giblet-dono:
I'm going to repeat my question: did you test safetynet before flashing anything supersu/magisk related?

If you aren't coming from a green screen, you are probably not going to get one after flashing..
[Magisk] ericotena:
Of course it was green before i flashed those
[Magisk] teddy0209:
Safetynet fails with Supersu and Suhide.54 installed?... Flash one at a time, boot to system after each flash to verify...
[Magisk] Frostbiter:
I reboot in between everything, I can get SuperSU and suhide to work fine and safetynet will pass, but the moment I try adding magisk to the mix, suhide doesn't seem to work anymore. Do I need to flash superSU and magisk without rebooting in between, I thought I read that you have to reboot in to the system first to make sure it works, or is this just an issue with motorola phones for the moment?