Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adb forward not working

adb port forwarding is not working for me and your insight is appreciated. The following command is what I am trying

./adb forward tcp:5985 tcp:5984"

I don't see any errors(in logcat) but it just fails silently. When I try the following command curl localhost:5985 after that, I get "curl: (56) Recv failure: Connection reset by peer"

When I try curl localhost:5984, I do see a message as I have a process running on port 5984 (Couchbase server).

I don't think this is an issue with adb itself as all other adb commands are working. Amongst other things I have tried are a) kill-server followed by start-server (with sudo mode as well) b) Restarting my machine.

Needless to say, neither of these have worked. I am working on x64 Ubuntu 11.10.

Please note that I am working with the emulator and my emulator device is running. I do see other messages in logcat just not this one.

Thanks

-Venu

like image 919
user35559 Avatar asked Jan 13 '12 06:01

user35559


People also ask

Why ADB connect not working?

Failed ADB connections usually have one root cause: bad Android USB drivers that load in place of the right ones. Windows doesn't make it easy to remove the wrong drivers, unfortunately. But before attempting to troubleshoot an ADB connection, first enable USB debugging on your phone if it's not on already.

What does ADB forward do?

Apparently, this adb command is to forward a specific port on the host (namely, some laptop) to a specific port on the device (eg. your android phone), if my understanding is correct.


1 Answers

Have you read this document from Google? https://developers.google.com/chrome/mobile/docs/debugging

It explains that you have to first make sure you can see your device with

adb devices

Then in Chrome on your Android device, go to Open Settings > Advanced > Developer tools and check the Enable USB Web debugging option as shown here:

enter image description here

Then enter the follow command:

adb forward tcp:9222 localabstract:chrome_devtools_remote

And go to this URL in Chrome on your desktop:

localhost:9222

Does that work?

like image 50
Bernie Perez Avatar answered Sep 28 '22 12:09

Bernie Perez