Skip to content

afluffywaffle/adbwifi-toggle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADB WiFi — Wireless Debugging toggle

A tiny, no-root Android app that surfaces Android 11+ Wireless Debugging (adb_wifi_enabled) as a one-tap launcher icon (plus a bonus Quick-Settings tile), and shows the adb connect <ip>:<port> address to reach the device from your computer.

It exists for devices where Developer Options / the Quick-Settings shade are hard to reach — e-ink readers like the Supernote (Nomad/Manta), locked-down tablets, kiosk builds — so there's no convenient on-device way to re-enable adb-over-Wi-Fi after a reboot. Pair it with a mesh VPN like Tailscale and you get reliable remote adb from anywhere.

Why Wireless Debugging and not adb tcpip 5555? The classic fixed-port route needs root (it sets a system property), and where a ROM leaves adb-over-TCP open it's usually unauthenticated (ro.adb.secure=0) — anyone on the same Wi-Fi can get a shell. Android 11's Wireless Debugging is authenticated (paired key) + TLS, so it's safe to expose over a VPN on untrusted networks. This app uses that channel deliberately.

  • Package: com.afluffywaffle.adbwifi
  • Min SDK 30 (Android 11+)
  • Kotlin, no third-party dependencies, no root, no adb tcpip

Build

./gradlew assembleDebug
# -> app/build/outputs/apk/debug/app-debug.apk

Toolchain: AGP 8.13.2, Kotlin 2.1.0, Gradle 9.1, JDK 17. Point local.properties at your SDK (sdk.dir=/path/to/Android/sdk) or set $ANDROID_HOME.

Install

A cable (or an existing adb link) is needed once, only to grant one permission.

# 1. install (add -s <serial> if more than one device is attached; see: adb devices -l)
adb install -r app/build/outputs/apk/debug/app-debug.apk

# 2. grant the one privileged permission — persists across reboots & reinstalls
adb shell pm grant com.afluffywaffle.adbwifi android.permission.WRITE_SECURE_SETTINGS

WRITE_SECURE_SETTINGS can't be granted from the UI, but pm grant works on any device that allows development-permission grants (no root). The grant is sticky, so this is a one-time step per device.

Use

Open ADB WiFi:

  • Turn ON → Android shows its own "Allow wireless debugging?" dialog → Allow. (This OS consent gate can't be bypassed programmatically — that's the security feature.)
  • The screen then lists adb connect <ip>:<port> for each local address (VPN/100.x addresses first).
  • Turn OFF is silent (no dialog).

The wireless-debug port is random each time it's enabled / after a reboot — re-open the app to read the current one, then from your computer:

adb connect <ip>:<port>

How it works

  • Toggles Settings.Global.adb_wifi_enabled via WRITE_SECURE_SETTINGS.
  • Discovers the current wireless-debug port with NsdManager (mDNS _adb-tls-connect._tcp) — this is why the app declares INTERNET; without it the discovery call throws and the activity crashes on launch.
  • MainActivity is the launcher entry point; AdbWifiTileService is an optional TileService for the Quick-Settings shade where reachable.

Limitations

  • Android 11+ only (Wireless Debugging didn't exist before API 30).
  • Enabling always requires the one-time OS consent dialog per network — by design.
  • Not on an app store; sideload the APK or build it yourself.

License

MIT — see LICENSE.

About

No-root Android app to toggle Wireless Debugging (adb over Wi-Fi) from the launcher — for Supernote e-readers & locked-down devices where Developer Options are hard to reach.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages