• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

MAGISK MODULE ❯ Universal SafetyNet Fix 1.1.0

Search This thread

zgfg

Senior Member
Oct 10, 2016
6,049
3,548
I have Google Pixel 5, fresh Lineage 18.1 installation, flashed magisk and made everything as described:

magisk hide / hida app, Riru, Magiskhide Props Config + Universal Safety Net fix...I pass basicintegrity but fail to pass cts profile :(

what am I doing wrong?
Try without MHPC but you must use exactly (!) USNF 2.1.2 (not older and not 2.2)

All assumed you are really using MagiskHide+Riru (as you wrote), not Zygisk+DenyList.
That also means you are not on Magisk Canary 2301x (but om the old Magisk 23, Magisk Custom or Magisk Alpha (but without Zygisk)

If not, then precisely describe what you use and how.
In that case you should not use Riru, but Zygisk+DenyList, and USNF 2.2 - as you see, small details are crucial
 

ipdev

Recognized Contributor
Feb 14, 2016
1,603
1
2,150
Google Nexus 10
Nexus 7 (2013)
I have Google Pixel 5, fresh Lineage 18.1 installation, flashed magisk and made everything as described:

magisk hide / hida app, Riru, Magiskhide Props Config + Universal Safety Net fix...I pass basicintegrity but fail to pass cts profile :(

what am I doing wrong?
This will be the same story for all Pixels using official Lineage 18.1 builds.

Take a look at my post back in this thread. - Link

Take a look at my post in the Magisk thread. - Link

Cheers. :cowboy:
 

ElBerretin

Senior Member
May 6, 2016
55
5
Hello, everyone!!

Can I just... Uh... Randomly fly in here and ask what the hell's been going on with Magisk?

I have a Mi 8, so an old-ish phone, with a custom ROM on Android 9. Have had it rooted for about 3+ years, always Magisk, never an issue. However, a couple weeks ago, Magisk suddenly "stopped working" in that my banking app started detecting the root, and not letting me use them. Not being the most knowledgeable person on this, and also having forgotten most of what I did in order to root the phone in the first place, I set out to Google-Fu this problem, thinking it wouldn't be so hard - I'd rooted the phone already, after all, right?!

A very confusing hour or two of Googling later, it seems like everything's changed. The creator now works at freakin' Google, MagiskHide is apparently dead, module searching from within Magisk looks dead too (doesn't work for me at least), and there's all this talk about some Riru and Zygote and all these things I've no idea about.

So, getting to my question... A basic one. How do I install this module? I'm hoping this is the fix I'm needing, and that my banking app stops nagging me after installing it... But every time I try to install the .zip file from within Magisk, the file is blacked out, so I can't select it. I can't select any other zip, either. I'm scared to try flashing it through TWRP as I would other .zip files, because I've read in here that Magisk modules aren't equal to flashable .zips. So what do I do?

By the way, if there's some hugely important info I'm missing, please hit me up. I haven't been on this forum for a literal three years, and so much has changed since, it's kind of exhausting trying to get back "into it" just to fix this and being bombarded with all the changes. But oh well... Thanks for any help!
 

zgfg

Senior Member
Oct 10, 2016
6,049
3,548
Hello, everyone!!

Can I just... Uh... Randomly fly in here and ask what the hell's been going on with Magisk?

I have a Mi 8, so an old-ish phone, with a custom ROM on Android 9. Have had it rooted for about 3+ years, always Magisk, never an issue. However, a couple weeks ago, Magisk suddenly "stopped working" in that my banking app started detecting the root, and not letting me use them. Not being the most knowledgeable person on this, and also having forgotten most of what I did in order to root the phone in the first place, I set out to Google-Fu this problem, thinking it wouldn't be so hard - I'd rooted the phone already, after all, right?!

A very confusing hour or two of Googling later, it seems like everything's changed. The creator now works at freakin' Google, MagiskHide is apparently dead, module searching from within Magisk looks dead too (doesn't work for me at least), and there's all this talk about some Riru and Zygote and all these things I've no idea about.

So, getting to my question... A basic one. How do I install this module? I'm hoping this is the fix I'm needing, and that my banking app stops nagging me after installing it... But every time I try to install the .zip file from within Magisk, the file is blacked out, so I can't select it. I can't select any other zip, either. I'm scared to try flashing it through TWRP as I would other .zip files, because I've read in here that Magisk modules aren't equal to flashable .zips. So what do I do?

By the way, if there's some hugely important info I'm missing, please hit me up. I haven't been on this forum for a literal three years, and so much has changed since, it's kind of exhausting trying to get back "into it" just to fix this and being bombarded with all the changes. But oh well... Thanks for any help!
First of all, what is exactly your Magisk version installed (old v23, or you upgraded to new Canary 23015 or else)?
 

Philnicolls89

Senior Member
Jun 28, 2019
672
294
32
A.C.T
Samsung Galaxy S10+
Hello, everyone!!

Can I just... Uh... Randomly fly in here and ask what the hell's been going on with Magisk?

I have a Mi 8, so an old-ish phone, with a custom ROM on Android 9. Have had it rooted for about 3+ years, always Magisk, never an issue. However, a couple weeks ago, Magisk suddenly "stopped working" in that my banking app started detecting the root, and not letting me use them. Not being the most knowledgeable person on this, and also having forgotten most of what I did in order to root the phone in the first place, I set out to Google-Fu this problem, thinking it wouldn't be so hard - I'd rooted the phone already, after all, right?!

A very confusing hour or two of Googling later, it seems like everything's changed. The creator now works at freakin' Google, MagiskHide is apparently dead, module searching from within Magisk looks dead too (doesn't work for me at least), and there's all this talk about some Riru and Zygote and all these things I've no idea about.

So, getting to my question... A basic one. How do I install this module? I'm hoping this is the fix I'm needing, and that my banking app stops nagging me after installing it... But every time I try to install the .zip file from within Magisk, the file is blacked out, so I can't select it. I can't select any other zip, either. I'm scared to try flashing it through TWRP as I would other .zip files, because I've read in here that Magisk modules aren't equal to flashable .zips. So what do I do?

By the way, if there's some hugely important info I'm missing, please hit me up. I haven't been on this forum for a literal three years, and so much has changed since, it's kind of exhausting trying to get back "into it" just to fix this and being bombarded with all the changes. But oh well... Thanks for any help!
I'm not sure why you are all of a sudden having issues with your banking app, my guess is an update changed how the app now detects root.
If you are passing safety net and the app in question is still detecting root then make sure magisk is hidden in settings, also try renaming magisk in settings and make sure the app is ticked in magisk hide.
You may also need more aggressive hide methods such as riru momohider.
As to the issue with modules being greyed out and not being able to be installed, I had this issue with a previous version of magisk, my work around was to rename the file. For example if the module was called 'module.zip' i renamed it to 'random.zip' and this stopped it from being greyed out!
 

pndwal

Senior Member
Hello, everyone!!

Can I just... Uh... Randomly fly in here and ask what the hell's been going on with Magisk?

I have a Mi 8, so an old-ish phone, with a custom ROM on Android 9. Have had it rooted for about 3+ years, always Magisk, never an issue. However, a couple weeks ago, Magisk suddenly "stopped working" in that my banking app started detecting the root, and not letting me use them. Not being the most knowledgeable person on this, and also having forgotten most of what I did in order to root the phone in the first place, I set out to Google-Fu this problem, thinking it wouldn't be so hard - I'd rooted the phone already, after all, right?!

A very confusing hour or two of Googling later, it seems like everything's changed. The creator now works at freakin' Google, MagiskHide is apparently dead, module searching from within Magisk looks dead too (doesn't work for me at least), and there's all this talk about some Riru and Zygote and all these things I've no idea about.

So, getting to my question... A basic one. How do I install this module? I'm hoping this is the fix I'm needing, and that my banking app stops nagging me after installing it... But every time I try to install the .zip file from within Magisk, the file is blacked out, so I can't select it. I can't select any other zip, either. I'm scared to try flashing it through TWRP as I would other .zip files, because I've read in here that Magisk modules aren't equal to flashable .zips. So what do I do?

By the way, if there's some hugely important info I'm missing, please hit me up. I haven't been on this forum for a literal three years, and so much has changed since, it's kind of exhausting trying to get back "into it" just to fix this and being bombarded with all the changes. But oh well... Thanks for any help!
I also suspect something has changed with a bank app update, but your changes aren't clear; if you are still on public Magisk nothing should have changed as yet with that AFAIK.

If you have moved / intend to move to new debug canary or upcoming public beta / stable Magisk builds, check this Changelog as well as Johns linked blog post to get the current picture:
https://github.com/topjohnwu/magisk-files/blob/9537c5d8cedfc09ca723ae0392b1219e75d9b636/notes.md

Access later changelogs here:
https://github.com/topjohnwu/magisk-files/commits/canary

If on a new canary build you'll need USNF (this module) ver. 2.2.0 to pass SafetyNet. If still on current stable but no longer passing SafetyNet, ver 2.1.2 + Riru (core) module will be your best bet... PW
 

ElBerretin

Senior Member
May 6, 2016
55
5
First of all, what is exactly your Magisk version installed (old v23, or you upgraded to new Canary 23015 or else)?
I updated to the latest Magisk (23.0 (23000) to be specific), and Magisk Manager app version 23.0 (21). No idea what Canary is, even though I've read the name a couple times now (is it like a "different" Magisk? What's the benefit?).

Despite the update, my phone isn't passing SafetyNet, which brings me to my issue (doesn't pass either basicintegrity nor ctsProfile, apparently).
 

ElBerretin

Senior Member
May 6, 2016
55
5
I'm not sure why you are all of a sudden having issues with your banking app, my guess is an update changed how the app now detects root.
If you are passing safety net and the app in question is still detecting root then make sure magisk is hidden in settings, also try renaming magisk in settings and make sure the app is ticked in magisk hide.
You may also need more aggressive hide methods such as riru momohider.
As to the issue with modules being greyed out and not being able to be installed, I had this issue with a previous version of magisk, my work around was to rename the file. For example if the module was called 'module.zip' i renamed it to 'random.zip' and this stopped it from being greyed out!
Yeah, it's weird, because for the longest time it worked without problem (and I know for a fact that it passed SafetyNet, because I originally installed Magisk to my phone to bypass Pokemon GO's restrictions, and I haven't played the game in a couple years now, yet still had it rooted).

Interestingly, now I can't pass either check of SafetyNet. Basically: I have root on my phone (checked with a Root Checker app, which detects it but also doesn't detect it once I apply MagiskHide to that specific app, which would mean both root and Hide work correctly; yet the banking app still detects my device as "altered", even though I've applied Hide to it as well).

To your suggestions - I can't rename Magisk! Every time I try, any name I give it, it just gives me a "Failed!" popup message.

But your other suggestion was great! I renamed the .zip files and voilá, they suddenly weren't greyed out. Currently installing the Riru module, whatever it may do, and I'll be trying the SafetyNet fix next. Will report back. Thanks for the help so far!
 
Yeah, it's weird, because for the longest time it worked without problem (and I know for a fact that it passed SafetyNet, because I originally installed Magisk to my phone to bypass Pokemon GO's restrictions, and I haven't played the game in a couple years now, yet still had it rooted).

Interestingly, now I can't pass either check of SafetyNet. Basically: I have root on my phone (checked with a Root Checker app, which detects it but also doesn't detect it once I apply MagiskHide to that specific app, which would mean both root and Hide work correctly; yet the banking app still detects my device as "altered", even though I've applied Hide to it as well).

To your suggestions - I can't rename Magisk! Every time I try, any name I give it, it just gives me a "Failed!" popup message.

But your other suggestion was great! I renamed the .zip files and voilá, they suddenly weren't greyed out. Currently installing the Riru module, whatever it may do, and I'll be trying the SafetyNet fix next. Will report back. Thanks for the help so far!
Universal SafetyNet should be all you need. Just make sure if you're on Magisk 23 to use the Riru version as Riru doesn't work with the canary builds. And to answer your other question, think of Canary like beta only more unstable. However that's not to say the canary Magisk is unstable, that's just typtically what Canary builds are.
The reason it worked for you years ago and doesn't now is because google is constantly upgrading their detection abilities. In fact I don't know if you're aware but there is talk that hardware attestation will be forced in the future and Basic won't be considered valid. When that happens it will be very difficult to pass SafetyNet if at all.
 
Last edited:

ElBerretin

Senior Member
May 6, 2016
55
5
I also suspect something has changed with a bank app update, but your changes aren't clear; if you are still on public Magisk nothing should have changed as yet with that AFAIK.

If you have moved / intend to move to new debug canary or upcoming public beta / stable Magisk builds, check this Changelog as well as Johns linked blog post to get the current picture:
https://github.com/topjohnwu/magisk-files/blob/9537c5d8cedfc09ca723ae0392b1219e75d9b636/notes.md

Access later changelogs here:
https://github.com/topjohnwu/magisk-files/commits/canary

If on a new canary build you'll need USNF (this module) ver. 2.2.0 to pass SafetyNet. If still on current stable but no longer passing SafetyNet, ver 2.1.2 + Riru (core) module will be your best bet... PW
I don't know exactly what changed, because to my eyes, nothing changed! I use my phone as normal, I'm the kind of user that doesn't really dab in "techie things" beyond having had to root my phone to install a custom ROM (I loathe MIUI) and used Magisk since, at the time, I played Pokémon GO and had to bypass SafetyNet. I haven't played the game in a couple years now, but still like my phone rooted, even though I don't really "do much" with it. So basically, not much that I have touched, it's strange.

Anyways... As far as I can tell, I'm on "stable" Magisk, v23. I don't know whether I should "move to Canary", I have no idea what Canary is or if it's "better" than good ole Magisk.

Lastly - following people here's advices, I managed to install both the Riru module, and the USNF (ver. 2.1.2), both are currently working.... Yet I'm still not passing either check of SafetyNet that Magisk allows you to check, and still can't get my banking app to work. It's disillusioning, I was certain that installing this module would do the trick, but alas....

So what's the next "best bet"? I don't really see what I'm doing wrong. My root works, my MagiskHide works (checked with a Root Check app as the troubleshooting guide advised), I have this module and Riru installed and running... What gives?
 

ElBerretin

Senior Member
May 6, 2016
55
5
Universal SafetyNet should be all you need. Just make sure if you're on Magisk 23 to use the Riru version as Riru doesn't work with the canary builds. And to answer your other question, think of Canary like beta only more unstable. However that's not to say the canary Magisk is unstable, that's just typtically what Canary builds are.
The reason it worked for you years ago and doesn't now is because google is constantly upgrading their detection abilities. In fact I don't know if you're aware but there is talk that hardware attestation will be forced in the future and Basic won't be considered valid. When that happens it will be very difficult to pass SafetyNet if at all.

Sadly, I've now managed to install both the Riru module and Universal SafetyNet Fix module, and even with both working, my phone doesn't pass either stage of the SafetyNet test built into Magisk. So weird... I feel like I'm missing something really obvious here, but I've tried everything suggested so far, without luck.

Interesting, that about Canary. Doesn't sound too enticing to me - I'm far too much of a non-techie user to be dwelling into a basically alpha program. Maybe if it turns out to be the only chance I have to pass SN, I could give it a try... But I'd much rather stay in regular Magisk for now, tbh.

And yeah, I imagined it had something to do with Google updating SN or something like that. And yes, sadly, one of the main things I was reading up on is how the "root scene", or at least the root-hiding scene, is coming to an abrupt ending with these hardware verification methods, and now Magisk creator going over to the "dark side" and working with the enemy. Sad times, I guess.

I know for a fact, though, that Magisk is working (or should be working) right now, and I'd love to use it as long as I possibly can...
 

Philnicolls89

Senior Member
Jun 28, 2019
672
294
32
A.C.T
Samsung Galaxy S10+
Sadly, I've now managed to install both the Riru module and Universal SafetyNet Fix module, and even with both working, my phone doesn't pass either stage of the SafetyNet test built into Magisk. So weird... I feel like I'm missing something really obvious here, but I've tried everything suggested so far, without luck.
Have you tried this version of USNF? 2.1.1
 

Attachments

  • safetynet-fix-v2.1.1.zip
    26.9 KB · Views: 1

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    It's in progress.

    Worth noting when @kdrag0n does publish the new Zygisk rewrite of USNF then gms and unstable will actually need to be removed from the DenyList for the module to function correctly, not added like some people are doing now to get previous USNF versions working.
    13
    Here I am, again. Some more cleaning of the thread was necessary.

    I'm only say this once: do not start any drama in the thread.

    users that do not want to or are not capable of paying what the pre-releases cost should just sit tight and wait. Until the pre-release becomes public (usually within a few weeks) whomever doesn't have/want access to it will have to use the currently publicly available releases. That might mean you need to use experimental releases of Magisk (of which there are a few), or the latest stable official Magisk release. Or you just suck it up and wait.

    That's it. It's that simple.

    No more drama or discussion of what is or isn't warez will be tolerated.

    Have a great day.
    10
    Hi everyone. A general announcement requires your attention:

    Let me direct your attention to the form rules, and in particular rule #6:
    If a piece of software requires you to pay to use it, then pay for it.

    There's currently a pre-release of USNF, available for @kdrag0n's Patreon supporters. It'll most likely eventually make it's way to the general public, like all the previous releases, but until then it requires you to pay... It might take a week, it might take a month, but the important part is that if you can't/won't pay for the software you wait and use the releases that are currently available to you.

    End of story.

    If you have anything to add or any questions my inbox is always open.

    Best regards
    Didgeridoohan
    Senior Moderator/Developer Committee/Developer Relations
    10
    A friendly Announcement (Not)

    Okay, sadly for the second time in a few days i have been personally PM'd, asking for a copy of the latest
    Universal SafetyNet Fix

    Just now, by some newbie with a total of 3 posts, probably only signed up to try a grab a copy of it

    Heres the message i replied with, and anyone else considering badgering other members for paid content should read and absorb

    Why are you asking me?

    Its a paid version, which will be released freely in a week or so

    Asking for paid content for free is the same as asking for Warez, and is banned on here

    DO NOT ASK AGAIN


    For starters, im not a patreon member of @kdrag0n s, i get my copy the same time as most people do when its graciously released after early adopters have a crack at it, and even if i did get it early, i wouldnt share it

    So stop asking

    Any further PM's i get or hear of, asking for a copy of an early release, will be forwarded to admin same as if you asked for warez on here...simple

    Update:

    Seems the 2nd guy didnt get the message:

    Follow up mesasage: "Sorry, I come from a poor country and cannot pay, please share the module link, thanks"

    Reported to admin
    7
    Latest kdrag0n
    Universal SafetyNet Fix Changelog:
    · v 2.2.0

    Changes since 2.1.1:

    • Ported module to Zygisk
    • Fixed screen-off Voice Match in Google Assistant
    • Fixed poor microphone quality with Voice Match enabled on Pixel 5
    • Fixed At a Glance weather display on Android 12
    • Fixed At a Glance settings on Android 12

    This version only supports Zygisk (latest Magisk Canary). See v2.1.2 for a Riru version.

    Download

    This version is currently only available to early access supporters. (Pledge now to get access or purchase one-time access.)

    https://kdrag0n.dev/patreon/safetynet-fix/v2.2.0

    👍😛 PW
  • 228
    Universal SafetyNet Fix
    Magisk module​

    This is a universal fix for SafetyNet on devices with hardware attestation and unlocked bootloaders. It defeats both hardware attestation and the new SafetyNet CTS profile updates released on January 12, 2021. The only requirement is that you can pass basic attestation, which requires a valid combination of device and model names, build fingerprints, and security patch levels.

    Passing basic attestation is mostly out-of-scope for this module; this module is meant to defy hardware attestation, as well as reported "basic" attestation that actually uses hardware under-the-hood. Nonetheless, it features a few basic attempts at helping pass basic attestation on some devices, especially older devices and devices running stock ROMs.

    No device-specific features (such as the new Pixel-exclusive Google Assistant design or screen-off voice match) will be lost with this fix.

    Android versions 8–11 are supported. Heavy OEM skins are not officially supported, but they may work depending on your luck and the particular ROM in question. Please do not report problems on such ROMs.

    How does it work?
    The way this workaround works is relatively low-level. An in-depth explanation, as well as source code and ROM changes, can be found on GitHub.

    Ideally, this workaround should be incorporated in ROMs instead of overriding part of the ROM in a Magisk module. The ROM changes for it are linked above for ROM developers to use.

    Downloads
    Downloads and changelogs can be found on GitHub. The topmost release is the latest.

    Telegram group
    Source code

    If this helped you, please consider donating to support development: recurring donation for sustainable support or buy me a coffee. Thank you for your support!
    28
    ok so there is a solution

    get the magisk module riru

    after you get riru get LSPosed

    after you get LSPosed get xprivacylua (in the LSPosed app)

    select play services in the xprivacylua settings IN the LSPosed app

    AND in the xprivacylua app itself after you've restarted.

    clear play service data

    check safetynet in magisk - enjoy?

    I would reboot between each step just to be safe but I know it's necessary to load the xprivacylua module

    s/o to saitama_96 for discovering it or so I'm led to believe
    22
    I managed to fix the 3rd party app fingerprint issue on my Samsung w/ Android 10 (commented on this Github issue too). Basically the AOSP keystore is not fully compatible with the Samsung one so I decided to binary patch the one on my phone and ended up with this module. Now both fingerprint and SafetyNet works.
    Notes:
    - This disables key attestation for every app, idk if it breaks anything, nothing broke so far
    - Only change is the replaced system_sdk29/bin/keystore with the Samsung one (8 bytes modified)
    - Only works on Android 10
    - Might or might not work for you, use at your own risk.
    21
    It's in progress.

    Worth noting when @kdrag0n does publish the new Zygisk rewrite of USNF then gms and unstable will actually need to be removed from the DenyList for the module to function correctly, not added like some people are doing now to get previous USNF versions working.
    18
    v2.1.0 is officially released and open sourced now, so everyone can stop being ****ing babies. 😏👍