yashsingh1/xdaforums huggingface dataset:
[Magisk] AquilaDroid:
@zgfg et.al. - Back on this finally, have tried a couple things that got me nowhere. I booted into TWRP fastboot boot C:\platform_tools\twrp-3.5.0-0-test8-redfin.img and was tried to delete /data/adb after verifying that it was empty. It seems to have come back (or wasn't deleted) when I looked a second time after rebooting. I wasn't able to flash the Magisk.img (couldn't find any .zip or .img files).

I just found a reference to changing "Magisk-v23.0.apk" to "Magisk-v23.0.zip" and flashing that. Any input on this?

So, I am able to get into TWRP, but not sure how much it's possible to do. Maybe try to flash the Magisk-patched.img (if I can find it)?

As the old cartoon character Pogo (way before your time) said "The older I get, the confused-er I get".

Glad y'all found another distraction in the interim!
[Magisk] dcarvil:
Changing "Magisk-v23.0.apk" to "Magisk-v23.0.zip" and flashing that is correct. You can also uninstall by changing Magisk-v23.0.apk to uninstall.zip, and flashing that.
[Magisk] zgfg:
Sorry, I don't know if flashing Magisk zip (yes, you have to rename apk) works for A/B devices like yours

If you don't see files on your Internal memory (Download folder) - actually, if you only see scrambled names:

You need to reboot to TWRP, and when it asks you for pass/pin, enter your Android pass/pin (same you use when booting, i.e. the one you use to unlock the screen in Android).

Most modern TWRP supports that (and/or pattern you use in Android for unlocking).

After that, you should be able to properly see the filesystem on Internal memory and Data
[Magisk] J.Michael:
@AquilaDroid When you use TWRP to "flash" magisk.zip, there is no patch step. (It's not just blindly flashing, TWRP finds (at least one) script in the zip file and executes it.)
[Magisk] maybeme2:
My distraction: I was at the dentist. Ugh!

As for messages from 3 years ago, that's what messes me up. Until I upgraded this phone to.android 10 I had a rooted android 9 phone, rooted with magisk and the twrp recovery was available on the phone. Unfortunately what worked then no longer works now. I've been burnt more than once when following old advice. When that happens it's disastrous to non experts like me!

😪
[Magisk] AquilaDroid:
OK, this let me get into TWRP on the phone and I was able to flash the Magisk.zip file. Magisk is now installed so I went back and patched the boot image and booted it to no avail. I do really like the "fastboot boot" instead of flash...

Sorry, I'm editing this on the fly...
[Magisk] dcarvil:
I'm confused. After flashing Magisk with TWRP, you do not need to patch boot image. Did you successfully boot after flashing Magisk? If so, you shoud be rooted. All you should have to do at that point is to install Magisk.apk with your package manager to get the Magisk Manager app working.

What does "booted to no avail" mean?
[Magisk] AquilaDroid:
Sorry, might have been clearer if I said "boot loop".
[Magisk] dcarvil:
Did you successfully boot after flashing Magisk.zip with TWRP, or was that a boot loop also?
[Magisk] AquilaDroid:
That was a boot loop also. I was able to get into TWRP with my password and do everything, so that part seemed to be OK.
[Magisk] dcarvil:
I don't recall everything you have already tried, but I think you are at the point where you need to completely wipe your phone and start with a completely fresh factory image flashed to both slots.

First, make sure you have the latest platform tools from https://developer.android.com/studio/releases/platform-tools, and all previous versions are no longer on your PC. You previously mentioned removing earlier versions of adb, but you have to also remove fastboot and all the other things in platform tools.

Instructions for flashing to both slots for a Pixel 3 are in this post. I assume it is similar for your phone. https://xdaforums.com/t/rom-pixel-3...r-blueline-13-july-2021.4024905/post-85263033

There is a post in this thread earlier today about using the Migrate app to ease the pain of wiping your phone. I have not tried it - I use the SwiftBackup app. Once your have your backup, you can use "adb pull /scard" to copy everything to your PC. Once you are back in a fresh factory image install, use "adb push" to copy everything back to /sdcard.

I just did this yesterday on my Pixel 3 when I moved to LineageOS. I assume the process for your phone is the same, but I do not know for sure.

Assuming you do all this successfully, then install Magisk.apk, patch boot.img, and "fastboot flash boot" it. That should be all.
[Magisk] AquilaDroid:
Thanks for all the detail. Yes, I'm afraid that's the only option at this time if for no other reason than freeing up this thread for more meaningful discussions. I'll definitely look into one of the backup apps in addition to having everything backed up to my G-Drive. Looking back, I probably would have saved 10+ hours if I'd just bitten the bullet right away, but at least I met a lot of very nice folks here!
[Magisk] pndwal:
Sorry, this is confusing me too... So did it ever boot w/ Magisk?... or did you actually uninstall by flashing an un-patched image again before booting / patching again?

Did you ever try no. 3 here?:

https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-85452873 PW
[Magisk] AquilaDroid:
Thanks all, I'll have another look at everything tomorrow. I've been trying to squeeze this in today and not doing a very thorough job of it!
[Magisk] ipdev:
There is a module for it. ;)

You can install it from the Module section.

ADB & Fastboot for Android NDK​

Magisk-Modules-Repo - adb-ndk - gitHub - Link

A couple of posts I made it different xda threads about using adb/fastboot from device recently.

[ROM][UNOFFICIAL][LineageOS][18.1][dragon] -> 2021-08-04 - xdaThread - Post # 2,115 - Link

[TOOLS][ZIPS][SCRIPTS] osm0sis' Odds and Ends [Multiple Devices/Platforms] - xdaThread - Post # 3,008 - Link

Cheers. :cowboy:
[Magisk] zgfg:
Nice tool but...

I don't think he wanted to use SECOND phone to run adb or fastboot commands against his Pixel (instead of running them from PC).

Even if he would have that second phone (with Magisk and ADB/Fastboot module installed) why would that (running the same fastboot commands from terminal emulator on that second phone, instead of as currently from the PC) solve his bootloop issue he gets when flashing the Magisk patched img (by fastboot, from PC). What would be different/better

That second phone cannot be his own Pixel he is trying to install Magisk on. The module must be running from the rooted Android, where he would have to run the terminal emulator app (to type in the fastboot commands), while his Pixel (he wants to flash it) must be booted to Fastboot (in the same time)

I think he wanted to flash directly from his Pixel, avoiding to use fastboot at all. There are some root applications to do that but they require already the rooted phone (AFAIK, his Pixel is not rooted yet and if it would be, he would be no more seeking to solve the bootloop problem with the Magisk installation)
[Magisk] TNSMANI:
MOD ACTION:

Thread cleaned of Off Topic.

Guys, I think that was enough OT for more than a month. This thread is already long enough new comers will be intimidated and will not read before asking questions. Let us start focusing on the subject. Thank you.
[Magisk] pndwal:
Removed this post due to community angst... Sorry folks... sigh....
[Magisk] AquilaDroid:
Just getting back to this, want to come up with a game plan at least. Flashing Magisk.zip did install Magisk on the phone and didn't affect the internal memory. The Android pin worked to get into TWRP so I was able to flash it. With Magisk reinstalled on the phone (I uninstalled it previously) I patched the stock boot.img with the result being the same file (same MD5).

Sorry that a mod finally cleaned the thread, especially since my list of post numbers to reference pertinent comments is now lost.

I went into TWRP and deleted the data/adb folder. MD5s matched on both images.

I'm going to go into TWRP later today to make sure that data/adb is no longer there. After that maybe I'll try to flash "uninstall.zip" and try one last time.

If anyone wants to put together a list of steps for my final shot at this please feel free!

Cheers!
[Magisk] zgfg:
IDK is it some misunderstanding here

Magisk and Magisk app are different entities. You can have Magisk app without Magisk or vice versa (or both, or none).

Magisk is like 'service' and Magisk app was formally named Magisk manager - and it's really that, a front end for user to manage the Magisk 'service'

You say you flashed Magisk zip from TWRP and by that you 'installed' Magisk. If really so, then you were done

Also, in that case you don't flash the patched img anymore, because,(supposidely), Magisk 'service' was already installed

Hence please what do you really mean when you say that you flashed Magisk zip and that Magisk was installed then

Do you mean that Magisk app was installed?

Or do you really mean that Magisk was installed - and how do you prove that?

Usually, you would then install Magisk app and if it really shows that Magisk is installed, it proves that and you're (practically) done

Or you wanted to say that after flashing Magisk zip you had bootlop and therefore you judged that Magisk was installed?

Anyway, you either flash Magisk zip from TWRP or you patch the boot img and flash it. These are two ways to install Magisk. If one way worked (that Magisk was really installed and without bootloop), then don't follow up the other way. Just install Magisk app and that's it (you will need then to activate MagiskHide, grant root to root apps, install modules and so)
[Magisk] 73sydney:
nevermind....post included levity/humour

edited to remove.
[Magisk] AquilaDroid:
Sorry for the delay, real life is intruding into my XDA life.

Is there any reason to delete the "App" (23.0 (23000) (21) from the phone before proceeding? Just "uninstall" it?

Since Magisk isn't installed on the phone (only option in the app is "Select and Patch a File") there wouldn't be any reason to run the "magisk-v23.0.zip" renamed to "uninstall.zip" right? I'm confused by the what the app is (a "Swiss Army Knife that is an .apk/.zip/uninstaller?): From the Magisk Github:

Download the Magisk APK

Rename the .apk file extension to .zip, for example: Magisk-v22.0.apk → Magisk-v22.0.zip. If you have trouble renaming the file extension (like on Windows), use a file manager on Android or the one included in TWRP to rename the file.

Flash the zip just like any other ordinary flashable zip.

Reboot and check whether the Magisk app is installed. If it isn’t installed automatically, manually install the APK.

On computer:

fastboot boot C:\platform_tools\twrp-3.5.0-0-test8-redfin.img

On phone: Enter p/w in TWRP, go to file manager and see if the "data/adb" folder has reappeared. If so delete it.

Install "Magisk-v23.0.zip" in TWRP

BUT... before doing that - since my last flash of "boot" was "fastboot boot..." (temporary) image-redfin-rq3a.210805.001.a1\boot.img I need to "fastboot flash boot..." that boot image before proceeding. If not it will revert to the earlier (bad) magisk-patched.img, Right?

(quote): Usually, you would then install Magisk app and if it really shows that Magisk is installed, it proves that and you're (practically) done

Then, reboot from TWRP? And Magisk should be installed? Can I keep the current Magisk App before I do all this?
[Magisk] zgfg:
1) You can directly see from the Magisk app, main screen if Magisk is installed or not - see my screenshot

2) There is no need to uninstall Magisk app - actually, I would leave it because of (1), to better monitor the result of installing Magisk

3) Since it seems that you don't have Magisk installed, there is no need to flash Magisk apk renamed to uninstall.zip

However, if you find (? !) that /data/adb folder has 'reappeared' then it would mean that you do have Magisk (maybe incorrectly) installed and in that case DO NOT just delete /data/adb but then really FLASH uninstall.zip

4) Yes, before flashing Magisk zip, make sure to have bootable system. That is, revert to the stock boot img if you currently have a bootloop with your patched img

5) Unfortunately, I'm not familiar with the A/B devices. If I understand correctly, you should have then two Boot partitions. You should be able to see that also from TWRP - go e.g. to Backup and check does it offer you backup for two Boot partitions.

In that case make sure both Boot imgs are reverted to stock/official

6) You can make a backup of the current Boot from TWRP. It will be saved as boot .emmc.win but it should be the same as boot.img (you can use an app to compare checksums - e.g. MiXPlorer is an absolutely excellent File explorer for Android with the tons of features; by selecting a file, taking Properties and then Checksum it will show you various checksums for that file; you can even cooy them and compare between the files).

That way you should be able to check which boot img you currently have installed (the stock/official, or the patched one by Magisk).

If you have two Boot partitions (A/B device), it should apply to both of their back-ups
[Magisk] J.Michael:
@zgfg: Given the number of times @AquilaDroid has deleted /data/adb, it looks like when he boots a magisk-patched.img, Magisk runs enough to recreate that directory
[Magisk] J.Michael:
@AquilaDroid: Have you ever

started with a working phone -- one that boots to "stock" Android

fastboot boot twrp

use TWRP to "install" magisk.zip

reboot -- there may be an option in TWRP, but my preference is power down, then power on

see if Android comes up
[Magisk] AquilaDroid:
Thanks @zgfg and @J.Michael for all your input! I'll let you know tomorrow (hate to leave you hanging for 12 hours!) how it goes and try to have accurate documentation of what I did so it's not so muddy.

@J.Michael - yes, I've always had a "working" phone when I'd flash the stock boot.img, just not able to get root with Magisk. I assumed that the issue was having not removed Magisk modules before flashing the August factory image. Yes, I did use TWRP to install the magisk.zip, but both times I hit the reboot tile in the TWRP app. Then, since I'd used "fastboot boot boot.img when it would reboot, I'd end up back in the boot loop from flashing the magisk-patched.img.

Hopefully tomorrow will be another day. (By the time I've written this I could have tried all these things <G>!)
[Magisk] 73sydney:
When you crack this im sending you an "I Got Root" t-shirt

Sorry, was that too much levity for anyone?
[Magisk] pippoparecchio:
Hi all,

I've just installed mconnect app, but even if I've had add it in magiskhide list and I've changed the "name" of the app, the mconect detects that the phone has been modified somehow... any other idea how to fake it? thank you
[Magisk] zgfg:
Similar cases with other apps have been discussed many times here so please search back

Also, look to the Magisk Wiki, there is a chapter about

If 'classical' methods do not work, search/read what was discussed here (and solutions given) for isolated processes (and riru)
[Magisk] jons99:
you can run this app it might give you a clue on what is detected

Releases · vvb2060/MagiskDetector

Contribute to vvb2060/MagiskDetector development by creating an account on GitHub.

github.com
[Magisk] J.Michael:
I still cannot tell if you have ever rebooted after using TWRP to install magisk.zip -- nothing between TWRP and rebooting.

What do you mean by "Then, since I'd used "fastboot boot boot.img when it would reboot, I'd end up back in the boot loop from flashing the magisk-patched.img"?
[Magisk] 73sydney:
Do you mean youve enabled MagiskHide and then also renamed the Magisk App?

Have you rebooted since you did those things?

Have you tried clearing data for the app, or uninstalling and reinstalling?

You might also try using:

Riru: in the repo

And

Riru-Momohider: in the repo (but may need config files created) OR you can try my mod of that with all that enabled out of the box attached to the post here: https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-85187739

If you wanted to try the above, you would need to install Riru, then reboot, then install Riru-Momohider, then reboot

You can also check where you may be failing detection with MagiskDetector here (grab the apk): https://github.com/vvb2060/MagiskDetector/releases
[Magisk] Didgeridoohan:
I can start the app without any warning as long as it's in the hide list. You might have the mconnect app installed to external storage, there might be apps or files/folders on your device that the app detects, etc...

https://www.didgeridoohan.com/magisk/MagiskHide#hn_Hiding_root_from_apps
[Magisk] AquilaDroid:
No joy. Here's the output of the session. Result - bootloop.

C:\platform_tools>adb reboot bootloader

* daemon started successfully

(Flashed stock boot.img since it had been installed with: fastboot boot not fastboot flash boot)

C:\platform_tools>fastboot flash boot C:\platform_tools\image-redfin-rq3a.210805.001.a1\boot.img

Sending 'boot_b' (98304 KB) OKAY [ 2.361s]

Writing 'boot_b' OKAY [ 0.487s]

Finished. Total time: 4.012s

Booted OK

C:\platform_tools>fastboot reboot

Rebooting OKAY [ 0.028s]

Finished. Total time: 0.059s

C:\platform_tools>adb reboot bootloader

* daemon started successfully

C:\platform_tools>fastboot boot C:\platform_tools\twrp-3.5.0-0-test8-redfin.img

Sending 'boot.img' (98304 KB) OKAY [ 2.270s]

Booting (bootloader) boot.img missing cmdline or OS version

OKAY [ 2.300s]

Finished. Total time: 4.981s

In TWRP the /data/adb folder was fully populated (?) so I deleted the adb folder. (The "magisk modules" folder was empty.)

Installed Magisk-v23.0.zip and rebooted by holding start button, (not TWRP reboot).

FAILED TO BOOT - "G" LOGO WITH FLASHING PROGRESS BAR

Tried to flash the previous patched.img - (a long shot!)

C:\platform_tools>fastboot boot C:\platform_tools\magisk_patched-23000_b7epA.img

Sending 'boot.img' (98304 KB) OKAY [ 2.267s]

Booting (bootloader) boot.img missing cmdline or OS version

OKAY [ 1.588s]

Finished. Total time: 4.261s

Also failed to boot, of course.

Flashed the stock boot.img

C:\platform_tools>fastboot flash boot C:\platform_tools\image-redfin-rq3a.210805.001.a1\boot.img

Sending 'boot_b' (98304 KB) OKAY [ 2.380s]

Writing 'boot_b' OKAY [ 0.344s]

Finished. Total time: 3.843s

C:\platform_tools>fastboot reboot

Rebooting OKAY [ 0.044s]

Finished. Total time: 0.065s

REBOOTED OK WITHOUT ROOT

One question - when you "fastboot boot..." it doesn't show "Sending/writing 'boot_b'" but when you "fastboot flash boot" it does show the partition?

Any last corrections/suggestions, friends? I remember some place along the long road that there was a step of booting into safe mode, but don't remember where it was.
[Magisk] J.Michael:
"fastboot boot" is not writing to a partition.

The horsing around with Safe Mode was a way to disable modules. At the time, it was hoped that your problem was an incompatible module. I am now satisfied that you do not have any modules. I do not think Safe Mode is of any use to you.

I think @zgfg expressed concern about whether the TWRP install of magisk.zip would deal with an A/B device.
[Magisk] zgfg:
As @J.Michael answered, fastboot boot just boots to the given img (one time), while fastboot flash flashes the given img

Anyway, could you try one more thing - in TWRP, take Install, then Install image, then navigate to your patched img on the phone, select target partition as Boot and swipe to flash. Then reboot to System
[Magisk] J.Michael:
Do you have to tell TWRP which partition to install the image to?
[Magisk] zgfg:
Yes, just edited/added, select to flash to Boot partition
[Magisk] Trovies:
I am currenltly on Magisk Canary. and i usually get random reboot when i switch off and on my wifi connection. anyone know how to fix this?

or

is there any way to switch to Magisk stable? without losing modules
[Magisk] pndwal:
@AquilaDroid, did you ever rename Magisk App to uninstall.zip and flash that before trying booting patched image? PW
[Magisk] zgfg:
Something specific to your phone/firmware (you didn't specify what do you have)

I think there was something similar here about WiFi, for a particular phone (maybe Samsung)

You can easily switch to Stable, just download Stable apk, install and then patch & flash (or install trough TWRP if you previously did and it worked).

You won't loose anything

However, there is no diff between Stable 23000 and Canary 23001
[Magisk] Trovies:
thanks for replying. i switched to magisk stable now. lets see if i still experience random reboots.

the phone usually reboots

1. when i switch on off wifi

2. when i switch on off MagiskHide option in Magisk setting

sometimes it reboots directly but sometimes System UI stops responding so i still have to reboot in the end

my phone is Redmi note 10 pro (sweet) , i am on miui 12.5.2.
[Magisk] zgfg:
You could try Magisk Alpha - search for Alpha in this thread (many posts last weeks). It has twenty or so upstream fixes/improvements compared to Stable/Canary
[Magisk] zgfg:
And @AquilaDroid , if you would (still) have bootloop with Magisk, boot again to TWRP, use Advanced, File Manager, navigate to /cache and copy the files magisk.log and magisk.log.bak to /sdcard (Internal memory), and later (when you flash back the unpatched boot img - you can also do it from TWRP) zip the logs and attach to your post

You can also pick the log files later, they won't be deleted by your deleting /data/adb neither by flashing the unpatched boot img
[Magisk] vandyman:
It sounds like you have a module or mod tied to the SystemUI that is giving you trouble.
[Magisk] AquilaDroid:
Thanks again! Did EXACTLY as you said (and flashed to boot partition), results in bootloop.
[Magisk] AquilaDroid:
Not pertinent originally and now not relevant.
[Magisk] pndwal:
1) Are you 100% sure you have patched/ flashed boot.img exactly matching / from current ROM? - Eg. Did NOT restore images, take OTA then flash original (now mismatched) patched image to restore Magisk. This often results in such issues.

2) Try booting with all Magisk modules disabled.

