Skip to content

Instantly share code, notes, and snippets.

View SuggonM's full-sized avatar
🐢
shut-in

Suggon SuggonM

🐢
shut-in
View GitHub Profile
@SuggonM
SuggonM / adb-5555.sh
Last active December 30, 2025 15:57
Restart wireless debugging (ADB) in port 5555 with Termux (no root)
#!/data/data/com.termux/files/usr/bin/bash
termux-notification --id 1 -t "Scanning for ADB port..."
adb_port=$(nmap -sT -p30000-50000 --open localhost | grep -m1 -oP "^\d+")
if [[ -z $adb_port ]]; then
termux-notification --id 1 -t "No debug port detected" -c "Tap to rescan." --action "$(realpath $0)"
exit
fi
termux-notification --id 1 -t "ADB port detected: $adb_port. Restarting ADB..."