Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to connect to my android device via ADB

Tags:

android

Sorry for the nooby question, I am having trouble sorting this out using the web.

I am trying to simply connect my device to my pc via adb to debug my application.

My device is rooted. Adb debugging is enabled. I downloaded an adb running application and started ADB.

Now i am trying adb connect ip:5555. and keep on getting "unable to connect to ip:5555" ...

Same happend when i try to connect via usb.

c:\>adb connect 192.168.20.191:5555
unable to connect to 192.168.20.191:5555

Help...?

EDIT: C:>adb devices List of devices attached 06fecaa1 unauthorized

like image 651
susparsy Avatar asked Jan 12 '14 16:01

susparsy


2 Answers

Launching Cordova

  1. Open Node.js / CMD
  2. Point to "the directory where you have located your source folder" >>> C:\Projects\RJX
  3. Enable Wifi
  4. Turn on Developer Option under settings
  5. Enable / Check USB Debugging Option under settings (Google if cannot find this option)
  6. Enable / Check the MTP Option under settings (Google if cannot find this option)

ADB Commands

adb kill-server
adb start-server
//plug off cable from mobile and plug in again if you connected your device earlier
//Uninstall the application from mobile if you already installed. (if necessary)
adb tcpip 5555
adb connect "ip" //adb connect 192.192.2.128
adb devices //to check device details
cordova run android --device

if this steps are not worked, try to close the cmd and do it again. Sometimes it needs some refresh. **Android devices version 4.0.4 and after should be no problem if you follow these steps.

like image 162
Yithirash Avatar answered Oct 15 '22 10:10

Yithirash


I will assume you are able to understand adb connect / ip's etc I won't bore you with that

but there are two lame "gotcha's"

THE GENYMOTION GOTCHA

genymotion WRECKS a lot of this sometimes.. I am sorry but it does.. it has a "I know what I am doing I am taking over" mentality.. sadly it doesn't know what it's doing :-P often you have to turn off genymotion for the adb->usb to work.. basically connect phone FIRST ... make sure it's there in eclipse (adb kill-server / start server if needs be ), then AND ONLY THEN then genymotion AFTER

THE OOPS [/facepalm] GOTCHA

check that your phone it isn't in Windows merely as a "Camera" - go to My Computer and look. If it looks like this pic it's that you're not running Samsung Kies(/disabled because it's annoying) the phone still goes "blub bling" when you plug it in, it may be connected via wifi so have a LAN ip but it is NOT really "connected" to ur PC. enter image description hereinstead run/download/update this (with phone disconnected) then make sure Kies is happy AND MAKE SURE MTU is enabled

enter image description here

enter image description here

like image 22
user26676 Avatar answered Oct 15 '22 09:10

user26676