adb unable to connect...

Status
Not open for further replies.
Search This thread

ApokrifX

Senior Member
May 23, 2011
468
50
I was to B&N today, read few books in store (on nook)
Came home, tried to connect:

adb unable to connect...
run dropbear - unable to ssh

rebooted nook via terminal
adb unable to connect...

Scratched head…
rebooted nook again via terminal
adb unable to connect...

Did basic adb troubleshooting:
setprop service.adb.tcp.port 5555
stop adbd
start adbd
adb unable to connect...

stop adbd
adbd &
adb unable to connect...

netstat
showed listening (with adbd running)
127.0.0.1:5037
0.0.0.0:5555

rebooted nook via terminal
rebooted PC…
adb unable to connect...

put noogie SD, reboot, check uRamdisk – same size & timestamp
removed noogie, off/on - connected right away!
I’m puzzled…
I saw few times, after 2-3 days of reading adb is unable to connect, but reboot fixed it always.
What was different this time?
“Cold reboot”?

I spend like 30min and feel like an idiot right now…
 

Adapt0r

Senior Member
Jan 17, 2009
214
17
I was unable to connect over the usb port as well. Without too long investigation I've used adbwireless app on NT and was able to connect.
You might want to refresh server
adb kill-server
adb start-server
then connect using your NT ip address:5555 and you should be done.
In my case, I think, there are too many conflicting drivers installed and NT is not being recognized when connected.
Good luck
 

ApokrifX

Senior Member
May 23, 2011
468
50
I was unable to connect over the usb port as well. Without too long investigation I've used adbwireless app on NT and was able to connect.
You might want to refresh server
adb kill-server
adb start-server
then connect using your NT ip address:5555 and you should be done.
In my case, I think, there are too many conflicting drivers installed and NT is not being recognized when connected.
Good luck
I did it as well before every adb connect, thought it not worth to mention.
Naturally, "rebooting PC" should reboot adb server too, right? ;)
But it didn't help either...
 

GabrialDestruir

Senior Member
Nov 12, 2009
650
514
California
If you see this issue again, just try toggling ADB Wireless On/Off and it should reset anything on the devices side. Also I've noticed that sometimes and completely random from what I can tell "USB Debugging" will get unchecked, which will mess with ADB access via USB.
 

digiflash

Member
Oct 17, 2007
26
16
Disabling/Enabling ADBwireless sometimes may help.
Maybe a stupid question: Do you have a firewall running on your pc?
 

ApokrifX

Senior Member
May 23, 2011
468
50
Disabling/Enabling ADBwireless sometimes may help.
won't it be the same as below or it does more?
Code:
setprop service.adb.tcp.port 5555
stop adbd
start adbd

Maybe a stupid question: Do you have a firewall running on your pc?
Always ;)
I did check it too. It was nothing worth to mention.
abd attempted to connect - got nothing back (timeout)
on NST adbd was listening, I was able to access gmail.
I can ssh neither, and dropbear was listening too.
Looks, in fact, like firewall on NST was blocking all incoming connection. :confused:
That's why I wrote "Scratched head…" - which means I checked pretty much everything.

Could somebody explain, what is the major difference for NST between:
reboot (hot reboot) & shutdown/start (cold reboot)
Or more precisely for the latter:
insert noogie SD/reboot/remove noogie SD/turn off/turn on
 

ApokrifX

Senior Member
May 23, 2011
468
50
insert noogie SD/reboot/remove noogie SD/turn off/turn on
Cannot connect today at all. Cold reboot doesn’t help anymore...

Did some more tests (including ADBwireless):
I cannot ping [nook IP] from my computer
I can ping [nook IP] from router.

From PC
>telnet [nook IP] 5555
Connecting To [nook IP]...Could not open connection to the host, on port 5555: Connect failed


From router:
telnet [nook IP] 5555
Connection didn’t timeout (i.e. it does connect!)

Again, looks like something on Nook blocking connections from all IP, except from default gateway (i.e. router)
Question: Does rooting process unblock connections from other IPs?



