Skip to content

Commit 8037490

Browse files
committed
docs: add wireless ADB guide to TESTING.md
1 parent fb09c58 commit 8037490

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

docs/TESTING.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ CI runs connected tests against API 26 using the
136136
[android-emulator-runner](https://github.com/ReactiveCircus/android-emulator-runner)
137137
GitHub Action.
138138

139+
💡 **Tip:** You can also connect a physical device wirelessly. See [Appendix: Wireless device connection](#Appendix-Wireless-device-connection) at the end of this document.
140+
139141
---
140142

141143
## 6. Generating the coverage report
@@ -401,3 +403,47 @@ Ensure you run both tasks together:
401403

402404
Running `jacocoTestReport` alone (without fresh test execution data) produces an empty
403405
report because JaCoCo needs the `.exec` file generated during the test run.
406+
407+
408+
## Appendix. Wireless device connection
409+
410+
You can run instrumented tests on a physical Android device without a USB cable using **Wireless Debugging** (Android 11 and later).
411+
412+
### Prerequisites
413+
414+
- Device with Android 11 (API 30) or higher
415+
- Computer and device on the **same Wi-Fi network**
416+
- SDK Platform-Tools version 30.0.0 or higher
417+
418+
### Steps to connect
419+
420+
**On your Android device:**
421+
- Enable **Developer Options** (tap "Build Number" 7 times in Settings → About phone)
422+
- Go to **Settings → Developer Options**
423+
- Enable **Wireless Debugging**
424+
- Tap **Pair device with pairing code**
425+
426+
**On your computer:**
427+
```bash
428+
# Pair with the device (use the IP, port, and code shown on your device)
429+
adb pair 192.168.1.45:39123
430+
# Enter the 6-digit pairing code when prompted
431+
432+
# Connect to the device
433+
adb connect 192.168.1.45:54321
434+
435+
# Verify connection
436+
adb devices
437+
```
438+
439+
### Disconnecting from a device
440+
441+
Disconnect a specific device
442+
```bash
443+
adb disconnect 192.168.1.45
444+
```
445+
446+
Disconnect all wireless devices
447+
```bash
448+
adb disconnect
449+
```

0 commit comments

Comments
 (0)