Top Related Projects
Quick Overview
SafetyNet Fix is a Magisk module designed to bypass SafetyNet and Play Integrity attestation on rooted Android devices. It aims to help users pass SafetyNet checks and use apps that require SafetyNet attestation, even on rooted devices with custom ROMs or modifications.
Pros
- Enables rooted devices to pass SafetyNet and Play Integrity checks
- Supports a wide range of Android devices and custom ROMs
- Regularly updated to keep up with Google's security changes
- Easy to install and use with Magisk
Cons
- May not work on all devices or Android versions
- Requires Magisk, which means the device must be rooted
- Could potentially be detected or blocked by future SafetyNet updates
- May not be a long-term solution as Google continues to improve security measures
Getting Started
- Ensure your device is rooted with Magisk installed
- Download the latest SafetyNet Fix zip file from the GitHub releases page
- Open Magisk Manager and go to the Modules section
- Tap the "Install from storage" button and select the downloaded zip file
- Reboot your device after installation
- Use a SafetyNet checker app to verify if the fix is working
Note: The project does not provide code examples as it's a Magisk module rather than a code library.
Competitor Comparisons
The Magic Mask for Android
Pros of Magisk
- More comprehensive root solution with module system
- Actively maintained with frequent updates
- Large community and extensive module ecosystem
Cons of Magisk
- More complex setup and usage
- Higher risk of breaking system integrity
- May trigger stronger detection mechanisms in some apps
Code Comparison
Magisk (Java):
public class SuImpl extends SuMasterImpl {
private static final int ROOT_ACCESS_DISABLED = 0;
private static final int ROOT_ACCESS_APPS_ONLY = 1;
private static final int ROOT_ACCESS_ADB_ONLY = 2;
private static final int ROOT_ACCESS_APPS_AND_ADB = 3;
}
SafetyNet-Fix (Kotlin):
object Props {
private val props = HashMap<String, String>()
fun set(key: String, value: String) {
props[key] = value
}
}
Magisk provides a more extensive codebase for root management, while SafetyNet-Fix focuses specifically on bypassing SafetyNet checks. Magisk's implementation includes broader root access controls, whereas SafetyNet-Fix primarily deals with property manipulation to pass integrity checks.
Using system APIs directly with adb/root privileges from normal apps through a Java process started with app_process.
Pros of Shizuku
- Provides a more comprehensive set of features for app development and system interaction
- Offers a stable API for developers to build upon
- Supports a wider range of Android versions and devices
Cons of Shizuku
- Requires more setup and configuration compared to safetynet-fix
- May have a steeper learning curve for developers new to Android system interactions
- Potentially higher resource usage due to its broader functionality
Code Comparison
Shizuku (Java):
@SystemService
public interface IPackageManager {
List<PackageInfo> getInstalledPackages(int flags, int userId);
PackageInfo getPackageInfo(String packageName, int flags, int userId);
}
safetynet-fix (Kotlin):
private fun patchPlayServices(classLoader: ClassLoader) {
val cls = classLoader.loadClass("com.google.android.gms.common.GoogleSignatureVerifier")
val originalMethod = cls.getDeclaredMethod("isGooglePublicSignedOrSystemApp", ComponentInfo::class.java)
originalMethod.setAccessible(true)
}
The code snippets demonstrate the different approaches: Shizuku provides a higher-level API for system interactions, while safetynet-fix focuses on specific modifications to bypass SafetyNet checks. Shizuku's code is more abstracted and developer-friendly, whereas safetynet-fix directly manipulates system classes for its specific purpose.
LSPosed Framework
Pros of LSPosed
- More comprehensive framework for system-wide modifications
- Supports a wide range of modules for various customizations
- Active development with frequent updates and community support
Cons of LSPosed
- More complex setup and usage compared to safetynet-fix
- Potentially higher impact on system stability and performance
- May trigger additional security checks on some devices
Code Comparison
LSPosed (XposedBridge.java):
public class XposedBridge {
private static final String TAG = "LSPosed";
private static final CopyOnWriteSortedSet<XC_LoadPackage> sLoadedPackageCallbacks = new CopyOnWriteSortedSet<>();
// ...
}
safetynet-fix (main.cpp):
#include <cstdio>
#include <unistd.h>
#include "logging.hpp"
int main(int argc, char *argv[]) {
// ...
}
LSPosed offers a more extensive framework for system modifications, while safetynet-fix focuses specifically on bypassing SafetyNet checks. LSPosed provides greater flexibility but requires more setup and maintenance. safetynet-fix is simpler and more targeted but may have limited functionality beyond its specific purpose.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Universal SafetyNet Fix
Magisk module to work around Google's SafetyNet and Play Integrity attestation.
This module works around hardware attestation and updates to SafetyNet and Play Integrity 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 or Play Integrity with this module, spoof the profile of a certified device by copying ro.product
properties. MagiskHide Props Config is an easy way to do so on Magisk v23 and older. 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 are supported, including OEM skins such as Samsung One UI and MIUI.
Download
Install the downloaded module in Magisk Manager, then enable Zygisk in Magisk settings.
There is also a Riru version for Magisk 23 and older, but it is no longer updated. Please update to a current version of Magisk and use the Zygisk version.
How does it work?
See Details for details about how this module works.
ROM integration
Ideally, this workaround should be incorporated in custom ROMs instead of injecting code with a Magisk module. See the ProtonAOSP website for more information.
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.
Top Related Projects
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot