Skip to content

Feature Request: Bypass ACCESS_MOCK_LOCATION Permission for Mock Providers #11

@arifpedia

Description

@arifpedia

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions