Introduction¶
In DSH Go, letting AI operate the local Android device usually requires you to open the adbd TCP port yourself first, remember the address, and manually adb connect after disconnection. Wireless debugging uses TLS pairing, which is a different path from the classic adb tcpip. Below is an introduction to the community plugin dsh-go-adb-link (a modified version by maintainer chen114514st, currently 1.3.3): after installation, it displays the connection status above the input box, auto-scans local adbd, maintains reconnection, and hands adb / adb_pair capabilities to the AI in the session as tools. Simultaneously, it uses a tool layer to constrain which commands can be run directly and which require you to approve them first.
What is this¶
dsh-go-adb-link is a native plugin for DSH Go, classified as a client capability: it searches for the adbd on 127.0.0.1 that responds to the ADB handshake within the environment of the current phone running DSH, maintains the connection, and does not connect to other devices in the LAN randomly.
- Repository: chen114514st/dsh-go-adb-link
- Directory: SkillHub Plugin Page
- License: MIT
- Panel Title (Chinese): ADB Auto Connect
This modified version is based on usi112/dsh-go-adb-link, with the upstream original at edgy7493/dsh-go-adb-link. The package name dsh-go-adb-link on npm still refers to the upstream 1.2.4; this modified version does not use npm and relies on GitHub for distribution.
Core Features¶
Auto-find Port and Reconnect¶
Auto-reconnection will first try the remembered port, as well as 3455 and 5555; if neither is reachable and USB debugging has been authorized before, it will perform two-stage scanning in the background: first scan common segments 1024–10000, and if no match is found within a few seconds, scan all ports 1–65535 (worst case on the panel is about 46 seconds, upper limit about 58 seconds). The scan only recognizes CNXN / AUTH responses and filters out TCP self-connect false positives.
Classic ADB over TCP (such as adb tcpip or Stellar’s TCP feature) can be discovered via scanning; Android 11+ native “Wireless Debugging” TLS pairing ports cannot be probed via handshake and require the pairing flow (see below).
Status Bar and Panel¶
After installation and restarting the engine in the App’s “Engine” page, a status bar (composer strip, id: adb-state) will appear above the input box. The engine also needs to be restarted after changes to lib/. The panel “ADB Connect” provides operations like Connect, Scan, and Fixed Port; starting from 1.3.3, it will provide “Next Step” guidance based on the current status and lastError.
Fixed Port (1.3.0+)¶
The panel “Fixed Port” executes adb tcpip 3455, making adbd listen fixed on 3455. It requires existing transport (already connected TCP or USB); it cannot be issued when the phone is powered off. tcpip is effective only for the current boot; after restart or adbd restart, you need to click it again. Some ROMs limit this command, and the panel will prompt if it fails. Clicking “Fixed Port” will clear the TLS pairing remembered addr and switch back to classic mode.
Wireless Debugging Pairing (1.3.0+)¶
View the IP, pairing port, and 6-digit pairing code in “Developer Options → Wireless Debugging → Pair using pairing code”. The AI calls adb_pair to complete the pairing. After success, the plugin uses adb mdns services to find _adb-tls-connect._tcp and automatically adb connect; the address is written to the addr in $DSH_HOME/dsh-go/adb-link/state.json. The pairing code is only given to adb once, is not written to disk, and is not echoed (displayed as •••••• on the tool card). If connection fails, you can retry using the connection port on the wireless debug home page via the connectPort parameter.
AI-facing adb Tools and Behavioral Boundaries¶
After successful connection, the AI can use the structured adb tool (supports serial, equivalent to adb -s). The plugin specifies in the system prompt and the tool layer:
- Say first, do later: Explain the intent in one sentence before changing the device via adb.
- Read-only directly executable: Commands that do not change state, such as
devices,getprop,pm list,dumpsys,logcat -d, screenshot,uiautomator dump, etc. - Write logcat to file (with
-f/--file/-r/-n) is treated as a write operation and requires agreement. - System-level / Write: Install/uninstall, change
settings, simulateinput,ambroadcast, force stop, delete data, etc., require prior agreement; delete data commands (such asrm,pm clear,dd of=/dev/block/*, etc.) are strictly blocked. - Connect, disconnect, and pairing in 1.3.2+ are treated as read-only and no longer require the panel “Allow once”; if blocked, the panel displays the command and provides “Allow once” / “Reject” (120 seconds, same parameters only).
Screenshots are saved as PNG: /sdcard/Download/DSH-Go/ is prioritized; otherwise, $DSH_HOME/dsh-go/adb-link/out/.
Data and Security¶
- Runtime state is in
$DSH_HOME/dsh-go/adb-link/state.json(port, authorization, auto-reconnect, etc.), not inside the plugin package. - Calls local
adb; may executeapt-get install -y adbif missing. - Does not read clipboard, input box, or conversation; only connects to the adbd identified locally. The local adb server (
127.0.0.1:5037) is shared with bash, so after connecting,adbcan also be used in a regular shell.
Compatibility¶
The README states compatibility with DSH Go 1.1.0 (engine r15-dsh0.2.2-rc.1-node24.22.1, Android arm64), with connection, panel, and adb / adb_pair tested normally. 1.0.16 and 1.0.15 are also usable; earlier versions are unverified. If there are issues after upgrading the engine, you can attach the App version, engine version, and panel lastError to Issues.
dshGo.minApp in package.json is 1.0.11, engine requires dsh >= 0.2.1-rc.2 and Node >= 22.
Installation and Enablement¶
This modified version recommends GitHub Direct Install:
dsh plugin --profile web add github:chen114514st/dsh-go-adb-link
Offline method: Download dsh-go-adb-link-1.3.3.tgz from Releases to the phone:
dsh plugin --profile web add /sdcard/Download/dsh-go-adb-link-1.3.3.tgz
Only when you need the upstream npm original (1.2.4):
dsh plugin --profile web add dsh-go-adb-link
After installation, go to the App “Engine” page restart the engine once, and the status bar will stabilize.
First Authorization¶
When connecting for the first time, the system will pop up “Allow USB debugging?”. Please click Allow and check Always allow from this computer. If not checked, you need to click again every time you reconnect, and the plugin cannot truly be fully automatic.
Typical Usage¶
- Install and restart the engine, and see if the status bar still displays “ADB Not Connected”.
- Open Wireless Debugging or plug in USB, click “Connect” in the panel; if necessary, click “Scan Port” to perform a quick segment or full port scan.
- If you want to fix the classic TCP port: First ensure you are connected, then click “Fixed Port” (remember to do it again after restarting the phone).
- Android 11+ Wireless Debugging: Open pairing info in developer options and let the AI use
adb_pair(pairing code is sensitive, do not paste it outside the conversation). - After successful connection, for read-only troubleshooting, you can let the AI run
adbdirectly; installing APK, changing system settings, etc., will request “Allow once” in the panel.
For multi-device scenarios, pass serial in the tool to avoid connecting to other adb endpoints on the local machine.
Troubleshooting Points¶
| Phenomenon | Handling Direction |
|---|---|
| Always “ADB Not Connected” | Confirm Wireless Debugging or TCP is enabled; click “Connect” under USB |
Connection refused |
Port is invalid, click “Scan Port” |
| “Waiting for authorization” | Phone click Allow and check Always allow |
| “Fixed Port” no transport | Connect or plug USB first |
tls-connect-failed |
TLS address is invalid, re-pair or pass connectPort |
Panel lastError is not empty |
Refer to README troubleshooting table (e.g., unauthorized, no-device, connect-failed) |
See the “Troubleshooting” section in the repository README for the full comparison table.
Uninstall¶
dsh plugin --profile web remove dsh-go-adb-link
You can also uninstall it in the App plugin details. state.json is under $DSH_HOME; uninstalling the plugin package will not automatically delete this file (upgrading the plugin won’t accidentally take the state either).
Use Cases and Notes¶
Suitable for developers who keep long conversations open on the DSH Go host, want AI to read device status, pull logs, take screenshots, and perform limited adb operations under your visibility. The plugin runs with the current DSH process permissions, and will execute local adb or even apt-get install adb; please check the source code and MIT license yourself before installing to confirm it fits your security policy.
The DeepSeek Harness ecosystem emphasizes “everything is a plugin”; SkillHub is a community directory and has no official affiliation with DeepSeek / Synthesia. The star count for this plugin is as shown on the community page; follow updates via repository Issues and Releases.
Conclusion¶
dsh-go-adb-link puts “finding adbd port, keep-alive, wireless pairing” into one panel and a set of tools, and uses tiered and panel approval to reduce the risk of AI misuse. For installation commands and version details, refer to the GitHub README; for browsing and favoriting, open the SkillHub directory page.