yashsingh1/xdaforums huggingface dataset:
[Magisk] HippoMan:
The cat-and-mouse game continues to escalate.

I'm beginning to wonder whether I should study jailbreaking for an iPhone, to see if it might offer more possibilities for us users to do what we want these days than trying to use rooted Android, as these new Google "improvements" start appearing.
[Magisk] gorman42:
And I'm back to the same situation.

I flashed uninstall.zip, I uninstalled the app, I flashed the original boot.img.

After that I installed the app, rebooted to bootlader, flashed the patched boot.img and... the app does not see root.
[Magisk] zgfg:
Them there is maybe something with Magisk 25.2 Stable, specific to your (custom) ROM

You may go back to an earlier version of Magisk (Stable 25.1, or some of 25.1 Canaries - but older Canaries are hard to get).

Or you could try with Magisk Delta (an unofficial fork - it was discussed here and it has its own thread)

Btw, assuming your custom ROM was not pre-rooted - that's a bad idea from developers, discouraged on Magisk GitHub [but some devs and their users do not dare to read] and users may have problems to update Magisk, etc
[Magisk] gorman42:
No, no, it's standard Lineage 19.1. Build downloaded from the official website.
[Magisk] gorman42:
Tried Magisk stable 25.1, again same result. Root is there, the app doesn't see it. Once again, after flashing uninstall.zip, uninstalling the app and flashing original boot.img before installing. I also patched through 25.1, in case for some reason it needed to happen on the same version. To no avail :-(

I'll try to check this Delta version. It's pretty disconcerting to have an unlocked, rooted phone and not being able to use it properly.
[Magisk] gorman42:
Nothing, even with Delta I remain in the same situation. Root is there, apps that already got permament permission are running correctly. Other apps can't be approved/don't ask permission. And banking apps don't work.

I hope a developer could chime in because this definitely doesn't make any sense to me. There must be something left over somewhere, I don't know.

Again: I flashed uninstall.zip, uninstalled Magisk, flashed original boot.img before proceeding with Delta installation/patching boot.img/flashing boot.img.

One thing I'm seeing... apparently MiXplorer was not approved permanently for root. I tried creating a text document in root and it failed. I can browse root but I can't modify files there. AdAway does because it got permament SU.

Is there a way to list the files under data/adb and remove them from ADB? Because maybe those are remaining there and complicating things, I am really grasping at straws by now. Found it. Let's see...

Editing, so as not to storm people with notifications.

Yeah, it appears that magisk.db still has all old configurations. I guess this might be an indication that stuff remained there for whatever reason.
[Magisk] rodken:
[Plausible] your problem might stem from an app(s) looking in the wrong place for Magisk's systemless root binaries, there's another option besides looking for a different app.

You can place a path to SU by creating a symbolic link. This may be accomplished by using an Android terminal emulator to insert the symlink, but MagiskHide or lack thereof will likely fail since SU will now be exposed.

-- Warning that this might break SafetyNet.

Another far-fetched idea is running ADB in Root Mode with ADB Insecure. The ADBD Insecure app allows you to run ADBD (Android Debug Bridge Daemon) in "insecure mode," so you can do things like access system files and directories by running the command "adb push/pull" or make your system partition writable using "adb remount." The daemon is what grants access to the shell.

Falling short of doing a complete factory reset - depending on the root app, SELinux could be preventing it from doing what you want it to do. You can search for a script and/or app that allow SE Linux Permissive.

At the end of the day [so to speak] you might have a botched installation of Magisk that requires more than just surgery [factory reset hint - hint].

​
[Magisk] J.Michael:
Earlier, you reported that you had no "/data/adb".

Trying to create a file in "/" is a bad test. Even with Magisk-granted root privilege, you might not be able to -- is your system configured as System-As-Root?

I don't know what your most immediate goal is, but if it is running LOS, find the LOS forum and see if anyone has your device.
[Magisk] gorman42:
And I solved it. Thanks to everybody that helped me. @zgfg idea of working on data/adb/magisk.db prompted me to investigate how to reach there. MiXplorer did not have root access granted forever, so it wasn't working. Ended up using adb and, through commandline removed everything releated to Magisk in there. Uninstalled the app, flashed the standard boot.img, installed the app, flashed the patched boot.img, rebooted and... success! 🙃

It only took me six hours or however much it's been. Now let's hope I can reactivate hiding features, etc.
[Magisk] zgfg:
Developer (TJW) will not chime in, he stopped reading XDA years ago.

You may twit him (but generally not for asking help or so but only about theoretical things like switching to Rust from native coding, or some even some interesting general news or similar - you know how Twitter goes)

Of course, you can submit an issue to Magisk GitHub. You must have GitHub account and you must be using Magisk Canary/Debug

Root grants are written in magisk.db.

At the moment you flashed uninstall.zip, the whole /data/adb was wiped, incl the magisk.db - hence no root (for MiXPlorer or any other app) could have survived

Magisk looks into magisk.db if root for MiX was granted. It doesn't find since the whole db was wiped. Magisk then looks for Magisk app to pop-up a question but since the connection between Magisk and Magisk app is broken you are never popped-up to grant the root again

Ie, you probably did grant root for MiX forever, but that 'forever' ended at the moment when it's database record was deleted

---

Edit:I see now your later post - glad you solved

Unfortunately I don't really understand where was the real problem - it would be interesting to know and to submit as an issue to Magisk Github
[Magisk] zgfg:
Offered granularity in the new API will become a loose-loose case

As we see from the existing banking and similar apps, their developers try to squeeze the hardest 'root' detection they are capable of thinking about and skilled to code it, or able to find and reuse it from Internet

Now, with the grabularity, they will always and easily go for the hardest 'root' check the API will offer - eventually, either all 'banking' apps will stop working on the 'rooted' phones or later, when hackers break the new APi, everybody will again be able to find the guide and to circumvent the whole new API (like SN became broken with the invention of USNF)
[Magisk] VD171:
Exactly.

Just a new episode on the cat-and-mouse game.

Google is doing what we expect they will do, creating new methods.

And the dark side too.
[Magisk] gorman42:
That was not the case. Once I used asb shell with root to list the content I'd data/adb/ the magisk.db was still there. I looked into it and it was populated with my settings, the right apps in the deny list, for example.

And this after flashing multiple times un install.zip (the renamed magisk apk). It went through the whole unistall process, I am sure, since it echoes all steps.

Yeah, I am sorry not to be able to be more specific about what caused this. The only thing I am sure I did wrong was not unhiding magisk. But in the guide somebody linked here it states that it should not be a problem with current releases.
[Magisk] ipdev:
For the record.

A few months ago, testing something.. :unsure:

I was surprised to see the official Lineage build(s) were not user builds.

Since they are not user builds, they can/will be considered compromised and not properly locked down.

Some apps will report root or a custom rom.​

It was pointed out to me (by a cm/los dev I highly respect) that the official Lineage (cyanogenmod) builds have always been debug builds.

Switching to user builds would be extremely difficult and way too much time and work for the maintainers.

Reminder. Most are volunteers that freely give us their time and knowledge.​

Some devices might not be able to be supported as a user build.

Would limit what you as the user can do with the device.

Cheers. :cowboy:
[Magisk] ipdev:
@gorman42

OnePlus 6T is one of the more annoying devices I have. 🙃

The reason I like testing things on it.

Cheers. :cowboy:
[Magisk] ipdev:
Good thing I have show signatures turned off. :p

Cheers. :cowboy:
[Magisk] zgfg:
Thanks for clarifying. It makes sense how you still had problems after flashing uninstall.zip and what for you used adb then

I was also puzzled with something else. If db was purged, your root grant for adb would be gone and root required commands would not work

But I don't understand why MiX lost root grant (or indeed it was not granted forever). But then how did you use MiX before flashing uninstall.zip - if MiX was not granted forever, you had to be popped-up every time (and that could not work if Magisk app was not aware of Magisk)

And the main questions: Why Magisk app did not recognize Magisk and now the second: Why flashing uninstall.zip did not properly uninstall Magisk, incl the database

Frankly, I don't understand that part from ipdev about user build for LOS possibly causing your troubles - there are many LOS users here, it would have been known (your troubles started with Magisk update, they would similarly have problems with Magisk app no more recognizing Magisk after their Magisk updates)

Anyway, glad that you solved

Btw, after flashing uninstall.zip, did you try magisk -c or something to recognize if Magisk/root was gone or not

Maybe Magisk was really uninstalled but /data/adb was not deleted - then, on next install Magisk found it, and it's old db there causing the same issues again.

And your adb root commands maybe worked even with Magisk uninstalled if LOS is debug build
[Magisk] DiamondJohn:
iPhones are closed sourced; for the OS. The mouse doesn't know or could even guess what the cat is up-to.

Custom ROMs open a doorway that has yet to be really exploited, because there are still easier ways than that nuclear OS approach. Keep in mind, Magisk has to do its magic withing the realms of the OS restrictions; its a "tack-on" to the os. A lot more could be achieved if the OS was modified explicitly to suit rooting. Also, Apple/iPhone would not allow Google to one-up them for too long, if ever. Especially since iPhone can plainly see the OS Source code of Android.

Saying the above out-loud, makes me think that in the future (NB: I have never correctly foreseen the lottery numbers...), there will be a commit in GutHub that can be shared between ROMs, that integrate/enable root into custom ROMs source. When I was bulding custom ROMs for my devices, I used to kang CPU Govs and IO Schedulers from other devices. It was also a one-liner that switched a ROM to permissive/enforcing.
[Magisk] HippoMan:
I forgot about the closed-source aspect of iOS.

As for custom ROMs, there are already plenty of them. Are you talking about a different type of ROM customization than what already exists?

Also, I like your use of the term "GutHub"! ... even if it might have been a typo.
[Magisk] J.Michael:
Does "debug build" in Android translate to "the device owner has su privilege"?
[Magisk] J.Michael:
@gorman42 I think, after deleting the contents of /data/adb, and uninstalling every Magisk app you could find, instead of uninstalling and reinstalling Magisk, you should have tried rebooting to see if the remarkably persistent Magisk would inject a Magisk app that it could work with.
[Magisk] DiamondJohn:
That is not something that should be forgotten too quickly.

I am talking about having the root functionality actually codded in the source code of the ROM. Currently Magisk modifies the existing compile boot image. Changes to the source, possibly specific to that device,l would possibly open up methods not as easily engaged as an add-on / modification, once it has been compiled into a binary.

Typo / Auto-connection ...err... i mean correction ;)
[Magisk] HippoMan:
In such a "RootROM", what about all those pieces of software, such as banking apps, which deliberately fail to run fully (or at all) when root is detected?

Could this kind of ROM foil all of the root-detection methods that are currently in use? Also, it seems to me that a rather simple set of querying steps on the part of such apps could determine that the ROM is not a "standard" one.

In other words, this kind of RootROM would have to make itself look like a standard ROM.

And if this RootROM were to obtain root in some non-standard, unanticipated manner in order to foil detection, then how could existing apps which allow root detect that the device is rooted, in order for these apps to provide their own root-based capabilities?

These are not rhetorical questions. If such issues could be addressed and solved in such a RootROM, this ROM would be a very desirable piece of software!
[Magisk] RandomPooka:
The short answer is no.
[Magisk] HippoMan:
Well, in such a custom RootROM, perhaps something like the following functionality could be present ...

The RootROM would present a totally standard, non-rooted, non-modded ROM configuration to any app which queries for these things. But there could also be a special "RootAllow" list which is sort of the inverse of a "MagiskHide" list, which is managed internal to the RootROM, and which contains a list of apps which want to run under root.

Instead of being run directly, any app in this RootAllow list will be run through a wrapper function which puts the app into some sort of virtual environment in which the standard "su" and related functionality would appear to be available. When that virtual "su" is invoked, the rooting request would be routed through the non-standard, hidden rooting mechanism that's built into the RootROM, so that the the app would "think" that normal, garden-variety rooting is enabled, and it then could run in the rooted manner that it expects.

For example, almost all of the apps in this hypothetical RootROM (especially things like banking apps) would not be placed in this RootAllow list, and they would run as they usually do on a non-rooted device. But apps that use root such as MixExplorer could be added to this RootAllow list, so that when these apps are invoked, the RootROM OS would run them in this virtual environment that gives them root capabilities through the ROM's hidden rooting capabilities.

In principle, at least, I think this could work.

PS: Also, there could be some sort of mechanism built in to this RootROM which allows these root-enabled apps such as MixExplorer to be given new names and also new package names. This is already doable via some existing Android apps, but having it built in to the RootROM makes it more efficient and more "bullet proof".

Inside the virtual environment that I described above, these renamed and repackaged apps could be invoked to appear to be running under their original names and package names, if these apps themselves require themselves to be named and packaged in any specific way. With this renaming and repackaging of, for example, MixExplorer, any root-detection software which looks for MixExplorer or its package name on the device will not find this program.
[Magisk] ipdev:
LOS was not the cause of the problems with Magisk.

Debug builds are just that, debug.

They include things for testing (debugging) that are removed from user (release) builds.

Even if you lock the bootloader, a secure app (like a banking app) will probably still complain because it is a debug build.

The app might report as a rooted device or a custom rom, even if it is a debug build of the official device rom.

Yep. 🙂

If it was a user build, adb root would not be an option.

Unless you modify it in someway to allow adb root.

--

As you noted.

It seems to have been a botched install and/or uninstall that created the problem.

A while back (a month or three ago?) it happened to me. 🙃

I know I saw something reported about it at that time.

Not sure if it was a post here on xda, an issue or a PR on GitHub.

Something about updating instead of a clean install with one of the Magisk updates.

Mine was a little different situation.

I updated Magisk while the app was hidden.

Normally the update would hide the new (updated) app.

That time it did not and triggered a bunch of issues.

The old (hidden) app showed as Magisk installed (new version) and there was an app update available.

The new (updated) app reported Magisk not installed but the app was up-to-date.

I also had the stub-app showing in my app drawer.

Gave an error that it could not download the full app.

I uninstalled the old (hidden) app, and rebooted.

The old (hidden) app was restored on boot.

Long story short.

I ended up uninstalling Magisk using the old (hidden) app since it had root access.

That did not uninstall the new (updated) app so, I had to uninstalled it manually.

Flashed the stock boot image back to the device (fastboot) and booted.

Then installed the new (updated) app and did the steps for a clean install using the patch boot image method.

Then set everything up again.

Configure Magisk, install modules, grant root access...

Cheers. :cowboy:
[Magisk] ipdev:
Not exactly but, yes. 🙃

Buildtype	Use
user	Limited access; suited for production
userdebug	Like user but with root access and debug capability; preferred for debugging
eng	Development configuration with additional debugging tools

Building Android - [source.android] - Choosing a target

Adding a New Device - [source.android] - Guidelines for userdebug​

Cheers. :cowboy:
[Magisk] ipdev:
@DiamondJohn - @HippoMan

OT for this thread but.. 🙃

Spoiler content hidden.

Would be better to discuss it in the Apple forum,

or the macOS forum.​

Cheers. :cowboy:
[Magisk] RandomPooka:
Without the zip signing keys for the device you're wanting to do this on, you aren't going to boot a custom ROM without an unlocked bootloader. You can't spoof a locked bootloader to my knowledge. So, whether or not root is built into the ROM or not, it will inherently show a locked bootloader. Detecting root isn't the only thing that gives away the presence of root. Device attestation isn't simply showing a fake ID to the stoned 28 year old working at your local drive through when you're underage and buying beer. In newer devices, it's hardware based. The workaround has been to declare that you're using an older phone that doesn't support hardware attestation.

Some of the detection details may have changed recently, but a custom ROM isn't typically able to pass SN at all without the use of magisk and now some other tools.

Even with root inbuilt, you're still going to have problems getting a custom ROM to be supported.

Things may have changed in the past few years, since I last worked on any ROM code, but I bet things haven't changed in the code to make it EASIER.
[Magisk] V0latyle:
Well, this just happened...and I used tap to pay about an hour ago

Canary 25201, DenyList enabled on GPay and Play Store, and Universal SafetyNet Fix 2.3.1. It's worked great for years, but somehow just stopped today, even though no apps were updated.

I believe this may have something to do with the new Wallet app. Tap to pay still works on my wife's Pixel 5a with Magisk 25.1; she never installed the Wallet app, but I did.

Edit: Got it to work again by clearing data for both GPay and Wallet, uninstalling both, then rebooting.
[Magisk] HippoMan:
But with two separate phones, there would be two separate bootloaders.
[Magisk] RandomPooka:
I must have missed the part about two separate phones, and bootloader's, and WTF are you actually trying to do, if not create/brainstorm a custom ROM with root that runs on a single phone?
[Magisk] HippoMan:
OOPS! I'm sorry. In another thread, I was suggesting a two-phones-in-a-single-case-sharing-buttons-and-a-screen solution, and I mistakenly thought I was reading your comment in that thread instead of this one.

I apologize for my confusion.
[Magisk] 73sydney:
It probably will not last...i got a good half day before i ended up like everyone else
[Magisk] wfred:
You're likely going to end up having to use the props module to spoof CTS fingerprint.

The discussion starts around here.

https://xdaforums.com/t/discussion-google-pay-magisk-discussion-thread.3906703/page-128
[Magisk] RandomPooka:
Ok, I'm glad that I wasn't going insane there LOL
[Magisk] pndwal:
Moving this here...

Guess you tried Direct install to update...

If this didn't work it's likely due to incompatible previous magisk-patched image due to refactoring magiskinit injection for 2SI (basically any device w/ Android 10+ except those launched w/ Android 9; yours launched w/ Android 10) in Magisk 25+...

I've put a lot about this in this thread around the time of that change...

As long as you're not running a custom kernel it should be enough to flash Magisk to a fresh (unpatched) image and boot it... This is required where previous Magisk patched fstab (ie. Direct install is broken when moving from 24.x- to 25.x+).

If you want to use old zip / custom recovery installation (no guarantees), you will first have to unroot (eg. take Uninstall Magisk, Restore Images option in App; this will preserve previous configuration incl. modules) to restore original boot image.

Recommended method for all SAR+ (generally Android 9+) devices (nb. Samsung instructions differ) is patch boot image matching / extracted from current ROM archive before flashing it with fastboot... This will negate the need to restore unpatched images on device... PW
[Magisk] pndwal:
Re. new Play Integrity detection in GPay/Wallet, Playstore (and more soon), please see this also:

https://xdaforums.com/t/magisk-module-universal-safetynet-fix-1-1-0.4217823/post-87188299

🤠 PW
[Magisk] doniedogawa:
I just tried upgrading the app (not magisk itself) to v25.2 and it still stuck logo on LG V20.
[Magisk] zgfg:
Assuming you did Unhide Magisk app if you ever previously hid (you never know what troubles to expect without)

Delete the app, download and install new apk manually (it does not affect Magisk)
[Magisk] Gbwhite:
Please I want to root my infinix note8i I tried to unlock the bootloader but is no finding my device
[Magisk] zgfg:
Better ask on some (sub)forum for your device - this is a general Magisk thread and users with LG, Samsung, One Plus, Xiaomi, etc could not know to help you about unlocking BL on your particular phone (procedures and tools may substantially differ from vendor to vendor, and that's a prerequisite for flashing custom recovery, custom ROM, Magisk or so but not really a part of installing Magisk)

Btw, if eg fastboot device does not work from PC (from your post is not clear what does not recognize your device), you may need to install additional drivers for fastboot (google may help you)
[Magisk] un4free:
Thank you very much for taking the time to write a detailed answer! I'll try what you've suggested later in the week and report back. Have a nice day :)
[Magisk] doniedogawa:
Okay, I just uninstalled the app and reverted it back to v23, it worked. Hoping next update will fix the issue.
[Magisk] HippoMan:
As far as I recall, there are already 3rd-party ROMs which work fine with regard to device attestation. For my device, there are Havoc-OS, Lineage, and others. I haven't tried either of these for a while, so perhaps my understanding of them is outdated, but I seem to remember that apps running on them generally don't announce that the device is modified.

I don't know how they manage the bootloader.

If my memory of these ROMs is correct, then I think that such a ROM (or another one that is designed similarly) could also be written to contain a hidden rooting mechanism that's similar to what I described in my recent post about the hypothetical "RootROM".