SKDBLOG

App Development

How to Forward an Emulator Port to Your PC Using ADB (Beginner’s Guide)

Hey there, If you are an Android developer or develop apps for Android using Java, Kotlin, Flutter, react native or any other language, you might have been stuck on a stage where you need your backend

Shashikant Dwivedi
1 min read
How to Forward an Emulator Port to Your PC Using ADB (Beginner’s Guide)
App Development01 MIN

Hey there, If you are an Android developer or develop apps for Android using Java, Kotlin, Flutter, react native or any other language, you might have been stuck on a stage where you need your backend, which is running locally, to be accessible from your Android emulator or your physical device.

So in this guide, I'll be helping you to solve this port using just a simple command of ADB.

Port Forwarding

So the command is -

bash
adb reverse <local> <remote>

So here -

  • <local> is on the device/emulator (what device apps will connect to).
  • <remote> is on the host/PC.

Also this is an example command -

bash
adb reverse tcp:8000 tcp:4444

That's it; by using this command, you can simply do port forwarding and successfully connect to the backend running locally.

If you experience any issues, ask me in the comment.

Device connection checklist
  • USB debugging is enabled on the device or emulator.
  • adb devices lists your target before forwarding ports.
  • Firewalls on your PC can block forwarded ports; allow the process if needed.

Written by Shashikant Dwivedi

Engineer, occasional writer, full-time noticer. Based in Prayagraj, India. New essays land roughly twice a month.

Keep reading

Adjacent essays.

All writing →

The newsletter

New articles in your inbox.

Occasional articles on engineering, tooling, and software development practices. No marketing, no fluff — just the article, when it's ready.

Unsubscribe with one click. Your email never leaves the list.