yashsingh1/xdaforums huggingface dataset:
[Magisk] Qavra:
Yeah sorry about that. So my phone is a redmi note 10 pro (sweet), the custom rom im using is cherish os 4.1 (A13). A manual installation of magisk is when you patch the boot image with magisk yourself, and flash it, when you install magisk with a custom recovery, it does everything for you, thats why i said manual, as you have to do everything, and its the recommended way of installing magisk. As of upgrading rom while already having magisk and some modules, i didn't do that. Lets pretend i've just clean flashed a new rom, then i proceed to install magisk, and after installing it, if i either flash a zip or a custom kernel or something else with the recovery (orange fox) or if i flash a module in magisk app, i reboot my phone and thats when my phone enter that bootloop like phase, and require a clean flash. I tried with an other custom rom, corvus, which is based on Android 12, but my phone also get in that bootloop like phase if i try to flash something. So i think it dosent matter which rom or Android version im on. Same for magisk, i tried multiple versions, v25.2/v25.1/v25.0/v24.3, always the same result. It might come from the modules, but i always download them from their github pages. Tell me if you need to know something else.
[Magisk] pndwal:
Have you checked if Play Integrity deviceIntegrity is passing since S/N API is deprecated and banks are migrating to PI API? PW
[Magisk] Prof_Shekhar:
@pndwal Thanks mate. Will check and get back.
[Magisk] zgfg:
Ok, so Xiaomi with Android 12

Writing this from Xiaomi Mi 11 Lite 5G NE, running Xiaomi.eu (hence MIUI 13, although not stock), A12

Having also Orange Fox (but not official OF, currently the only custom Recovery working with A12 on my device)

And of course rooted - (always) latest Canary (now) 25205

And running tones of Magisk modules, incl. LSPosed and three its modules

Not a bootloop, everything works smoothly

I'm not running a custom Kernel

---

Does Magisk properly install with you if you patch the original boot.img and then, you do not flash the custom Kernel

If so, then there is probably a conflict when you additionally install a Kernel

You could try the following:

- Install the custom Kernel first, prior to Magisk

- From OF make a backup of boot.img

- Then patch by Magisk that backed-up boot.emmc.win and flash back to Boot

Also, I can't believe that every module causes you bootloop.

Like, you need USNF, maybe Shamiko - cannot believe they will cause bootloops (they don't for any of us).

Try one by one and detect which

---

Btw, does your device have separated Recovery and Boot or is the Recovery integrated to Ramdisk and into Boot?
[Magisk] pndwal:
... Further to post above,

Check:

Definitely have patched boot.img matched to each ROM you tried? (Rookie mistake is to flash same patched image after a ROM uodate...)

Are you flashing Magisk modules in Magisk App?; Nb. Many (not all) are incompatible w/ recovery flashing, and custom recoveries are generally not yet compatible with A12+...

Does the issue occur with no mods flashed via recovery installed appart from ROM itself? PW
[Magisk] Nekromantik:
not sure if offtopic but looks like due to Googles changes to kernel we need updated magiskboot for AK3

anyone know if dev is aware of this?
[Magisk] Qavra:
Hi, i come back to you after trying that boot.img patch method (backing up the stock boot.img and patching it in magisk), so it worked quite well the first time, i was able to install a bunch of modules (bootloop protector, safetynet fix, lsposed and 9 lsposed modules) but while i was enabling an lsposed module (macsposed), my phone bootlooped. So i did everything again (clean flash the rom, installing magisk) and i've proceed to install bootloop protector, no problem, and after that safetynet fix, and my phone bootlooped. That issue is really unpredictable. Maybe the next time it happens, i can try flashing an Android 12/12L rom (project élixir i think), i've heard that Android 12 was more stable for rooting. And btw my phone have an Android 13 based rom ! Cherish Os 4.1 Android 13.

Oh yes and for the question you asked lastly in your reply, im not sure. i think that everything is separated. how can i tell exactly if the recovery and boot are separated? In the rom's zip, i see a boot.img file, vbmeta.img file, so those 2 are indeed separated, but i think the recovery might be integrated to the boot.img file and/or ramdisk. Correct me if im wrong. And the reason of bringing vbmeta in this reply is, before installing magisk, we have to figure out if the vbmeta partition is separated or not, if its not the case, we have to patch it before patching the boot.img file. In my case, as i see a vbmeta.img file in the rom's zip, it means that vbmeta is separated, so it dosen't require a patch, so i skip it. And again, correct me if im wrong.
[Magisk] Qavra:
And im not running a custom kernel too, i tried vantom kernel once, but i havent noticed big improvment, if not any improvment at all, so im just running the stock kernel that comes with the rom.
[Magisk] Qavra:
Hi, thank you for replying and trying to help me, i appreciate it. yes im patching the boot.img file that comes with the rom.

Im indeed flashing magisk's modules in magisk app, so no problem here.

And lastly, it occures if i flash anything in my phone after installing magisk, it can be either a magisk module i flash in magisk app, or a zip i flash using orange fox. If i dont flash anything, it works smoothly.
[Magisk] zgfg:
There are various ways to check if your device does have Recovery as a separated partition or is it integrated into Boot, eg:

- Find, download and unpack your stock MIUI installation fastboot/tgz file for your phone.

It will have boot.img (and many other IMG files)

If it also includes recovery.img then for sure Recovery is a separated partition.

If not - then Recovery is integrated to Boot (or you are have not correctly unpacked/not correctly checked the content)

Checking the custom ROM installation zip might not be relevant bcs custom ROM developers expect users to first install custom recovery themselves - to be able to install the custom ROM zip, hence there might be no point of flashing that custom recovery again from the custom ROM zip installation file

- If TWRP (Orange Fox, other custom recoveries) can be installed by:

fastboot flash recovery <IMG file>

Then Recovery is separated partition.

If Fastboot complains that Recovery partition is unknown - then not

- In TWRP (OF), Backup, list of partitions for backing up, if Recovery is locked or not

- Use root explorer (like MiXPlorer) and check the content of (it will show all partitions)

/dev/block/bootdevice/by-name/​

Does it contain recovery (recovery_a, recovery_b) or not

Or use Terminal app and run:

su

ls /dev/block/bootdevice/by-name/ | grep recovery

If you are not familiar with Terminal app, you should be with adb (some knowledge expected from ppl going for Magisk👍) and rewrite yourself how to execute for the same result with adb
[Magisk] zgfg:
Don't know for your macsposed, but might be not compatible with your ROM, with new Magisk, who knows

Btw, for LSPosed and with the Magisk (from TJW - not talking about the Magisk forks like Alpha, Delta...) you should be using zygisk-lsposed Magisk module (not riru-lsposed, not some other old XPosed), as from:

Releases · LSPosed/LSPosed

LSPosed Framework. Contribute to LSPosed/LSPosed development by creating an account on GitHub.

github.com
[Magisk] zgfg:
Finally few more comments:

'Clean' installation of your ROM, may or may not (it depends how devs of custom ROM writer commands into the zip file) include wiping Data.

It reflashes system partitions but if your old /data/adb folder was not wiped, then when you next time install and boot with Magisk, Magisk finds and initializes all the previously installed modules, and if some of them was a culprit, it will bootloop

About vbmeta - don't know for your particular device, but for my Xiaomi (and many other models), there is no need to bother with vbmeta when installing Magisk (although I also have separated vbmeta partition - and yes, I know what is written on the Magisk GitHub)
[Magisk] Qavra:
After checking the stock miui rom zip file, as well as in orange fox, i can tell you that the recovery (as well as boot and vbmeta) indeed have a separated partition, recovery.img does appear in the stock rom's zip, and in orange fox (backup section). Also when im flashing a recovery, i use "fastboot flash recovery recovery.img" command. What should i do now ?
[Magisk] Qavra:
I only use lsposed zygisk
[Magisk] Qavra:
I wipe data, dalvik, and cache before flashing the rom, then i flash the rom, and after flashing it to the phone, i format data. But that bootloop like phase still occures after correctly installing magisk, if i flash something.
[Magisk] zgfg:
Nothing special. I was curious (some new devices do have Recovery integrated to Boot, like mine - and when you patch custom recovery, Magisk, Kernel - there might be problems if some installation does not handle things correctly)
[Magisk] zgfg:
/data/dalwik-cache

/data/cache

Are different directories than

/data/adb

When you want to make clean Magisk installation upon dirty-flashing the ROM, use TWRP/OF, navigate to /data/adb and remove that folder

PS: But if you Format or Wipe Data (I overlooked your statement), then it was already cleaned
[Magisk] Zibri:
You are very welcome. I also found it very amusing.
[Magisk] gorilla p:
Forgive me if this a dumb question, but here it is...

I just got the Pixel7.

The unique thing that I've seen with the Pixel7 is that it is not the boot.img that needs to be patched but rather initboot.img

I'm rooted and attempting to install the latest OTA.

Typically to resolve this issue, I

1 - select Uninstall Magisk/Restore Image.

2 - Install OTA update

3 - reinstall Magisk again and select "flash to inactive slot" prior to reboot.

The Uninstall/image restore in Magisk is not removing Magisk as it still shows installed and the update still fails.

I'm wondering if it is restoring the boot.img, when it is the initboot.img that has been modified.

I could be wrong, just thought I'd ask if this is a possibility given that this is a new device.
[Magisk] pndwal:
So you're using method to retain root for A/B devices:

https://github.com/topjohnwu/Magisk/blob/master/docs/ota.md#devices-with-ab-partitions

vvb2060 recommended patching initboot.img since it works as it contains the main ramdisk... (I guess you could keep this setup but may not be able to use that method: I believe you'll need to restore unpatched images, take OTA, then obtain new initboot.img and patch and flash this from PC...)

However we also have this fix:

Support GKIs without ramdisk …

Fix #5819

topjohnwu committed on 12 May

With this compression method fix Magisk's manually added basic ramdisk in boot image w/ Magiskinit injected can work instead of vendor_boot ramdisk in Pixel 6 series devices (main ramdisk was moved here for GKI compatibility in A13 for p6 series) as other vendor ramdisks can now be merged with the new ramdisk in boot.img...

I'm wondering, do we have a boot.img file any longer in Pixel 7?

If so it may be possible to make a manually added ramdisk work in boot.img again if it doesn't currently...

Then again, the architecture may have changed considerably w/ P7+... PW
[Magisk] 73sydney:
It looks like you leave the boot.img well alone on 7

https://xdaforums.com/t/unlock-boot...gain-all-relevant-links.4502805/post-87579229

This is interesting to see, even though i left Pixel...

At the top of the thread:

https://xdaforums.com/t/unlock-boot...gain-all-relevant-links.4502805/post-87540337

and the following post....#2 for first time rooting and updating procedures

If only Google made decent hardware (i left after my 2XL, havent yet seen enough of the 7 series to know if id go back - there are some issues already noted)...they make the software side of things pretty damn straight forward
[Magisk] pndwal:
Just found the same thread linked from TG Alpha discussion!... Been flicking through first 7 posts... Recommend any Pixel 7 series owners do the same...

https://xdaforums.com/t/unlock-boot...net-working-again-all-relevant-links.4502805/

👍 👀 PW
[Magisk] 73sydney:
Its pretty dense, but worthwhile, presented well too.

Not nearly as wordy as my infamously wordy GPay Module post :)

I could teach that moderator a thing or two :)
[Magisk] gorilla p:
OK, Im glad it wasnt just a stupid question.

