Forrest logo
back to the adb tool

adb-reverse:tldr:d62c8

adb-reverse: Reverse a TCP port from an emulator or device to localhost.
$ adb reverse tcp:${remote_port} tcp:${local_port}
try on your machine

The command "adb reverse tcp:${remote_port} tcp:${local_port}" is used with the Android Debug Bridge (ADB) tool to set up port forwarding between a device/emulator and a local machine.

Here's a breakdown of the command:

  • "adb" refers to the Android Debug Bridge tool, which provides commands for interacting with and managing Android devices.
  • "reverse" is a keyword used to indicate reverse port forwarding. In this case, it means forwarding traffic from the device/emulator to the local machine.
  • "tcp:${remote_port}" specifies the TCP port on the device/emulator from which the traffic will be forwarded.
  • "tcp:${local_port}" specifies the TCP port on the local machine to which the traffic will be forwarded.

In simpler terms, this command allows you to forward incoming network traffic from a specific port on an Android device or emulator to a port on your local machine. This can be useful for various purposes, such as accessing services running on the device from the computer or testing network-related functionality of an app.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the adb tool