Description
Currently, this module excels at hiding mock location status (e.g., isFromMockProvider(), settings queries), similar to Smali Patcher's "Mock Locations" option. However, it lacks the ability to bypass the android.permission.ACCESS_MOCK_LOCATION requirement for creating mock providers via LocationManager.addTestProvider(), setTestProviderLocation(), etc.
Apps like games often check both mock status AND whether the app has mock permission enabled. This feature would allow apps without the permission to use mock providers without throwing SecurityException.
Proposed Implementation
Hook the permission checks in LocationManagerService or related framework classes:
- Bypass
enforceCallingPermission("android.permission.ACCESS_MOCK_LOCATION", ...) or checkCallingPermission() calls before mock provider APIs.
- Similar to Smali Patcher's "Mock Providers" patch.
Use Case
- Enable mock GPS in apps that don't have (or can't enable) mock location permission.
- Combine with existing hide-mock hooks for full spoofing undetectability.
Additional Context
Reference: Smali Patcher "Mock Providers" option (XDA thread: https://xdaforums.com/t/module-smali-patcher-7-4.3680053/).
Thank you for the great module!
Description
Currently, this module excels at hiding mock location status (e.g.,
isFromMockProvider(), settings queries), similar to Smali Patcher's "Mock Locations" option. However, it lacks the ability to bypass theandroid.permission.ACCESS_MOCK_LOCATIONrequirement for creating mock providers viaLocationManager.addTestProvider(),setTestProviderLocation(), etc.Apps like games often check both mock status AND whether the app has mock permission enabled. This feature would allow apps without the permission to use mock providers without throwing
SecurityException.Proposed Implementation
Hook the permission checks in
LocationManagerServiceor related framework classes:enforceCallingPermission("android.permission.ACCESS_MOCK_LOCATION", ...)orcheckCallingPermission()calls before mock provider APIs.Use Case
Additional Context
Reference: Smali Patcher "Mock Providers" option (XDA thread: https://xdaforums.com/t/module-smali-patcher-7-4.3680053/).
Thank you for the great module!