Also, just FYI, I initially patched boot.img and booted at first. It showed magisk active in ramdisk, but N/A in app. It had no other effect. I restored stock once I found the correct instructions.

I will try the other method presented. Perhaps Magisk could now check initboot for magisk patching as well as boot?
[Magisk] pndwal:
Think you mean Admin?

... Funny, cos the same thoughts just crossed my mind... Only cos I saw this:

Wadoya know?... They're missin ya there too!.. But nobody mentioned ya name!! 😜 PW

Is that a platypus teddy bear?
[Magisk] 73sydney:
i love that they quoted the repo README and the headstone got an airing
[Magisk] pndwal:
All methods incl. vv's are only 5 days old...

I'd watch this space... and hold my breath... PW
[Magisk] Qavra:
Dude, i have finally found what was the cause of these bootloops, you wont believe me !
[Magisk] J.Michael:
Are you waiting for someone to ask? OK,

What was the cause?
[Magisk] J.Michael:
I don't think there is any "active in ramdisk".

The note on the Magisk Manager app display, "Ramdisk: Yes" means the original (at least, before the first time it was patched) boot image already had *a* ramdisk.

You just didn't install Magisk. Yet.

In general, Magisk doesn't "check", you tell it to patch a file, and you tell it which file to patch.

(Samsung is a special case, where partition images are bundled into a tar file, you "patch" the tar file, and Magisk magically decides which partition images to modify.)
[Magisk] m0han:
maybe he is collating all the information.
[Magisk] zgfg:
So, what?
[Magisk] Qavra:
It was greenify... That f*ing app haven't been updated in ages, and the last time it got updated, Android 9 or 10 was the latest Android version. So i've been stuck for a while, thinking that magisk or the roms i've tested where the issue, but it was in fact greenify (im a newbie in rooting). i hate my life..
[Magisk] zgfg:
I use AirFrozen v1.6.2

Seems it was removed from Playstore and on XDA and GitHub there are older versions, like v1.2.8

I have the installation APK:

AirFrozen Disabler ROOT_v1.6.2_apkpure.com

By name, you should be able to find on apkpure
[Magisk] 73sydney:
Greenify was great in its day, i bougth a Pro license, But it had diminishing returns from Android 7 onwards...Android grew up a lot

Its like theres still people using "task managers" in 2022.....
[Magisk] 73sydney:
Hail on F-Droid is also worth a crack

Hail | F-Droid - Free and Open Source Android App Repository

Freeze Android apps

f-droid.org
[Magisk] BostonDan:
Anyone else find that magisk (canary) 25205 will not allow you to "hide" the app under a new name? When I try, I change the name and an icon is created. I am then told that root was lost. When I restore the magisk app, it shows no root. When I delete the renamed app from the phone and reboot, I still have root and the original Magisk app available.

Cheers,

B.D.
[Magisk] martyfender:
This sound like the classic, two magisk apps installed at the same time, one hidden and one not hidden. With the hidden app installed, look to see if you also have the magisk app and uninstall it.
[Magisk] badabing2003:
Ah greenify,

I got burnt by it too, except it was not a bootloop, but rather crashes / freezes / reboots , phone getting hot

You can read all about it here.
[Magisk] pndwal:
If it's failing to recognise and uninstall full app when stub is installed, yes, it's a common issue... Some advice here:

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

User @darkknight1995 made a proper issue here:

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

... It's still open... PW
[Magisk] asripath:
Had similar issue on custom A13 rom...unable to hide...root was lost and the hidden magisk app was created... all happened...while multiple messages kept popping up on screen...magisk works fine after all that...so hopefully no issues unknown
[Magisk] 73sydney:
On more than one occasion lately, even aside from fooling about on A13 GSI's testing, even on stock ROM, ive had issues with hiding magisk, i think i mentioned this recently?, so for the hiding part now i enable Automatic Response to Grant and then hide, then toggle back to Prompt afterwards. This completely negates the issue.....

special wave to B.D., he knows why....(inspiring that horrible magisk module, that i finally killed off)
[Magisk] BostonDan:
Sydney,

Always good to see your responses and you. Got my Magisk hidden by hiding it which resulted in root being lost. I then deleted the original Magisk app and rebooted and all was good again.

Appreciate the comments from everyone for the information provided.

Cheers,

B.D.
[Magisk] DoR3M3:
Regarding the Install instructions;

Installation

The Magic Mask for Android

topjohnwu.github.io

For flashing, why is Recovery listed? I use TWRP, and I've always assumed for Magisk you only flash a boot image?

So when I saw the commands listed on the Install section, I guess at the moment I'm not understanding flashing to recovery?

Flash the patched boot/recovery image to your device.

For most devices, reboot into fastboot mode and flash with command:

fastboot flash boot /path/to/magisk_patched.img or

fastboot flash recovery /path/to/magisk_patched.img
[Magisk] J.Michael:
Magisk installs itself into the ramdisk/initrd of the boot image. Some devices came out with no ramdisk in the boot image. Wu responded by installing Magisk into the ramdisk of the recovery image, which on those devices, had a ramdisk.

More recently, Wu made Magisk capable of adding a ramdisk when there wasn't already one. And some of those devices with no ramdisk will use the ramdisk he puts there. So fewer devices require that Magisk be installed in recovery. But the option is still there.
[Magisk] bnsmb:
The directories and files in /data/adb used by Magisk are not created automatically after the installation of the Magisk App. They will be created after instalilng the magisk files into an image of the boot partition via the install button in the App.

Is there a way to create these directories and files automatically? Either during the installation of the apk or e.g. by a command in an adb shell (so that I can script this)

Bernd
[Magisk] zgfg:
No, apk cannot create/write to /data/adb without the root

App is not Magisk/root, just like a manager (its old name)

Generally, without root you cannot write there - you have no permissions

Hence only when you boot with the patched img (it will create by itself) or by flashing Magisk through TWRP (if applicable to your device)
[Magisk] bnsmb:
My goal is to install Magisk via script without any user interaction into the current boot partition.

In principle it works already very well using these commands on my PC running Linux:

- install the Magisk Apk via adb shell

cat Magisk-25.1_25100.apk | adb shell pm install -S 11229118

- reboot the phone from the TWRP image

adb reboot bootloader

sudo fastboot boot /data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-0-I006D.img

- install Magisk into the boot partition via script (the script will connect via adb shell and use the Magisk script boot_patch.sh)

./install_magisk_via_twrp.sh

The script install_magisk_via_twrp.sh is documented here:

https://xdaforums.com/t/how-to-install-magisk-into-the-boot-partition-using-a-script.4456621/

But that method only works if I execute the Magisk App one time manually on the phone to install Magisk into a boot partition image to get the necessary directories and files in /data/adb that are required by my script..

So I would like to create these directories and files in /data/adb via some script commands in an adb shell as user root while booted from the TWRP image.

I could do this manually but I prefer some kind of "Official" method to be sure it will also work with the next version of Magisk .

regards

Bernd
[Magisk] zgfg:
Btw, you can find boot_patch.sh if you rename Magisk.apk to zip, unzip and in the assets folder. And you can execute the script without having the Magisk installed (Magisk app does that before the phone is rooted, when patching the boot img)

There is a similar tool, with the similar concept:

📳🔥 PixelFlasher, a GUI tool for flashing / updating / rooting / managing Pixel phones.

DESCRIPTION As the name suggests this is an application to flash (update) Pixel™ phones (possibly all Google™ made phones/tablets, YMMV.) PixelFlasher at its core is a UI layer (with bells and whistles) on top of adb / fastboot commands, hence...

xdaforums.com

It was also discussed here, maybe two or three weeks ago
[Magisk] bnsmb:
ok, but boot_patch.sh needs magiskboot and magisk64 also. Will think about that.

Thanks for the hint -- I did not know that

regards

Bernd
[Magisk] zgfg:
You can check how that tool works. It was discussed here Oct 4-5 with the author, he uses adb to run the patch script from /data/local/tmp

And see the follow-up/conclusion/confirmation in the Pixel Flasher thread, that post:

https://xdaforums.com/t/pixelflashe...g-managing-pixel-phones.4415453/post-87501935
[Magisk] m0han:
I see your participation in that thread (gui-tool-for-flashing-updating-rooting-managing-pixel-phones). Do you have a Pixel phone? Or are you using that app on other phones as well? Just curious ;).
[Magisk] zgfg:
I have no Pixel, but the tool is interesting and could be applied (with potential adaptations) to the other phones
[Magisk] pndwal:
🤔 do you mean use app to flash /boot here?

We can delete all contents of this directory and Magisk daemon with reconstruct it; the daemon is what first sets up /data/adb configuration files initially even if Magisk App is not installed... Magisk App may be making changes to this needed by your script when first run however...

I believe Magisk is useable (many services are available thru CLI) without ever setting up the App... Please correct me if I'm wrong...

🙂 PW
[Magisk] bnsmb:
>> do you mean use app to flash /boot here?

Installing the Magisk app will not create the directories and files in /data/adb . This dirs will be created by Magisk after installing Magisk into an image of the boot partition via the Install button in the GUI.

>>We can delete all contents of this directory and Magisk daemon with reconstruct it; the daemon is what first sets >>up /data/adb configuration files initially even if Magisk App is not installed

sure?

>>I believe Magisk is useable (many services are available thru CLI) without ever setting up the App... Please >>correct me if I'm wrong...

Hmm, not sure about that. I will try that later again on my develop phone

regards

Bernd
[Magisk] pndwal:
Yes, I understand this, which is why the statement confused me... Guess you didn't actually mean simply running the App...

...so seems you mean take Magisk Install, Direct Install(?)... If so, you do mean flashing... However /data/adb initial configuration occurs on next boot, and will also occur then with previous Magisk binary also (Magisk root must already be present for 'installation through GUI' to occur anyway), if the directory has been wiped...

Quite sure...

Users can fix broken magisk.db and messed up module configs etc, or simply effectively gain clean Magisk installation by doing this anytime... No need to uninstall/reinstall Magisk...

I'm not 100% sure if App never needs to be run either simply because I've never tested this... I do know it can be uninstalled and Magisk still functions fine w/ options to install or remove modules, configure denylist etc etc from CLI...

🙂👍 PW