About Disabling/Enabling ADBwireless:
Before running ADBwireless

netstat
127.0.0.1:5037
0.0.0.0:5555

netstat -tapn doesn’t work

stop adbd
both above disappear from netstat

start adbd
both show up

run ADBwireless
get message: ADBwireless is off
pushed button, message changed to: adb connect [nook IP]:5555
(adb connct didn’t work)

Switch to terminal,
netstat
127.0.0.1:5037
I.e. no more: 0.0.0.0:5555

Subsequent "stop adbd"/"start adbd" changes nothing:
netstat
127.0.0.1:5037

I was wondering what ADBwireless supposed to do then?
Could somebody check from his nook what netstat shows, please?

Nook can connect to internet (gmail, market) + netstat shows all outgoing connections…
What else can I try? :confused:

I guess, I can switch to adb usb…
 

Adapt0r

Senior Member
Jan 17, 2009
214
17
It might be helpful if you tell what OS you are running on your PC and what did you do with NT. If we can reproduce your case then we can troubleshoot it otherwise you will hear useless guesses and speculations.
I like NT as a reader and nothing else. Web and games are looking awful on it.
 

ApokrifX

Senior Member
May 23, 2011
468
50
It might be helpful if you tell what OS you are running on your PC and what did you do with NT. If we can reproduce your case then we can troubleshoot it otherwise you will hear useless guesses and speculations.
I like NT as a reader and nothing else. Web and games are looking awful on it.
One box is XP with Outpost firewall (abd set to full trust).
Another win7 (FW policy – allow outgoing connections + few exceptions).
I’m Win developer/admin and Linux(CentOs) admin.
I’m complete noob when it comes to Linux non-shell related programming.
Router runs DD-WRT.
As of now I switched to uRamdisk_1_1_rooted_usb.
When I run dropbear, I see it listening on 22, but cannot ssh still.
That’s all I guess…

Could you do one test for me please?
If your NST runs uRamdisk_1_1_rooted_wifi:
Could you ping you NST from you box
If not - could you do same from your router/AP?
 

Adapt0r

Senior Member
Jan 17, 2009
214
17
1. I don't have uRamdisk_1_1_rooted_wifi on my NT and can't test it.
2. adbWireless works on my Win 7 and Mac the same way. Both comps have firewalls running and both are on the same network. I can connect and ping NT.
Just for clarification I will describe how it works on my setup:
- I start adbWireless on NT,
- it asks for root permission if it for the first time and I grant it
- then shows fat button on the screen and says adbWireless is off
- I push the button
- it says adbWireless is on, from your computer run
adb connect 192.168.15.112:5555
At this point I can ping IP address and run adb shell.
I've rooted NT for purposes of software testing and customization. I did it twice with older and newer Nooter and did not find any noticeable differences.
Let me know if you want some other tests or info.
 

ApokrifX

Senior Member
May 23, 2011
468
50
I can connect and ping NT.

At this point I can ping IP address and run adb shell.
To clarify (trying to get a setup as simple as possible):
We connected NST to our home wireless network and it gets IP.
We didn’t touch adbWireless yet!

Now do two tests, please:
1. From NST we ping gateway or "another device on same network", (providing it let us).
2. From "another device on same network", ping NST.
What do you get?

I thought, adbWireless just configure adbd for IP connection (as opposite for USB one) and starts it - nothing else.

If #1 works, but not #2,
and #2 starts working after you “hit adbWireless button”, than adbWireless does more then I wrote above…
 

Adapt0r

Senior Member
Jan 17, 2009
214
17
Sorry, I didn't have time to do your test at home. I'll try today.
I think you are correct, adbWireless does configuration of connection by executing something like this:
Turning On:
setprop service.adb.tcp.port 5555
stop adbd
start adbd

Turning Off wifi and start listening on usb
setprop service.adb.tcp.port -1
stop adbd
start adbd

Cheers!

