yashsingh1/xdaforums huggingface dataset:
[Magisk] GauchoTche:
I also think the tutorials are copy and paste, and that they might not work. The great news is that I've just received a link for original phone firmware from Ulefone. Is there anything i should know about patching boot.bin with magisk app, any thing that may make it not work and bootloop?
[Magisk] zgfg:
Usually you must unlock Bootliader first otherwise Fastboot does not allow to flash

Search for guides how to unlock Bootloaders on your Ulefone

Also, for Fastboot you will need drivers - usually Minimal ADB and Fastboot package (download and guide from XDA) or Google SDK Platform tools should work - maybe additional drivers from Internet will be needed
[Magisk] zgfg:
@GauchoTche

Take a look at this guide (also, search yourself on XDA to find more similar guides/threads):

https://xdaforums.com/t/systemless-root-on-ulefone-armor-10-5g-how-i-did-it.4243161/

Go further and there are posts about unlocking Bootloader
[Magisk] Spaceoid:
Hi guys!

I consider myself quite the experienced user, but today I ran into a Magisk problem.

A user in the LOS thread of my phone told me I could to OTAs without manually installing Magisk to inactive slot. I tried that out, but (as I expected) lost root during the OTA.

I then tried to re-install Magisk using the patch-boot-image method, but everytime I flash the patched boot image using fastboot my device won't boot anymore. It will get stuck at the "bootloader unlocked" screen.

I even tried uninstalling manager completely and starting from scratch, but to no avail. I am not out of ideas. Maybe something with the slots went wrong during OTA, but that is beyond my knowledge. Does anybody here understand what happened, and could kindly help me?
[Magisk] huskydg:
You need to go magisk github repo and report. And can you attach installation logs and dmesg to let me know more?
[Magisk] Spaceoid:
The problem has resolved itself in a very weird manner.

I tried to COMPLETELY uninstall Magisk renaming the Magisk .apk to uninstall.zip and sideloading it.

Apparently 25.1 does not have any uninstall function anymore. Instead, the .zip installed Magisk again properly. So now everything is fine again I guess.

A follow-up question though: In the LOS thread, a user stated that since 24.2 it was not necessary anymore to manually install Magisk to inactive slot upon doing an OTA. Link

https://xdaforums.com/t/rom-official-enchilada-12-lineageos-19.4437321/post-87030749

That obviously did not work for me here, I lost root. The user stated further:

https://xdaforums.com/t/rom-official-enchilada-12-lineageos-19.4437321/post-87052207

So, what did I do wrong? Why do I still need to install to inactive slot after each OTA? Thank you in advance!

Edit: Edit2: I did never patch my vbmeta partition, as this was stated optional in the installation instructions. Maybe that is the problem I lose root on every OTA without manually installing it to inactive slot?
[Magisk] GauchoTche:
Hello, I had already read that thread, even posted a reply some days ago, but no answer.

About vbmeta_null.img file, is that file universal, is it specific for Ulefone phones, or do I need one of those specific for Armor X10 Pro?

In the original phone rom I've these files:

No vbmeta_null.img
[Magisk] m0han:
well, i stuck my neck out and attempted a delta update - just like that. all is well. thanks, @huskydg.
[Magisk] nubru:
Tried installing 25.1 on Pixel 3 XL Lineage 19.1. Phone stops at fastboot. Only way to get it to boot was downgrading to 24.0. Tried installing Magisk from recovery and same problem, only fixed with a downgrade.
[Magisk] pndwal:
What was the last stock version you had before moving to custom ROM? PW
[Magisk] nubru:
I don't know the exact date but it was Android 11 from mid-2021.
[Magisk] rogers11:
Did you try to update from within the app? Worked for me on two Pixel (3a/4a).
[Magisk] pndwal:
Yup... just to confirm your device is 2SI SAR... (didn't go to custom ROM from 9) now... (Google retrofitted 3 series Pixels w/ 2SI w/ stock Android 10)...

Thought you may have this issue, but it's for non-2SI (actually, a Magisk in recovery ramdisk device):

https://github.com/topjohnwu/Magisk/issues/6000

- Still, I'm not sure if 2SI devices may also need /dev directory in a ramdisk coil... You could try the test build:

https://github.com/topjohnwu/Magisk/issues/6000#issuecomment-1159733754

Could be this too, being custom A12 ROM and 2SI device:

https://github.com/topjohnwu/Magisk/issues/5777

but seems likely only if your LOS or kernel requires Magisk to alter fstab (which new Magisk no longer does w/ refactoring of Magiskinit)... Are your LOS or kernel unofficial builds? PW
[Magisk] nubru:
Yes, first time was within the app, then I downgraded to get it to boot, then tried flashing the zip from recovery and the same result: couldn't get past fastboot and required a downgrade.

Sorry I don't know anything about 2SI SAR. I found that thread yesterday and actually tried that test build, flashed in recovery and it installed fine but still wouldn't boot.

When I was trying things to get it to boot, I flashed the latest official Lineage build with its kernel and it still wouldn't boot, so after downgrading Magisk I then put back the Kirisakura kernel.
[Magisk] Bouls:
Hello, so today I was trying to update my magisk to 25.1 and I got an error that I never faced. Please help me

! Unsupported boot image extra

! Please restock back to stock boot image

! Installation failed
[Magisk] GauchoTche:
I've bought a Motorola Moto G71 5G. Unfortunately i cannot find a single thread about it on XDA. If i find it's stock ROM, what's the next steps to install magisk? How can i know that patching boot.img with magisk would work and not result in bootloop?
[Magisk] binary**#:
You could opt for temporary root and check if it works or not. For that, boot your device via the Magisk patched boot file using the command-

fastboot boot magisk-patched-boot.img

If everything's well and good, then open the Magisk app and select Direct Install. It will permanently root your device.

However, if your device doesn't boot up, then retry with a force restart, it will be booted to the standard non-rooted OS.

If you are still unable to boot to the OS, then flash the stock boot.img via

fastboot flash boot boot.img
[Magisk] pndwal:
Ok...

Be aware that Magisk should still work going forward with ROMs/ Kernels that will boot w/o Magisk, either as-is or w/ verity/verification disabled first by user... If verity/verification disabled is needed, it will also now be needed with Magisk 24303+.

Explanation from Shana (dev) here:

https://github.com/topjohnwu/Magisk/issues/5777#issuecomment-1121937108

I'm assuming official LineageOS should be bootable without Magisk, but if it requires verity/verification disabled to boot without on your device it will likewise require this now w/ 24303+...

Configurations that rely on Magisk to strip avb_key and avb verification flags for partitions will no longer work as Magisk no longer does / needs these changes (since fstab modification is not used for magiskinit injection in 2SI any longer).

This means a number of custom ROMs / kernels, including your Kirisakura kernel by @Freak07, will bootloop on some devices if you don't disable verity/verification before booting... Also worth noting is this

new trap

:

https://github.com/topjohnwu/Magisk/issues/5777#issuecomment-1123830105

This occurs when seeing

https://github.com/topjohnwu/Magisk/issues/5777#issuecomment-1123939156

👀 PW
[Magisk] pndwal:
Read this?

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

Good tips above 👍 PW
[Magisk] pndwal:
Does patching/flashing stock boot image work?...

Another user just got this terse recommendation:

https://github.com/topjohnwu/Magisk/issues/6022#issuecomment-1163779264

... Issue closed with no further explanation... 🤔 PW
[Magisk] Bouls:
I will try to patch stock boot.img in magisk do you think it's a good idea?
[Magisk] pndwal:
Really, I should have said patch/flash unpatched image from current ROM (ie. stock image if using stock ROM)...

Yes; to eliminate Direct install issues...

I have a feeling it may have to do with changed magiskinit injection method, and issues reverting previous fstab modifications...

What is your device / OS?... PW
[Magisk] Bouls:
I am using a samsung galaxy note 9 android 10 one ui 2.1
[Magisk] GauchoTche:
thanks pal. Unfortunately I've changed my mind and ended up buying an Samsung Galaxy A33 5G. It has better specs than Moto G, for the same price. Are there any specific considerations about rooting a samsung phone? I've heard something about fastobot not working, needing ODIN?
[Magisk] J.Michael:
Read John Wu's installation instructions. As you have heard, for Samsung there is no fastboot, you need to use Odin to download/"flash".

Look for a forum for your device. Even if you find one, look at threads for similar devices.

Samsung is a nuisance, but there are success stories.
[Magisk] pndwal:
So Legacy ramdisk device, now upgraded to modern 2SI since A10... Qualifies for changed magiskinit injection method issue... PW
[Magisk] Bouls:
If you know how can I fix my issue can you help me pleasee?? I did not understand very well what's the matter but as I remeber I didn't touched or changed anything
[Magisk] J.Michael:
I think @pndwal was saying that your problem sounds like a known issue -- you need to wait for the problem to be fixed.

You can go to github, read about issues, wait for mention of release fixing issue.
[Magisk] nubru:
I turned off verity and verification by adb'ing the vbmeta file with flags then upgrading to 25.1 from the app, rebooted once more and it got stuck again. The phone then had a tricky time getting in to recovery, but I flashed 24.0 and all was well again. I checked that verity is off through Termux ("verity is disabled on slot with suffix _a"/"verification is disabled on slot with suffix _a"). Maybe the original lineage kernel would let it boot I didn't do any other testing though.
[Magisk] pndwal:
As I mentioned above, there may be issues upgrading (Direct installing) Magisk from earlier Magisk that patched fstab for magiskinit injection due to (unexpected?) need to revert previous modifications:

The clue was this terse recommendation given to a user facing the same issue on a OnePlus device:

https://github.com/topjohnwu/Magisk/issues/6022#issuecomment-1163779264

before the issue was closed with no further explanation...

SInce then, @osm0sis has asked

and Canyie finally clarified with this:

https://github.com/topjohnwu/Magisk/issues/6022#issuecomment-1165110166

So it's now confirmed that Direct Install will fail where previous Magisk installation (ie. method of injection etc) is no longer supported although a fresh install will work...

Hope this clarifies the reasons why you and others facing issues (bootloops etc) updating to 25.x (24303+) on 2SI devices need to

1) Do a fresh initial installation (patch/flash an original boot image) of Magisk, and

2) In some cases, eg where a custom kernel requires verity/verification disabled to boot, you may need complete Magisk Uninstall and OS booting w/o Magisk before taking fresh Magisk initial installation.

So:

Try patching/flashing unpatched image for fresh install...

Your best chance (w/ Kirisakura kernel) would be to do complete Uninstall Magisk from app main page (or simply delete everything in /data/ADB and fastboot flash stock/unpatched images), then get ROM booting without Magisk using 3rd party means to disable verity/verification if needed. After this do a fresh install (patch/flash boot image from current ROM package) of Magisk... 😛 PW
[Magisk] Stillhard:
Uh where's the love?

Glad we still have ppl like him aboard, BUT maybe it's because THE @osm0sis :LOL:

Ponkles can't beat him too
[Magisk] nubru:
Hey thanks. I tried all that - uninstalling Magisk from the app, rebooting, patching the original lineage image, flashing that, rebooting and installing 25.1, rebooting again and it booted fine. I then flashed the Kirisakura kernel and - stuck at fastboot again! Only the patched recovery image or downgrading Magisk got it to boot. Verity & verification is still disabled. Although oddly, wifi refuses to work when on the patched lineage recovery image. The phone starts with wifi not connected, and turning it on in settings does nothing, and is always turned off again when looking in settings afterwards. Once I downgraded Magisk and flashed Kirisakura, wifi now works again.
[Magisk] J.Michael:
I don't know how much patching Magisk does to the kernel itself, but I would think it would be a bad idea to try to change the kernel on a system on which Magisk is installed. Rather, I think you should replace the kernel on a "stock" system, let Magisk patch the resultant boot image, and flash that.
[Magisk] pndwal:
Please see my last post for further explanation...

so since you seem to have this issue, you still need to do this...

Known issue, but not a regression, so no further fixes will come... (Edit: Except this one: https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-87068697 )

Basically, Direct install breaks due to previous Magisk injection method for 2SI being incompatible with new Magisk... It's more complicated in configurations where disabling verity/verification to boot is still required, but for most 2SI device users the solution is simply to do initial Patch and fasttboot flash original boot image again, thereby replacing the incompatible fstab-patched image...

🙃 PW
[Magisk] pndwal:
Confirms issue was previous fstab patching...

Is this a typo?...

Patching recovery image either Pixel 3 or any 2SI device is not needed / may cause issues as it's designed only for A-only legacy SAR devices, although it will likely work for root...

As I said, Magisk in recovery ramdisk is not intended for your device... Expect such issues...

Sure...

So you need to patch/flash Kirisakura boot image, NOT recovery image... However it seems your current/new method(s) for disabling verity/verification may be inadequate...

Did you do this?:

Of course, 'boot image from current ROM package' in this case is image with Kirisakura kernel...

In theory the above method should work, but others are trying this as we speak, so you'll likely get specific help in forums for you device and for Kirisakura kernel...

Bit further, @capntrips has managed to get Kirisakura 2.4.0 to boot on SP2A.220405.004 with verity enabled using Magisk 24310 (comment at end of main GitHub issue for this):

https://github.com/topjohnwu/Magisk/issues/5777#issuecomment-1126691707

@capntrips doesn't say if his technical method helps w/ Magisk-patched Kirisakura system booting Magisk 25+, but it may be a good start...

Yup, testing ROM/custom kernel booting without Magisk (and using 3rd party means to disable verity/verification if needed), then installing Magisk seems to be what Shana is recommending. In fact she states she won't consider issues in configurations that rely upon / won't boot without Magisk:

- https://github.com/topjohnwu/Magisk/issues/5777#issuecomment-1121769085

- https://github.com/topjohnwu/Magisk/issues/5777#issuecomment-1121937108

The issue is that Kirisakura and other configurations relied on Magisk to strip avb_key and avb flags for partitions... This function is no longer generally performed for 2SI devices in 25+.

The fact that similar custom configurations relying on any 'undocumented internal behaviors of Magisk' will not be supported (ie. will be marked 'wontfix') is also now evident/clarified...

https://github.com/topjohnwu/Magisk/issues/5777#issuecomment-1118202208

👀 PW
[Magisk] capntrips:
I haven't read back through to get the context in this thread, and I'm on mobile, so I can't easily link to the relevant posts, but I made a tool (Hashtree Patcher, see my sig) to simplify the process, and that has been integrated with AK3 and is included in the latest build or so of Kirisakura.
[Magisk] pndwal:
Efforts to be Friendly and Clear

Actually, I applaud all Magisk dev's efforts w/ such curly issues... and now Canyie has come to the party, and Shana and @osm0sis have joined the dance also, finally approving this Pull Request - More friendly and clear error message #6030

This changes error messages seen.

Old scripts/boot_patch.sh

ui_print
! Unsupported boot image $dt

abort
! Please restore back to stock boot image

New scripts/boot_patch.sh

ui_print
! Boot image $dt was patched by old (unsupported) Magisk

abort
! Please try again with *unpatched* boot image

So friendly and clear error messages "to make people happier" will be coming to a Magisk distribution near you at any tick of the clock!

😍 PW
[Magisk] zgfg:
Test with Magisk v25.1:

- open Terminal

- do not execute su

(do not go as root/superuser)

- test:

which su

With Magisk Canary 25101 it returns for me:

system/bin/su

Since I did not request (and was not granted root privileges yet), IMO I must not see the su in the path

I'm not sure how it was with earlier versions of Magisk, but I became suspicious since the new Momo v4.3.1 detects:

"Found executable su in the path" - although Momo is properly in DenyList

See the screenshot
[Magisk] justDave:
Wasn't it always this way? How else would the shell find `su` when you try to run it?

What if you add `terminal` to your deny list?
[Magisk] zgfg:
See the screnshots from Momo

And Momo is in DenyList
[Magisk] pndwal:
On RN8T w/ A10 MIUI stock & 25101, which su gives /sbin/su, but my Momo isn't showing 'Found executable su in the path'...

For me it's 'init.rc is modified' and 'Found zygisk' that have returned...

PW

Edit: Thinking about this, I think you're showing results for new 2SI device... Mine is Legacy SAR...

I'm guessing, but detectable 'executable su in the path' could be a regression from new magiskinit refactoring of 2SI implementation... Being brand new, I imagine it will get further attention... hopefully...
[Magisk] BillGoss:
You should use which -a su to see all the directories in your path containing su, not just the first one.
[Magisk] huskydg:
@zgfg @pndwal

How does hiding root work?

When target app on hidelist / denylist is opened, Magisk will immediately unmount Magisk tmpfs mountpoint, dummy skeleton tmpfs and magisk created mount bind so there are no /sbin/su or /system/bin/su (Android 11+) in target apps.

See the source code:

Denylist unmount: zygisk/deny/revert.cpp

MagiskHide: magiskhide/hide_policy.cpp

Momo is abusing isolated process and app zygote process to bypass MagiskHide and detect Magisk. And the fact that not all banking apps use isolated process or app zygote.
[Magisk] m0han:
my situation is almost the same as yours. i've now updated usnf to v2.3.1.
[Magisk] pndwal:
... Just did what @zgfg did for his comparison... However w/ -a, same result:

PW
[Magisk] asripath:
Mine is a bit different, it's from termux
[Magisk] huskydg:
Termux has wrapper "su" in /data/data/com.termux/files/usr/bin

And this path is in PATH variable
[Magisk] huskydg:
Because there are only su in /sbin
[Magisk] pndwal:
Sure; but fact is many banks do do this (detect mount 'leaks' etc), which is why vvb2060 and other LSP Devs experimented w/ unshare modules, Magisk Lite etc, and why they've incorporated such functionality in Canyie's Shamiko and Magisk Bravo now...

Isn't Momo simply doing whatever Google/ Android allows, just like Bank apps, with the stated purpose:

Also, this helps modders understand what can (possibly) be detected by bank apps etc... Not sure why such an initiatives by key Magisk / LSP / XHook framework Devs would be considered to be an abuse... 🤔 PW
[Magisk] huskydg:
Scanning proc mount leeks is no longer possible on Android 8+ and proc is mounted with hidepid=2 flag
[Magisk] pndwal:
Still, if "abusing isolated process and app zygote process to bypass MagiskHide and detect Magisk" can be done, why is this abuse for Momo where the stated goal is "making detection methods public... to improve user knowledge and force the community to make correct improvements"?...

Isn't the point that if it can be done by Momo, at least some banks will try it? PW
[Magisk] huskydg:
And... Aren't there already 3rd modules that workaround this issues??

Bonus: You can make DenyList to handle isolated process by just adding a small code into zygisk/hook.cpp

// Ensure separated namespace, allow denylist to handle isolated process before Android 11
if (args->mount_external == 0 /* MOUNT_EXTERNAL_NONE */) {
// Only apply the fix before Android 11, as it can cause undefined behaviour in later versions
char sdk_ver_str[92]; // PROPERTY_VALUE_MAX
if (__system_property_get("ro.build.version.sdk", sdk_ver_str) && atoi(sdk_ver_str) < 30) {
args->mount_external = 1 /* MOUNT_EXTERNAL_DEFAULT */;
}
}
[Magisk] pndwal:
Just like Canyie's Bravo Magisk I mentioned?

Allow denylist to handle isolated processes before Android 11

canyie committed on 4 Apr...

...Just care what can/can't be done... to much misinformation here already... PW
[Magisk] vMAC:
So currently I have Magisk installed on my phone. I also have a Work Profile with Intune setup. The problem is that it restricts my ability to install apps from "unknown sources." So with the last update to Magisk Canary I keep getting the alert that I need to update. I currently have Magisk hidden also, so it doesn't come up with the Magisk name.

I connected my computer to my phone and did a "adb install magisk.apk" for the canary app. The problem is that after doing this, while it states that it was successful, the app still says that I need to upgrade the app.

Can someone help me? What am I doing wrong?

I hope the answer isn't that I need to uninstall Intune every time I want to upgrade Magisk.
[Magisk] zgfg:
which -a su

/system/bin/su

Momo detecting su in the path

Magisk Canary 25101 with DenyList Unmount (not Shamiko).

Momo in DenyList, DenyList not enforced

@pndwal how to inspect is it 2SI device
[Magisk] zgfg:
As you stated, you only updated Magisk APPLICATION, not the Magisk itself

Magisk main window, doesn't it show you Update at the top?

And btw, what does it show for your version of Magisk, vs the version of Magisk app?

They should be the same - see my screenshot

If Magisk version is older, it will show you Update on the right, you should click on that Update and do eg Install Direct

Please read Installation documentation on Magisk Github to understand that what is Magisk app vs the Magisk itself

---

You could google for Install from unknown sources or for Install unknown apps to find how to enable (on A8+ it is disabled by default, for all apps)

Hopefully, your Intune does not block you from enabling. If it does, your adb workaround is nice 👍
[Magisk] vMAC:
Yes my company's Intune blocks installing from unknown sources even on my personal side.

I downloaded the latest version of Canary from the Github........That is what I installed via adb install magisk.apk, and this is what shows in my magisk:
[Magisk] zgfg:
Please look at your screenshot. It shows everything - please read

Your installed app is v25001 but it shows that latest is v25101

If you are blocked from Installing from unknown sources, go to Magisk GitHub and download Canary APK 25101 (not stable 25001) and install by adb

Or, if you already downloaded Canary 25101 and attempted to install by adb, then check if adb installing reported you an error (due to Intune?!)- that could be also the reason why you still have Magisk app 25001, not 25101

Also, your Magisk app is hidden. For many reasons it is better to unhide before updating. If Install from unknown sources blocks you to unhide, then uninstall the old Magisk app and then install the new 25101

Again, Magisk app (former mngr) is not Magisk itself. Uninstalling Magisk app will not uninstall Magisk itself (but you have to uninstall the app, like any app - and not through adb, bcs it will only disable the old app package but will leave it present on the system)
[Magisk] traversone:
Lsposed released new Shamiko *.115 !!

https://github.com/LSPosed/LSPosed.github.io/releases