File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # gps_spoofer.sh -- Spoof GPS location on Android via mock location app
3+ # Usage: ./gps_spoofer.sh <latitude> <longitude> [altitude]
4+ # Example: ./gps_spoofer.sh 40.7128 -74.0060 # NYC
5+
6+ LAT=${1:- 0}
7+ LNG=${2:- 0}
8+ ALT=${3:- 0}
9+
10+ if ! adb devices | grep -q " device$" ; then
11+ echo " β No device connected"
12+ exit 1
13+ fi
14+
15+ echo " π GPS Spoofing β Lat: $LAT , Lng: $LNG "
16+
17+ # Method 1: Using dumpsys to inject mock location
18+ # (Requires mock location app enabled in developer options)
19+ adb shell " settings put secure mock_location_app com.android.systemui"
20+
21+ # Method 2: Use Xposed module if available
22+ # Method 3: Use FakeGPS app intent
23+ adb shell am start -n com.fakegps.tools/.MainActivity
24+
25+ echo " β To enable:"
26+ echo " 1. Developer Options β Allow mock locations"
27+ echo " 2. Install a GPS spoofing app like FakeGPS or Fake Locations (F-Droid)"
28+ echo " 3. Set location in that app"
You canβt perform that action at this time.
0 commit comments