FORUMS
Remove All Ads from XDA

[SafetyNet Fix][PoC] Pass SafetyNet after 2017-07-17 on Magisk V13

390 posts
Thanks Meter: 297
 
By Tobi@s, Senior Member on 16th July 2017, 11:27 PM
Post Reply Email Thread
EDIT: Official fix is out, please follow this link: https://forum.xda-developers.com/sho...9&postcount=25

Good evening,
since Google broke all our beloved SafetyNet passing phones I decided to have a look at it. Turns out they have extended their property scanning.
There is an easy fix BUT: I have no idea how this fix interferes with Magisks internal behavior. @topjohnwu Why are properties used for magisk internals?

SafetyNet checks now for these properties, so we have to delete them:
Code:
[init.svc.magisk_pfs]: [stopped]
[init.svc.magisk_pfsd]: [stopped]
[init.svc.magisk_service]: [stopped]
[persist.magisk.hide]: [1]
EDIT: @dimon222 had a look at magisk source and answered my question why these properties even exist:
Quote:

BTW, I shortly check'd source of Magisk, it seems 3 of those flags are related to exit code after start of Magisk services on boot. Basically, they're automatically set by Android when service with such name is started.
I guess dev will probably rename those services to avoid detect or hide it somehow.
https://github.com/topjohnwu/Magisk/...init.magisk.rc

And the last flag is some internal for Magisk.
It feels like something serious, but I don't know if its only used during boot. Maybe if u reset it after boot, it won't be automatically reloaded by Magisk, and it will continue to use hide.
https://github.com/topjohnwu/Magisk/...AGISKHIDE_PROP
Worth to check if SafetyNet apps are still working after that, not just SafetyNet check itself. Its quite possible that it won't hide, if it gets this property from global variable at realtime.

How to fix this:
1. This fix is only a temporary fix. You will have to apply it after every reboot.
2. Use a Terminal emulator app or adb to enter these commands.
3. Use resetprop to delete the properties - again: I have no idea how this interferes with magisk behavior!!!! Do this at your own risk:
Code:
su
resetprop --delete init.svc.magisk_pfs
resetprop --delete init.svc.magisk_pfsd
resetprop --delete init.svc.magisk_service
resetprop --delete persist.magisk.hide
Using Magisk Core mode? also execute this command:
Code:
resetprop --delete ro.magisk.disable

4. Optional/Not recommended: If you want to make this temporary fix more permanent, add all the required resetprop calls to a .sh file inside /magisk/.core/service.d/ and let magisk automatically execute the script for you every startup.

Troubleshooting if this didnt work:
Still doesnt work? Try this: https://forum.xda-developers.com/sho...7&postcount=65
Check for other magisk properties using "getprop | grep magisk" and delete them as well (at your own risk!)


After deleting the properties SafetyNet check will pass again
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20170717-001447.png
Views:	7678
Size:	102.4 KB
ID:	4213931   Click image for larger version

Name:	Screenshot_20170717-001421.png
Views:	7716
Size:	74.1 KB
ID:	4213932  
The Following 159 Users Say Thank You to Tobi@s For This Useful Post: [ View ] Gift Tobi@s Ad-Free
 
 
16th July 2017, 11:37 PM |#2  
Junior Member
Thanks Meter: 2
 
More
What kind of functionality do you still have after this? Does magisk manager crash? Do modules work? Does su work?
16th July 2017, 11:38 PM |#3  
Junior Member
Thanks Meter: 0
 
More
Can you please explain in detail that how to do it.

Thanks
16th July 2017, 11:40 PM |#4  
crackerstyle's Avatar
Senior Member
Thanks Meter: 3
 
More
Would these persist through a flash-all without wiping the device? I still couldn't get safety net to pass after that.
16th July 2017, 11:41 PM |#5  
Junior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by ali.ahmad

Can you please explain in detail that how to do it.

Thanks

Looks like you just need adb shell or a terminal emulator on your phone, and su/root.
16th July 2017, 11:41 PM |#6  
Astur13's Avatar
Junior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by ali.ahmad

Can you please explain in detail that how to do it.

Thanks

Yes please, I'm a little lost too
16th July 2017, 11:41 PM |#7  
bmg1001's Avatar
Senior Member
Flag Los Angeles
Thanks Meter: 490
 
Donate to Me
More
Quote:
Originally Posted by ali.ahmad

Can you please explain in detail that how to do it.

Thanks

Type it into a terminal on your phone.
16th July 2017, 11:42 PM |#8  
Junior Member
Thanks Meter: 1
 
More
No luck
16th July 2017, 11:42 PM |#9  
Junior Member
Thanks Meter: 17
 
More
It worked for me, thank you.

Enviado desde mi SM-N930F mediante Tapatalk
16th July 2017, 11:42 PM |#10  
Junior Member
Thanks Meter: 1
 
More
Interesting. I'm curious, how were you able to detect what safety net is actually detecting?

I haven't tried your fix as it's not super imperative for me to get safetynet passing for myself just curious what you are using to find this stuff out.

Either way thanks for the work
The Following User Says Thank You to tool666schism For This Useful Post: [ View ] Gift tool666schism Ad-Free
16th July 2017, 11:43 PM |#11  
Astur13's Avatar
Junior Member
Thanks Meter: 2
 
More
Then, is these sure? I don't have a computer here to unbrick my phone.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread