当前位置: 首页 > 软件库 > 手机/移动开发 > >

safetynet-fix

授权协议 View license
开发语言 Java
所属分类 手机/移动开发
软件类型 开源软件
地区 不详
投 递 者 孔俊友
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Universal SafetyNet Fix

This is a universal fix for SafetyNet on devices with hardware-backed attestation and unlocked bootloaders (or custom verified boot keys). It defeats both hardware attestation and the 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. MagiskHide is required as a result.

Passing basic attestation is 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. Use MagiskHide Props Config to spoof your CTS profile if you have trouble passing basic attestation. This is a common issue on old devices and custom ROMs.

Android versions 7–12 are supported, including OEM skins such as Samsung One UI and MIUI. This is a Riru module, so Riru must be installed in order for it to work.

Installation

Download and install the latest release from GitHub Releases. The module must be installed using Magisk Manager, not TWRP or any other custom recovery.

Always make sure you have the latest version of the module installed before reporting any issues.

How does it work?

Google Play Services opportunistically uses hardware-backed attestation to enforce SafetyNet security (since January 12, 2021), and enforces its usage based on the device model name (since September 2, 2021).

This module uses Riru to inject code into the Google Play Services process and then register a fake keystore provider that overrides the real one. When Play Services attempts to use key attestation, it throws an exception and pretends that the device lacks support for key attestation. This causes SafetyNet to fall back to basic attestation, which is much weaker and can be bypassed with existing methods.

However, blocking key attestation alone does not suffice because basic attestation fails on devices that are known by Google to support hardware-backed attestation. This module bypasses the check by appending a space character to the device model name. This has minimal impact on UX when only applied to Google Play Services, but it's sufficient for bypassing enforcement of hardware-backed attestation.

Unlike many other approaches, this doesn't break other features because key attestation is only blocked for Google Play Services, and even within Play Services, it is only blocked for SafetyNet code. As a result, other attestation-based features (such as using the device as a security key) will still work.

ROM integration

Ideally, this workaround should be incorporated in custom ROMs instead of injecting code with a Magisk module. Please note that the following patches have not been updated for the new September 2 changes yet.

Commits for the system framework version of the workaround:

Support

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

 相关资料
  • 在解码签名部分时。 当解码看到这个断断续续的错误时,我做错了什么? 然后,我开始使用JWT库来解码令牌。 首先我尝试了 我在我的Android应用程序中做错了什么,阻止了auth0 Android jwt库的正常工作? 然后我在我的Android应用程序中尝试了库。 当我执行这个代码时:- 我从这个问题base64:java.lang.IllegalArgumentException:非法字符中发

  • 我想用SafetyNet验证电话号码Firebase,而不是重新CAPTCHA验证。我在这里遵循Firebase留档:https://firebase.google.com/docs/auth/android/phone-auth 在谷歌API控制台中,我启用了Android设备验证API 在Firebase控制台中,我添加了SHA-256指纹 重新安装谷歌服务。json并将其添加到项目中 它总是

  • 我有这个错误: 我正在和kotlin一起工作AndroidStudio,主要的问题是每次我尝试通过firebase电话身份验证登录时都会出现验证码。 所做的事情: 添加了firebase项目中的所有键(SHA-1、SHA-256--调试和发布) 启用的Android设备验证 删除时,会出现以下错误。 失败 我总结说,如果错误解决了,所有其他错误都将自动解决。

  • 用SafetyNet检查失败并出现错误(如下)。相反,reapcha会在浏览器打开时触发。 如果有人遇到,请帮忙。下面是您需要的所有信息。 授权代码: 错误日志: 颤振医生: 在Firebase控制台中,启用了安全网https://i.imgur.com/gBhzRT9.png 添加了SHA-1和SHA-256 添加到构建中。gradle 在谷歌云中添加了“Android设备验证”,并配置了与Fi

  • 我试图在一个Android应用程序中实现SafetyNet,但遇到了这个问题: 有什么想法吗? 谢了!

  • 问题内容: 当使用Spring 3.0功能注释计划任务时,我想从配置文件中设置as参数,而不是像当前那样将其硬连接到任务类中。 不幸的是,使用Spring表达式语言(SpEL)的方法似乎返回了一个String对象,该对象又不能按照参数要求自动装箱成长值。 问题答案: 我想注释是毫无疑问的。因此,可能适合您的解决方案是使用XML配置。让我们考虑以下示例(从Spring doc 复制): …或者如果从