Skip to content

balaji128k/auto-adbt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

auto-adbt — adb connection automator for termux

Automates wireless ADB setup on Android from within Termux — no PC needed.


What it does

  • Detects your device IP and wireless ADB port automatically
  • Walks you through enabling developer options, USB debugging, and wireless debugging step by step
  • Handles pairing via pairing code (with in-notification reply)
  • Persists the ADB connection over TCP so it survives USB disconnects
  • Gracefully stops and cleans up ADB sessions

Requirements

  • Termux
  • adbpkg install android-tools
  • termux-apipkg install termux-api + Termux:API app
  • python3pkg install python
  • zeroconfpip install zeroconf

Installation

git cone https://github.com/balaji128k/auto-adbt.git && cd auto-adbt;

Usage

bash adbt.sh [start|stop|status]
Command Description
start Interactive setup — guides through full connection flow
stop Disconnects devices and kills ADB server
status Shows ADB port, PID, and connected devices

Flow overview

start
 ├─ already connected? → persist & exit
 ├─ developer options enabled?
 ├─ USB debugging on?
 ├─ wireless debugging on?
 ├─ paired? → pair if not (auto pairing code via notification)
 ├─ detect port (get_adbWifi_port.py)
 ├─ detect IP (wlan0 / v4-ccmni1 / v4-ccmni2)
 ├─ adb connect
 └─ persist over TCP → exit

Notes

  • Run from inside a Termux session on the device you want to debug
  • Wireless debugging port changes each session — that's expected
  • persist_adb switches to tcpip 5555 and kills the wireless debugging port so the connection holds without a cable

License

GNU - GPL-2.0