How huangzhuorui/locationspoofer works
LocationSpoofer is an Android system-level location and wireless-environment spoofing framework. Users configure a location, route, realism options, and environment data in the Compose app; the app persists configuration, while the foreground service supports ongoing control and the LSPosed module applies spoofed responses inside selected apps. The graph also preserves route/motion computation, map-engine choices, environment collection and storage, and anti-detection capabilities documented in the README. Several feature implementations were not sampled, so their internal call links are omitted rather than inferred.
Main entry points: LocationHooker.kt Hook entry · MainViewModel.kt App ViewModel · MotionController.kt Motion controller · EnvironmentScanner.kt Environment scan
Components 25
App and controls
- Android entry
app/src/main/java/com/vincenthzr/locationspoofer/MainActivity.kt - Compose screens
app-ui/src/main/java/com/vincenthzr/locationspoofer/ui/screen/MainScaffoldScreen.kt - Map engines
app-ui/src/main/java/com/vincenthzr/locationspoofer/ui/components/map/AMapEngineAdapter.kt - App ViewModel
app-ui/src/main/java/com/vincenthzr/locationspoofer/viewmodel/MainViewModel.kt
Location and data
- Settings storage
core-data/src/main/java/com/vincenthzr/locationspoofer/data/repository/SettingsRepository.kt - Shared config
core-data/src/main/java/com/vincenthzr/locationspoofer/utils/ConfigManager.kt - Environment scan
core-data/src/main/java/com/vincenthzr/locationspoofer/utils/EnvironmentScanner.kt - Environment records
core-data/src/main/java/com/vincenthzr/locationspoofer/data/db/EnvironmentDao.kt - Room database
core-data/src/main/java/com/vincenthzr/locationspoofer/data/db/AppDatabase.kt
Background control
- Service bridge
service/src/main/java/com/vincenthzr/locationspoofer/service/SpoofingServiceControllerImpl.kt - Spoofing service
service/src/main/java/com/vincenthzr/locationspoofer/service/SpoofingService.kt - Floating joystick
service/src/main/java/com/vincenthzr/locationspoofer/service/FloatingJoystickService.kt
System injection
- Hook entry
xposed/src/main/java/com/vincenthzr/locationspoofer/xposed/LocationHooker.kt - Location hooks
xposed/src/main/java/com/vincenthzr/locationspoofer/xposed/hooks/SystemLocationServiceHooker.kt - Wireless hooks
xposed/src/main/java/com/vincenthzr/locationspoofer/xposed/hooks/SystemWifiServiceHooker.kt - GNSS simulation
xposed/src/main/java/com/vincenthzr/locationspoofer/xposed/hooks/GnssFastMockEngine.kt - Hook route engine
xposed/src/main/java/com/vincenthzr/locationspoofer/xposed/utils/RouteEngine.kt - Anti-detection hooks
xposed/src/main/java/com/vincenthzr/locationspoofer/xposed/hooks/AntiDetectionHooker.kt
Geometry and realism
- Motion controller
core-data/src/main/java/com/vincenthzr/locationspoofer/data/motion/MotionController.kt - Route geometry
core-geo/src/main/kotlin/com/vincenthzr/locationspoofer/utils/RoutePath.kt - Motion realism
core-geo/src/main/kotlin/com/vincenthzr/locationspoofer/utils/MotionRealism.kt
Other components
- User
- Target apps
- Android system APIs
- WiGLE / OpenCellID
Connections 30
- User → Android entry: opens app
- Android entry → Compose screens: renders
app/src/main/java/com/vincenthzr/locationspoofer/MainActivity.kt - Compose screens → App ViewModel: uses state
app-ui/src/main/java/com/vincenthzr/locationspoofer/ui/screen/MainScaffoldScreen.kt - App ViewModel → Environment scan: uses scanner
app-ui/src/main/java/com/vincenthzr/locationspoofer/viewmodel/MainViewModel.kt - App ViewModel → Environment records: queries records
app-ui/src/main/java/com/vincenthzr/locationspoofer/viewmodel/MainViewModel.kt - App ViewModel → Settings storage: reads settings
app-ui/src/main/java/com/vincenthzr/locationspoofer/viewmodel/MainViewModel.kt - Map engines → App ViewModel: configures map
- Environment scan → Environment records: stores scans
- Room database → Environment records: provides DAO
core-data/src/main/java/com/vincenthzr/locationspoofer/data/db/AppDatabase.kt - App ViewModel → Motion controller: controls motion
app-ui/src/main/java/com/vincenthzr/locationspoofer/viewmodel/MainViewModel.kt - Motion controller → Route geometry: uses geometry
core-data/src/main/java/com/vincenthzr/locationspoofer/data/motion/MotionController.kt - Motion controller → Motion realism: uses realism
core-data/src/main/java/com/vincenthzr/locationspoofer/data/motion/MotionController.kt - Service bridge → Spoofing service: starts and stops
service/src/main/java/com/vincenthzr/locationspoofer/service/SpoofingServiceControllerImpl.kt - Service bridge → Floating joystick: controls visibility
service/src/main/java/com/vincenthzr/locationspoofer/service/SpoofingServiceControllerImpl.kt - Floating joystick → Motion controller: reads state
service/src/main/java/com/vincenthzr/locationspoofer/service/FloatingJoystickService.kt - Hook entry → Location hooks: registers hooks
xposed/src/main/java/com/vincenthzr/locationspoofer/xposed/hooks/SystemLocationServiceHooker.kt - Hook entry → Wireless hooks: registers hooks
xposed/src/main/java/com/vincenthzr/locationspoofer/xposed/hooks/SystemWifiServiceHooker.kt - Hook entry → GNSS simulation: initializes
xposed/src/main/java/com/vincenthzr/locationspoofer/xposed/LocationHooker.kt - Hook entry → Hook route engine: uses route engine
xposed/src/main/java/com/vincenthzr/locationspoofer/xposed/LocationHooker.kt - Hook entry → Anti-detection hooks: applies defenses
- Hook route engine → Route geometry: uses geometry
xposed/src/main/java/com/vincenthzr/locationspoofer/xposed/utils/RouteEngine.kt - Hook route engine → Motion realism: uses realism
xposed/src/main/java/com/vincenthzr/locationspoofer/xposed/utils/RouteEngine.kt - Hook entry → Shared config: reads config
- Shared config → Target apps: shares settings
- Environment scan → WiGLE / OpenCellID: imports records
- Location hooks → Android system APIs: intercepts APIs
- Wireless hooks → Android system APIs: intercepts APIs
- GNSS simulation → Android system APIs: simulates satellites
- Anti-detection hooks → Target apps: hides hook traces
- Android system APIs → Target apps: returns spoofed data