MAGISK MODULE ❯ Universal SafetyNet Fix 2.4.0

Search This thread

crok.bic

Senior Member
Dec 22, 2010
516
330
Debrecen
Added BDO in magiskhide. Renamed magisk app into something else. Rebooted. No dice.

BDO app refuses to work. What's different with your setup comapared to mine that you're able to make it run?

I used to "freeze" the hidden Magisk app, too.. works for me (you app does indirect discovery I guess). I "freeze" the hidden Magisk app with AirFrozen after I set up everything I wanted to be set up in Magisk and my banking app (myRaiffeisen Hungary) works. Here's my "method" I wrote on Xiaomi.EU forum.. I got the idea from Didgeridoohan's Magisk help page.
 
  • Like
Reactions: pndwal

pndwal

Senior Member
  • Like
Reactions: Slim2none4u

Nikishek

Senior Member
May 24, 2007
84
21
pndwal:
Sorry, I have it somehow connected mainly with edXposed and LSPosed (which are only on Android 8 and later)
But anyway, in the first post of this forum is Android versions 8–11 are supported which is a bit confusing.
 

pndwal

Senior Member
Never fear, i did link the kiddie to my automatic modded version of Momo-Hider, here: https://xdaforums.com/t/magisk-module-universal-safetynet-fix-1-1-0.4217823/post-85630515

As well as linking to the HP of Momo-Hider (containing the manual method of adding those files) back a page in response to his original post

Yours,

Nigel :)
Ah, sure, but could help others reading / trying / thinking it does nothing when it does... 😐

I don't doubt the ability of mice like you to give computing / coding advice to the Arthur Dents of this world. (Like him we're all kiddies really.)

After all, any who've read the Guide to the Galaxy know that mice built the thing to compute what Ultimate question had originally been asked to result in Deep Thought's most satisfying conclusion: 42.

But I'm 30 billion times more intelligent than a live mattress and even I get a headache thinking about it...

I don't know why you Liked this, but I think you ought to know that for devices where Magisk does not reside in /sbin (eg. running Android 11) com.google.android.gms is needed in hidelist in addition to com.google.android.gms.unstable, and that I'm feeling very depressed.

I'm going now, to solve the major mathematical, physical, chemical, biological, sociological, philosophical, etymological, meteorological and psychological problems of the Universe, excepting my own, three times over, and compose a number of lullabies. I won't enjoy it.

Marvin ☹️
 
Last edited:
  • Like
  • Haha
Reactions: paul c and 73sydney

pndwal

Senior Member
pndwal:
Sorry, I have it somehow connected mainly with edXposed and LSPosed (which are only on Android 8 and later)
But anyway, in the first post of this forum is Android versions 8–11 are supported which is a bit confusing.
Still says "Universal SafetyNet Fix 1.1.0" too... Clearly OP doesn't update on XDA much and hasn't even announced later releases here.

His GitHub on the other hand seams to be an up-to-date source. PW
 

christantoan

Senior Member
Oct 9, 2015
259
109
OnePlus 3T
OnePlus 7 Pro
To those who are bored, can you try if you can prevent this banking app from detecting root? This banking app is the only one that's refusing to work on my device. Other banking apps work with just "magiskhiding" it. Some of my apps work if put them inside Island. Just this one app that refuses to work no matter what.

If you ever want to try "breaking" it to not detect root, the name of the app is BDO Digital Banking (by BDO Unibank, Inc.)
Disclaimer: I'm not (yet) using this module but interested in its development.

What works for me (until login screen) is using MagiskHide and (renaming TWRP folder in /sdcard OR using Storage Isolation on the app)
 
  • Like
Reactions: onoakino

onoakino

Senior Member
Sep 25, 2015
332
78
Manila
I used to "freeze" the hidden Magisk app, too.. works for me (you app does indirect discovery I guess). I "freeze" the hidden Magisk app with AirFrozen after I set up everything I wanted to be set up in Magisk and my banking app (myRaiffeisen Hungary) works. Here's my "method" I wrote on Xiaomi.EU forum.. I got the idea from Didgeridoohan's Magisk help page.
Thank you. I tried AirFrozen and it was able to freeze my renamed magisk app, but I get the same error, unfortunately.
 

Attachments

  • Screenshot_2021-09-15-22-13-05-971_www.mobile.bdo.com.ph.jpg
    Screenshot_2021-09-15-22-13-05-971_www.mobile.bdo.com.ph.jpg
    230.4 KB · Views: 53

onoakino

Senior Member
Sep 25, 2015
332
78
Manila
I used to "freeze" the hidden Magisk app, too.. works for me (you app does indirect discovery I guess). I "freeze" the hidden Magisk app with AirFrozen after I set up everything I wanted to be set up in Magisk and my banking app (myRaiffeisen Hungary) works. Here's my "method" I wrote on Xiaomi.EU forum.. I got the idea from Didgeridoohan's Magisk help page.
Thank you for this suggestion. I tried AirFrozen, but it didn't work. But I love how AirFrozen freezes (makes renamed magisk app disappear from system tray). Maybe this will work with other apps so I'll definitely try this in the future.
 

onoakino

Senior Member
Sep 25, 2015
332
78
Manila
Disclaimer: I'm not (yet) using this module but interested in its development.

What works for me (until login screen) is using MagiskHide and (renaming TWRP folder in /sdcard OR using Storage Isolation on the app)
Finally, this solved the issue for me!

What I did:

1. Added BDO app to magiskhide.
2. Added BDO to Storage Isolation

You are also correct in saying that as an alternative to #2, renaming the TWRP folder also does the trick.

Apparently, the app gets triggered when it "sees" TWRP folder on the sdcard and trips the "rooted, jailed, bootloader unlocked" stop error.

Thank you, @christantoan



ps:
@Chandru123
Thank you for the suggestion of upgrading to Alpha Magisk. I didn't try it because I am happy with Magisk 23 stable channel right now though. But thanks for the suggestion.
 

Attachments

  • Screenshot_2021-09-15-22-45-03-802_www.mobile.bdo.com.ph.jpg
    Screenshot_2021-09-15-22-45-03-802_www.mobile.bdo.com.ph.jpg
    183.5 KB · Views: 55

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
16,773
40,452
Halifax
GT-i9250
Google Nexus 4
Only to try LSPosed / PrivacyLua solution, or petition ROM dev to merge commit linked here:
https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-85580011 👍
That frameworks_base repo and commit are missing now, perhaps @Displax can repost somewhere using gist for just the example diff/patch? Then @kdrag0n might be interested in adding it to the USNF README as another "out of scope" example.

Edit: Actually, scratch that, looks like @kdrag0n will make a patch himself when he has time for ROM stuff next: https://github.com/kdrag0n/safetynet-fix/issues/88#issuecomment-917729677

Should still probably be linked in the README though, since there seem to be a lot of confused custom ROM users always asking for help...
 
Last edited:
  • Like
Reactions: pndwal

pndwal

Senior Member
That frameworks_base repo and commit are missing now, perhaps @Displax can repost somewhere using gist for just the example diff/patch? Then @kdrag0n might be interested in adding it to the USNF README as another "out of scope" example.

Edit: Actually, scratch that, looks like @kdrag0n will make a patch himself when he has time for ROM stuff next: https://github.com/kdrag0n/safetynet-fix/issues/88#issuecomment-917729677
Not sure this is actually referring to ROMs like PixelExperience (with "prebuilded utils, which manipulate the props values. Need to fix inside there").

He used to give two fairly comprehensive methods on main page for normal ROM Integration. Now there's just this:
https://github.com/kdrag0n/safetynet-fix#rom-integration with a note that "the following patches have not been updated for the new September 2 changes yet" and a link for old (January) Android 11 framework fix only. (A post there says to cherry pick the commit.)

Seems he just meant he'll update standard AOSP framework fixes (from old 1.x series non Riru solution) with his Proton ROM updates.

Some specific fix example for ROM devs manipulating props would still be useful...
Should still probably be linked in the README though, since there seem to be a lot of confused custom ROM users always asking for help...
Agree. PW
 
  • Like
Reactions: osm0sis

eNVy

Senior Member
Dec 11, 2010
349
98
Bangalore
OnePlus 5
Google Pixel 4a
Hi, I have a Pixel 4a with magisk stable v23 and safetneyfix v2.1.1.
SafetyNet is a success and I have hidden all of my banking apps and it is working fine.
I'm from India and there is one banking app (Axis Mobile) and it is able to detect root and thus I can't use the app.

Is anyone else facing the same issue. Were you able to fix it ?
Can anyone help in maybe some way I haven't thought of. (like: some people have suggested in the past having twrp folder can also cause root detection. PS: I don't have the folder.)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 337
    Universal SafetyNet Fix
    Magisk module​

    Magisk module to work around Google's SafetyNet attestation.

    This module works around hardware attestation and recent updates to SafetyNet CTS profile checks. You must already be able to pass basic CTS profile attestation, which requires a valid combination of device and model names, build fingerprints, and security patch levels.

    If you still have trouble passing SafetyNet with this module, use MagiskHide Props Config to spoof a certified device profile. This is a common issue on old devices, custom ROMs, and stock ROMs without GMS certification (e.g. Chinese ROMs).

    Android versions up to 13 Beta 3 are supported, including OEM skins such as Samsung One UI and MIUI.

    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 custom ROMs instead of injecting code with a Magisk module. See the ProtonAOSP website for more information.

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

    Latest release
    v2.4.0

    Highlights
    • Play Integrity bypass without breaking device checks or causing other issues
    • Disabled use of hardware attestation on Pixel 7 and newer (@anirudhgupta109)
    Other changes
    • Updated instructions for newer Android and Magisk versions
    • Better debugging for future development
    This version only supports Zygisk (Magisk 24 and newer).

    It's taken a while to find a way to bypass Play Integrity that doesn't require spoofing the build fingerprint permanently, but I wanted to make sure this module doesn't cause any unnecessary breakage. Just like the original goal of Universal SafetyNet Fix, this minimizes adverse effects by spoofing dynamically at runtime only when necessary. Enjoy!

    If you found this helpful, please consider supporting development with a recurring donation for rewards such as early access to updates, exclusive behind-the-scenes development news, and priority support.
    Alternatively, you can also buy me a coffee. All support is appreciated ❤️

    Source code
    223
    So, here is my modification of USNF with Play Integrity API bypass.

    It changes fingerprint to old 7.1.2 6.0 (LOL) and apply it only for GMS SafetyNet process (by Zygisk injection), so your original prints/security path level does not change. This avoids many side effects/problems with global props changing.

    Updated 3.0:
    No words needed, you understand everything yourself 😜

    Updated 2.1:
    Hide "Enable OEM Unlock" setting

    Updated 2.0:
    Bypassing DEVICE_INTEGRITY for devices that shipped with Android 13+ (Pixel`s 7 )

    Updated:
    Drop fingerprint to lowest possible (6.0) to ensure that no one use same Android version

    Usage:
    1. Delete/disable/reset MagiskHidePropsConfig (if installed).
    2. Just install it over old Universal SafetyNet Fix and reboot device.
    3. You may be needed to wipe GMS data (not cache) if there is no result immediately.

    Many thanks to @1nikolas for integrity checker.

    Source code: https://github.com/Displax/safetynet-fix/tree/integrity
    58
    So, here is my new modification of USNF with Play Integrity API bypass.

    It is now based on top of original v2.4.0 codebase instead of v2.3.1, with adding new hiding algorithm for current realities and some code refreshing.

    Changelog:

    Version 1.2
    * Fix crash and endless tests loop/failing on Android < 9.0 (bug from original version 2.4.0).
    * Do not unpatch (revert) changes. To prevent possible tests failing after a while on some ROMs (cross conflicts).

    Version 1.1
    * Fix KeyStore hook desynchronization (tests randomly failing problem).


    Usage:
    1. Delete/disable/reset MagiskHidePropsConfig (if installed).
    2. Just install it over old Universal SafetyNet Fix and reboot device.
    3. You may be needed to wipe GMS data (not cache) if there is no result immediately.

    Source code: https://github.com/Displax/safetynet-fix/tree/dev
    33
    So, created separate thread for my mod. Welcome)

    32
    Folks, the SafetyNet API was depreciated last Month with 'full turndown' slated for June 2024 and the introduction of the new Play Integrity API. It has also become clear that Google apps are simply the first to adopt the long foretold Play Integrity API; all responsible banks are bound to follow suit in short order, and at least before the June 2023 migration deadline.

    This means (assuming fully deployed Hardware Key Attestation doesn't come first 😬) that the need for a 'Universal Play Integrity Fix' has become quite urgent.

    We currently have workarounds involving using older fingerprint props by means of MHPC module (similar to fix needed for uncertified ROMs), but success/mileage varies per device and users of regular bank apps / gamers etc on stock devices will all soon be forced to experiment with MHPC prints also... This is hardly ideal.

    So I've made an issue report/request on USNF GitHub as follows. This information may be insightful to users here also...

    Please let me know here if I have missed anything important, or add any technically relevant details there...

    PLEASE DON'T spam that issue with unimportant details or queries... (The previous issue is already burgeoning w/ OT.) That's what this thread is for... 😛 :

    Please make 'Universal Play Integrity Fix' ... #204

    Fixes to expand 'Universal SafetyNet Fix' to become a 'Universal Play Integrity Fix' are needed.

    The SafetyNet Attestation API is deprecated and has been replaced by the Play Integrity API.
    https://developer.android.com/training/safetynet/deprecation-timeline

    New Play Integrity API is rolling out from June 2022, and evidently Google Play Store and Google Pay/Wallet are already using its verdict.

    June 2023 is the Migration Deadline for app developers. This will also allow their older app versions to continue working with SafetyNet API for a limited time.

    June 2024 is the End of life for SafetyNet API; its attestation will no longer work for any app version, and apps will receive an error.

    The new Integrity API has more strict requirements for passing attestation, and this seems to be enforced in Android 11+ particularly.

    Currently (evidently due to this), device security issues are detected by

    1. Google Pay/Wallet, which may state "You can't pay contactless with this device...(Your phone doesn't meet software standards)" on updating or attempting to add a card despite in-app Contactless setup stating "You're ready to pay contactless with your phone (Your phone meets security requirements)", and
    2. Google Play Store, which may no longer show apps like Netflix w/ Android 11+ (developers can 'exclude devices from their app's distribution based on their device integrity . Device exclusion is based on the latest device integrity verdict that the Play Store app receives from the Play Integrity API') despite in-app settings showing Play Protect 'Device is certified' result.
    I'm guessing that the 'passing' messages based on the old SafetyNet API are likely to realigned soon.

    A workaround that evidently allows Play Integrity API attestation to pass (and solve Wallet / Play Store issues also) has been discovered. It involves spoofing an earlier certified ROM, generally by using MagiskHide Props Config module to change fingerprint prop to one for Android 10 or earlier.

    Undoubtedly other apps will begin to detect broken TEE etc / fail as they migrate or begin integrating the Play Integrity API.

    A 'Universal Play Integrity Fix' will evidently require more understanding / research into how the fingerprint prop is used, and possibly other new behaviours.

    Here's hoping... 🙃 PW