MAGISK MODULE ❯ Universal SafetyNet Fix 2.4.0

Search This thread

stubbs95

New member
Feb 9, 2023
4
0
OnePlus 7T pro with derpfest 13 custom ROM and magisk delta, even with the 3.0 mod, cts fails.
Here my modules and settings:
 

Attachments

  • Screenshot_20230209-064016_Magisk_Delta.png
    Screenshot_20230209-064016_Magisk_Delta.png
    430.4 KB · Views: 128
  • Screenshot_20230209-064135_Magisk_Delta.png
    Screenshot_20230209-064135_Magisk_Delta.png
    322.2 KB · Views: 126

Bxperiaz3

Senior Member
May 19, 2015
295
129
Actually I'm still getting play store not certified and wallet gives the security standards blurb when I open. Passes playstore integrity and safety net though? I'll try a contactless payment shortly
 

Displax

Senior Member
Jan 19, 2015
384
2,123
27
Ukraine - Kyiv
Google Pixel 4a 5G
derpfest 13 custom ROM
Expected that it not work on ROM that manipulate system.prop himself, need to wait wix in this ROMs

Did you publish the source code for the MOD3.0.
Not now. Need some tests and improvements and than will be published.
 
Last edited:

crypticc

Senior Member
Aug 22, 2009
1,249
174
London
Ok so I

Ok so here's what I did:
  1. Changed to 2.3.1 mod 2.1
  2. Reboot
  3. Uninstalled/uninstall updates and clear storage for: gpay, wallet, play services, play protect, and play store
  4. Remove all of the above from the denylist
  5. Reboot
  6. reinstall/update: gpay, wallet, play services
  7. Run gpay and wallet to get them to "integrate" . Wallet app did not disappear like it had previously
  8. Have not added any of these back to denylist
  9. Fails cts, passes basic, fails device and Strong
Am I now at the point that I'm having the same issue as everyone else?
How are you able to get both Gpay and wallet. I only see wallet in play store.

Which region are you? I recently came back from holiday in India and they were still using Gpay which was deprecated years ago I thought.
 

crypticc

Senior Member
Aug 22, 2009
1,249
174
London
No new fix as of yet. I'm having the same issue as you. It started after updating to the February release on my Pixel 6 Pro. There were also a few Google app updates that may have contributed to it as well. I know there are some developers working on it already but who knows how long it will be before they figure something out. Guess I'll be using my debit card instead of tap and pay for a while.

I'm still on Google TQ1A.221205.011 which I understand is January and yet over the weekend sporadic issues fixed by wiping the usual app data and reboot, but as of yesterday even that wouldn't work.
I'm thinking they did something on the quiet in FW before xmas, but unused, and just released the app capability recently.
 

crypticc

Senior Member
Aug 22, 2009
1,249
174
London
Some further information... I've cleared and then uninstalled wallet, rebooted. But wallet is still in toolbar and launches when clicked. It's not in the app list, even as a system app so I can't clear data. Wondering if there's another apk labelled differently and maybe it's that which is being validated. Any next steps/logs needed?
 

inzaghi89

Senior Member
May 16, 2015
121
28
How are you able to get both Gpay and wallet. I only see wallet in play store.

Which region are you? I recently came back from holiday in India and they were still using Gpay which was deprecated years ago I thought.
You need to install universal safetynet modified by @Displax . Afair it's on page 91 this thread. For me it works.
 

shoey63

Recognized Contributor
Haha! 😝 ... But your device / efforts keeps giving valuable clues!...

And I'm betting you'll restore strongIntegrity rooted because Root of trust still returns Device locked: true w/ Verified boot state: Verified...

This should be fine... You never needed the PI hardware-based verdict enforcement bypass that is mismatched fingerprint prop anyway. 😜... Were you changing it for some particular reason?
Well yes. Had to change it from original stock 12 to stock 10 to get the PI hardware-based verdict enforcement. Now that doesn't work, even Yasnac hardware backed attestation fails unless I use the original 12 stock fingerprint.
👍

Maybe... May need more now (and must figure out which)... Or MHPC may have handled sensitive props differently... Nb. MHPC does this by default, without configuring anything... So I'd try restoring MHPC w/o fingerprint changes...

If you only configured fingerprint, you could activate again and revert to stock print... Or if you made many MHPC changes, fully remove the module and reboot before installing and rebooting again w/o configuring anything... 'MagiskHide props' should be active by default to adjust sensitive props as needed...

You could also try disabling Shamiko (enforce denylist, but don't just deactivate Shamiko Zygisk parts this way, disable Shamiko module properly also before rebooting) after trying with MHPC in case Shamiko's sensitive prop adjustment method is the issue or part of it...

Also, sometimes clearing Play Services data is needed to fix some attestations... Do that too...

Tried the lot. Even HuskyDG's prop reset module. No change.
Please say/remind me of
- ROM (stock?),
- Android version,
- anything in denylist aside from 2 gms processes and banks + G Pay/Wallet?,
- all modules...

May think of other considerations later, but that's all I have for now... 🥴 PW
ROG Phone 3 (ZS661KS)
WW-31.0210.0210.258 (Stock android 12)Screenshot_20230209-172455551.jpgScreenshot_20230209-172337188.jpg
 
  • Like
Reactions: pndwal

jknaggs

Senior Member
Oct 3, 2010
140
52
Manchester UK
Google Pixel 6 Pro
Ok, just installed this morning in UK and after trying many different variations Pixel 7 pro now passes. Shamiko enabled, no enforce denylist and only cache wiped in play services & wallet. Will try payment today and report back. View attachment 5831613
OK, have carried out a couple of transactions on Gipsy all went without a hitch. However on initial opening of Gpay I had device unsafe warning. Exited, ran YASNAC and passed. Reopened Gpay , no warning and payment successful.
 

Attachments

  • Screenshot_20230209-095720.png
    Screenshot_20230209-095720.png
    1.1 MB · Views: 49

straumli

Senior Member
Jan 12, 2012
53
6
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
Wrt Magisk Modules view: I am able to select and install the old and known v2.4.0.zip but I cannot select this mod. It is greyed out somehow? Could somebody advise what I am doing wrong?

1675937971445.png
 

inzaghi89

Senior Member
May 16, 2015
121
28

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