-
-
Notifications
You must be signed in to change notification settings - Fork 302
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
feat: Hide Mock Location Universal Patch #3389
Comments
Hello! Thank you for your request. Would you have any app to test the patch? Thank you. |
Yes here's a quick and easy app to test it with without creating any accounts. I have checked the behaviour of the app is as expected, it can detect mock/no mock accurately. https://apkpure.com/mock-location-root-detector/com.check.mock/download |
Thank you for your answer. Unfortunately, it confirms what I thought: the method is inside the core library of android, and therefore not compiled with the app (it is shared by all apps and integrated to the OS). The only solution I see would be to recompile the whole lib (and therefore the OS), which is not possible with Revanced. Since I started retro-engineering android a couple weeks ago, I keep this issue open until someone more experienced can confirm or deny my statement. |
Can you please explain why it would not be possible? The API may be in the OS but the return value can be changed. |
The returned value can be changed, but it would be app-specific, and not universal. Since the package A solution would be to hook the method during runtime, but it isn't what Revanced is made for. |
You can filter for all references to that API and spoof the call's return value. Besides, if your initial assumption was that the code would be in the app itself, it would be even less possible to create a universal patch. Refer to https://github.com/ReVanced/revanced-patches/blob/main/src/main/kotlin/app/revanced/patches/all/connectivity/wifi/spoof/SpoofWifiPatch.kt for an example on how to spoof the return value of an API call part of the OS. Hooking at runtime is possible via ReVanced. |
Thank for that precious information. I still have a great deal to learn! |
Feature description
A universal patch to hide mock location. In Android the user can set the gps location by using "mock locations". However, an App can check if this is the real location or not by checking isMock() (API >= 31) or isFromMockProvider (API < 31). This behavior could be change by making these functions always return false.
Motivation
This feature could let the user change gps location in apps that don't allow it. It could also enhance user privacy, by letting the user set a random location as the "real" location. In some cases it could also help circumvent geo filtering.
Acknowledgements
The text was updated successfully, but these errors were encountered: