Displax / safetynet-fix

SafetyNet & Play Integrity API workarounds for Magisk
MIT License
2k stars 53 forks source link

microG support #5

Closed j0110 closed 1 year ago

j0110 commented 1 year ago

Hey there, Thanks for your work! I found that latest release (2.4.0-MOD1.3) fails to pass safety net (both CTS and basic integrity) while version 2.3.1-MOD3.0 do successfully the job. Is there any particular reason? Thanks !

Undisputed00x commented 1 year ago

Same here! I use a Poco x3 Pro with LineageOS 19.1 (Android 12L) latest build and only 2.3.1-MOD3.0 works for me. Have tried all releases but no success.

cleanerspam commented 1 year ago

GIF-230619_144356 Same here , Not working with latest module or any module except with 2.3.1-Mod-3.0

Displax commented 1 year ago

GIF-230619_144356 Same here , Not working with latest module or any module except with 2.3.1-Mod-3.0

Do not use microg

Displax commented 1 year ago

@j0110 @AndiDink00x Do you also use microg?

j0110 commented 1 year ago

Yes, it is a problem?

Displax commented 1 year ago

Yes, it is a problem?

Yep, use normal GMS.

Undisputed00x commented 1 year ago

@Displax im using microg , the question is why does work with gms and not with microg ?

Displax commented 1 year ago

@j0110 @AndiDink00x

Yes, that is the problem. Just use normal GMS. Anyway, could you send your logcat during trying SN/PI tests with latest MOD and getprop command?

Undisputed00x commented 1 year ago

@Displax using latest release

myprops.txt mylogcat.txt

Displax commented 1 year ago

@AndiDink00x Do not use termux for log, use adb or separate programs to grab logcat.

Undisputed00x commented 1 year ago

@Displax

myNewProps.txt myNewLogcat.txt

Displax commented 1 year ago

Can you confirm that v2.3.1-MOD_3.0 works good? And please test if v2.3.1-MOD_2.1 work/not work? @AndiDink00x @j0110

j0110 commented 1 year ago

Yes, both work.

Undisputed00x commented 1 year ago

@Displax yeah both versions work for me also

Displax commented 1 year ago

@AndiDink00x @j0110

Try this build safetynet-fix-v2.4.0-MOD_1.3-microG-test.zip

j0110 commented 1 year ago

It works !

Undisputed00x commented 1 year ago

@AndiDink00x @j0110

Try this build safetynet-fix-v2.4.0-MOD_1.3-microG-test.zip

@Displax Yeah it works !!!

EDIT : Microg SN fails (integrity check failed) but YASNAC test passes ... also after some quick retries YASNAC crashes. EDIT (2) : it seems that it is not stable , in SN history in microg shows that also YASNAC fails after couple retries thats why it crashes

j0110 commented 1 year ago

OK, same for me in fact

Undisputed00x commented 1 year ago

@Displax

output

Displax commented 1 year ago

@AndiDink00x @j0110

So, same problem not happens on v2.3.1-MOD_3.0 ?

Undisputed00x commented 1 year ago

@Displax its stable on 2.3.1-MOD_3.0

Displax commented 1 year ago

@AndiDink00x @j0110

Try this safetynet-fix-v2.4.0-MOD_1.3-microG-test2.zip

j0110 commented 1 year ago

Screenshot_20230622-113659_Yet Another SafetyNet Attestation Checker Screenshot_20230622-113725_microG Services Core Screenshot_20230622-113735_microG Services Core Strange... We just got basic integrity and after 2-3 tries it crashes as before...

Undisputed00x commented 1 year ago

@AndiDink00x @j0110

Try this safetynet-fix-v2.4.0-MOD_1.3-microG-test2.zip

@Displax

output

Displax commented 1 year ago

@AndiDink00x @j0110

New build safetynet-fix-v2.4.0-MOD_1.3-microG.zip

j0110 commented 1 year ago

@AndiDink00x @j0110 Try this build safetynet-fix-v2.4.0-MOD_1.3-microG-test.zip

@Displax Yeah it works !!!

EDIT : Microg SN fails (integrity check failed) but YASNAC test passes ... also after some quick retries YASNAC crashes. EDIT (2) : it seems that it is not stable , in SN history in microg shows that also YASNAC fails after couple retries thats why it crashes

Same as this, for the new build.

Displax commented 1 year ago

Same as this, for the new build.

Too strange... Can you send your getprop when my original MOD-3.0 installed, than disable/delete it - reboot, and save getprop once again. Thanks.

Undisputed00x commented 1 year ago

@Displax ok i dunno what is happening, with 2.3.1-mod3.0 now after 2 tries it leads to "integrity check failed" , same as the 2.4.0-microg these are the props

myprops-2.3.1_MOD_3.0.txt

myprops-2.4.0_MOD_1.3-microG.txt

Undisputed00x commented 1 year ago

mylogcat-2.4.0_microG.txt

Displax commented 1 year ago

ok i dunno what is happening, with 2.3.1-mod3.0 now after 2 tries it leads to "integrity check failed" , same as the 2.4.0-microg these are the props

So it completely same behavior of this versions. I think microG has "wait timeout" for requests. Please test on this build safetynet-fix-v2.4.0-MOD_1.3-microG-test.zip but do not send SN requests very often. Just run several test (at least 10 times) at 5 min. intervals.

@AndiDink00x @j0110

Undisputed00x commented 1 year ago

@Displax After some testing i found out that there is no "timeout", both in microG and YSN there are only 2 available passes after that they fail, but if microG is closed/reopened the available successful SN passes are refreshed.

For example: opened YASNAC tried 2 times successfully , 3rd time fails-crashes(YASNAC crashes only on "integrity check fail") , closed the app on backround, just launched microG and closed it, then reopened YASNAC and again passed only 2 times. That happens with also microG.

anonimou0 commented 1 year ago

Hey. I didn't want to hijack the thread but I didn't find any contact info from you @AndiDink00x .

I also have a Poco x3 Pro but I am one step back. I still can't get SafetyNet to pass (I am using microG).

Do you have any directions or instructions that you could share?

EDIT: Steps I have taken: 1) I have microG (crDroid), with signature spoofing and Magisk 2) Enabled Zygisk, rebooted 3) Enforced DenyList, rebooted 4) Added to DenyList: microG Services Core (all 4 activities? - unstable, persistent ui), microG Framework Proxy and YASNAC 5) Installed Universal SafetyNet Fix and MagiskHide Props Config, rebooted 5.1 - No props for X3 Pro. Didn't actually do anything 6) Enabled in microG device Google Device Registration, Cloud Messaging and Google SafetyNet 7) Tried to pass SafetyNet attestation. 8) Results: Basic integrity pass. CTS profile match fails.

Undisputed00x commented 1 year ago

@anonimou0 user:Undisputed00x on discord

Displax commented 1 year ago

@AndiDink00x So there is other restriction. Please send logcat from crashes. I don't think it's my module's "problem". Anyway there is no need to check SN status more than twice in a row. No such app do this, so no real problem on it.

Undisputed00x commented 1 year ago

@Displax hereismynewlogcatbud.txt

Displax commented 1 year ago

@AndiDink00x Try this, not sure if it fix "problem", but anyway... safetynet-fix-v2.4.0-MOD_1.3-microG-unload.zip

Undisputed00x commented 1 year ago

@Displax same thing ...

Displax commented 1 year ago

Ok. So I release microG version "as is" because this behavior should not affect applications in real life. Just do not run attest more than twice in one session. https://github.com/Displax/safetynet-fix/releases/tag/v2.4.0-MOD_1.3

Void-0000 commented 1 year ago

Did anyone end up managing to pass the safetynet attestation completely on microg? If so, what steps should I take to get it to work? The best I ever get is "CTS Profile does not match"...

personshelldon commented 1 year ago

Did anyone end up managing to pass the safetynet attestation completely on microg? If so, what steps should I take to get it to work? The best I ever get is "CTS Profile does not match"...

Just use verison 2.3.0. I am using it now and everything work ok with it including microg

Void-0000 commented 1 year ago

Just use verison 2.3.0. I am using it now and everything work ok with it including microg

Wait, so I shouldn't use the latest version? Even though the latest version has (and is the only version to have) a MicroG-specific release? Also, There's no 2.3.0 version of the mod, do you mean 2.3.1 or should I not even use the mod?

personshelldon commented 1 year ago

Just use verison 2.3.0. I am using it now and everything work ok with it including microg

Wait, so I shouldn't use the latest version? Even though the latest version has (and is the only version to have) a MicroG-specific release? Also, There's no 2.3.0 version of the mod, do you mean 2.3.1 or should I not even use the mod?

Sorry, I was incorrect in version. I am using 2.4.0-1.2 now. And everything work.

Void-0000 commented 1 year ago

Sorry, I was incorrect in version. I am using 2.4.0-1.2 now. And everything work.

I see, but how come the previous version works and the current one, supposedly made specifically for MicroG, doesn't? Shouldn't this issue be re-opened in that case?

Undisputed00x commented 1 year ago

@Void-0000 if it works why open the issue

Void-0000 commented 1 year ago

if it works why open the issue

Apparently, the latest version (1.3) doesn't work, while the previous one (1.2) does. Unless I've missed some part of the process to make it work, this seems like a bit of a problem. Did you manage to get the latest version working with MicroG?