Skip to content

Latest commit

 

History

History
55 lines (47 loc) · 2.29 KB

File metadata and controls

55 lines (47 loc) · 2.29 KB

Hide Mock Location

Prevents detection of mock location
Supports Android 6–16
Test App: MockLocationDetector

Compatibility Notes

  • For Xposed API 100 or lower: Please use v1.2.2 or below.
  • For Xposed API 101 or higher: v2.0.0 or above is recommended.

Usage

  1. Download the APK from the latest releases and install it on your device.
  2. Enable the module in your Xposed manager.
  3. If you are using LSPosed, select the target apps from which you want to hide the mock location.
  4. To apply this to all apps, you can select the following in your scope (Recommended):
    • System Framework (system)
    • Settings Storage (com.android.providers.settings)
  5. Reboot your device (if required by your Xposed manager) and you're all set!

Hooked Methods

  • android.location.Location
    • isFromMockProvider()
    • isMock()
    • setIsFromMockProvider()
    • setMock()
    • getExtras()
    • setExtras()
    • set()
  • android.provider.Settings
    • Secure.getStringForUser()
  • android.app.AppOpsManager
    • checkOp()
    • checkOpNoThrow()
    • unsafeCheckOp()
    • unsafeCheckOpNoThrow()
  • com.android.providers.settings.SettingsProvider
    • call()
  • com.android.server.appop.AppOpsService
  • com.android.server.AppOpsService
    • checkOperationImpl()
    • checkOperation()

How to set Mock Location app via ADB (Stack Overflow)

Granting Permission

adb shell appops set <MOCK_LOCATION_APP_PKG> android:mock_location allow

Revoking Permission

adb shell appops set <MOCK_LOCATION_APP_PKG> android:mock_location deny

Note: For rooted devices using a terminal emulator on the device itself, omit the adb shell prefix.

Disclaimer

Use this module at your own risk. The developer assumes no responsibility for any damage, data loss, or issues caused by the use of this software.

Credits & References

ThePieMonster#HideMockLocation