yashsingh1/xdaforums huggingface dataset:
[Magisk] pndwal:
See you did get this going with Delta fork, but FWIW it doesn't detect root w/ official Magisk 26001 on my device:

- Xiaomi RN8T, stock A11 MIUI

- @Displax USNF mod / PI deviceIntegrity passing

- Magisk App hidden as stub

- Bank app in denylist

(- Works with Shamiko disabled / DenyList enforced, and no need for HMA LSPosed module)... PW
[Magisk] badabing2003:
You can read here to understand why.

I wanted to create a Magisk patched file that matched the one created by Magisk, on my 64 bit phone.

If you look at the /data/adb/magisk, both versions exist, even though my phone is 64 bit.

And if you create a patch without the libmagisk32, you'd find that the generated patch does not match the one created by Magisk application.

Hence why it is included, perhaps leaving it out would be benign, but why risk it?

Only the platform that you're running, and if x64 you also want the libmgaisk32

Possibly not all are needed, specially chromeos if you're not on chromeos, but you'd have to experiment to see which is the minimal set that creates an identical patch.

You start without a flag, you generate a patch, and binary compare it to Magisk application created one.

If you notice differences, then you need to add flags, often, you'd see the flag related sections in the magisk application created patch, which gives you a clue which flags to add.

It shouldn't take you long to figure what is needed for your setup.

Either that or you step through Magisk code and see where it makes decisions about the specifics of your device.

Good luck
[Magisk] sergej_7:
there is an addon d flashafterupdate Script available since many years from osm0sis used it Back in time on older devices. since i read new Magisk won't survive Update will this Script fix it? https://xdaforums.com/t/tools-zips-...tiple-devices-platforms.2239421/post-40409361

I would just keep the latest magisk zip in the sdcard/FlashAfterUpdate folder to achieve forceful Flash of magisk while the survival is broken
[Magisk] ThePieMonster:
@topjohnwu

Seems to be a issue with the DenyList on version 26.0.

Android 13 Pixel 6 Pro
[Magisk] pndwal:
Native Bridge Zygisk

A lot more work occurring now on official Magisk Native bridge Zygisk loading as tested initially in @5ec1cff's Maru Magisk fork... That was an initial Zygisk implementation of the original Riru loading method which was of course pioneered by @RikkaW...

Apart from providing the basis for the Zygisk hooking model which, like Riru, allows Magisk to run (inject) code in Android applications' processes, it seems we are now seeing (with new Native bridge Zygisk loading) further reason for Rikka's inclusion here:

... I'm fairly sure she'll be providing tips to Shana (@yujincheng08, LoveSy of LSPosed fame) behind the scenes at the very least...

Go Native Bridge Zygisk! 😀 PW
[Magisk] pndwal:
Why deny Magisk modifications in those processes anyway?

If you add some Google processes you'll get unexpected results, like broken webview...

You don't need to add any Google processes if hiding root from droidguard (attestation engine for gms) is your aim and you use a Zygisk based USNF build; it does its own hiding... The only Google app I'm aware of that you need to hide root from is GPay/Wallet...

Not sure why Google Services Framework gets unchecked, but it's likely a protection to save you from yourself. 😜

Assuming you use USNF module, that's removing Play Services (gms) processes at boot time if denylist is enforced (it'll remain if using Shamiko etc) because DenyList kills USNF code injection in gms (needed for fake keystore registration)...

😬😀 PW
[Magisk] pndwal:
Just took a quick look at that script, and I'm unsure if it would still work with broken Magisk addon.d* as it clearly works differently... @osm0sis may comment on whether a full flashable Magisk .zip would flash correctly as part of an OTA this way...

Edit: @osm0sis clarified the it won't work below... 🙃

*Nb. Apparently these 25207 changes broke normal Magisk addon.d:

Remove unexpected files

and

Stop embedding stub.apk in magiskinit completely... Some further sepolicy changes etc may also cause issues... According to @osm0sis, "basically it's failing at this line (https://github.com/topjohnwu/Magisk/blob/master/scripts/boot_patch.sh#L185) and just continues since there's no error catching through most of boot_patch.sh..." Many will be hoping that his PR Fix scripts #6833 gets reviewed and merged... 🙃 PW
[Magisk] Life_goes_on:
Run a FULL backup with the following command:

adb backup -f FullBackup.ab -apk -all

adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|nosystem] [<packages...>]

[GUIDE] Full Phone Backup without Unlock or Root

Like a lot of you, I have been putting off unlocking the bootloader on my Nexus because I didn't want to have to go through the hassle of backing up everything manually and restoring individual application data; logging back into apps; saving...

xdaforums.com

Flash boot in bootloader

fastboot flash boot <filename>.img
[Magisk] zgfg:
Screenshot from Magisk Delta TG channel (March 5) where @huskydg commented the sepolicy changes brought by TJW Magisk Canary v25207 (he did not integrate [yet] to Delta)
[Magisk] nes4r2:
Hello, I ve been coming across this issue, any idea what might be the issue? Is the script corrupted or something? Every time I try to install new modules they fail.

- Copying zip to temp directory

- Installing music-revanced-magisk-v5.39.52-arm64-v8a.zip

/data/user/0/com.topjohnwu.magisk/cache/flash/update-binary: /data/adb/magisk/util_functions.sh: line 186: syntax error: unexpected "(" (expecting "fi")

! Installation failed
[Magisk] pndwal:
Refactor sepolicy.rules resolve app is only one factor... There are several commits associated with removing stub.apk from /data/adb/magisk which kills boot patching with boot_patch.sh... Actually this is apparently the key one breaking addon.d: Remove unexpected files. PW
[Magisk] nes4r2:
Nevermind, útil script was corrupted, I just unzip a new magisk .zip and replaced the script with the one in the new zip and its good.
[Magisk] osm0sis:
Nah, the zip needs to be designed to be OTA aware, for A/B anyway.
[Magisk] ThePieMonster:
Yes it would seem that G Pay does still work after only having the following app in the DenyList. The other Google Apps were not necessary as I have

safetynet-fix module installed.

Seems like just the Systemless module and the Safetynet-Fix are the only modules necessary for Android 13.
[Magisk] ctcx:
Excuse me, already tried re-reading the docs, but still wasn't clear for me...

Currently have Magisk 25.2. When on non-patched boot.img (for example, stock one after update), what's the appropriate way to update Magisk? From app itself, or downloading apk and manual install again?

Thanks.
[Magisk] pndwal:
If had Magisk (core) installed you would generally update App then take Direct install to update Magisk itself (core patched boot image)...

Seems you've uninstalled Magisk, so now need initial installation again...

Update App then patch / flash boot image per instructions, or (generally only if using a legacy device) rename .apk to .zip (or not depending on custom recovery) and flash from custom recovery... Nb. You'll need to reinstall Magisk from booted system when prompted by App in this case to properly configure environment (ie. selinux/module rules)...

🤠 PW
[Magisk] kurtn:
26.0 on lineageOS 14 android 7: deleting a module seems to halfway pop up a message. Maybe for device restart
[Magisk] zgfg:
Not 'maybe' but whenever you install, disable/enable or uninstall a module, phone must be restarted - before restart, module is only marked that it will be disabled/re-enabled, uninstalled on the next restart (only on restart, when initializing modules, Magisk does the actions)

Nothing specific to Magisk v26, it was always the way how Magisk manages the modules
[Magisk] pndwal:
Systemless module? They're all (normally) systemless! (That's the point of MagicMount and what makes Magisk "The Magic Mask for Android"!)...

If you mean Systemless hosts (integrated) module, that's not needed for GPay/Wallet... It's for ad blocking... 🙂PW
[Magisk] pndwal:
Hooray!

@osm0sis' fix is merged (reverting the changes that recently broke addon.d)...

The Magisk Survival Script for ROMs with addon.d support by topjohnwu and osm0sis should be working again for custom ROM users with next release!

👏🎊 PW
[Magisk] kurtn:
Yes. Reboot expected. But look at the screenshot. That ghost contour looks buggy.
[Magisk] pndwal:
This?:

... Nice bin ain't it? 🤪 (... Bit 'o dark humour, sorry...) 🙂 PW
[Magisk] pndwal:
I've hinted, but this is gonna be BIG folks! (especially for those who think Magisk = root hiding; it doesn't, but)...

This major Zygisk injection change should fix a number of issues incl. Android Studio problems, native debugging broken due to .so detection failing and even kernel issues in old Samsung devices that prevent Zygisk from loading, however there may be a hidden agenda (scuse da pun)...

The last Riru method for injecting into zygote using the "native bridge" was from @canyie (author of Riru-Momohider, Shamiko, Magisk Bravo) and the mechanism for hiding this by making the memory of Riru and modules "anonymous memory" hidden from /proc/maps string scanning in v22.0+ was based on Haruue Icymoon's concept...

Basically, aligning the Zygisk injection method with that of late Riru will make proper concealment from string scanning possible, and is also tried and tested in RiruHide...

... I'm certainly hoping to see a happy Momo with official Magisk... Eventually... 😀 PW
[Magisk] zgfg:
Delta went through the various Zygisk implementations, back and forth, incl. the Native bridge if I recall correctly - not sure what implementation is in the latest version (and btw, I'm running the last but one Delta v25210)

Frankly, I switched long ago to Delta on my daily, better for hiding but Momo is still complaining and demanding (currently, Found Magisk plus 'regular' Bootloader unlocked and Restrictions on non-SDK interfaces not working)
[Magisk] pndwal:
Yup, if you scroll back through linked posts from post above you'll see mentioned "Maru does just this, and @huskydg has since made such Zygisk hiding accessible to many users via his Delta Magisk fork" and other mentions of native bridge injection in Delta, notably my reply to you here:

https://xdaforums.com/t/discussion-...third-party-magisk-fork.4460555/post-87729841

Seems that many complex considerations / committed fixes / Magisk action runs (never seen so many re-runs) have been needed, and more may still come, in order to implement new injection in official Magisk without breaking stuff... Guess we'll find out what still breaks, but apparently much testing is/was being done with this (upcoming) iteration...

Delta seems a bit like early Zygisk Alpha was; bleeding edge stuff tested on the run ustng a small userbase... @huskydg certainly has an eye for good solutions however, borrowed or not, as I've said before....

Further, it's everyone's choice whether to run with an unofficial fork or TJW Magisk, and reasons are varied and also change.

John did make these comments:

www.twitter.com/topjohnwu/status/1445598605029482503

Anyway, seems @canyie's native bridge Riru injection model is coming to Magisk native hooking... Looks like this along with her hiding module may soon prove John right. 😀 PW
[Magisk] ctcx:
My case was that LOS updated, thus boot.img returned to non-patched; if this is what you'd call "Magisk uninstalled". However, Magisk app stills there, just with the limited/basic functionality of non-patched...

Renaming to .zip and flashing from recovery is no longer recommended according to Magisk updated docs, although I once observed this was the only way for Magisk to show all functions as if patched boot.img, without actually patching.

So I reiterate question, how can I update Magisk in the device, preferably without having to patch again?

Is it in Magisk home screen, with the "App Install" option (the one being below "Magisk Install" option used to patch...)

Thanks again.
[Magisk] dcarvil:
Your best option is to patch the boot.img again, and flash the patched image. You may be able to avoid this problem in the future by renaming magisk.apk to magisk.zip and flashing it. This will install a script in /system/addon.d that will patch boot.img during the OTA process.
[Magisk] ctcx:
If that were true then badabing2003's PixelFlasher would probably not have reason to be...
[Magisk] WislaHD:
Hello, looking for some support here.

I just updated my Oneplus 7 Pro to the latest Android 12 and begun work on customizing post-upgrade. I went and installed a Magisk Module (a simple emoji switcher) and it caused my phone to bootloop. It is actually stranger than a bootloop because the phone is just stuck on the booting screen, it is not looping. I can get the device to fastboot mode however.

Anyway, I don't think I have TWRP installed because of my recent upgrade to Android 12.

What can I do to get my device back? I tried following this guide here but it did not work.
[Magisk] J.Michael:
Instead of thinking you don't have TWRP, try booting to recovery to see if you don't have TWRP.

I'm not watching another video. How about telling us what you tried that did not work.
[Magisk] WislaHD:
In fastboot mode, when I select Recovery Mode, I am taken to the Oneplus boot screen, no TWRP.

When I use ADB to "fastboot boot twrp.img" it takes me to a "Oneplus Fastboot Mode" screen, and does not load TWRP.

The video comes down to using ADB command "adb wait-for-device shell magisk --remove-modules" to remove magisk modules during a bootloop. I tried doing that while manually restarting the device a few times, hoping it would kick in upon device restart, but no luck.
[Magisk] pndwal:
The adb command won't work w/o USB debugging enabled... Alternatively, try booting to safe mode:

https://topjohnwu.github.io/Magisk/faq.html#q-i-installed-a-module-and-it-bootlooped-my-device-help

🤠 PW
[Magisk] jons99:
while you boot connect to the pc open power shell and type:

adb wait-for-device shell magisk --remove-modules
[Magisk] pndwal:
If safemode fails to disable modules, you can often temp-boot to TWRP (fastboot boot TWRP.img, don't flash) to put an empty file named 'disable' in the font module folder in /data/adb... (I believe your OP7Pro device has dual recovery partitions unlike most A/B devices, so this should work fine.)

Nb. Font modules are fraught, can cause bootloops and detection issues as well as kill certain apps... I don't use them but guess you need to investigate solutions that properly treat these issues... 👀 PW
[Magisk] WislaHD:
Thanks. Is there a command for booting the device into safe mode from fastboot mode? For obvious reasons, I cannot access safe mode from within the device currently.

And yes, I have tried googling the answer to this for the past half hour before replying here.
[Magisk] jons99:
there's actually a way to reboot to safe mode you first flash your unpatched boot img then boot to system then hold the power button and then hold the on screen power off button till it gives you the option to reboot to safe mode then before it boots hold the power button or whatever to enter fastboot and flash your patched boot img this way you'll boot to safe mode with magisk
[Magisk] pndwal:
No... Generally only two methods...

You need to use hardware key combo from off state (#2 below)... Cleary that's the only method that can work for fixing Magisk or any other bootloop issue (read any system boot issue really)... #1 can't work...

I found this as first result with first Google search for "oneplus 7 pro safe mode" 🙃:

That will restore booting device, but will still leave bad module in /data/adb as Magisk Safe Mode detection / module disabling only works if Magisk daemon is running; it detects key combo via props and puts 'disable' file in modules directory...

To fix, member must retain root...

🤠 PW
[Magisk] WislaHD:
First thanks for the response. I was very reluctant to go through all those steps just to enable USB debugging. I am terrified of hard bricking my device especially given that I don't have a back-up (yes, I know...). For the past few years I have had Magisk installed Magisk via the app, so patching the boot.img is all new to me.

I have been trying to do the hardware buttons combination for the past few hours actually. It is not working for me. I have had bootloops before over the years, but this one seems different to me in that the device isn't actually rebooting, it is just stuck in the boot screen (OnePlus Logo and "Powered by Android" at the bottom). It only seems to respond to volume-up + power to send it to fastboot mode.

Incidentally, should I be concerned that when I tried to fastboot boot TWRP.img that my device did not load into TWRP? I am still thinking that the easiest solution to clearing the magisk modules from my device is by the file manager in TWRP as per this guide here.
[Magisk] pndwal:
Welcome...

It's a trade off... Allows you to dirty flash ROMs etc to fix corruption, but it's a security concern if device is stolen or even if connected to public USB (who says it's just a charger?!)...

Then maybe keep USB debugging enabled?

🤔... If installed Magisk via the App you must have patched the boot.img in App originally, no??

Yup; can be broken / not always reliable...

I'd say it should work if you can return device to fully powered down state however... Have you been trying from stuck boot screen?... Won't device properly power down if you enter fastboot mode then hold down pwr button?...

Is it correct TWRP?... Nb TWRP often needs upgrading to match kernel build when ROM has been updated... There may be other issues with this also (eg. I believe fastboot boot is not working with late Pixel ROMs)...

Yup, that's why I suggested TWRP as alternative...

Not the best guide however; deleting modules that way should be a last resort as modules may write data in other places etc, and doing that may not uninstall properly... Best way is to place empty file named 'disable' in the problem module folder to restore booting system, then remove disabled module from Magisk App later; this runs proper uninstall script and should clean up properly...

Here's a better guide:

https://www.didgeridoohan.com/magisk/MagiskModuleIssues#

... scroll down to "Disabling/uninstalling modules manually"

If all else fails, you can still restore booting system as mentioned by flashing unpatched boot.img... Then you can save/back up all your userdata and clean flash ROM or factory reset... That will fix issue as /data is wiped... 😜

🤠 PW
[Magisk] jons99:
you didn't brick your phone you can always wipe data in recovery and your phone will be like new

I gave it my best pndwal
[Magisk] pndwal:
Yup, and your point to restore boot.img will fix device booting w/o root, allowing userdata retrieval before wiping data / factory reset...

I've done a bit of testing with safe mode... I thought it might work w/o root initially too, but delved into the mechanism...

Magisk safemode key combo detection is still not reliable in MIUI for example (despite my issue being closed with a 'fix') due to timing issues... It is possible to activate Safe Mode without Magisk detecting it (not disabling modules), and it's possible to achieve (trick) Magisk Safe Mode key combo detection w/o entering Safe Mode at all for example...

We're all learning here... I know my 'best' has gotten better! 😝 (We all have targeted areas of expertise and areas where blanks need filling in anyways)... Please don't be discouraged; thanks for kind efforts... Can't have enough efforts of that kind!...👍 PW
[Magisk] jons99:
no thank you pndwal I read most of your posts here and I learned a lot
[Magisk] WislaHD:
I thought it was enabled. It may have come disabled as I updated to the Android 12 (which I didn't think it would?). Unfortunately, the update took me by surprise, I thought it was just a normal security patch update since I long believed that the Oneplus 7 Pro had reached end of life on software updates. When I had realized, the update was already installing. That is why I was also caught with no backup.

Honestly, I may have used a third-party app to install Magisk the last time I bricked my phone years ago that automated all these steps. I was never comfortable with the move away from TWRP in the first place, and was just careful to maintain my root status through every OTA update. If it sounds like I shouldn't be using a rooted phone, then don't worry I agree and believe I don't have the patience for this compared to 10 years ago, I will likely stick to stock whenever I eventually upgrade devices.

It feels like whenever I start the phone, it immediately brings up the stuck boot screen. It doesn't go through any of the normal booting cycle that I am familiar with (granted I don't know what changes they did to the booting animation in Android 12).

I've been inside Safe Mode before on Android 11, I know how the boot-up animation changes when you activate Safe Mode.

I've tried both the TWRP.img that I used last time, and the latest download. Did not work. Sends me to a screen with Oneplus logo and Fastboot Mode written at bottom.

It seems I will have to get through the work-day first before trying this flashing route in the evening. I'd appreciate if anyone had more ideas about why I cannot access Safe Mode, what this stuck on boot screen is, or understand why TWRP won't run in fastmode.
[Magisk] badabing2003:
Based on this post, I'm going with the assumption that your problems are due to installing a Magisk module, which necessitates that you are rooted and running Magisk.

Break down this into two stages.

1- Get your system working non-rooted (without Magisk), this will prove that there are no other issues on your system other than Magisk / Modules. This will also give you an opportunity to backup critical data (not Nandroid backup, but rather manual backup or through apps)

2- If you still want to have a rooted system, doing the necessary steps to disable the module(s) that are causing issues and have Magisk installed again.

1- Getting your system working.

Find out what is your current OS version / build.

Download the matching firmware

Extract boot.img

Flash the boot.img by issuing this command (adjust for your device if it needs to be init_boot)

fastboot flash boot boot.img

You can test it without flashing by issuing this command (might not work)

fastboot boot boot.img

Assuming that stage 1 is working, you can move to stage 2, (don't bother with stage 2 if stage 1 is not working)

2- Getting rooted again

You can't remove / disable bad modules, unless Magisk core is installed and loaded (root), and when it is loaded, the bad module gets in the way and causes the system not to boot properly, or bootloop. (Chicken and egg situation)

The first thing you want to do after step 1 is to uninstall the currently installed Magisk Manager

Then you:

Install this special version created by @gecowa6967, this is special because it gives you root but does not load the modules.

Create a patched boot / init_boot using this Magisk Manager

Flash the patched image.

You should now be able to get root access, and your modules will not load.

Delete / Disable suspect modules.

Uninstall this Magisk Manager.

Install your Magisk Manager of choice.

Create patched boot / init_boot image.

Flash the patched image.

You should be good to go.

Post back your progress of if anything does not go as described.
[Magisk] pndwal:
Thanks for this!...

I knew of users making core only patches when other options failed, but seemed they were device specific... Had actually thought about recommending this approach as a selectable option in Install menu for initial patching in official Magisk too...

Haven't looked at this solution yet, but if it works on any device I'll certainly be a keeper for me too!... 👍 PW
[Magisk] pndwal:
@badabing2003

Actuaually I remember HarryWindsor now, and our subsequent conversation... I should revisit it properly...

Thanks for your recall... I have a photographic memory too, but it still needs developing... PW
[Magisk] badabing2003:
lol, I have a terrible memory, the only reason I got the link so quickly because I have it in PixelFlasher as an option. :)