yashsingh1/xdaforums huggingface dataset:
[Magisk] ipdev:
Have issues on Pixel C.

Running LineageOS 18.1, the direct install option is still broken.

I made note of my install and update for lineage 18.1 in that thread.

xda thread - Post 2,317 - Link

I am currently on the last Google stock for Pixel C.

ryu-opm8.190605.005 Android 8.1 (SDK27)

Magisk issues with Google stock.

Direct patch does not work.

Patch file option works.

fastboot boot magisk_patched.img bootloops into recovery.

fastboot flash boot magisk_patched.img will boot.

[*]After magisk is installed, TWRP can not decrypt data.

See EDIT​

Booting the stock boot image will bootloop into recovery.

Flashing the stock boot image will bootloop into recovery.

A quick test of canary 22005 still had issues.

Some log files from canary 22004.

TWRP recovery log of canary 22004 install, adb logcat while trying to use the Direct install method, magisk_log of using the Patch File option.

The stock and lineage 18.1 boot images.

GoogleDrive - Link

This afternoon I will test canary 22005 and see if all the problems still exist on stock Google.

Pixel C is not the fastest and has a thirty second orange boot delay so, it takes a little longer testing.

No option to double tap the power button :(

Hope it helps.

Cheers. :cowboy:

EDIT:

TWRP can not decrypt data on stock Google Android 8.1.

TWRP can still install magisk as a zip.

Using the adb sideload option

Using adb to push the magisk zip file to /tmp and then using TWRP's install option.​
[Magisk] osm0sis:
😛

/dev/BOOT is known (usually) not an actual boot partition, hence nanddump failing.

I had originally fixed this back here: https://github.com/topjohnwu/Magisk/commit/2aede97754fec67d393bde0c7725ed84d8c3c112

So not sure if we're looking at some kind of a regression, or just a further edge case.

@io2345 what's the actual, correct location of your boot partition? Please give me the output of `ls -alR /dev`
[Magisk] io2345:
@osm0sis

Thank you for having an eye on that.

Did the "ls" twice, first from a TWRP-terminal in recovery, second from a terminal while phone is "up and running".
[Magisk] sinopw:
hi I want to build a magisk module to place my customized ifw.xml into /data/system/ifw systemlessly.

but it seems that i can just modify /system/* systemlessly by placing customized file into $modid/system.

to modify files in /data,i should write a shell script to realize it?i tried customize.sh with following contents

"

SKIPUNZIP=1

SATH=`dirname $0`

IATH=/data/system/ifw

cp -r $SATH/xml/* $IATH

".

but it is not systemlessly.btw service.sh excuted after every boot,customize excuted only after module flashed,am i right?
[Magisk] osm0sis:
Looks like you have /dev/bootimg as your real partition location and it is still higher in the list in util_functions.sh like how I fixed it in the linked commit, so this is definitely a regression from some other recent change to Magisk.. sigh, I'll look into it. 🤔😕
[Magisk] Msprg:
Hi guys, I got a build for you! (canary 22005) But use it only if @osm0sis approves, okay?

app-debug.zip

drive.google.com

(couldn't attach it to the message, hope mods won't take it down or something...)
[Magisk] zgfg:
Not customize.sh but service.sh or post-fs-data.sh, see:

Developer Guides

The Magic Mask for Android

topjohnwu.github.io

and scroll to Boot scripts chapter

In the script, use

mount -o bind ...

not cp

Install Vanced Manager, use it to install Vanced YT root and check how it dynamically mounts Vanced base.apk over the YouTube base.apk in /data/app
[Magisk] xunholyx:
Will it not FC when installing modules on Android 12? I'm having issues with that with my Pixel 5. About to revert to stable 22 to see if that works with 12. Pinging you @osm0sis

Looking to try to get this sh*t fixed for a bit now. I've been using my P2XL until I can get this figured out. Nothing but problems.

@Msprg, sorry for hijacking your post

EDIT: Already on 22005. No it doesn't fix it, but it may cause it.
[Magisk] osm0sis:
Module flashing broke in 22005, no idea why personally, but it's a pretty big regression so I'm sure @topjohnwu will get to it shortly.

As for the nand device regression, turns out it was much larger than that, and probably affected all the A-only devices with weird partition naming. Fixes incoming: https://github.com/topjohnwu/Magisk/pull/4075

Thanks to @Msprg for the help testing out my hypothesis for the fix. :)
[Magisk] pndwal:
Support was added for this w/ 21.1

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

This commit:

https://github.com/topjohnwu/Magisk/commit/ade1597e03788ab24651872b8f7c8184f912d072

You may also need this fix when/if merged:

https://github.com/topjohnwu/Magisk/pull/4056 PW
[Magisk] xunholyx:
Thank you sir for confirming that it's just not me lol. I was going nuts trying to root my P5. I'll just revert to 22 stable for now like I planned to (but don't have time to this weekend). Cheers from the other coast in Canada.
[Magisk] sinopw:
sincerely grateful !
[Magisk] BlueShanka:
I'm unable to patch any boot/recovery .img after an OTA update.

EDIT: Nevermind, I needed to go into the LineageOS Recovery -> Update -> ADB.

then run 'adb sideload magisk.zip' in cmd.

I'm running Lineage 17.1 (16, March, 2021 nightly build) on a Pixel 3a. I updated from an earlier one, DEC 2020, where I previously had Magisk installed and running smoothly. I did disable all modules I used before the update installed and rebooted, but definitely forgot a step.

I have tried both the recovery.img from the link, as well as boot.img I pulled from the payload inside the .zip, using Python and Payload_Dumper on my pc.

In Magisk manager, when I select one of the .img files to be patched, nothing happens. (see screenshot). My phone does seem to be reading the .img as .bin, is that normal?

Any help greatly appreciated. Unsure if I need to uninstall magisk and reinstall, or if there's something wrong with the files...

Thanks!
[Magisk] io2345:
@Didgeridoohan : Just found, that the link in the above mentioned description is no longer valid (Patch). Do you have more details about that?
[Magisk] Didgeridoohan:
Thank you for letting me know. I think I've tracked down the correct URL now and updated the wiki. Check again.
[Magisk] fdl_chris:
Device: Huawei Nexus 6P

OS: Lineage OS 15.1

Current Magisk version installed: 22.0

Hi al,

I have Magisk (+ app) 22.0 currently installed and it's been working fine, without issue. I use Magisk Hide and rename the app to add that bit of extra obfuscation.

This morning I noticed that one of my apps which Magisk is hidden from, complained about being rooted. I checked to find all similar apps were complaining of being rooted. I haven't changed any settings on my device as I've not been bothered to tinker for some time.

I suspected perhaps there was an issue with Magisk Hide, so I disabled Magisk Hide and removed the renaming of the app (so it appears as Magisk). I checked to see if there was any further update, but I'm already on the latest version. I did try to update anyway, but obviously nothing happens when trying to proceed with direct install method.

I rebooted the device, with the intention of re-enabling Magisk Hide and renaming the app again.

However, my device will no longer boot into the OS. With a short power button press, I receive a black screen. A long power press, sends me to the Android bootloader. Choosing 'Start' does nothing but a black screen.

I can boot into 'Recovery mode' which sends me to TWRP 3.3.1-0.

I was going to put Magisk 22.0 .ZIP on a USB, and install via USB OTG within TWRP but thought I should consult here first.
[Magisk] Marotte:
Hi,

I had Magisk installed and my phone rooted. For this I took the boot.img file the phone manufacturer sent me (in an archive with some other files), and patched it using the Magisk Manager app. After this, I flashed this patched image back to the boot partition (using fastboot).

It was working fine, I had root access, but today an Android update took place. It went fine (I guess) but the phone is no more rooted.

I can’t figure what to do to get root access back. I guess that if I do the exact same process it would downgrade my system (as the boot.img file the manufacturer sent me is not up-to-date), and I would have to re-configure all the phone again, re-install apps, etc… anyway?

How can I have an updated boot.img I could patch with Magisk? Can’t I generate this file from the device itself? For example with a dd command in an ADB shell or something like that?

Or am I forced to run an outdated version of Android if I want it rooted? Unless the manufacturer is able to send me an updated files set for my phone? (where I would find an updated boot.img I could patch like I did the first time?)

The phone is a Doogee S96Pro (the real manufacturer’s name seems to be "Mediatek"). Their support provides me those files when I asked : https://onedrive.live.com/?authkey=!AKAIyxSQvJdj7B4&id=7525A55C0028FDF5!2227&cid=7525A55C0028FDF5

I just realize there is only one archive left, the "EEA" (v3.02), but some time ago I also had an archive named "S9S88A7.DGE.DOOGEE.HB.HJ.AYYDVFAZ.1203.V3.04.zip" (and this was from this one I took the boot.img file to patch).

More globally I wonder if/how I can use the recovery partition (like with TWRP?). I know I can flash the recovery partition the same way I flash the boot partition, and I know how to tell the phone to boot on it, but I don’t understand how it works to be honest. I think I tested a "twrp.img" file I found, flashing it onto the recovery partition but it was unable to boot.

I also have a "vbmeta" partition (I don’t remember if I flashed it or not…) and three image files : vbmeta.img, vbmeta_vendor.img and vbmeta_system.img. What are these files for? What’s the difference?

Last question about boot/recovery image files : If I’m unable to boot the phone with "fastboot boot foo.img" I should never flash this foo.img to the boot nor the recovery partition, right? So if I find a TWRP image I can use for the recovery partition, I should be able to boot the phone with "fastboot boot twrp.img" to test the image before flashing it onto the recovery partition?

I hope someone will have the time to help the Android newbie I am… Have a nice day,

Stéphane.
[Magisk] fdl_chris:
Fixed this on the first attempt.

1. Copied the lineageOS ROM .zip to a USB drive.

2. Extracted the boot.img from the .zip.

3. Booted into TWRP, wiped the Dalvik Cache and regular Cache.

4. Selected 'Install' and 'Install Images'.

5. Selected the boot.img. Checked only the 'boot' option.

6. Rebooted and everything is back as it was.

7. Re-install Magisk.
[Magisk] Marotte:
OK… so reply to myself… I didn’t manage to wait for an answer before testing something :)

So, I flashed back my previously patched boot.img on the boot partition. It didn’t erase my data. It seems that flashing the boot partition doesn’t imply to erase all the data…

After I flashed the boot partition the device was booting in a loop endlessly. I had to "fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img", and then it would boot again.

Anyway the Android system has been downgraded. I can tell because it proposes me to update Android (I cancelled it this time, because doing it would un-root the phone).

The “fun” fact is that it tells the current version is "0128.V3.03", but the archive the boot.img comes from is labelled "1203.V3.04" ?!

So the question now is : is it possible to get the Android updates while keeping the phone rooted? And if this is the case : how?
[Magisk] Marotte:
I found this : https://www.thecustomdroid.com/install-ota-update-rooted-android-device-guide/ but it seems outdated. I don’t have an option to install Magisk "on a second slot". It also says that the device needs to be unrooted before doing the OTA update, but I don‘t have this problem, the OTA update is done, then the phone reboot then is no more rooted. So I don’t think I can follow this procedure to achieve the OTA update.
[Magisk] pndwal:
Yes, seems only A/B devices can do this, but there are recent Google changes causing issues. Must Unroot, but by making needed changes BEFORE rebooting, Magisk can be preserved. Some report still being able to use this method, but others (incl. non A/B) will have to un-root / re-root. Official OTA procedure:

https://github.com/topjohnwu/Magisk/blob/master/docs/ota.md

I'll post a method you can try for updated ROM without package / boot image from archive shortly. PW
[Magisk] zgfg:
Boot is Boot partition, Data is Data, hence flashing one does not erase the other. Like flashing System would not erase the first two

How to do OTA update over the root highly depends on the manufacturer. Usually, you must have stock Recovery, but some also 'brick' if OTA is applied over the rooted Boot partition

You said you rooted before OTA by flashing the stock Boot. You simply had to flash back that stock Boot (and stock Recovery if it was overwritten by TWRP), before applying OTA. That's the safe way.

Again, on some phones it is not neccessary, but it costs you only few minutes, and puts you on the safe side

In addition, it is assumed that on the rooted phone you applied only the systemless changes.

Therefore, when booted with the stock Boot, there is no more Magisk and therefore no changes on the System. With stock Boot and stock Recovery, OTA could not complain or brick

Generally, it's not manufacturer's business to prepare the 'full-proof' OTA (specially differenial OTA packages) to cope with non-stock Recovery, Boot, System or any other unexpected case (like finding an old Boot, not corresponding to the actual firmware before OTA, or something).

It will be a gray zone, with possibly unexpected results (sometimes funny but sometimes tragic), experimenting on your own risk

One more thing. You should use the (stock) Boot (and Recovery) images corresponding to your current firmware version.

I.e., after the OTA update, do not flash or patch (and use) your old (pre-OTA) Boot, corresponding to your previous firmware version. Usually you can download the full OTA package, unpack and find inside its new Boot img. Where to find the OTA packages for download and how to extract them it depends on the manufacturer and details should be looked for on the particular phone's forum
[Magisk] pndwal:
Correct.

Not for you, as discussed above.

Nb. Ensure you in un-root and have stock recovery before taking an OTA update.

To re-root after OTA without boot image from ROM package, try this:

From Installation with boot.img unaltered (ie. after OTA),

1) Make a TWRP backup of (unrooted) boot.img.

2) Rename resulting boot.emmc.win file to boot.img and try patching / flashing that.

No guarantees, but works for some. PW
[Magisk] gil80:
"RESTORE THE EXISTING MAGISK MANAGER BACK TO NORMAL BEFORE UPGRADING IF HIDDEN!"

I can't do that! This is broken. How can I get magisk working again?

It was hidden and it refuses to un-hide.
[Magisk] ineedroot69:
How does it refuses to unhide?
[Magisk] gil80:
I still see the hidden icon type.

I get a message saying: Upgrade to full magisk manager to finish the setup. Download and install?

I press ok then it says "please manually re-launch the app".

But I have no app installed.
[Magisk] ineedroot69:
If it ask that usually it redirect you directly to Magisk github from that just download apk and install it then when installed goto Magisk and click "Complete Uninstall"
[Magisk] ineedroot69:
Also your issue is not really issue since it's reproducible that happen because you did factory reset while Magisk is installed
[Magisk] mOlDaViA:
Do you know how exactly we can do that? I've tried it for many hours now and still no succeed.
[Magisk] gil80:
No, I haven't done such a thing at all.

It doesn't redirect me.

I downloaded it manually.

I've attached a screenshot of what I see now.

I don't know how to proceed from here.
[Magisk] Marotte:
OK thank you. I got a better picture of it now. I’ll ask the manufacturer if he has any OTA package available for my phone. Ii should be OK as he already sent me (a link to) the current package. I’ll see if it’s a good or a bad manufacturer :). The hardware seems nice at least (but I have no experience with other phones so I can’t really tell).
[Magisk] ineedroot69:
There's no uninstall? Lmao I guess just uninstall the Magisk without icon since the Magisk Manager says it's not installed
[Magisk] gil80:
ok, I did that now.

but how do I get the installation file for magisk? I don't really understand what's going on here.
[Magisk] ineedroot69:
Installing Magisk is like Ancient Art ... only bravest warriors survive there are many factor to consider such as :

Phone Model

Availability of stock Rom/Images

Current Humidity

Your Zodiac Sign

... Etc

But looking at your screenshot you provided you have SAR result as Yes so I guess your device is Samsung or Huawei?
[Magisk] gil80:
Phone model: OnePlus One

ROM: LinageOS 17.1

Current humidity for Sydney Australia: 78%

Zodiac Sign: Libra
[Magisk] ineedroot69:
what a coincidence i'm Leo they say Libra and Leo are meant to be :sneaky: anyway your Lineage OS that's good things since it's open source also OnePlus One have is own dedicated page for custom rom and stuff https://xdaforums.com/f/one-android-development.3134/
[Magisk] gil80:
There's nothing there on Magisk.

I remember it used to be a ZIP file and APK file.

Now I can't find how to install the ZIP file anymore.

I don't have settings option to hide root from some apps.
[Magisk] wiznerdcs:
I have a Samsung S7Edge. I got my stock boot.img onto the phone and used Magisk V22 to patch it. Now I am wondering how I flash the patched boot.img given that samsung doesn't support fastboot. The docs here https://topjohnwu.github.io/Magisk/install.html don't cover this case as far as I can tell. I am on linux, but I can use ODIN if needed.
[Magisk] ineedroot69:
read again it's there but it look you need more other partition such as BL, CP, and CSC since *cough*Samsung*cough*

•Reboot to download mode. Open Odin on your PC, and flash magisk_patched.tar as AP, together with BL, CP, and CSC (NOT HOME_CSC because we want to wipe data) from the original firmware. This could take a while (>10 mins).

•After Odin is done, your device should reboot. You may continue with standard initial setup.

•If you are stuck in a bootloop, agree to do a factory reset if promted.

•If your device does NOT have boot ramdisk, reboot to recovery now to boot Android with Magisk

•Although Magisk is installed, it still need some additional setup. Please connect to the Internet.

•Install the latest Magisk app and launch the app. It should show a dialog asking for additional setups. Let it do its job and the app will automatically reboot your device.

•Voila! Enjoy Magisk 😃
[Magisk] pndwal:
Check official Installation Instruction re. Renaming APK to ZIP, etc, from Magisk main page (on GitHub) from app main page (cat symbol), or here:

https://github.com/topjohnwu/Magisk

Files there too.

Humidity actually 100% in Sydneytown. PW
[Magisk] gil80:
Cheers!

That worked.

Now V4A is broken ffs...
[Magisk] KRafi:
When using TWRP and my device doesn't have ramdisk, will I patch TWRP to install Magisk?
[Magisk] zgfg:
I didn't say that. But if I didn't point out:

For specific questions (like how to install OTA on the rooted phone), check/ask in the forum for your phone

Here, on XDA, there is usually a (sub)forum for each manufacturer and each phone (if not a totally new or an obscure model).

With the Guides section - to look if somebody already wrote a guide about.

And with Q/A section to check if it was already asked and answered, or to ask there if not.

Experts for that phone usually read, write and answer there - if anything bad or unexpected happen by following a guide or an advice, there is the best chance to get the quick and accurate help

E.g., for my phone one way to update OTA over the root is to manually download the OTA zip package and to flash from TWRP (with wiping but only the Cache and Dalwik). From the downloaded package also to extract the corresponding stock boot.img, to patch it and flash - and voila, I get new firmware, Magisk again, modules continue to work, with all root grants and Magisk hide remaining as previously set

But THAT procedure is SPECIFIC for my phone/manufacturer, and it even works only with SOME custom recoveries/versions - guides and details like that (OTA, TWRP, how to install V4A, etc) are not discussed here in this generic Magisk thread (all phones, all Android versions, all firmwares and custom ROMs).

Procedure that works for one phone/ROM, MAY even BRICK the other
[Magisk] wiznerdcs:
Thanks for the reply! I read those instructions as well. The issue is that those instructions say that they only apply to phones on android 9.0+. Mine is on 8.0. Should I still follow these instructions? I also forgot to mention my phone is currently encrypted. Does that have an effect? And will these instructions wipe my phone? I already have OEM unlock.
[Magisk] pndwal:
You may not need recovery.img DESPITE (factory) ramdisk (in boot) = no (if it's Xiaomi and some other devices), so it's often worth trying patching/flashing boot image.

This will usually work without errors, but the test will be whether bootloader can boot w/ ramdisk. (If not, Magisk root won't be applied.) While ramdisk = no means 'we assume it can't', sometimes it can!

Here's why you can (sometimes) have working ramdisk in boot image despite ramdisk (in FACTORY boot image) = no:

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

Bit more:

https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-84567583 PW
[Magisk] KRafi:
But Magisk app only gives an option for Recovery Mode in first step.
[Magisk] zgfg:
For patching boot.img, do not enable Recovery mode and just proceed pointing to boot.img

For patching recovery.img, enable Recovery mode and proceed by pointing to recovery.img

Watch does it declare that ramsisk was found and image patched, or it reports an error

Ofc, in the first case you must flash the magisk_patched_XXXXX.img to Boot, while in the second case to Recovery.

By the patched images names you will no more distinguish was it boot or recovery img.

But you can freely rename the images before or after the patching.

Like, magisk_patched_boot.img

Btw, one can also patch the TWRP backup of the boot partition (for the phones and users where it applies to - having Boot partition and supported by TWRP) and in that case IT IS NOT NECCESARY to rename boot.emc.win before patching - Magisk can patch with any name or extension (it will report an error if file is not the proper image)

I've patched my boot.emmc.win many times and now I have just renamed my boot.img to file.my and patched with no issues
[Magisk] cris royal (Elec):
🤔....ehh?!....you dont say
[Magisk] cris royal (Elec):
Magisk v22 up & running....✌🏾
[Magisk] SFCurley:
Contemplating purchasing the new OnePlus 9 or 9 Pro, just released today. Any idea how long before new phones like this are added to Magisk? Root's important enough to me that I wouldn't buy before I know I'll be able to root. Thanks.
[Magisk] zgfg:
I don't know the state of Magisk on OnePlus at the moment but most likely, if Magisk supports the other recent OnePlus phones or other OnePlus phones recently receiving OTA updates, it will work for the new model as well.

Assuming also there will be no issues with unlocking the Bootloader (don't know how it goes for 1+)

In short, search on XDA how rooting goes for OnePlus 8 with A11 - if no problems you should not expect either for the new 9 once it comes (or it will be soon fixed/supported by Magisk Canary)
[Magisk] SFCurley:
Thank you. Magisk works fine with my OnePlus 7+, about 1.5 years old, and I believe with the 8's as well, so that's encouraging. I wasn't sure if support for a new phone had to be specifically added. saw in the Magisk release notes that support was noted as having been "added" for the most recent Samsung Note.
[Magisk] Didgeridoohan:
OnePlus generally keeps things pretty standard, so should be no issues, maybe.

Only time that there's any specific device "support" added is when a big OEM (seems to be Google and Samsung most of the time) comes up with some new kind of shenanigans that need to be accommodated or worked around.