ADB Mirror
Embed Android device mirroring directly in VSCode/Cursor using ADB.
Features
- 🖥️ View your Android device/emulator screen directly in VSCode
- 🎮 Control your device from the embedded view (tap, swipe, etc.)
- 🔄 Automatic device detection
- ⚙️ Configurable settings
- 🔄 Automatic orientation detection
Requirements
- ADB installed and in your PATH
- Android device connected via USB or emulator running
Installation
- Install from the VSCode Marketplace
- Or install from VSIX:
code --install-extension adb-mirror-0.1.0.vsix
Usage
- Connect your Android device or start an emulator
- Press
Ctrl+Shift+P (or Cmd+Shift+P on Mac)
- Run command:
ADB Mirror: Start Device Mirror
- Select your device if multiple are available
- Your device screen will appear embedded in VSCode!
- Click on the screen to interact with your device
Configuration
Open Settings (Ctrl+,) and search for "ADB Mirror":
adbMirror.adbPath: Path to ADB executable (default: "adb")
adbMirror.serverPort: Port for the web server (default: 8888)
Commands
ADB Mirror: Start Device Mirror - Start mirroring a device
ADB Mirror: Stop Device Mirror - Stop the current mirror session
ADB Mirror: Select Device - List and select available devices
Troubleshooting
No devices found
- Make sure ADB is in your PATH
- Check that your device is connected:
adb devices
- Enable USB debugging on your device
ADB not found
How it works
This extension uses ADB (Android Debug Bridge) to:
- Capture screenshots periodically (~10 FPS) using
adb exec-out screencap -p
- Send touch commands using
adb shell input tap
- Send swipe gestures using
adb shell input swipe
- Control your device directly from VSCode
Development
Building
npm install
npm run compile
Testing
- Open the project in VSCode
- Press
F5 to open a new window with the extension loaded
- Test the commands from the command palette
Packaging
npm install -g vsce
vsce package
Publishing
vsce publish
License
MIT
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
| |