Edit:
Ping NST_ip_address from PC works fine.
Since I don't have terminal installed I could not test reverse pinging.
 
Last edited:

ApokrifX

Senior Member
May 23, 2011
468
50
Ouch…
Just figured out:

1: I press “big red button” in adbWireless.
2: I push back button
And it pushed adbWireless into background.
If it’s the same as turning it (adbWireless) off,
it’s possible, that adbWireless reset adbd service to use USB.
Thus there is nothing listening on 5555 when I run netstat in terminal on NST.
Who’s with me? ;)

Should be east to test:
press “big red button” in adbWireless.
I push back button
try to connect
 

ApokrifX

Senior Member
May 23, 2011
468
50
Updated router firmware - I can ping nook and ADB over wireless works too. :)
Not sure thought, if it was wireless channel problem.
I've read somewhere, some NST firmwares doesn't work on high channels or certain combined modes - like works on A+B, but not A+G
Apparently, NST firmware 1.1.2 was targeted to solve some of these issues.
 

bobcdy

Member
Dec 28, 2009
41
1
PROBLEM SOLVED.
I didn't have the proper folder for the adb.exe.
-----
I have a similar problem: I recently rooted my nook simple touch with touchnooter 2.1.31, and all seems well but I can't connect to the adb wireless. IP is 192.168.0.6:5555 according to adb; I can ping from my Win XP computer if I use 192.168.0.6, but not if I add the 5555, but I just can't connect to the ereader. Wireless connections seem fine otherwise. I've tried shutting off and one the wireless adb.

I'm a complete beginner in this. On the reader, the screen has this:
"from your computer run: adb connect 192.168.0.6:5555"

This suggests that I can't simply use a firefox browser to connect? I tried using the windows cmd box, but windows indicates it doesn't know what 'adb' is. Then I found a website about adbwireless: http://theunlockr.com/2011/04/12/how-to-connect-to-your-android-device-through-adb-wirelessly/
and installed Adroid SDK Tools as indicated. When I use the cmd window, go to the proper sdk tools subfolder, and type 'adb connect 192.168.0.6:5555', windows still insists it doesn't recognize 'adb'

Please help!
 
Last edited:

bobcdy

Member
Dec 28, 2009
41
1
Meter 13,
Thanks for the reply. I added a pre-script to my op. I had created a bat file to move to the proper folder but had realized that the adb.exe had been moved to the platform-tools subfolder from its old location in the tools folder. Once I realized this, all worked well - connected to my nook, and used adb to install an apk file.
Bob
 

Renate

Recognized Contributor / Inactive Recognized Dev
Just a note:

Ping isn't the usual TCP/UDP stuff, so there are no (port) numbers on the end.

ping 192.168.1.27

ADB uses TCP and a port number but it usually defaults to 5555

adb connect 192.168.1.27
adb connect 192.168.1.27:5555

You can also telnet to check if you can connect to the nook via TCP and port 5555

telnet 192.168.1.27 5555

(Note: If this works it will tell you that you are connected, but you can't do anything because ADB is a binary protocol.)
 

bramgg

Senior Member
May 12, 2009
296
20
I had the same problem, turns out the correct drivers weren't installed. Ive downloaded HTC sync from HTC.com. I installed it and removed HTC sync afterwards. The drivers should stay there. Now reconnect your phone and try "adb devices" Before ADB wouldn't recognize my device but now it does. Tried to "adb backup -all" again, and it worked instantly. :cool:

Maybe this solves the problem?
 

roustabout

Senior Member
Feb 12, 2011
825
212
You could try going back to a stock /boot partition.

I run my nstg rooted with the addition of about 8 files (su, xbin, busybox in system, adb wireless in /data plus a launcher) when I first root.

with the nstg, at least, I don't actually need the modified kernels - adb connects from my computers to the nstg, I simply don't have a root shell when I first connect.

This is fixed by doing an
su
once I'm in

Might be worth trying a restore of just partion 1 from your backup?
 
Status
Not open for further replies.