Skip to content

Commit cd6b4f7

Browse files
authored
adb-forward, adb-reverse: improve command description, add -s option for selecting devices (#19086)
1 parent 0f22528 commit cd6b4f7

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

pages/common/adb-forward.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# adb forward
22

3-
> Connect to an Android device wirelessly.
3+
> Forward socket connections to a connected Android device or emulator.
44
> More information: <https://developer.android.com/tools/adb>.
55
6-
- Forward a TCP port:
6+
- Forward a TCP port to the only connected emulator or device:
77

88
`adb forward tcp:{{local_port}} tcp:{{remote_port}}`
99

10+
- Forward a TCP port to a specific emulator or device (by device ID / [s]erial number):
11+
12+
`adb -s {{device_ID}} forward tcp:{{local_port}} tcp:{{remote_port}}`
13+
1014
- List all forwardings:
1115

1216
`adb forward --list`

pages/common/adb-reverse.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@
77

88
`adb reverse --list`
99

10-
- Reverse a TCP port from an emulator or device to localhost:
10+
- Reverse a TCP port from the only connected emulator or device to localhost:
1111

1212
`adb reverse tcp:{{remote_port}} tcp:{{local_port}}`
1313

14+
- Reverse a TCP port from a specific emulator or device (by device ID / [s]erial number) to localhost:
15+
16+
`adb -s {{device_ID}} adb reverse tcp:{{remote_port}} tcp:{{local_port}}`
17+
1418
- Remove a reverse socket connections from an emulator or device:
1519

1620
`adb reverse --remove tcp:{{remote_port}}`

0 commit comments

Comments
 (0)