yashsingh1/xdaforums huggingface dataset:
[Magisk] sereksim:
Okay so I patched the boot.img with Magisk, and restarted into fastboot-mode, but flashing the new image didn't work:

Any suggestions?😬
[Magisk] sereksim:
Okay, maybe I will try that, if the recommended way doesn't work...
[Magisk] zgfg:
It says 0 KB, but then the file too big - how big is really your original boot.img and the patched one (mine is cca 21 KB)?

When calling fastboot without the path for the file, file must be in the ADB directory, is it?

Are you able to flash the same way the original boot.img or twrp.img?

Btw, you should have TWRP, why don't you Install the patched img from TWRP (select img files - by default it shows only zip files) and select Boot as the target partition

I assume Magisk did not report an error when you were patching, and that you have not only Bootloader unlocked (you have to, since you switched to Xiaomi.eu) but also that upon installing Xiaomi.eu you re-enabled OEM Unlocking in Developer menu (otherwise it blocks flashing)

And test with fastboot devices before you attempt to flash from fastboot
[Magisk] XenonF-Dev:
Thanks again for all the helpul info, still I'm not 100% sure how to proceed, which will be probably because I haven't exposed everything clearly (or I could be missing something 😅), so I will try my best now.

For me safe means keeping the installed apps data as intact as possible, that is, recovering from the bootloop and beign able to reroot (ideally) again without loosing installed apps data (I also don't remember the credentials for the phone G Account, but that is discardable in the worst case scenario).

I checked Settings option on TWRP, but haven't seen the about device option sadly (using TWRP 3.0.2-0-decker-2, if that helps). Right now I'm only able to access recovery on the phone.

Yeah, they are small .zip files which were bundled on the S60 Rooting topic package, so I guess they are binary-patches. I guess I could try to make a NANDroid boot's backup and then try the uninstall.zip method with the magisk version I used, and if that fails try to use 31.02 boot.img and try to be lucky and in case something goes bad, I could restore the NANDroid bootlooping backup.
[Magisk] Xellerate:
how do you flash magisk with heimdall, the installation only explains how to install magisk with odin, ive tried to flash with heimdall, everything worked apart from the touchscreen, so i coundlnt even get out of the set up screen
[Magisk] Xellerate:
how do i flash magisk with heimdall, what i did was that i pathed the ap with the magisk app, then moved it to pc then extracted to flash the files seperatley since you cant flash the ap itself and it booted up without touchscreen
[Magisk] digger16309:
Restore Images doesn't work for me. I get a message that says:

stock backup does not exist!

I have the stock boot.img from April - where do I need to place the file so Magisk will find it?

--------------------

Nevermind - that's what I did - I patched the stock boot.img file again then restored back to it.
[Magisk] J.Michael:
After it booted up without touchscreen, have you tried flashing unpatched stock files with Heimdall? Are you then back where you started, no Magisk but touchscreen works?

If so, I would say that shows you are using Heimdall correctly.

If you are using Heimdall, I would assume you are have a Samsung device. Have you read the Imstallation Notes sections about Samsung? I would expect you to have to install Magisk to recovery. There is some disagreement over whether you need to check the Recovery option in Magisk Manager before patching the AP.tar file, or whether Magisk Manager will always install to recovery when presented with an AP.tar file.
[Magisk] J.Michael:
@pndwal knows what you mean by "safe".

Noone can guarantee safe.

I think it is a very bad idea to keep going with the phone attached to a Google account you can not log into.

There is a warning to disconnect from any Google account before running Odin. You may not have a Samsung phone, you may not be using Odin, but I think the potential for interference from Google still exists.
[Magisk] XenonF-Dev:
My bad, didn't get it 😅.Well, I tried starting with safemode using the method described on tusch00101's blog post about this phone, but I wasn't lucky :cry:.

So, what path should I take then? Most apps I want to keep info are from F-Droid repository and I could make a manual backup of those files in case sh*t hits the fan.

Edit: After getting a 64GB sd for making a backup, I saw that TWRP named the backup "LTE_D0201121.0_S60_0.038.00" so I guess I'm in the last revision that was discussed on the S60 root topic. Sadly, I can't find any sources for the so called update38, nor I think it is available as a full OTA update and probably only binary-patch version. The good side is that at least I got more info :). Yet again, thanks for everything so far and in advance.
[Magisk] OP6Tuser:
I just got a factory reset oneplus 6T. I heard that the newest version of twrp (3.5+) and magisk (v22+) dont work together and that wifi doesnt work if you use them both. Is this true? What versions of twrp and magisk work well together for OP6T?
[Magisk] Xellerate:
Thats what i did last time i flashed it, but the thing with heimdall is that i have to extract the ap then flash the files separately, it doesnt have the option to flash the packaged version of them, im wondering that maybe its because i didnt flash the full ap is why the touchscreen didnt work, by the way do you have to flash the fota.zip
[Magisk] Xellerate:
After i was faced with the no touchscreen error, i flashed the boot.img like i did before then it worked, when going into recovery mode is it just meant to be a list of all the options
[Magisk] zgfg:
This is really a question to be posted under Q&A at:

https://xdaforums.com/c/oneplus-6t.8257

Maybe already covered in your device forum there
[Magisk] J.Michael:
I don't know your device. I've only used one device (Samsung SM-T290).

But, yes, I think recovery mode is just a list of options. One option for me says something like "boot to bootloader", and is one of the paths to what's called "download mode". That's where I use Odin. I assume that's where you use Heimdall.

The little I read about Heimdall made me think it was beastly to use. Can't you hold your nose and use Windows long enough to use Odin?

Since @topjohnwu warns against just flashing one .tar file, or flashing too little in the AP.tar file, I'd say there's a good chance that your problems come from failing to flash enough. Did you flash boot.img, recovery.img, and vbmeta.img? (The notes say to at least put that much into a tiny AP.tar file. They also say don't leave out the other three .tar files.)
[Magisk] Zimbushman:
Hi, I have a Samsung A10s, (sm-a107f) with Android 10, Magisk 22.1 installed, no ramdisk, SAR yes, flashed stock kernel with patched AP. Boot into Magisk via recovery, all good , phone rooted, but will no detect sim card, aeroplane mode dimly lit, cannot toggle, if i boot phone normally (no magisk root ) the siim card is detected, making me think that the problem lies with Magisk, could someone kindly advise, Cheers in advance
[Magisk] pndwal:
Not sure it your device, but new suffix now = Android version compatable.

I found latest Official twrp-installer-3.5.2_9-0-fajita.zip - seems to be Android 9.

TWRP 3.4.0-11 Q Unofficial by mauronofrio may in fact be more improved:

Prop fix, A11 decryption, (A10 device tree?)

https://xdaforums.com/t/recovery-3-...y-for-oneplus-6t-stable.3861482/post-84118769

If you still have compatibility problems, consider Restoring stock Recovery, and Fastboot booting only (not flashing) to TWRP when needed. This overcomes compatibility problems for many. PW
[Magisk] pndwal:
I don't have Sammy 😜

However, did you do initial Magisk installation this way:

- Patch AP tar w/ Recovery mode selected.

- Copy the patched tar file to your PC with ADB (NOT MTP).

- Using Odin, flash magisk_patched.tar as AP, TOGETHER WITH BL, CP, and CSC (NOT HOME_CSC) to flash w/ data wipe.

- Allow Additional setup from Internet.

If updating ROM:

- pre-patch AP w/ Recovery mode selected.

- Copy the patched tar file to your PC with ADB (NOT MTP).

- Using Odin, flash magisk_patched.tar as AP, TOGETHER WITH BL + CP + HOME_CSC to upgrade / keep data.

- Allow any Additional setup from Internet.

... just checking... 😛 PW
[Magisk] J.Michael:
@pndwal What's "ADB (NOT ADB)"?
[Magisk] J.Michael:
Do you have any modules installed?

Disable all Magisk modules and reboot.
[Magisk] ipdev:
Sorry for a bit of OT. ;)

Note about TWRP.

TeamWinRecoveryProject

Starting with 3.5.x, TWRP is built on Android 9 or Android 10 depending on the device.

TWRP 3.5.0 Release Notes.

TeamWin - WebSite - Link

Cheers. :cowboy:
[Magisk] pndwal:
...What do you get when you've got ADD?

ADB? MTP? ADDLED, MUDdled, Befuddled... 😜

Fixed it, ta. 👍
[Magisk] pndwal:
Isn't it a question of whether ramdisk is supported in boot? Pretty sure patching AP.tar still patches boot image on Ramdisk=yes devices.

On Sammy with Ramdisk=no, is Magisk Installed properly to recovery without Recovery mode selected? (I don't think Magisk in boot works for Sammy as it does generally for Type III Xiaomi, and John says "If your device does NOT have boot ramdisk, make sure “Recovery Mode” is checked in options" in Sammy section.) PW
[Magisk] pndwal:
You may be able to check this.

Using a root explorer, so you have any magisk_backup_xxx folder(s) in /data?

Or in /data/adb/magisk, any stock_boot.img?

Just flash it to restore! Fastboot, or TWRP. 👍 PW
[Magisk] pndwal:
Meant device Settings, About device! 😛

Meant unroot, take OTA, make TWRP backup to obtain boot.img update (if you can't extract, or its only a binary incremental OTA patch), patch and flash that to re-root. (Simply renaming boot.emmc.win to .img file seems to work fine, although renaming other .win files apparently doesn't always.) 🤠 PW
[Magisk] sereksim:
I patched the boot.img again and it worked. Thanks for your help :)
[Magisk] J.Michael:
We keep going in circles on this. As far as I know, only Samsung delivers firmware in tar files. I don't know if any Samsung for which firmware is delivered in tar files has Ramdisk=yes.

I thought that when I was struggling to install Magisk, I determined that the Recovery checkbox was meaningless, that Magisk would do what it thought best after seeing the AP.tar it was being asked to patch.

I started to check that again, but my Magisk Manager will not give me am option to patch a file: It wants to update, it won't show any "Install" option until I update, I am not willing to update. From things I've read (probably things you wrote), I might get around that by changing to Custom Update Channel without providing a URL, but, again, I'm afraid to change anything.

It does not seem to be the case that Magisk *must* be installed in recovery on Samsungs: The thread on installing TWRP on my device (SM-T290) talks about patching the boot image.
[Magisk] pndwal:
John's?

https://twitter.com/i/web/status/1309273850836705281

... might need to part with £1600 (British) for that!

But seriously, type III (legacy SAR, Ramdisk = no) devices have been superseded by 2SI ramdisk 'SAR' (first seen on Pixel 3 Android 10 developer preview) on devices launched with API level 29+, as well as retrofitted Pixel 3 / 3a.

So ALL later (type IV) Samsung devices use tar package and (boot) Ramdisk = yes.

Earlier (type II) A/B, legacy SAR devices (from Pixel 1) employed a recovery ramdisk in Boot partition (Recovery partition was removed), and Samsung used tar package for their offerings.

So earlier A/B (type II) Samsung devices also use tar package and (boot) Ramdisk = yes.

Non A/B legacy SAR (type III) are the only devices w/ Ramdisk = no, unless some other type has escaped John!

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

😉 PW
[Magisk] J.Michael:
A small price to pay when you remember that, after opening it 3000 times, you will have two tablets for the price of one. (I can't wait to hear whether you can drag something from one half to the other. Or does Samsung Entanglememt guarantee that anything done to one half was already done to the other?)
[Magisk] pndwal:
No, only that ones better half will be less inclined to interface with a third party, as in the case of Alice and Bob below.

Of course, as presented by the converse theory, where third party entanglement has a mechanical bond stronger than the bipartite pure state, Alice will divulge nothing to Bob, and vice versa.

https://arxiv.org/abs/1102.0439

The question of whether anything done to one half was already done to the other, however, or if stuff can equitably be dragged from one party to the other for that matter, is moot, as the testing environment has become wholly unsatisfactory. At this point, the whole premise folds.

Disclaimer:

The objective is still, as always, reduced density of operators.

Apologies if anyone feels that this General Discussion is in any way irreverent, or even irrelevant to the Support those impelled to don a Magisk Mask to hide from Alice... or from Bob... or from the Bank, or Google.

Would look great at a party though. PW
[Magisk] XenonF-Dev:
Thanks for everything, I finally managed to get it to boot again, although in an unexpected way :p.

Going to list it to make it as clear as possible:

Made a full compressed TWRP backup

"Installed" on TWRP Magisk22.1.apk as uninstall.zip, still got bootloop

Tried again uninstall.zip, this time wiping dalvik cache, still got bootloop

Renamed Magisk-v20.3.zip to "Uninstall.zip" and installed it with TWRP, it installed Magisk20.3 instead

The Phone now boots with no strange signs (besides the new SD I used for backups)

I'm glad it now works, and as it is my only daily phone that's a lot, but I'm not sure how to proceed to keep myself safe in the future (Maybe install the old magisk manager and uninstall magisk from there, which could give me a clean update38 boot.img to patch?)

Again, thanks a lot for the time and effort put into looking on my issue, it's really appreciated :D.
[Magisk] pndwal:
Aside from trying Canary Magisk (not sure if you did), might be worth waiting for next Stable build. Seem to be quite a few fixes already committed to be merged... PW
[Magisk] pndwal:
www.twitter.com/topjohnwu/status/1387804040226951180

😂 PW
[Magisk] HemanthJabalpuri:
Which logs are helpful when devices bootloops on splash screen?

I read https://www.didgeridoohan.com/magisk/MagiskHelp but is last_kmsg need be taken after booting to Android after flashing stock boot.img?

I have took and posted logs by booting to TWRP. Is that a correct way?

Device refuses to boot with Realme UI 2.0 · Issue #4313 · topjohnwu/Magisk

All bug reports require you to USE CANARY BUILDS. Please include the version name and version code in the bug report. I have used Magisk_fb8000b5_22104 If you experience a bootloop, attach a dmesg ...

github.com

Thanks
[Magisk] ipdev:
The kmsg (Kernel Message) file is constantly written to while booted into an Android environment.

System or Recovery.​

A new kmsg file is created every time you boot the device into an Android environment.

The previous kmsg file is moved to last_kmsg

Both files are replaced each time you (re)boot into an Android environment.

Example.

You boot into system and get stuck at the splash screen.

Your device is currently writing to /proc/kmsg​

You force a reboot into recovery.

The previous /proc/kmsg was moved to /proc/last_kmsg​

Your device is currently writing to /proc/kmsg​

/proc/kmsg is now the current recovery boot

Your previous boot into system is now /proc/last_kmsg

If you now reboot from recovery into recovery again.

The previous /proc/kmsg is moved to /proc/last_kmsg​

Your device is currently writing to /proc/kmsg file.​

/proc/kmsg is now the current recovery boot

Your previous boot into recovery is now /proc/last_kmsg

Note:

Newer devices use /sys/fs/pstore instead of /proc/last_kmsg

You normally need heightened privileges (root) to grab kmsg or pstore.

A custom recovery normally allows you root access.​

Hope it helps more than confuse. 🙃

Cheers. :cowboy:
[Magisk] DiamondJohn:
And there is also the magisk boot log method, which I think from memory is basically just a logcat during boot, and is more if you can boot normal before it fails. More info at @Didgeridoohan web site:

MagiskHelp:Magisk and MagiskHide Installation and Troubleshooting guide

www.didgeridoohan.com
[Magisk] hamid3pnn:
hi after hide magisk to another apk name in setting, Avast mobile security says it contains malware and wanted to uninstall it, should i ignore that? thanks
[Magisk] pndwal:
Many 'Magisk' packages floating around actually DO contain malware. Counterfeit (doctored) builds have even been proffered on PlayStore!

What's more, root permission makes malware particularly potent / dangerous, so BE CAREFUL!

John Wu's GitHub is now the ONLY official source.

https://github.com/topjohnwu/Magisk

Please consider the source of yours.

Having said that, it is still likely that there is no malware infection to worry about at all. John acknowledges that detection of 'suspicious activity' in relation to a hidden Magisk App / Manager is in fact legitimate due to generated key used to sign the App:

www.twitter.com/topjohnwu/status/1231114984484065281

Perhaps coincidentally, John has recently changed the App hiding method. Just out of curiosity, what is you Magisk version? PW
[Magisk] diorlee90:
Hey guys, my phone xiaomi Mi 11 pro has rooted succes with magisk 22.1 ver. But it's only "youtube vanced" working, Mixplorer newest ver not work athough it's has permission. It's cant modify system/root.

Anyone know how to solve that problem?

sorry for my bad English.
[Magisk] DiamondJohn:
If you have a newer device (Which it sounds like you do), then your system is mounted as Read-Only, and basically can not be changed to RW. Thats how newer android on newer devices, runs
[Magisk] diorlee90:
thank you bro.
[Magisk] XenonF-Dev:
What puzzles me is that even after un-rooting I had the bootloop, and only applying Magisk 20.3 fixed it.

Also saw a popup when checking Magisk App that Magisk 22.1 app doesn't give support to Magisk <20.4 (I had 20.3), which could have been the problem from the start.

When I manage to have some time to fiddle more with Magisk, I will try updating to Magisk20.4 via TWRP and try again, this time with the next Stable Magisk version of course (which I hope doesn't drop support for 20.4 🤞).

About Canary, I didn't even consider it, since I couldn't afford the risk of doing anything that could potentially do even more damage as I was still trying to understand what was happening first and taking only affordable risks if possible. While I consider I can defend myself on bash, I lack the Andoid's ecosystem knowledge that could let me know what went wrong and that kind of stuff, so thanks ipdev for summarizing it, it will be really helpful in case I run again into trouble :).

Have a nice day!
[Magisk] dknight178:
Hi everyone, I'm using OP7 pro (10.0.10). Magisk was working fine before today; however, I tried updating my magisk manager to 22.1 and now I can't open magisk manager - first time I open the app, the magisk logo appears then disappears and nothing happens; second time I open it says "magisk keeps stopping".

I googled around and tried to: a) restart my phone, b) clear cache and/or storage, c) try to use magisk manager without wifi/data, but none of them worked.

