[Magisk v14.0] Universal SafetyNet Fix | Universal Hide [v2 Beta 5]

Deic

Senior Member
Feb 4, 2012
540
980
0
Madrid
www.xiaomiadictos.com
Universal SafetyNet Fix
This module tries to pass SafetyNet on devices that triggered it.

It works by doing some magic with the system props, which are changed to match with the required by Google to pass it's security test (SafetyNet). However, that is not all...

The real magic here is the Universal Hide part, which is a custom implementation of Magisk Hide. It basically does the same magic as Magisk Hide, but in a shell-y simple way.
It reads the file Magisk Hide uses to store apps that should be hidden and then monitors logcat until a hidden app is opened. Once this happens, it enters it's mount namespace to unmount all Magisk related mount points.
That way you can hide root or bypass SafetyNet for almost to all apps. App's that use custom checks to detect root are one of the few exceptions as we cannot anticipate what they check.

Why did I basically duplicated Magisk Hide? Well, Magisk Hide doesn't work properly for all devices, so this is a fast solution until topjohnwu fix all the issues.

Information

Requeriments
  • Magisk v13.x/14.0
  • MagiskSU

Links
Download Beta
Download Stable (very outdated)
Download uninstaller
Source code

Installation
  1. Flash the .ZIP from TWRP
  2. Reboot

Donations
If you feel I helped you, you can buy me a coffee here. :)

Changelog

v1.10.1
  • Fixed Magisk Hide detection for Magisk v12

v1.10
  • Module is now universal, not for Xiaomi devices only
  • Module refactored
  • Magisk v13 beta support
  • Added some props
  • Added SafetyNet fix for Magisk v12
  • Check if Magisk Hide was properly started and try to fix
  • Zip signed

v1.9.1
  • Fixed logging code: ignore output of wait for unmount loop

v1.9
  • Added new supported devices: Redmi Pro, Mi 4S, Redmi 4X
  • Changed Redmi Note 3 MTK prop
  • Changed wait for Magisk SafetyNet check to a function and run in a subshell

v1.8.2
  • Fixed Redmi Note 3 MTK device name typo

v1.8.1
  • Fixed forgotten set_prop function calls

v1.8
  • Added new supported devices: Mi Note Pro, Redmi 1, Redmi 1S
  • Fixed Mi 5 prop
  • Removed run enable script
  • Code improved

v1.7
  • Added new supported devices: Mi 6
  • Added "ro.bootimage.build.fingerprint" prop
  • Removed reinitiate Magisk Hide
  • Added run Magisk Hide when boot & service steps are completed
  • Improved log code: waiting to SafetyNet test and Magisk Hide folder unmount, silence some shell output

v1.6
  • Added new supported devices: Mi Pad, Mi Note, Mi 3/Mi 4, Mi 2/2S, Mi Pad 2, Mi Pad 3
  • Added code to reinitiate Magisk Hide

v1.5
  • Added new supported devices: Redmi 4, Redmi 4 Prime, Redmi 4A

v1.4
  • Added new supported devices: Redmi 3/Prime, Mi 4i
  • Added code to generate useful logs and enable Magisk Hide if not enabled
  • Changed to use resetprop directly from script @laggardkernel
  • Removed build description because is useless



v1.3
  • Added new supported devices: Redmi 2/4G, Redmi 2 Prime
  • Added some extra code to support device with different model name

v1.2
  • Added new supported devices: Mi 4c, Mi 5c, Redmi Note 3 Special Edition, Mi Note 2, Redmi Note 4X

v1.1
  • Added new suported devices: Mi Max, Mi Max Prime, Redmi 3S/Prime/3X

v1
  • Initial release
  • Suported devices: Redmi Note 2, Redmi Note 3 MTK, Redmi Note 3 Qualcomm, Redmi Note 4 MTK, Mi 5, Mi 5s, Mi 5s Plus, Mi MIX

Thank you
 
Last edited:

lampshade90

Senior Member
Oct 30, 2011
323
99
0
It's not working for me on redmi note 4 mtk latest (7.4.27) xiaomi.eu unlocked bootloader fresh install with magisk v12. Don't know if there is a difference to the snapdragon version...

Edit: sadly I've been waiting for this since I bought this phone! Still get profile cts mismatch

Edit2: files added
 

Attachments

Last edited:
  • Like
Reactions: llamasking

Deic

Senior Member
Feb 4, 2012
540
980
0
Madrid
www.xiaomiadictos.com
I know you try to run the post-fs-data.sh immediately after installation. But it is still a little weird that, all the changes in system.prop, the properties written by post-fs-data.sh during boot, will be loaded at next boot. How about dropping the system.prop and loading the properties by post-fs-data.sh directly?

https://github.com/DeicPro/xiaomi-safetynet-fix/pull/1
These props are read before of run resetprop from post-fs-data. My first step was as you did it and I had to do as is now.
 
Last edited: