While working on Android development, I have come across the command adb forward tcp:8080 tcp:8080
many times. What does it actually do? and why 8080?
Basically means that the requests on specific port on the host will be forwarded to a specific port on the device.
Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device.
Basically means that the requests on specific port on the host will be forwarded to a specific port on the device. Where the first port is the host and the second one is the device port.
From the docs
forwarding of requests on a specific host port to a different port on an emulator/device instance
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With