android-phone-mcp-server: Skill for Claude Code

.pi/skills/adb-wifi-debug/SKILL.md

adb-wifi-debug is a skill for Claude Code from expoli/android-phone-mcp-server. It costs 78 tokens per session (2,005 once invoked), scanned B, original, MIT.

Instructions for connecting an Android phone to Windows Subsystem for Linux, Microsoft's Linux environment running alongside Windows, using Android Debug Bridge over Wi-Fi. It also describes USB forwarding as a fallback for USB-only tasks.

In plain words
What is it for?
Connecting to an Android phone for shell access, app installation, logs, and screen control with tools such as scrcpy, plus USB access for file transfer or flashing.
Why use it?
It addresses the common problem that WSL cannot directly see a phone connected to Windows by USB. It includes pairing, connection checks, and recovery when the device goes offline.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is expoli/android-phone-mcp-server's own configuration. It tells Claude Code how to work on android-phone-mcp-server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything android-phone-mcp-server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to expoli/android-phone-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/expoli/android-phone-mcp-server/master/.pi/skills/adb-wifi-debug/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/expoli/android-phone-mcp-server

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for adb-wifi-debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/expoli/android-phone-mcp-server/adb-wifi-debug/github.svg)](https://agentmods.dev/skills/expoli/android-phone-mcp-server/adb-wifi-debug)
Your own site
<a href="https://agentmods.dev/skills/expoli/android-phone-mcp-server/adb-wifi-debug"><img src="https://agentmods.dev/badge/skills/expoli/android-phone-mcp-server/adb-wifi-debug/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for adb-wifi-debug

Your own site · 80×15
<a href="https://agentmods.dev/skills/expoli/android-phone-mcp-server/adb-wifi-debug"><img src="https://agentmods.dev/badge/skills/expoli/android-phone-mcp-server/adb-wifi-debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,005 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.02005
Opus 5 $0.00039 $0.01002
Sonnet 5 $0.00016 $0.00401
Haiku 4.5 $0.00008 $0.00200

Measured 8d ago against content hash bc728c7a26b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

adb-wifi-debug scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo apt install -y linux-tools-generic usbutils hwdata
.pi/skills/adb-wifi-debug/SKILL.md · 124 lines

How it starts

The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.

adb 无线调试连接(WSL2 ↔ Android 手机)

背景与关键事实

  • 环境:WSL2 (Ubuntu 24.04, NAT 网络模式), Windows 主机, adb 已装于 /usr/bin/adb (version 34.0.4)。
  • WSL2 是虚拟机,默认看不到 Windows 上连接的 USB 设备 —— 需要 usbipd-win 透传,或直接用 WiFi 无线调试。
  • 结论(本项目首选):只要需求是 adb 调试(shell/装应用/日志/scrcpy),优先走 WiFi 无线调试,零配置、无防火墙问题。usbipd 只留给 MTP 传文件、刷机等 USB 专属需求。
  • 已知设备:OPPO PKT110 (Android 16),局域网网段 192.168.1.0/24,路由器 192.168.1.1

主路径:WiFi 无线调试(Android 11+,推荐)

1. 手机端开启

设置 → 开发者选项 → 无线调试 → 开启。

  • 主界面显示 「IP 地址和端口」(如 192.168.1.15:39455)→ 连接用
  • 「使用配对码配对设备」 → 配对端口 + 6 位配对码(仅首次/重新授权时需要)

2. WSL 侧连接

adb kill-server && adb start-server
adb connect <手机IP>:<连接端口>    # 例: adb connect 192.168.1.15:39455
adb devices                        # 状态为 device = 成功; unauthorized = 需配对/授权

首次连接若显示 unauthorized

adb pair <手机IP>:<配对端口>       # 输入 6 位配对码
adb connect <手机IP>:<连接端口>

3. 验证

adb -s <手机IP>:<端口> shell getprop ro.product.model
adb -s <手机IP>:<端口> shell getprop ro.build.version.release

4. 省电断连(offline)与重连

手机息屏/空闲一段时间后,无线调试连接常变 offline端口不变,无需重新配对)。标准恢复流程:

adb kill-server && adb start-server
timeout 15 adb connect <手机IP>:<连接端口>   # connect 可能挂起,用 timeout 兜底
adb devices
  • adb connect 挂起/超时是省电状态的正常现象:直接重试即可,通常第二次就能连上。
  • 只有重新开关了「无线调试」,端口才会变(那时需重新发现端口,见下节)。

自动发现设备(nmap)

关键教训:ping 扫描会漏掉"隐身"设备

nmap -sn 靠主机回包判断存活。OPPO/ColorOS 在屏幕熄灭/空闲省电状态会静默丢弃 ICMP 与陌生 TCP 探测包(DROP 而非 RST),导致在线手机被判定为 down、漏出存活名单,从而不会被后续端口扫描覆盖

正确流程

# 0) 前置:确保手机屏幕亮着、无线调试已开启(省电模式会隐身)
# 1) 确定网段:ping 常见网关(192.168.1.1 / 192.168.0.1 / 10.0.0.1)
# 2) 找存活主机
nmap -sn -T4 192.168.1.0/24 | grep "Nmap scan report"
# 3) 对存活主机扫 adb 端口(5555 传统 + 37000-46000 无线调试随机段)
nmap -T4 --min-rate 3000 -p 5555,37000-46000 <存活IP列表>
# 4) 兜底:跳过主机发现直接全子网扫(慢但可靠)
nmap -Pn -p 5555,37000-46000 192.168.1.0/24

注意事项

  • mDNS 在 WSL NAT 下不可用adb mdns services 返回空是正常的(NAT 不转发组播),别浪费时间。
  • 无线调试端口每次重新开启都会变(37000-46000 内随机),重连前重新确认手机上的 IP:端口。
  • 手机必须与电脑在同一局域网;AP 隔离/访客网络会导致连不上。
  • 扫描阴性 ≠ 连不上:实测 nmap 对 37000-46000 全扫无开放端口、5555 filtered,但 adb connect 立即成功——省电状态手机会丢弃快速 SYN 探测(高速扫描尤其容易漏)。扫描无果时,直接 adb connect <IP>:<已知端口> 试一次,别轻易下结论。

Read the full file on GitHub · 124 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 124 lines · 78 tokens per session scan B bc728c7a26b7

Subscribe to this mod's changes

adb-wifi-debug is a skill published in the GitHub repository expoli/android-phone-mcp-server (2 stars, last pushed 29d ago), licensed MIT. It adds 78 tokens to every session and 2,005 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

ios-fix

Autonomous iOS bug fixer. (gstack).

garrytan/gstack · 15 tokens

google-mobile-ads-validate

Validates a project's Google Mobile Ads (GMA) SDK integration for iOS, Android, or Unity projects. Use when conducting a full pre-launch audit of an app that integrates GMA SDK or when validating any individual GMA SDK integration checks, such as when validating ad unit IDs and ad formats, SKAdNetwork IDs, mediation…

google/skills · 84 tokens

competition-ios-runtime

Internal downstream skill for ctf-sandbox-orchestrator. CTF-sandbox workflow for IPA runtime analysis, Frida hooks, Objective-C or Swift method tracing, Keychain inspection, SSL pinning bypass, URL scheme handling, and iOS request-signing recovery. Use when the user asks to hook an IPA, trace Objective-C or Swift…

zhaoxuya520/reverse-skill · 123 tokens

swiftui-performance-audit

SwiftUI performance: render, scroll, CPU/memory, updates, layout, Instruments.

steipete/agent-scripts · 24 tokens

android-tombstone-symbolication

Symbolicate the .NET runtime frames in an Android tombstone file. Extracts BuildIds and PC offsets from the native backtrace, downloads debug symbols from the Microsoft symbol server, and runs llvm-symbolizer to produce function names with source file and line numbers. USE FOR triaging a .NET MAUI or Mono Android app…

dotnet/skills · 176 tokens

node-connect

Diagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps. Use when QR/setup code/manual connect fails, local Wi-Fi works but VPS/tailnet does not, or errors mention pairing required, unauthorized, bootstrap token invalid or expired, gateway.bind, gateway.remote.url, Tailscale…

the-open-agent/openagent · 81 tokens