Skip to content
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

Breaks Play Integrity API for some devices (needs to be tested for >v1.15.0) #18

Closed
pmsobrado opened this issue Dec 23, 2023 · 35 comments
Closed

Comments

@pmsobrado
Copy link

Screenshot of Play Store page of the app you are trying to detach:

Not applicable.

Screenshot of the helper CLI showing detached apps (from Option 2):

Not applicable.

Logs taken with su -c logcat -s "zygisk-detach" > /sdcard/log.txt:

Not applicable.

I used this module to detach an app. After that, the Play Integrity API request from Play store (in developer tools/options) fails with error -100 (internal error). After trying some stuff I checked logcat, and found an error trying to read the detached app from somewhere, some database I guess. The app had the first two characters modified to unknown ones, which I guess is the method this module uses to detach.

In any case, this seesm to break Play Integrity API request from official Play store app.

@j-hc
Copy link
Owner

j-hc commented Dec 23, 2023

cant reproduce. even if that was the case i cant fix it. i already did whats possible to not break play integrity.

@j-hc j-hc closed this as completed Dec 23, 2023
@pmsobrado
Copy link
Author

It was a weird coincidence I guess...

@yuzamei2854
Copy link

yuzamei2854 commented Jan 16, 2024

I have the same issue, after enabling the module and rebooting the system, the issue with Play Integrity API starts happening, I tried using SPIC and this error shows up:

20240115_231819

For now, SafetyNet works fine.

I'm using a Samsung phone with custom ROM and Magisk.

@pmsobrado
Copy link
Author

pmsobrado commented Jan 16, 2024

Even without reboot, the moment I detach, I get a -100 error. The moment I reattach, the error is gone.

In logcat I saw an error with weird characters on the detached package name, my guess is this module breaks the package name in a way that google play does not detect it, making the app detached, but the package name change with weird characters also breaks integrity api call, for some reason.

Issue still happens to me.

EDIT

I don't have much time but, if @j-hc wants it and would like to check this, I can upload the log I'm talking about.

@pmsobrado
Copy link
Author

@j-hc Sorry, still the same, here's the log:

imagen

Let's see how it goes for @yuzamei2854

@yuzamei2854
Copy link

yuzamei2854 commented Jan 16, 2024

Hi, forgive me if I'm not able to give useful information, I'm still new to root and Magisk.

The problem still persists after the v1.10.0 update, I did the same test as the OP about detach and reattach, and I can confirm that when the application is detached, the error -100 starts to appear, after reattaching the error disappears.

As I still don't know how to get logs, I used the same app as the OP, here's a screenshot of a part I suspect from the log.

20240116_124139

I will try to provide information if necessary.

@j-hc
Copy link
Owner

j-hc commented Jan 16, 2024

probably wont work but try this module:
zygisk-detach-v1.10.0t.zip

@yuzamei2854
Copy link

yuzamei2854 commented Jan 16, 2024

probably wont work but try this module: zygisk-detach-v1.10.0t.zip

I reattached the app, deleted the module, installed this test version and detached the app again, still the same.

@j-hc
Copy link
Owner

j-hc commented Jan 16, 2024

probably wont work but try this module: zygisk-detach-v1.10.0t.zip

I reattached the app, deleted the module, installed this test version and detached the app again, still the same.

you rebooted after flashing right? what do the logs show now

@yuzamei2854
Copy link

yuzamei2854 commented Jan 16, 2024

probably wont work but try this module: zygisk-detach-v1.10.0t.zip

I reattached the app, deleted the module, installed this test version and detached the app again, still the same.

you rebooted after flashing right? what do the logs show now

Yes, I rebooted after flashing it, here is the logs:

20240116_155555
20240116_155220

@pmsobrado
Copy link
Author

pmsobrado commented Jan 16, 2024

Hmm, still issues when the package name is not recognized...

Is Play Integrity verifying package names??

@j-hc j-hc reopened this Jan 21, 2024
@pmsobrado
Copy link
Author

BTW, in case it helps. I'm on MIUI 12 / Android 10 (xiaomi.eu rom).

@j-hc
Copy link
Owner

j-hc commented Jan 31, 2024

@pmsobrado
Copy link
Author

pmsobrado commented Jan 31, 2024

@j-hc Still no dice 😩

IMG_20240131_183341

Same -100 error:

Uploading IMG_20240131_183524.jpg…

@j-hc
Copy link
Owner

j-hc commented Jan 31, 2024

@pmsobrado how about this one
zygisk-detach-v1.11.0t.zip

@pmsobrado
Copy link
Author

It works! How did you do it?

@j-hc
Copy link
Owner

j-hc commented Feb 1, 2024

It works! How did you do it?

by using a hackish way to return a fake app's info. it works for you but will crash for other android versions.
what does the logs show now?

@pmsobrado
Copy link
Author

pmsobrado commented Feb 1, 2024

That's weird... I do have Android 10 and MIUI 12, but Play Store version should be the same, or similar to modern phones, right? Why this different behaviour?

BTW, the app shows as "disabled" on Play Store, is that a part of the hackish ways?

@j-hc
Copy link
Owner

j-hc commented Feb 1, 2024

That's weird... I do have Android 10 and MIUI 12, but Play Store version should be the same, or similar to modern phones, right? Why this different behaviour?

because im not hooking play store but libbinder.
im still not yet sure about the proper solution.

BTW, the app shows as "disabled" on Play Store, is that a part of the hackish ways?

yes

@pmsobrado
Copy link
Author

Well, if you need testing, logs or want me to debug something, please ask :)

@yuzamei2854
Copy link

yuzamei2854 commented Feb 4, 2024

@pmsobrado @yuzamei2854 try this one zygisk-detach-v1.11.0t.zip

Doesn't work, same error.

@yuzamei2854
Copy link

yuzamei2854 commented Feb 4, 2024

@pmsobrado how about this one zygisk-detach-v1.11.0t.zip

Working on Android 9.

@pmsobrado
Copy link
Author

So I guess older versions of Android need different methods... but I still don't get it, isn't Play Store app version the same as on recent phones? Shouldn't this only affect Play Store app, and not anything of the Android system/ROM?

@j-hc
Copy link
Owner

j-hc commented Feb 5, 2024

So I guess older versions of Android need different methods... but I still don't get it, isn't Play Store app version the same as on recent phones? Shouldn't this only affect Play Store app, and not anything of the Android system/ROM?

like i said play store version is irrelevant. zygisk-detach hooks binder driver of the kernel which changes across android versions.
i have the fix, just dont have time to experiment yet. for now you can keep using the latest test version i sent.

@pmsobrado
Copy link
Author

Yes, don't worry, take all the time you need. I just though you we're binding some Play Store process (on normal versions of your module, not these latest test ones) renaming packages on some db relative to Play Store, without affecting the system.

@N0nd
Copy link

N0nd commented Feb 9, 2024

I also ran into this problem on Android 9
chiteroman/PlayIntegrityFix#254

@MrManinBlack1337
Copy link

I am getting the same issue, tested with release and all tests versions all break integrity API.
My rom is android 10 non-MIUI, Xiaomi Redmi Note 7

@yuzamei2854
Copy link

@N0nd, @MrManinBlack1337, the developer has already said that the test version can't work on every device and he needs time to find a good solution, for now, logs could help the developer.

@N0nd
Copy link

N0nd commented Feb 15, 2024

@N0nd, @MrManinBlack1337, the developer has already said that the test version can't work on every device and he needs time to find a good solution, for now, logs could help the developer.

actually, the test version helped me, I just reported that I had such a problem. but the test version works well.

@j-hc
Copy link
Owner

j-hc commented Feb 23, 2024

ok i decided on a solution. new test build here:
zygisk-detach-v1.12.0t.zip

if working fine, i will merge the changes.

@yuzamei2854 @pmsobrado

@MrManinBlack1337
Copy link

The newest test version works for me, play integrity remained intact! Thank you

@j-hc
Copy link
Owner

j-hc commented Feb 23, 2024

aight merged the changes. closing the issue.

@j-hc j-hc closed this as completed Feb 23, 2024
@pmsobrado
Copy link
Author

Works for me too.

@j-hc
Copy link
Owner

j-hc commented Mar 26, 2024

i reverted the fix as it doesnt stop play store from updating detached apps: #37
users with affected play integrity can keep using v1.13.0 until i implement some other fix

@j-hc j-hc reopened this Mar 26, 2024
Repository owner deleted a comment from pmsobrado Apr 2, 2024
Repository owner deleted a comment from pmsobrado Apr 2, 2024
Repository owner deleted a comment from yuzamei2854 Apr 2, 2024
@j-hc j-hc changed the title Breaks Play Integrity API Breaks Play Integrity API for some devices (needs to be tested for >v1.15.0) Apr 10, 2024
@j-hc
Copy link
Owner

j-hc commented Jul 25, 2024

closing the issues as nobody reported anything

@j-hc j-hc closed this as completed Jul 25, 2024
@j-hc j-hc pinned this issue Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants