ADB Basics Android 5.0+ (API 21+) Risk: SAFE

Reverse Socket Connection

Forwards network socket connections from the Android device back to host computer.

Command Syntax

adb reverse
Generic Syntax: adb reverse <remote> <local>

Options & Parameters

Flag Description
--list List all active reverse socket connections.
--remove <remote> Remove a specific reverse socket connection.
--remove-all Remove all active reverse connections.

Real-World Usage Examples

Reverse React Native Metro port 8081
Enables device to access dev server via localhost:8081.
adb reverse tcp:8081 tcp:8081
Output:
8081
List active reverse connections
Displays active reverse ports.
adb reverse --list
Output:
RF8M90ABCDEF tcp:8081 tcp:8081