Recently, Google made security changes which make sure fails check when Magisk is installed.

This was Tweeted by John Wu (Magisk developer) , here and here. Some excerpts:

So here we go, after years of fun messing around using Magisk, it seems that Google FINALLY decided to "fix" SafetyNet to something useful, and that is to use key attestation to verify device status (after 3 years since introduced to Android's platform!)

Let's face it. Fun is over guys.

(Emphasis added)

Edit: From Github

Disable MagiskHide by default

Since SafetyNet CTS is impossible to achieve, leaving MagiskHide on by default no longer serves a purpose.

For more details regarding the latest SafetyNet changes, please check: https://twitter.com/topjohnwu/status/1237656703929180160 https://twitter.com/topjohnwu/status/1237830555523149824

MagiskHide's functionality will continue to exist within the Magisk project as it is still extremely effective to hide modifications in userspace (including SafetyNet's basicIntegrity check).

Future MagiskHide improvements may come, but since the holy grail has been taken, any form of improvement is now a very low priority

It looks to me that Google could/should have implemented this earlier but didn't and the CTS check being done from within Magisk wasn't comprehensive.

Please demystify this in simple terms (to the extent possible) for folks who don't understand the innards of Android (like me).

  • 1
    If I get it correctly from the tweets the bootloader unlocked state is now determined by code that runs in the TEE, a security part available in most ARM CPUs that is hardened against manipulation. Also the code executed in it can't be changed. This code checks somehow the bootloader state and prepares the signed data sent to Google. The Google server then decides if or if not your devices passes the check. – Robert Mar 12 at 12:41
  • @Robert Yes, but am trying to understand more in terms of why now Vs earlier when apparently mechanism was in place. Plus, CTS check earlier was also being done by a server I thought but it seems to be Google. As said, simplify for dummies! – beeshyams Mar 12 at 12:45
  • 1
    From my understanding the main problem is that the boot loader check has been moved into the TEE and that it can only performed there (before it was executed outside of TEE?). TEE is like a separate OS, we don't have root to and it is running only signed code. Hence you can't modify or manipulate the check. You can only decide not to run it. – Robert Mar 12 at 12:56
  • Somehow this isnt true yet. Am on Android 10, 5 March Security Update, Magisk and EdXposed installed. And safetyNet still pass. – Otniel Yoreiza Mar 18 at 4:01
  • @OtnielYoreiza yes, it has been reported that older Android versions are not yet affected in some cases. I am little surprised in your case. Have you tried to install some app that doesn't work if Safety Net is broken - to double check (Magisk check is sometimes faulty) – beeshyams Mar 18 at 4:26

It appears that Google may have chosen not to enforce this checking, even though it was implemented for a short while (a few days?). At first, the Magisk developer, John Wu, sounded quite pessimistic about it, going even so far as to say that the fun was over.

A few days after the tweets from John Wu that were referenced in the question, however, on March 14, John Wu tweeted again, and this time he said

So apparently CTS is just passing again out of nowhere? Maybe Google is still testing things out?

I'm over it anyways. Google is apparently willing to use key attestation for detection. Since MagiskHide is still there, people can still always use it as usual.

In my own test in late May 2020, with MagiskHide not enabled, SafetyNet failed, but with MagiskHide enabled and targetting my test app, SafetyNet passed, meaning that MagishHide could still defeat SafetyNet. The test was run on a Pixel 3 with android 10.

So, Google may have the capability to detect Magisk, since the boot loader check had been moved into the TEE, but they have somehow stopped doing that, for reasons known only to Google.

| improve this answer | |
New contributor
auspicious99 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.