Files
Abdurrahman Kaan DikeçandClaude Opus 5.5 1b6b1fab8d tools/adbd: a static adbd for Linux, USB only, keys always required
AOSP's adbd (platform-tools 34.0.5, the sources nmeum/android-tools vendors, SHA-256
pinned), built for adbd alone and static against musl in Alpine: one aarch64 binary of
2.49 MB for Ubuntu and OpenWrt alike, in under two minutes.

Debian's/Ubuntu's adbd package (26.04 only) is no option: it is patched to require no
authorisation on Linux and listens on TCP 5555 without FunctionFS. mu300-adbd.patch:
- auth_required = true on Linux, always; keys from /etc/mu300/adb_keys and
  /root/.android/adb_keys only, never Android's framework socket (an environment variable)
- FunctionFS on Linux and no TCP or vsock listener at all; no FunctionFS: exit
- umask 022, pushed files without group/other write, the login shell for adb shell
- musl: StopWorker waited for pthread_kill(t, 0) == ESRCH, which musl never returns for an
  exited thread that is not joined - adbd hung at the end of every USB connection
JDWP, adb over Wi-Fi (pairing) and mDNS are stubbed out, and protobuf with them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-11 21:11:02 +03:00
..