Nb. Do you have Universal SafetyNet Fix enabled?

https://github.com/kdrag0n/safetynet-fix/issues/32

I think this may apply to stock Android 11 MIUI (yours), but I have no such issues w/ stock Android 10 MIUI on RN8T. (Nb. I'm using latest USNF 1.2.0)

Test solution "Shim the keystore service instead of replacing it" is available here:

https://github.com/kdrag0n/safetynet-fix/pull/13#issuecomment-767863635

Read the OP there also. Excerpt:

PW
[Magisk] zgfg:
Log can be opened as a text file (e.g., rename from log to txt)

You don't need to mount Internal memory - you were able to navigate in TWRP to the img and zip files on Internal memory when you were flashing
[Magisk] AquilaDroid:
No longer relevant.
[Magisk] zgfg:
Supposedly, you're posting from PC (you mentioned right click). First zip the file(s), then while posting in browser, take Attach files button (screenshot attached)

GN8 from my side for today (on vacations with small grandsons, and waking up every day by 6 or earlier)

But this is an intl forum, there are ppl from all around the clock, somebody could pick up your Magisk logs and try to find something interesting
[Magisk] J.Michael:
Are you using Windows on your PC?

Did you copy "recovery.log" to your PC?

Did you look at "recovery.log" in a text editor?

How big is the file?
[Magisk] AquilaDroid:
File was 130kb No longer relevant.
[Magisk] J.Michael:
I don't think that's too big to post without compressing -- just attach the file.

Are you using Windows on your PC?

Did you copy "recovery.log" to your PC?

Did you look at "recovery.log" in a text editor?