Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trouble debugging android wear over bluetooth - Unable to connect to localhost

I can't debug over bluetooth with my Moto360.

To start I have enabled "ADB debugging" and "Debug over Bluetooth" on the Moto360. I have also enabled "Debugging over Bluetooth" via the companion phone. It shows:

Host: disconnected

Target: connected

When I connect the companion phone via USB, I can see it connect to adb using:

./adb devices

Then I try:

./adb forward tcp:4444 localabstract:/adb-hub

and then:

./adb connect localhost:4444

which returns:

unable to connect to localhost:4444:4444

I've tried a lot of things like resetting the moto360, killing the adb server, rebooting the computer, uninstalling platform tools via sdk manager and reinstalling them, trying a different port number. Nothing seems to work.

I was able to connect with my personal computer, but every time I try on my work computer I get: unable to connect to localhost:4444:4444

like image 453
user2825168 Avatar asked Apr 15 '15 17:04

user2825168


3 Answers

I was getting the following error message:

unable to connect to localhost:4444: cannot connect to localhost:4444
no connection could be made because the target machine actively refused it (10061).

I used adb connect 127.0.0.1:4444 instead and I was prompted with the message instantaneously.

like image 105
Juan José Melero Gómez Avatar answered Oct 14 '22 14:10

Juan José Melero Gómez


Try this instead

adb connect 127.0.0.1:4444

more: https://stackoverflow.com/a/35093813/2267994

like image 17
Vu Nguyen Avatar answered Oct 14 '22 15:10

Vu Nguyen


I found the answer

first remove port forwarding;

adb forward --remove tcp:4444

then do port forwarding steps from the begining

adb forward tcp:4444 localabstract:/adb-hub
adb connect localhost:4444

i fixed my problem with these steps

like image 8
Enes Avatar answered Oct 14 '22 13:10

Enes