Google pay still works and rooted apps like titanium backup still work (although "magisk manager keeps stopping" pops up, I can use the rooted apps).

Is there any way I can fix this without losing my data and my root? Thanks
[Magisk] zgfg:
Make sure you find in Settings, Apps the old Magisk Manager (or however you renamed if hiding) and ununstall.

If needed uninstall and reinstall also the new Magisk app.

You will not loose Magisk root, modules, hide etc
[Magisk] dknight178:
This did the trick. Thanks a lot :)
[Magisk] J.Michael:
@XenonF-Dev If you had a bootloop, how can you be sure you had "unrooted"?

Do you have any Magisk modules installed?

When you had bootloop, did you ever try to boot to Safe Mode?
[Magisk] 535iu:
Hi, some of us are having problems patching Ramdisk so we can update Magisk. Magisk is patching the Ramdisk file wrong and when this file is installed (from TWRP) the root is lost. The direct install method doesn't work either, root is also lost when installing.

I have tried with several versions of the Magisk application, also with the old Magisk Manager applications. Nothing works. I also wiped Dalvik and cache.

I have Magisk 20.4 (20400).

Can anyone help me?
[Magisk] zgfg:
You omitted the most important details like model, firmware

Assuming ramdisk.img, you should have Huawei with exactly EMUI 8.x?

Do you still have your ramdisk patched with the old Magisk - to revert if neccessary.

Try (re) patching with the new Magisk that ramdisk img previously (successfully) patched by the old Magisk, instead of patching the stock ramdisk

Try also with Magisk Canary (it's newer than Stable)

Use the appropriate (Stable or Canary) Magisk app
[Magisk] hamid3pnn:
thanks, i'm using v22.1 then installed canary build on it from this page to pass safetynet , https://github.com/topjohnwu/Magisk ,

after install there was no problem, just when i changed magisk name to (for example) "magic", avast says it's malware
[Magisk] zgfg:
Then it probably recognizes the original package name

com.topjohnwu.magisk, knowing that Magisk apk is not mallware - but it's suspicious about that 'new' root manager with the 'unknown' package name (it doesn't matter that much that you rename the app, but that package name gets obfuscated)
[Magisk] SaikiK:
After updating to a.61 from a.59, there was a bootloop ( a.59 was rooted with magisk patched image), but after download a.61 update from realme website and then flashing original boot image, it worked, but my device is no longer rooted and safety net cts profile fails.

Tried rooting a.61 but there is a boot loop (even though performed same earlier method).

Device details attached.
[Magisk] 535iu:
Hi. Yes, I have a Huawei Mate 10 8.0.0.

I have tried patching the original ramdisk and the last patched ramdisk (20.4). Nothing worked. Magisk and Magisk Canary patch the ramdisk wrong.

It's strange, because when Magisk/Canary patches the ramdisk wrong, the size of the file obtained is the same as the original ramdisk: 16 MB. However, in the old ramdisk patched correctly, the size was reduced: from 16 MB to 8 MB.

Is it possible that new versions of Magisk are not compatible with my phone? I currently have v20.4. The latest version of Magisk is 22.1. For example, if my phone was only compatible with version 21.0 (at most), how could I patch the ramdisk to version 21?

(Sorry for my bad English).
[Magisk] zgfg:
Suggested you to try using Magisk Canary, which is 22104. Not guarantee but worth to try (if nothing else works)

Also, suggested you to try patching your ramdisk img that you previosly (successfully) patched with Magisk 20.4 - if that img was 8 MB, once you repatch by the new Magisk it will likely stay 8 MB

(Although the size should not matter that much - stock images are filled by zero bytes to the full size. Old Magisk cut off the filler bytes, while the new Magisk keeps the full size patched images)

Unfortunately, Magisk guides practically says that Huaweis are no more supported (if I recall correctly) because of troubles with unlocking the Huawei Bootloaders. If so, you are probably on your own to experiment with Stable and Canary, repatching the patched ramdisk instead of the stock one, etc

If nothing would work, you can stay with the old Magisk that happily worked for you - don't be concerned about SafetyNet showing API error and thus failing - you can use a third party SN checker and it should pass. Or just update Magisk app to Canary but stay with the old Magisk (the apk, former Manager, performs SN check and it fails there with the old one because of the old API key, needed for testing and nothing else
[Magisk] Tanvir Rezwan:
The problem not fixed. i removed systmless host module but still after 20 - 24 hours pubg stuck and lagged

but all other thing is ok.