Real Android Device — Wireless ADB & Screen Mirror
A VS Code extension that connects to your real Android phone over Wi-Fi and
mirrors its live screen inside VS Code — no emulator, no Android Studio.
Features
- Pair with code (Android 11+ wireless debugging): enter the phone's
IP:port and 6-digit code, and the extension runs adb pair for you.
- Connect to IP:port: quick connection for already-paired devices or
legacy
adb tcpip setups.
- Connect via QR code: point the extension at a screenshot of a QR code and
it will decode and act on it (pairing info,
adb connect strings, or
host:port).
- Show pairing QR: the extension displays the
WIFI:T:ADB;… QR code that
your phone scans from the Wireless debugging screen, then finds the phone's
mDNS pairing service and pairs automatically — no code to type. (The QR
carries a pairing service name and password, not Wi-Fi credentials; the phone
must already be on the same network.)
- Live screen mirror in a VS Code panel:
- HD mode — smooth H.264 streaming via
screenrecord + WebCodecs.
- Screenshot mode — JPEG frames that work on every device.
- Tap / swipe / Home / Back / Recents / Power / Volume / text input
controls sent back to the device over adb.
- Save screenshots.
- Device tree view and status bar counter, with one-click mirroring,
APK install, and disconnect.
Requirements
- Android SDK Platform Tools
(
adb) on your PATH, or set realDevice.adbPath in settings. The extension
auto-detects ANDROID_HOME, PATH, and common SDK locations.
- A phone with Developer options → Wireless debugging enabled (Android 11+),
on the same Wi-Fi network as your computer.
- For QR pairing, your network must allow mDNS (multicast) traffic. Check with
adb mdns check / adb mdns services.
Quick start
- Open the Real Device view in the activity bar.
- Run Real Device: Pair with code and enter the
IP:port and 6-digit code
shown on your phone (Wireless debugging → Pair device with pairing code).
- Once the device appears in the Devices tree, click it (or run
Real Device: Show device screen) to open the mirror.
- Use the toolbar to control the phone; toggle HD for smooth streaming.
Alternatively, use Real Device: Show pairing QR, then on the phone open
Wireless debugging → Pair device with pairing code → Scan QR code (some
phones: Pair device with QR code) and scan it. The extension waits for the
phone's pairing service over mDNS, pairs, and connects automatically.
Settings
| Setting |
Default |
Description |
realDevice.adbPath |
"" |
Full path to adb (empty = auto-detect). |
realDevice.mirror.mode |
auto |
auto / screencap / screenrecord. |
realDevice.mirror.intervalMs |
500 |
Delay between frames in screenshot mode. |
Logs & troubleshooting
Every adb command the extension runs is written to the Real Device output
channel with its exit code, stdout/stderr, and any errors:
- Output panel (
Ctrl+Shift+U) → dropdown → Real Device.
- Run Real Device: Show logs from the Command Palette, click the output
icon in the Devices view title, or pick Show logs in the status bar menu.
- Error notifications include a Show logs button.
- Device tree entries show
unauthorized / offline states; the mirror panel
status line shows streaming errors.
Pairing codes are redacted (******) before they are logged.
QR pairing does not connect
- The QR is not a Wi-Fi credential QR.
S/P are an mDNS pairing service
name and pairing password; the phone must already be on the same Wi-Fi.
- Scan it from Wireless debugging → Pair device with pairing code → Scan QR
code. The normal camera app / Google Lens will not start pairing.
- The QR expires with the panel; close and re-run Show pairing QR to get a
fresh one.
- Verify mDNS works:
adb mdns check should report a daemon version and
adb mdns services should list _adb-tls-pairing._tcp after the phone scans.
- VPNs, guest Wi-Fi, and router "AP isolation" block the phone↔PC traffic that
pairing needs. Use the pairing-code flow if mDNS is blocked.
For deeper diagnostics, run adb directly in the terminal:
adb devices -l
adb kill-server && adb start-server
adb logcat -d | tail -200 # PowerShell: `adb logcat -d | Select-Object -Last 200`
ADB_TRACE=all adb server nodaemon # Windows: `$env:ADB_TRACE='all'; adb server nodaemon`
See VS Code's own Developer: Show Logs… → Extension Host for extension-host
errors, and Help → Toggle Developer Tools → Console for webview errors.
Building
npm install
npm test # unit tests
npm run build # bundle + typecheck
npm run package # create the .vsix