How to Hide Developer Options & Mock Location on Android 15/16 Without Root (2026 ADB Guide)
Quick answer: On an unrooted Android 15 or Android 16 device, you can hide Developer Options and the legacy mock_location setting from third-party apps by granting WRITE_SECURE_SETTINGS once over ADB (adb shell pm grant
Quick answer: On an unrooted Android 15 or Android 16 device, you can hide Developer Options and the legacy mock_location setting from third-party apps by granting WRITE_SECURE_SETTINGS once over ADB (adb shell pm grant <package> android.permission.WRITE_SECURE_SETTINGS), then setting Settings.Global.DEVELOPMENT_SETTINGS_ENABLED and Settings.Secure.ALLOW_MOCK_LOCATION to 0 while location simulation is activeβwithout rooting, unlocking the bootloader, or tripping Samsung Knox (0x0).
If you are building, QA-testing, or using location-aware Android apps on Android 14, 15, or 16, standard Play Store mock-location tools frequently trigger "Mock location detected" or "Disable Developer Options" errors, or suffer from constant GPS snap-back to your real coordinates.
Below is the exact diagnostic workflow, copy-paste adb shell commands, OEM snap-back fixes (Samsung S22βS25, Xiaomi HyperOS, Pixel), and a clear engineering comparison of every no-root method in 2026.
1. Check What Target Apps Actually See on Your Phone (adb shell)
Before guessing why an app rejects your simulated GPS, inspect the exact OS flags every Android app can read without special permissions:
# 1. Check if Developer Options is visible to third-party apps (1 = visible, 0 = hidden)
adb shell settings get global development_settings_enabled
# 2. Check the legacy mock_location secure flag
adb shell settings get secure mock_location
# 3. Verify which package currently holds Android's mock location AppOp
adb shell appops query-op --user 0 MOCK_LOCATION allow
# 4. Inspect live fused + GPS provider state (check for isMock=true)
adb shell dumpsys location | grep -E "last location|mock|fused" | head -n 20
Inside a typical Android app, anti-spoof checks inspect four layers in Kotlin/Java:
// Layer 1: Per-fix mock flag on API 31+ (Android 12β16)
val isMockFix = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
location.isMock
} else {
@Suppress("DEPRECATION")
location.isFromMockProvider
}
// Layer 2: Global Developer Options flag (no permission required to read)
val devOptionsOn = Settings.Global.getInt(
context.contentResolver,
Settings.Global.DEVELOPMENT_SETTINGS_ENABLED,
0
) == 1
// Layer 3: Legacy mock_location flag (still checked by enterprise & courier SDKs)
val legacyMockOn = Settings.Secure.getString(
context.contentResolver,
"mock_location"
) != "0"
That is why simply picking a mock-location app inside Developer Options is no longer enough on Android 15 or Android 16: Layer 2 (development_settings_enabled == 1) gives you away before the target app even requests a single GPS coordinate.
2. The Exact ADB Command to Hide Developer Options Without Root
A normal Android app cannot write to Settings.Global or Settings.Secureβcalling putInt throws a SecurityException. Manually flipping Developer Options off in Android Settings hides the flag, but immediately revokes the mock-location provider on most devices.
The clean no-root workaround is a one-time WRITE_SECURE_SETTINGS grant over USB or Wireless ADB:
adb shell pm grant com.gpspoofer.app android.permission.WRITE_SECURE_SETTINGS
Once granted, the app can safely suppress both OS flags the moment location simulation starts and restore Developer Options automatically when you stop:
// Hide OS-level flags during active simulation (requires one-time WRITE_SECURE_SETTINGS grant)
Settings.Secure.putString(context.contentResolver, "mock_location", "0")
Settings.Global.putInt(context.contentResolver, "development_settings_enabled", 0)
// Restore cleanly when simulation stops
Settings.Global.putInt(context.contentResolver, "development_settings_enabled", 1)
Key properties of this ADB grant:
-
Persists across reboots: You only run
pm grantonce; it stays active until you uninstall the app or revoke it. -
100% reversible: Run
adb shell pm revoke com.gpspoofer.app android.permission.WRITE_SECURE_SETTINGSanytime. - No root & Knox stays intact: Zero bootloader unlock, zero Magisk/Zygisk modules, banking apps and OTA updates stay unaffected.
Here is an unedited live screen capture on an unrooted Samsung Galaxy S22+ running Android 16 demonstrating ADB Stealth hiding Developer Options in real time while holding a steady simulated coordinate:
For the complete architecture walkthrough (including Wireless ADB setup without a PC), see the no-root hide mock location Android guide.
3. Comparison: Every No-Root vs. Root Mock Location Method (2026)
Not all apps stop at Layer 2 (development_settings_enabled). If an app also calls Location.isMock() (Layer 1) inside its own process, ADB alone won't flip the per-fix booleanβyou also need either on-device APK patching or Container Mode.
| Method | Root Needed? | Hides Developer Options? | Strips Location.isMock()? |
Keeps Google Sign-In? | Works on Android 15 & 16? |
|---|---|---|---|---|---|
| Basic Play Store Mock GPS | No | No | No | Yes | Often detected / snaps back |
ADB Stealth (WRITE_SECURE_SETTINGS) |
No | Yes | No | Yes | Yes |
| On-Device APK Patching (LSPatch) | No | Pair with ADB Stealth | Yes | No (use email/OTP login) | Yes |
| Isolated Container Mode | No | Pair with ADB Stealth | Yes | Yes (unmodified APK signature) | Yes |
| Root + Magisk / Hide Mock Location | Yes | Yes (with Zygisk/PlayIntegrity) | Yes | Fragile (Play Integrity cat-and-mouse) | Requires bootloader unlock |
4. Fixing "Fake GPS Keeps Jumping Back" (Samsung One UI, Xiaomi HyperOS & Pixel)
Even when detection flags are handled, Android 14β16's FusedLocationProviderClient continuously triangulates nearby Wi-Fi BSSIDs, Bluetooth beacons, and cell towers. If a mock app only feeds GPS_PROVIDERβor gets throttled by OEM battery managersβyour pin will keep rubber-banding to your physical location.
Apply these OEM-specific settings to lock simulated coordinates steady:
| Device / OS | Exact Settings to Disable Snap-Back |
|---|---|
| Samsung Galaxy (S22 / S23 / S24 / S25 / A56, One UI 6β8) | 1. Location β Location services β turn OFF Wi-Fi scanning, Bluetooth scanning, and Google Location Accuracy. 2. Battery β Background usage limits β remove your mock GPS app from Sleeping / Deep sleeping apps. 3. App Info β Battery β Unrestricted. |
| Xiaomi / Redmi / POCO (MIUI & HyperOS) | 1. Location β Location services β turn OFF Wi-Fi & Bluetooth scanning. 2. App Info β Battery saver β No restrictions + enable Autostart. 3. Lock the app in the Recents switcher so HyperOS doesn't kill the foreground mock service. |
| OnePlus (OxygenOS) & Vivo (FuntouchOS) | 1. Disable Wi-Fi/Bluetooth scanning in Location Services. 2. Set App Battery Usage to Allow background activity + Allow foreground activity. |
| Google Pixel (Android 15 / 16) | 1. Settings β Location β Location services β turn OFF Google Location Accuracy, Wi-Fi scanning, and Bluetooth scanning. 2. App Info β App battery usage β Allow background usage β Unrestricted. |
If your pin still jumps back and forth every 30β60 seconds, the mock tool is not feeding both GPS_PROVIDER and the Fused provider continuously at a stable interval. Full step-by-step troubleshooting is documented in the Android Fake GPS snap-back fix guide.
5. Real-World App Categories & Honest Technical Limits
Different app ecosystems enforce very different detection stacksβknowing which layer an app actually checks saves hours of trial and error:
-
Delivery, dispatch, and gig-economy geofence testing: Most courier and dispatch apps gate access on
development_settings_enabled,mock_location, andLocation.isMock(), plus server-side impossible-travel checks (teleporting 50 miles in 2 seconds will still be flagged server-side regardless of local stealth). Read the delivery & gig app Android mock-location technical breakdown. - Offline terrain & hunting map scouting: Apps like onX Hunt rely on clean GNSS/Fused fixes and cached offline map tiles; hiding mock flags cleanly prevents location lockouts while previewing remote waypoints and GPX routes. See the onX Hunt Android fake GPS & offline map setup guide.
-
Strict Play Integrity / banking / competitive anti-cheat: Apps enforcing hardware-backed Play Integrity (
MEETS_STRONG_INTEGRITY) or server-side kinematic telemetry cannot be bypassed purely by hiding OS flagsβno honest tool should claim otherwise.
6. Frequently Asked Questions
Can you use fake GPS without Developer Options enabled on Android 15 or 16?
You still need Developer Options enabled once during initial setup to select your mock-location app (and run the one-time ADB grant). After granting WRITE_SECURE_SETTINGS, ADB Stealth hides development_settings_enabled (0) automatically while spoofing is active, so other apps read Developer Options as turned off.
Why is my fake GPS not working on Android 16 or Samsung S24/S25?
Two main reasons: (1) Android 15/16 enforces stricter background location throttling unless the mock service runs as an unrestricted foreground service feeding both GNSS and Fused providers, and (2) Samsung One UI's Google Location Accuracy and Deep Sleeping Apps override static mock coordinates within seconds unless disabled using the table above.
Does adb shell pm grant ... WRITE_SECURE_SETTINGS void my warranty or trip Knox?
No. pm grant is a standard Android Debug Bridge permission command that does not touch the bootloader, recovery partition, or /system. Samsung Knox remains 0x0, OTA security updates continue normally, and the permission can be revoked with a single adb shell pm revoke command.
What tool implements ADB Stealth + Hide from Apps + Container Mode together?
GPS Spoofer Unlimited for Android 8β16 bundles ADB Stealth, synchronized GNSS + Fused anti-snap-back injection, on-device APK patching, and Container Mode in one no-root package (with a free Lite edition on Google Play for basic testing).
Regional Setup & Payment Reference
| Guide | Focus |
|---|---|
| GPS Spoofer Unlimited (Main Overview) | Android 8β16 no-root setup, ADB Stealth, GPX routes & live S22+ proof |
| India Android Guide (INR UPI AutoPay) | Xiaomi/Samsung/OnePlus setup + native INR UPI billing |
| GuΓa en EspaΓ±ol (Android sin Root) | US / LatinoamΓ©rica setup en espaΓ±ol para Android 8β16 |
| Π€Π΅ΠΉΠΊ GPS Π½Π° Android Π±Π΅Π· Root (ΠΠ°Π·Π°Ρ ΡΡΠ°Π½ / Π‘ΠΠ) | ΠΠ°ΡΡΡΠΎΠΉΠΊΠ° Π±Π΅Π· Root + ΠΏΡΡΠΌΠ°Ρ ΠΎΠΏΠ»Π°ΡΠ° USDT |
| Direct Crypto Checkout (No Credit Card) | Direct USDT (TRC-20/Solana/Polygon), USDC, BTC & SOL activation |
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.