yashsingh1/xdaforums huggingface dataset:
[Magisk] AquilaDroid:
1. Flash the boot.img from the official image zip to your device and boot up. OK

2. Hold the power button until the menu comes up OK

3. Hold the power off button until you get the safe mode message OK

4. when rebooting into safe mode, hold down the volume down button to get into fastboot. OK

5. flash your magisk_patched.img OK, but phone doesn't reboot without entering "fastboot reboot" (???) ****Should I hold vol. down button to force it into safe mode?**** NO, THAT DIDN'T WORK. Do I need to use an ADB shell command?

6. the phone will now boot into safe mode with magisk Phone bootloops with "G" on screen. Have to flash stock boot.img to recover. When it reboots phone is still in Safe mode.

7. magisk will automatically disable all modules

8. reboot the phone again to disable safe mode

9. after booting, confirm that magisk works

10. remove all disabled magisk modules with the following adb command

Hope this makes sense to one of you pros!
[Magisk] zgfg:
Can you please give a link to the mentioned post about interrupting boot to Safe mode, flashing and 'resuning' the boot to Safe mode

Something very new to me (frankly, I don't understand how to 'resume')

Anyway, we have to be always ready for continuing education
[Magisk] AquilaDroid:
Is this what you're looking for?: https://xdaforums.com/t/bootloop-on-magisk-with-android-11.4170091/#post-83613203

Post #5
[Magisk] ipdev:
Quick question, what menu options do you have in fastboot?

Using the volume up/down keys to cycle though the options.

Is there a resume or continue option?

What happens it you just boot the magisk patched image at step 5?

C:\Users\aquil\Desktop\August Platform Tools\platform-tools>fastboot boot "C:\Users\aquil\Desktop\August Platform Tools\platform-tools\magisk_patched-23000_0Gs4k.img"

or flash it and then continue boot at step 5?

C:\Users\aquil\Desktop\August Platform Tools\platform-tools>fastboot flash boot "C:\Users\aquil\Desktop\August Platform Tools\platform-tools\magisk_patched-23000_0Gs4k.img"
fastboot continue

Cheers. :cowboy:
[Magisk] AquilaDroid:
Very interesting question which opens options I know nothing about!

Power Off

Bar Code

Rescue Mode

Recovery Mode

Restart Bootloader

Gives me a lot more reading material! Any suggestions on the above before I get stuck in several more rabbit holes<G>?
[Magisk] midgo12:
Hi Guys.

Magisk-Alpha is still on version 30.

Is anyone using this and finding it works well with no issues.

I am using it but only for basic things like flashing from storage and it works fine for that.

What other uses are you guys using it for???
[Magisk] pndwal:
Just caught up with saga.

May be missing something, but seems if you cannot boot to Safe mode at all with Magisk-patched image, this is due to issue with image itself / patching process / issue / regression affecting your device since this is effectively 'core only' mode. Ie. even with safe mode access / modules disabled you have bootloop.

If modules are an additional issue, that will just go away once you can boot to Safe mode with patched image.

I understand August update is still Android 11 (- you haven't gone to A12 developer preview have you?).

Anyway, it may be worth while trying @vvb2060's updated Alpha Magisk to patch as he has a number of recent fixes.

I don't know which fixes might help you, but something might be fixed. Eg, he added "Support bootimg v4 format". Late Android 11 uses V3, but Google may already be moving to v4 in preparation for Android 12(?)

Latest Alpha:

https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-85397935 PW
[Magisk] AquilaDroid:
Thanks for all the insight. No, I haven't gone to A12 preview yet, considered it when I flashed the August A11 update (which I now wish I hadn't done <G>). I'll give the lates Alpha a go tomorrow. Can't believe how many things I've tried with exactly the same (fortunately not worse!) results.
[Magisk] ipdev:
Only the two ideas. ;)

fastboot boot instead of flashing it to the device.

Using fastboot continue to continue the boot after flashing the boot image to the device.

Cheers. :cowboy:
[Magisk] ipdev:
I was curious now and since no other redfin users have joined in..

I decided to unlock mine to test Magisk.

I updated mine to the July build.

I patched the July boot image prior to updating (I did not check but, I think i was on the May build?).

Interesting Message. 🙃

Both magisk_patched-23001-redfin-rq3a.210705.001-boot.img and magisk_patched-23001-redfin-rq3a.210805.001.a1-boot.img gave the same response.

[ip@lost p5]$ fastboot boot magisk_patched-23001-redfin-rq3a.210705.001-boot.img
Sending 'boot.img' (98304 KB) OKAY [ 4.445s]
Booting (bootloader) boot.img missing cmdline or OS version
OKAY [ 1.470s]
Finished. Total time: 6.011s
[ip@lost p5]$

The July build booted with the Magisk patched image, I then used the Direct install option to install Magisk.

Updated to August build (I forgot to pre-patch the August boot image. :oops:) so I just booted the patched July image again.

Then patched the August boot image, rebooted to bootloader and booted the patched August boot image to test.

Then used the Direct install option to install Magisk.

Magisk (canary) works just fine with the August build on Pixel 5 (redfin) for me.

I used the fastboot images to update.

I modify the flash-all.sh a bit.

fastboot -w update image-redfin-rq3a.210805.001.a1.zip

I change it to.

fastboot --skip-reboot update image-redfin-rq3a.210805.001.a1.zip
fastboot reboot bootloader

This will skip the wipe (-w) and auto-reboot after the update.

The skip-reboot will leave you in fastboot_d so I add the reboot back into bootloader (fastboot).

It is late for me now, I learned my lesson years ago about flashing when tired. ;)

Cheers. :cowboy:

PS.

Ran out of time to test TWRP.

Looks like we need to flash EX kernel before using TWRP but, I did not go though the whole thread.
[Magisk] pndwal:
Good stuff!

Interesting that it boots despite errors...

🤔 ... But Magisk was already installed w/ July image wasn't it?... Did extra Direct Install make some difference here?

Assuming this booted ok.

But should be able to patch August image booted from un-patched August installation... Did booting with Magisk to patch make a difference here?

🤔 So you're simply re-patching / flashing via direct install rather than flashing already patched and tested August image via fastboot here?

Good to know... So we can assume boot image is still V3 or earlier.

Did you test simply patching then flashing image from latest stock build w/o Magisk installed?

Any thoughts on why @AquilaDroid's patched image (patched w/o Magisk installed) results in bootloop and won't even boot to safe mode?...

Perhaps an error transferring image to PC if MTP was used? PW
[Magisk] zgfg:
'Still'?- It's on 30 since Jul 30, not long at all.

Actually, it was Jul 29 our time

And if you scroll back this thread to Jul 29/30, you will find posts about (succesful) update of Alpha to 30 (several of us here regularly use Alpha and usually update when versions are released on GitHub and even earlier, prereleased on Telegram).

Or use the Search in this thread
[Magisk] J.Michael:
@jons99's post in this thread had two links. The first was to a post by @Incanity describing how to dance in and out of safe mode.

Too bad modules don't seem to be @AquilaDroid's problem.
[Magisk] AquilaDroid:
A HUGE thanks to all of you who are trying to help me with this! It's the extreme example of XDA's spirit of helping others.

I'm not going to have much time to try things today and am pretty burned out after hours of trying various things yesterday and last night.

Two things - @J.Michael says "Too bad modules don't seem to be @AquilaDroid's problem." I've been assuming they were, but without a way (unless the "new" TWRP will give access) to find out. The other minor difference is that I use flash-all.bat (with -w removed of course).

I'm learning a whole lot more here than I ever expected to (or wanted to?). Thanks to all of you for your time investments!
[Magisk] J.Michael:
I thought you had gotten to the point where you booted to safe mode, with Magisk installed at the time you reached safe mode, and still had the "boot loop". Other people's comments left me thinking that modules would be disabled in safe mode, as well as for the next boot after safe mode.

Maybe the process should have been

boot to safe mode without having Magisk installed

flash Magisk-patched-boot-image

reboot

The description is always "boot to Safe Mode; reboot; Magisk will disable all modules". I always assumed they were only disabled for that one boot -- reboot again and they would be un-disabled. I also assumed that the disabling occurred at the beginning of the first boot after Safe Mode, that there was some operating system flag allowing Magisk to recognize that the previous boot had been to Safe Mode.
[Magisk] Didgeridoohan:
Modules will be disabled until you enable them again, no matter how many reboots you make (but only if you have Magisk installed when booting to Safe Mode).

https://topjohnwu.github.io/Magisk/faq.html#q-i-installed-a-module-and-it-bootlooped-my-device-help
[Magisk] J.Michael:
@Didgeridoohan, @zgfg: Are all modules "not activated" when you boot to Safe Mode?

So, if @AquilaDroid booted to Safe Mode with a magisk-patched-boot-image, and the boot hung, then he can conclude that that problem is *not* being caused by a module?
[Magisk] zgfg:
As explained above, Magisk recognizes the Safe mode and it creates the "disable" files. However, if Magisk also hangs out for him when booting to Safe mode, I would say that Magisk then did not come to the point to create the *disable" files

But bcs of Magisk hanging up in Safe mode, I would assume his problem is not in some module but that something is wrong with patching img

@AquilaDroid - did you try using Magisk Alpha instead of Magisk Stable)Canary?

Can you upload your stock boot.img and the patched one to Mega or GDrive, I will try to patch for you (by Magisk Alpha)
[Magisk] AquilaDroid:
Thanks for your response! I've gone through dozens of attempts (probably quite a few duplicates!) but don't know that I've ever had Magisk installed since it boot loops every time. Today I tried uninstalling Magisk (just in case it was installed) and got the following output:

C:\Users\aquil\Desktop\August Platform Tools\platform-tools>adb shell pm uninstall -k com.topjohnwu.magisk

Success

which makes it look like it was installed (but maybe any bad modules are still there?). Maybe I'll try running the above shell command and follow it with reflash of the Magisk_patched.img (?).

I found this old suggestion:

Now open CMD and type "adb shell"

To find a specific module

type "ls -Ral data/adb/modules"

Now to remove the magisk module

type "rm -r data/adb/modules/module_name"

(module_name is the name of the module)

Is that worth trying?

Thanks again!
[Magisk] zgfg:
com.topjohnwu.com is package name for Magisk App/Manager - therefore you did not uninstall Magisk that way, by no means

/data/adb/modules contains one folder per each module - but folder name is not necessarily equal to the module's name - they are usually similar but not identical a letter by letter (folder names are usually shortened, lowercase, without spaces - whatever the module developer liked and specified)

By adb, you could try listing the folder names, then recognize from the folder name to which module it should belong

Or, list the folder names, then enter to each folder and find , copy to the PC and open its module.prop file.

Use Open with, to open by Notebook (textual file), that is a meta file describing the module name, its version, author, and so

Actually, definition of the module's folder name is also provided in module.prop file. When Magisk installs the module, it finds module.prop in the module's zip package, it processes the module.prop - if the folder name for that folder is defined there as aaabbbccc, Magisk will create and install the module into the folder /data/adb/modules/aaabbbcccc hence that folder's name will not corresoond to the module's name (bad luck)

Excersize: Download and unzip a zip Installation package for some module and analyze its structure.

Find and open the module.prop file, read what meta info it contains

For those who want to learn more: Install also that module and compare the actual module's folder in /data/adb/modules with the unzipped module's installation package.

Folders are similar but not necessarily equal.

E.g, if there was s customize.sh script in the zip, Magisk will not copy that file but it will execute it at the time of installation - that script, written by developer, may programatically create additional files and (sub)folders you could find in /data/adb...

Similarly, post-fs-data.sh and/or service.sh are executed on each reboot (when Magisk is installed and module not disabled) - those scriots can add/remove files in the folder over time

Or, install MHCP, run props command in Terninal and play by props. Save the changes and look into the MHCP folder (btw, find what's the folder nane for that module) what was changed there.

Be careful, before rebooting revert whatever proos you changed, added or removed - unless you well know what you're doing (affected props may cause miiss behavior, crashes or even bootloops
[Magisk] rodken:
Could you patch my boot.img as well with the Alpha version if I sent you the necessary files?
[Magisk] zgfg:
I can try, usually it works (I used to patch the img from phone B on phone the phone A and flash it later on the phone/model B) but recently there was a user on Github for whom it did not work

Also, boot.img files are huge (20-128 MB) hence upload please to e.g. Mega - I will upload the patched img to my Mega and give you the shared link
[Magisk] AquilaDroid:
Yes, I missed this earlier but will do that later. Thanks for staying on top of this!
[Magisk] AquilaDroid:
@zgfg - How do I get your email address to give you access to GDrive? I've uploaded both files.
[Magisk] pndwal:
You can send via private message in XDA. Now called 'Conversations'. 👍 PW
[Magisk] RicardoCarv:
Hi.

I'm on android 4.4.2 with magisk 22.1.

I know it's a bit of an old setup but I still hope I can get some help.

I can either have some modules working or root prompts:

If I have modules that change /system/xbin and others, I can get root prompts but the modules that change xbin (and, sometimes, all of them) won't mount. When the modules are being mounted, the daemon goes off. I have tested and, magisk --post-fs-data on terminal shuts the daemon down. It can be seen in the log that instead of '**boot-complete trigered', it launches daemon again and there's a twice '**boot-complete trigered' at the end.

If I only have /system/xbin modules, I can get them mounted but there are no prompts. Only already registered apps can get root permissions.

I have almost no experience on this and so I'll say logcat doesn't work properly on my tablet. The attached logs are the best I can get to show my point (unless someone can guide).

UPDATE; had the names switched
[Magisk] pndwal:
There is info on module issues in wiki, here:

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

You may have 'updated template' problem if modules are old; do you get any error message / message telling you to install an older version of Magisk / "mount_magisk_img: not found" in a proper log?

Seems in case of message telling you to install an older version of Magisk you can try older (pre v19.0?) Magisk if desperate to use old module, or update module.

Logging methods here:

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

I have little practical experience here either. Best I can do is point to docs. 😛 Others may have more clues. PW
[Magisk] J.Michael:
I think it is definitely worth trying the "ls -Ral". That is just looking, and would tell us if you actually have any modules.

Just "ls -l /data/adb/modules" will be a shorter listing, and will show if you have any modules.

If the "rm" command works, that will remove the modules.

Can you boot using fastboot:

fastboot boot unpatched-boot-image

?

If that works, you could try again, this time using a magisk-patched-boot-image.

And just to settle any question of corruption during transfer, compare the MD5 of the unpatched image on your PC and on your phone. And compare the MD5 of the magisk-patched-image in both places.
[Magisk] zgfg:
As @pndwal answered you, maybe a problem with the Magisk veesion vs. version for which the module was developped

Usually modules require a Magisk version greater than something, but at that time cannot anticipate if Magisk (API) would change in future and would it really keep working

Unzip the module's installation package and open the textual (!) file:

META-INF/com/google/update-binary

(you can do all that directly on the phone with MiXplorer, by tapping to the module's zip file to open it, then go through the folders and Open file as Text)

Search inside for:

$MAGISK_VER_CODE

to find something like:

[ $MAGISK_VER_CODE -gt 18100 ]

return $?

or:

[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk

From there you can deduct that module was written at the times of Magisk v18100 or v20400, and you can try then with that older Magisk version (that is another story how to obtain, might be tricky specially with the older Magisk versions, there were posts here about, again by e.g. @pndwal)
[Magisk] zgfg:
Answered you through Conversations (PM) but you could (also) take in GDrive Copy link (to the given file or folder) - screenshot, and only those who will have the link (long and 'random' like) would have access to

Like:

Google Drive: Sign-in

Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use).

drive.google.com

Then no mail address is needed
[Magisk] RicardoCarv:
As far as I've seen, nothing like that

When things are working, it's at 100%

I just can't get them all to work at the same time

I wanted to try 21.4 and go downgrading, trying to get it to work

But, I don't have custom recovery and haven't been able to figure out how to do it without...
[Magisk] RicardoCarv:
they all ask for 20.4+
[Magisk] zgfg:
You're on 22.1 - certain changes were introduced, maybe they will work better with older ones (although I have v23, even Alpha now and in my previous post I copied from two of the modules I use that required even > v18.

It all depends how module works (it could be also up to Android/ROM version)
[Magisk] RicardoCarv:
As I've said, the modules work fine on their own

Making more experiences, I've found that enabling hosts module is what gives me the root prompts (at the expense of the rest of the modules, except for xposed (dalvik), I think)

Even reflashing, for a "cleaning", won't give the prompts. Can't see any of that in the logs and there isn't a "request denied". It just waits forever for it.

Is there a keyword I can use, to search for "root requests", at the log?
[Magisk] zgfg:
That's the tricky part. In the good old days (up to around v20 or so), use of Custom update channel worked reliably - you correctly set the Custom channel to particular, older, Magisk version, and when you patch, it will patch the img with the requested Magisk version

From then on, json files do not include proper URLs (except for the Changelog) and Magisk app includes the hardcoded link to the latest Magisk (Stable, Beta or Canary). Even if you adapted the json to include the full URL, I don't recall did I got it patching with the requested version or it again used the latest. You can try (once it boots to Magisk, you can read what is the installed version)
[Magisk] zgfg:
With A8 (even A10 on some phones) or older A versions, you don't need (try without) Systemless hosts for AdAway. Although, if hosts file is too big, AdAway will fail to write it to /system/etc/hosts

You can check with root explorer (like MiXplorer) how the /system/etc/hosts look like
[Magisk] 73sydney:
what modules are you using?..i havent seen where youve mentioned them?

I have modules that are outdated in the repo, but that were modded to work for later versions, and posted in threads (Swap Torpedo is one that springs to mind for A11) sometimes its just necessary to change a line here or there
[Magisk] RicardoCarv:
I didn't.... Only by seeing the logs

Right now,

Debloater and App Systemizer by veez21

Busybox for NDK

and Xposed Framework (Dalvik)
[Magisk] RicardoCarv:
It's not like I'm using it

It's just that it seems to be the only thing that gives the prompts

Which is actually very strange......
[Magisk] 73sydney:
Gave up on awful Adaway years ago, i use a proper hosts file around 40Mb (across all my devices), and useless AdAway things chokes on hosts about 1/4 of that.

I switched to using dnscrypt proxy, first manually from their site, then via the module in the repo (until they made it harder by requiring you to use a separate DNS changing app to toggle it on and off (usually AFWall which wasnt terribly reliable, leaving you with broken connectivity - i havent run AFWall in years either because it has issues too) - earlier versions were scripted to use iptables rules at startup (bit of course allowlist/blocklist updates meant you had to go into terminal to restart the service and it could get janky) - i got bored of playing catch up with editing the module every release), and then when someone came along and made an app wrapper that makes that whole mess easier to manage i switched to that

InviZible – Main

InviZible – Main

invizible.net

Lite version available to test

It does TOR and I2P, but i never use those modules...

It does suck that recent Android or app changes mean that i couldnt seem to easily point the file paths in the config file (dnscrypt-proxy.toml) to /sdcard/dnscypt-proxy and make updating the blocklists (domain and ip) and viewing logs easy peasy, instead its into /data/data/pan.alexander.tordnscrypt/app_data/dnscrypt-proxy to do those things. Its to the point ill probably go back to making my own module for it, to use iptables again and script a sync with that path and /sdcard/dnscrypt-proxy to make life easier

But yeah, i wouldnt swap that for AdAway for any amount of money :)

Edit/Update:

Here you go, this is like the original dnscrypt-proxy magisk module where the DNS redirection is done via iptables, no AFWall or DNS changer needed.....seems to be maintained too, And apparently is pathed to /sdcard like the old version for easy blocklist/allowlist updating and log viewing.

Im switching to this to test

dnscrypt-proxy-android

Hardened dnscrypt-proxy module for Android.

git.nixnet.services
[Magisk] droidmate:
From where I can download the Zip file for TWRP flash? I am unable to flash the latest Magisk from Magisk Manager. Getting the error when doing direct flash: Insufficient Partition size
[Magisk] zgfg:
Just rename Magisk apk file to zip. It's described in Changelog (and elswhere).

Renamed to uninstall.zip is for uninstallation also through TWRP
[Magisk] pndwal:
Well, some modules do conflict with others, especially those with similar functions / overlaying same system files etc...

Just in case you still want to try this on pre new single package delivery builds (ie. pre 22.0 for public builds), here is method for using patch method (or direct install) with legacy public releases (stable / beta) of Magisk (using custom channel):

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

Notes, incl. why this doesn't work (this simply) for debug Canary builds:

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

Nb. Be sure to unhide / Restore the Magisk app (from settings) or uninstall it entirely before up/downgrading to avoid conflicts / multiple Manager / Apps.

Nb.2. From 22.0, you only need to install App with required Magisk version, then click Install Magisk to downgrade. App and Magisk (mask) now use same version designation and Magisk (mask) installed is entirely dependent on current App build.

https://topjohnwu.github.io/Magisk/releases/22000.html

Hope it helps. PW