Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
Fixed Magisk Hide detection for Magisk v12
Browse files Browse the repository at this point in the history
  • Loading branch information
DeicPro committed Jun 16, 2017
1 parent 3ac3b7d commit d4e0218
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
Fix SafetyNet on devices with MIUI Developer/Beta ROM, CyanogenMod, Lineage OS, Resurrection Remix, etc.

## Changelog
#### v1.11
- Fixed Magisk Hide detection for Magisk v12
#### v1.10
- Module is now universal, not for Xiaomi devices only
- Module refactored
Expand Down
19 changes: 15 additions & 4 deletions common/post-fs-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,24 @@ function background() {
rm -f /dev/magisk_system/mirror/vendor
ln -s /dev/magisk_system/mirror/system/vendor /dev/magisk_system/mirror/vendor
while :; do
[ "$(grep 'Zygote.*ns=mnt:\[.*\]' '/cache/magisk.log')" ] && break || {
su -c /magisk/.core/magiskhide/disable; sleep 1
su -c /magisk/.core/magiskhide/enable; }
[ "$(grep 'Zygote.*ns=.*' '/cache/magisk.log')" ] && break || {
su -c exec /magisk/.core/magiskhide/disable; sleep 1
su -c exec /magisk/.core/magiskhide/enable; }
sleep 3
done; }

[ "$(magisk -v | grep '13.0(.*):MAGISK')" ] && {
grep_logcat() {
    set +x; while :; do logcat -b events -v raw -d | grep "$1" && { set -x; break; }; sleep 1; done
}

check_safetynet() {
    echo "Waiting for Magisk Manager SafetyNet check..."
    grep_logcat "MANAGER: SN: Google API Connected"
    grep_logcat "MANAGER: SN: Check with nonce"
    grep_logcat "MANAGER: SN: Response"
}

[ "$(magisk -v | grep '13.0(.*):MAGISK' 2>/dev/null)" ] && {
while :; do
[ "$(grep 'proc_monitor:.*zygote.*ns=mnt:\[.*\]' '/cache/magisk.log')" ] && break || {
magiskhide --disable; sleep 1
Expand Down
2 changes: 1 addition & 1 deletion config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ LATESTARTSERVICE=false

print_modname() {
ui_print "*******************************"
ui_print " Universal SafetyNet Fix v1.10"
ui_print "Universal SafetyNet Fix v1.11"
ui_print "*******************************"
}

Expand Down
6 changes: 3 additions & 3 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=xiaomi-safetynet-fix
name=Universal SafetyNet Fix
version=v1.10
versionCode=14
version=v1.11
versionCode=15
author=Deiki
description=Fix SafetyNet on devices with MIUI Developer/Beta ROM, CyanogenMod, Lineage OS, Resurrection Remix, etc.
description=Try to fix SafetyNet on devices with MIUI Developer/Beta ROM, CyanogenMod, Lineage OS, Resurrection Remix, etc.
template=3

0 comments on commit d4e0218

Please sign in to comment.