If you wish to step into unchartered territory, then the first prerequisite is to gain administrative privileges. This could be done either by flashing the Magisk patched boot.img or by flashing the Magisk App via TWRP. Once you do so, you will get access to the system partition. This in turn will allow you to flash Magisk Modules, Xposed Framework, Substratum Themes, and a plethora of other tweaks as well. However, all these tweaks come at a cost……
What is Safety in Android?
As soon as you successfully root your device, it will end up triggering a safety flag. Also known as SafetyNet, this is an API that is embedded into your device by Google in order to check if your device has been modified or not. Only when your device is able to pass this test will you be able to use certain types of apps.
Moreover, Google has switched over from BASIC (which was easier to bypass) and has now implemented the Hardware-based Attestation, which can’t be easily fooled. But fret not, there’s still a handy way out. You could spoof the BASIC Attestation over the current Hardware-based which in turn will allow you to easily able to pass the SafetyNet Test on your rooted Android 12 device.
What if SafetyNet Fails?
Well, if the test fails, then you wouldn’t be able to use any banking apps or streaming services like Netflix that make use of WideVine Certification. Along the same lines, games like Pokemon Go wouldn’t function along the expected lines.
The basicIntegrity and ctsProfile Tests
All these apps just check for the SafetyNet flag’s value, and if it comes out to be ‘Failure’, then it wouldn’t allow you to carry out its functionality onto your device. In this regard, these apps carry out two SafetyNet tests- the basicIntegrity and ctsProfile. In order to successfully use these apps, you will have to pass both these tests (passing just one wouldn’t do any good, see the below image).
However, with each new release of Android, things are becoming a tad difficult. And the recent development surrounding Magisk does do any good to the tech enthusiast either. But the fact that it’s an open-source platform is more than sufficient for us. And making full use of the same, this guide will show you the steps to pass the SafetyNet Test on your rooted Android 12/13 device. Follow along.
How to Pass SafetyNet on Rooted Android 12/13
Given below are two different methods to get this job done. The first method is the old and lengthier approach but initially, it was our only escape route. However, now there is a new and shorter approach available as well, which we have listed in Method 2 [recommended]. Both these methods should work across numerous Android devices [tested on Pixel 6/7 series and the OnePlus 7 series]. Likewise, it should work on both Android 12 and 13 [should also work on older Android versions, but I haven’t tested them myself]. So on that note, let’s get started. Droidwin and its members wouldn’t be held responsible in case of a thermonuclear war, your alarm doesn’t wake you up, or if anything happens to your device and data by performing the below steps.
METHOD 1: Pass SafetyNet using Magisk Hide Props Config [OLD]
This is the lengthier of the two methods and involves spoofing the device’s fingerprint to one of the older devices that followed Basic Attestation and were easier to bypass.
STEP 1: Install MagiskHide Props Config
STEP 2: Force Basic Attestation
We will now be starting with the implementation of the BASIC attestation on top of the hardware-based so that it becomes easier to bypass. Here’s how it could be done:
STEP 3: Instal Riru Module
Next up, you will have to install the Riru Module, which is a prerequisite for the SafetyNet Fix Module (STEP 5).
STEP 4: Flash SafetyNet Fix
This module will help us to implement the BASIC attestation on top of the hardware one. And yes, it is the final piece of this jigsaw, completing which you would have achieved success.
STEP 5: Enforce Deny List and Enable Zygisk
Deny List is the new name for Magisk Hide. For the unaware, it is the feature through which you could hide root from various installed apps onto your device. So let’s first enable this Deny List and then configure it according to the requirement.
STEP 6: Configure DenyList
STEP 7: Hide Magisk App
STEP 8: Delete Play Service and Play Store Data
STEP 9: Check SafetyNet Results
UPDATE 1: The latest update to the Magisk app has removed the option to check SafetyNet. So you will now have to take the help of a third-party app. As for this guide, we will be using the YASNAC – Yet Another SafetyNet Attestation Checker. The older method of checking Safetynet via Magisk is preserved below: That’s it. These were the steps to pass the SafetyNet Test on your rooted Android 12/13 device. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.
Update for Android 13
For my device running Android 13, I choose Pixel 3 device and selected Android 1o as the OS in STEP 2 above. So if you have any doubts, then it’s better to select that one as it has been tried and tested.
Attaching hereby are the results of passing SafetyNet on rooted Android 13:
METHOD 2: Pass SafetyNet without Magisk Hide Props Config [NEW]
The shorter of the two methods, this doesn’t require you to spoof the device’s fingerprint or flash the Magisk Hide Props Config, all thanks to tweaks made by the developer of the Universal SafetyNet Fix Module.
STEP 1: Hide Magisk App
STEP 2: Enable Systemless Hosts
STEP 3: Enable Zygisk
STEP 4: Flash Universal SafetyNet Fix Module
STEP 5: Configure Denylist
Denylist is the new name for the traditional Magisk hide. You could use this functionality to hide root from the desired apps, apart from the three compulsory apps listed below.
STEP 6: Delete Data
You will now have to delete the app data of all the apps from which you have hidden root. These include the compulsory Google apps and the desired apps of your choice.
STEP 7: Check SafetyNet Test Results
That’s it. these were the steps to pass SafetyNet on your rooted Android 12/13 device. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.
How to Pass SafetyNet test after installing Xposed or EdXposedFix Magisk Safetynet API Error: Detailed GuideHow to Fix ctsProfile Mismatch Error on Rooted AndroidBootloop after installing/updating Magisk: How to Fix