-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SafetyNet started failing #482
Comments
Last I checked SafetyNet on my phone it passed. When I saw your issue posted, I tried again and I am now getting the same CTS profile match fail result as you. To the best of my knowledge, nothing on my phone that should affect SafetyNet has changed (same versions/builds of Android, microG, etc.) So I can confirm your issue. |
OK, since I’ve seen no sign of such an issue on forum of Magisk users for instance, I suppose this is quite μG specific. So we will have to wait for @mar-v-in to take a look at it. |
It isn't a problem with microG but more likely with the ROM. An official LineageOS ROM usually pass SafetyNet while an unofficial one may not pass it (for example because isn't signed). But there may be additional problems:
|
@ale5000-git - None of you points explains my situation: SafetyNet test passed a few weeks ago and doesn't pass now. No change in my ROM, microG, etc.
|
@n76 I suggest to try a full wipe to be sure that it isn't a "casual" problem. The problem may also depend on how you install microG. |
@ale5000-git I do have F-Droid set up with the microG repository and assure that I've the latest versions from that installed. (Signature for microG is the same on the ROM and repository so there is no issue with updating from the repository.) |
@ale5000-git It’s way worse than that, I had it working before going to sleep but not when waking up ~8 hours later. Absolutely nothing has changed between those two attempts, the only thing the phone did during this time is… nothing. It was in airplane mode, and that’s all. Not even used it for alarm. As stated above, I have no root, no Magisk, no Xposed, nothing. Just using official OmniROM. I have two affected phones, a OnePlus One, on which I’m going to try a clean flash (OmniROM and then LineageOS4uG to check), and that does not support verified boot, and a OnePlus 5T, that does support verified boot but of course verified boot is currently disabled because OmniROM, but the important point is that is was working literally just before, so even if not everyone is affected, this is definitively a change in DroidGuard. So, what we need to figure out is what are the condition for SafetyNet to be tripped, and how to solve it. @ale5000-git @n76 What ROM are you using (and eventually device)? |
SafetyNet fail also if you haven't an internet connection (maybe it fail also if it is inconstant). @ArchangeGabriel: Official LineageOS 14.1 on Galaxy S2 + microG unofficial installer. |
I had an internet connection of course, I was just saying it was in airplane mode in the eight hours span during my two trials. I’ll try the LineageOS4uG right now on my OPO. |
Does not work either with LineageOS for uG on OPO:
|
@ale5000-git Could you post a working logcat for comparison? I’m wondering whether there is an issue with BUILD. |
@ArchangeGabriel I am currently running lineage-14.1-20180117-microG-harpia.zip downloaded from https://download.lineage.microg.org/harpia/ on my Moto G4 Play (XT1607 RETUS). That particular build is no longer in that directory. It is probably time for me to upgrade to a February build to get the latest security updates. . . |
@n76 February patches are not in yet. Anyway, we have both OmniROM and LineageOS-uG affected on three different devices, all of them without root and regarding my OnePlus One even with clean flashing. |
|
You have Try to put both microG GmsCore and DroidGuard Helper in /system/priv-app to fix it. If it still do not work try the official LineageOS (without microG) and then a flashable microG zip. |
@ale5000-git Seems you are correct. Doing the following for me gets SafetyNet to pass:
I guess I must have upgraded my Lineage with microG after my last successful SafetyNet test. Seems like Lineage with microG ought to install DroidGuard helper along with the other parts of microG. |
OK, so this did it. Still, it means something changed on DroidGuard side and that it now requires additional rights, which is never good news. However, I think that Lineage with uG should still not install DroidGuard Helper at all, it’s quite invasive and not needed by everyone. |
And thank you @ale5000-git for figuring this out. |
For me it never worked as user app, it is possible you was having DroidGuard Helper as both system and user app and it worked but the OTA update removed the system app. For me it is fine to have it installed with Lineage with uG since microG GmsCore have it disabled by default, so having it installed doesn't mean anything. |
No, I’m sure I wasn’t having it as system-app, and also I remind you that nothing happened on my phone between working and non-working state. It was definitively working as user-app, but not anymore. Even GmsCore is not system-app on my system. That’s right, SafetyNet being disabled by default, having DroidGuard lying somewhere might not be an issue. @corna should have a look at it. ;) |
On many ROMs you won't get location binding if GmsCore is not a system app. |
I know, but I use OmniROM so I’m not affected by this first point AFAIK (though I admit having not tried network location with my OnePlus 5T yet, since the GPS works everywhere) and I don’t use GCM so I don’t really need GmsCore to be installed before anything else. |
It seems that GmsCore must be installed as system-app for network location to work even under OmniROM apparently… Not sure if that is expected or an issue. Anyway, this mean that every week I have to push back DroidGuard and GmsCore to |
I built LineageOS with patches to allow location providers outside /system and signature spoofing. I installed microG and DroidGuard as normal apps (non-privileged). SafetyNet works enough to start Pokemon GO (Basic Integrity is true, CTS profile match is false). When using the LineageOS for microG ROM, SafetyNet fails both checks and Pokemon GO fails to start. This started happening relatively recently. I haven't tried pushing DroidGuard to priv-app. So it seems DroidGuard has to be installed with GmsCore in the same location (standard apps or privileged) in order to work now? |
No, it must be installed in privileged app folder due to SELinux. |
I’m surprised PoGO works for you with CTS false… Anyway, sometimes DroidGuard as normal app works, but every time it fails, pushing it to |
Less than 30 minutes ago, SafetyNet started failing again. Both LineageOS4μG and OmniROM, with DroidGuard in |
Does your |
Yes, it does. SafetyNet Helper Sample app fails for response validation with error message:
I also get an app crash the first time I try it. Retries do not crash the app anymore. |
OK, that’s an unknown issue to me, sorry. |
Moto g4 plus, LineageMicroG 7.1. I intermittently got error [14] versus a failed response, not sure what causes it to switch back and forth. |
@jimbo1qaz you mean LineageOS for microG 14.1 (Android 7.1), right? I'm still curious if this is working for someone on LineageOS 14.1... |
Fairphone 2 on LineageOS 14.1 (going to switch to 15.1 today) and it seems to work. The SafetyNey helper app returns CTS profile match: false, though, but that doesn't prevent me from playing Pokémon Go (the only other SafetyNet-using thing on my phone)
Le 29 septembre 2018 15:25:18 GMT+02:00, jansohn <notifications@github.com> a écrit :
…@jimbo1qaz you mean LineageOS for microG 14.1 (Android 7.1), right? I'm
still curious if this is working for someone on LineageOS 14.1...
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#482 (comment)
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
|
Moto G4 Plus, LineageOS 14.1 microg edition. I get "microg droidguard helper has stopped", with or without 0.1.0 as a system app (via my custom unreleased magisk module). MicroG core is 0.2.6.14280-dirty from Git, with a few local hacks related to gmail.
apparently my "my custom unreleased magisk module" didn't extract the libs right I overrode the system droidguard app with 0.1.0-10-gf64bf69, it either spits out 14 immediately, spins for ~15 seconds, before spitting error 14, exactly once I got a failed response. Sometimes microG itself crashes.
EDIT: Lucky patcher or Xposed causes safetynet to fail after 1 second. Uninstalling both leads to the weird behavior above. |
I tried installing Droidguard from https://github.com/ThibG/android_packages_apps_RemoteDroidGuard/tree/aarch64 (the unmerged pull request).
|
hmm. If GPS has been turn OFF, I could sign in for Pokemon GO. |
i don't see how you could've possibly gotten it to work. Moto g4 plus, lineage-microg 14.1. So I got several "safetynet failed" results, decided to backup, wipe, and reflash. Now all I get are error 14/etc. Removing /system/priv-app/droidguard.apk (I forgot to put in a subfolder) made no difference. I tried installing Magisk Nanodroid (microG sub module) on top of Lineage-microG and uninstalling my user Droidguard, now microG crashes immediately with error:
Both nanodroid and 0.2.6.13280-dirty (git) have same error. edit: i got safetynet to pass Basic but not CTS Profile. Unfortunately MicroG failed to generate a Play ID.
|
@jimbo1qaz |
Can you explain your exact setup? I'm guessing:
Where did you get microg core 0.2.6.13280 apk? Manually compile, or is there a CI build artifact repo with all .apk builds? |
@jimbo1qaz
|
I used the droidGuard helper apk suggested at this comment by @Nanolx and enabled safetynet in microG settings. I then used the My results were I 'm guessing this means that the PR works - because of the response signature success - but something else I did fails? Or maybe something else apart from droid guard helper needs fixing? P.S. I am using this ROM for the Galaxy S5 Neo that I compiled through the L4mG docker ci/cd image through those steps. I didn't install/flash any extra system modifications (root, magisk, Xposed or anything else). P.P.S. cc'ing @ArchangeGabriel because of this comment. I probably missed something, as I 'm still learning but hope the feedback can still be helpful. |
CTS Profile is the extended check. If you're on a Galaxy device with unlocked Bootloader, that will trip KNOX and thus CTS Profile match fails as the device is seen as tinkered. So that is not an issue, but the correct result. The only way around this is Magisk. |
@Nanolx This comment on the LineageOS subreddit, saying that knox is not checked by SafetyNet, prompted me to check after I went back to official LineageOs and gapps and frdoid on my S5Neo. When I rerun SafetyNet check everything passed, including CTS Profile match. I 'd guess this should rule out tripped knox as the reason why CTS Profile match failed since now it is passing while I still have a custom ROM and recovery installed. Unfortunately I no longer have LinageOs with microg installed on the phone to try to debug this (on top of that I wouldn't know where to begin). Just posting here to inform that this problem had to do with safetynet and not knox. |
Well for me none of the proposed solutions work. I'm on LineageOS 14.1 unofficial for SM-A300FU. The logcat output also shows DroidHelper crashing and I have the The logcat output:
Also have Magisk v18.0 hiding DroidGuard as proposed by @Nanolx in microg/RemoteDroidGuard#19 (comment) |
Official DroidGuard Helper won't work, you need a build with this pull request here merged. Everything fine with that. |
I have installed that one and the problem persists... I'll try a clean install and report back if that works. |
After several tests my conclusion is: LineageOS 14.1 for A300FU doesn't pass SafetyNet under any of the conditions I tested so far:
So far, none of the combinations presented above led me to a successful SafetyNet check. I installed then a modified version of the stock ROM and installed the nanodroid package with microg, then hide DroidGuard with magisk and SafetyNet check passes now. Though the concerned app I thought was affected by safetynet still doesn't work (airfrance app), but the SafetyNet checks are all green. |
@kYc0o it won't help you but I also never got SafetyNet working with LineageOS 14.1 either... |
@kYc0o I think you need the following two things:
I have added both apk's in a fork of mine and I used them to build LineageOS+microG for s5neoltexx (Galaxy S5 neo). Instructions on how I did it, if needed can be found here. Hopefully that will help you. In my case it was Lineage 15.1 used as a base instead of 14.1 but I think they can also work for 14.1. |
Using that updated droidguard apk and adding droidguard to MagiskHide gives me basicIntegrity: true and ctsProfile: false, which is enough for some apps |
Thanks @Iolaum for your insight! Actually I also own a S5 neo, although I still prefer the A300FU. Do you have the compiled apk's of those packages? I couldn't find them and I'd like to check if th md5 matches the versions I have currently installed. I'll also test your build asap on my s5 neo. |
@kYc0o I 've already put those apk in my repository which is linked on my previous post. You can also get those apk's with the following Linux shell commands:
That is where I got them from. Update: It looks like there's a newer version |
Well, it turns that's the version I have: a3ulte:/ $ md5sum /system/priv-app/GmsCore/GmsCore.apk
6400f03950b3f1d49a68a7ec10f50d04 /system/priv-app/GmsCore/GmsCore.apk
a3ulte:/ $ md5sum /system/app/DroidGuard/DroidGuard.apk
ea538b995a7bd6143970101458852c94 /system/app/DroidGuard/DroidGuard.apk Actually in my current ROM (SEP 8.5) SafetyNet is all green, but my airfrance app doesn't log in. I guess that problem is related to other things and not to SafetyNet. In #691 I explain more in detail the issue. Thanks a lot for your help! |
@ale5000-git could you close this issue? It's about the old bug fixed by microg/RemoteDroidGuard#19 |
Somewhere around friday morning, SafetyNet started failing (
CTS Profile match: false
, butBasic Integrity: true
). I have not changed anything on my device (OP5T, OmniROM, no root or whatsoever) between the time it worked and the time it stopped working, and I’ve tested on my old phone (OPO) on which it does not work either (but I had to reinstall on OmniROM on it and it has alsoBasic Integrity: false
).Is anyone else confirming? If not, what should I look for? If yes, I suppose this is due to some DroidGuard update that now detects μG?
The text was updated successfully, but these errors were encountered: