[Q][FIXED] ADB won't connect under linux - Captivate Q&A, Help & Troubleshooting

I have the android sdk installed, my phone shows up under lsusb, and mounts properly with the mass storage option. However, adb won't properly recognize my phone, reporting it to have a question mark serial number. Additionally, I can't deploy apps from eclipse. Any help?

TheEscapist said:
I have the android sdk installed, my phone shows up under lsusb, and mounts properly with the mass storage option. However, adb won't properly recognize my phone, reporting it to have a question mark serial number. Additionally, I can't deploy apps from eclipse. Any help?
Click to expand...
Click to collapse
If you are running ubuntu, you need to run sudo adb
Sent from my SAMSUNG-SGH-I897

Pirateghost said:
If you are running ubuntu, you need to run sudo adb
Sent from my SAMSUNG-SGH-I897
Click to expand...
Click to collapse
Tried that, no difference.
Sent from my SAMSUNG-SGH-I896 using XDA App

Stupid question, but do you have the USB cable plugged into the back of the desktop, direct motherboard plug? There are issues with ADB if you are using a USB plug that isn't direct, there is a voltage problem.

TheEscapist said:
Tried that, no difference.
Sent from my SAMSUNG-SGH-I896 using XDA App
Click to expand...
Click to collapse
if you tried sudo after you tried normal, you have to kill server before you run as sudo
sudo adb kill-server
sudo adb devices

trekie86 said:
Stupid question, but do you have the USB cable plugged into the back of the desktop, direct motherboard plug? There are issues with ADB if you are using a USB plug that isn't direct, there is a voltage problem.
Click to expand...
Click to collapse
On a laptop, so there isn't much choice. Besides, I never had issues like that on my custom desktop. Plugging into front panel, my Das keyboard usb hub, and rear ports all worked.
Pirateghost said:
if you tried sudo after you tried normal, you have to kill server before you run as sudo
sudo adb kill-server
sudo adb devices
Click to expand...
Click to collapse
Ahh, makes sense, I'll try that.
Edit: It worked, thank you.

Good call Pirateghost. Totally forgot about the killserver function first. Glad to hear it works Escapist

also, have a look at this so you dont have to run as sudo
http://www.google.com/support/forum/p/android/thread?tid=08945730bbd7b22b

Related

Getting Nexus One ADB/USB Mount working (Driver)

Download This file and extract.
hit Windows Key + r
Type in devmgmt.msc
right click on nexus one
click update
update from location on computer.
select that folder.
---------------Notes-------------
Be sure to enable debugging on your phone via Settings>Applications>Devlopment>USB debugging.
Confirmed working on:
Win 7 Ultimate x64/x86
Win 7 Home Edition x86?
Win Vista
XP Home x86
XP Pro x64/x86
O.S
What O.S you had this working on?
@th3fallen
143!!
I got it working on win7 Ultimate version
This works for Windows 7 Home Premium Edition as well.
In order to get ADB working on Linux (Ubuntu 9.04) I had to edit /etc/udev/rules.d/51-android.rules (I may have created this file for the G1) and add:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
What I was seeing was the device would sort of show up when I ran adb devices, but it would list ????????? as the ID and no permissions.
~Kenny
I was able to access it by using dream, magic and adb testing device didnt need any specific driver.
I did this to get it working on win 7 ultimate x64
NexVision said:
I was able to access it by using dream, magic and adb testing device didnt need any specific driver.
Click to expand...
Click to collapse
You need the latest refresh of the drivers (and tools for updated fastboot, etc.) from the SDK. If you go to a Windows command prompt and run Android, assuming the tools directory is in your path, you can select the update for both. It will fail in updating tools, since you are using an app in it, but don't close the app, just reapply at that point and it will work on the second go. Then when you install the N1, you will have the drivers you need to install as before.
Not meaning to argue with you but what I was saying is I have had no issues doing anything via adb with it as a magic I have done fastboot as well hey maybe its just working for me.
kfk2 said:
In order to get ADB working on Linux (Ubuntu 9.04) I had to edit /etc/udev/rules.d/51-android-rules (I may have created this file for the G1) and add:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
What I was seeing was the device would sort of show up when I ran adb devices, but it would list ????????? as the ID and no permissions.
~Kenny
Click to expand...
Click to collapse
Hmm...I have that already in my /etc/udev/rules.d/51-android.rules (mine has .rules, not -rules...I'm assuming that's a typo in your post?) and I'm still coming up with ?????????? as the device and no permissions, all attempts to do anything with adb result in it telling me I don't have permission to do these things.
Swervo said:
Hmm...I have that already in my /etc/udev/rules.d/51-android.rules (mine has .rules, not -rules...I'm assuming that's a typo in your post?) and I'm still coming up with ?????????? as the device and no permissions, all attempts to do anything with adb result in it telling me I don't have permission to do these things.
Click to expand...
Click to collapse
Yah that was a typo.. The no permissions error appears to me that adb doesn't have access to the /dev/ devices used. I'm not at home so I cannot lookup what device is created and used in /dev/ for you to check the permissions. I know I killed the adb server and restarted it a few times while trying to get mine to work, along with updating to the latest sdk. So you may want to try those things, you could also try running adb as root and seeing if that fixes it (if so, then it's a simple permission error with udev not creating it with correct permissions).
Alrighty, I think I got it. I'm no udev expert (in fact, I'm rather useless at it), but this worked for me.
1) Make sure USB debugging is turned on on the phone.
2) Plug the phone into the USB port on the machine.
3) Make sure /etc/udev/51-android.rules has
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
Click to expand...
Click to collapse
in it.
4) run
adb kill-server
Click to expand...
Click to collapse
5) As root, run
service udev restart
Click to expand...
Click to collapse
6) run
adb start-server
Click to expand...
Click to collapse
Worked for me to get the device recognized.
Hey guys, I have the Android 1.5 SDK/ADB installed on my computer.. so I don't know what will happen when I mount my N1 (haven't tried yet). I want to be able to mount my N1 normally without ADB or anything, 'cause I'm not going to root it for a while. Thanks!
Confirmed on Vista
I can confirm that the instructions in the OP work on Vista. Thanks a lot, th3fallen.
Alleviate said:
Hey guys, I have the Android 1.5 SDK/ADB installed on my computer.. so I don't know what will happen when I mount my N1 (haven't tried yet). I want to be able to mount my N1 normally without ADB or anything, 'cause I'm not going to root it for a while. Thanks!
Click to expand...
Click to collapse
Nothing will happen, ADB doesn't start interacting with your phone without you explicitly telling it to. Also, if you don't have debugging turned on on your phone, then it won't even if you do explicitly tell it to. Feel free to mount the drive on it.
ADB and Root
Maybe I'm doing something wrong, but I can't get ADB to recognize my phone. ADB is all set up correctly, I have it updated (I believe) to the most recent version. I installed the updated USB driver and I see the "Android Phone" in my device manager. I have USB Debugging checked off in my phone settings. ADB worked fine for my G1, but it doesn't recognize my Nexus One.
I shouldn't have to root the phone to have ADB working should I? Can anybody think of something I overlooked? I am running Windows XP Professional SP3
Okay, so I navigated to the "1.1-nexusone-superboot" folder in the command prompt and tried
Code:
adb-windows devices
and my device showed up. Now I want to move those files to where I originally had my adb files in C:\android-sdk-windows\tools so that all I have to type is
Code:
adb devices
to have my phone listed. I tried replacing the files in my \tools folder and renaming them to what they were named before, but that didn't work. Could somebody please help me get this set up properly?
ccunningham83 said:
Okay, so I navigated to the "1.1-nexusone-superboot" folder in the command prompt and tried
Code:
adb-windows remount
and my device showed up. Now I want to move those files to where I originally had my adb files in C:\android-sdk-windows\tools so that all I have to type is
Code:
adb devices
to have my phone listed. I tried replacing the files in my \tools folder and renaming them to what they were named before, but that didn't work. Could somebody please help me get this set up properly?
Click to expand...
Click to collapse
in your command prompt you have to be in the c:\android-sdk-windows\tools\ directory for it to work
ccunningham83 said:
Maybe I'm doing something wrong, but I can't get ADB to recognize my phone. ADB is all set up correctly, I have it updated (I believe) to the most recent version. I installed the updated USB driver and I see the "Android Phone" in my device manager. I have USB Debugging checked off in my phone settings. ADB worked fine for my G1, but it doesn't recognize my Nexus One.
I shouldn't have to root the phone to have ADB working should I? Can anybody think of something I overlooked? I am running Windows XP Professional SP3
Click to expand...
Click to collapse
I was having the same problem yesterday. But i'm on Vista. Nothing seemed to work, but ADB was working fine on my Mytouch. At any rate, I ended up going to download the most recent SDK and trying adb again from a command prompt @ the tools location of the newest SDK, and then everything worked. I don't know if that was something I should have done in the first place and I just didn't know it (duh), but that's what worked for me.

ADB Errors

so, stupid question time.
i've used ADB in the past and its worked great so not sure whats going on this time around.
I get the following errors when trying to start adb:
"daemon still not runningerror: cannot connect to daemon"
I have installed moto drivers for droid 3 (32bit), im on win7 32bit. I have my phone on dev mode, and charge only. I have run CMD with admin rights. and still ADB wont turn on.
I have also tried using the new one click method:
http://rootzwiki.com/showthread.php?t=3714&p=75934
anyone have some direction? I did kill adb from my running processes (all instances) and tried all over, no go, same error.
help?
Did you put the phone is PC Mode as opposed to USB Mass Storage?
its supposed to be done in Charing only mode, the issue isn't on my phone setup, it got to do with my darn computer, I can even do an adb devices command... may have to remove the sdk completely and start over.
Put in charge only, use one click method
Sent from my DROID3 using xda premium
did you change directory in cmd to the folder that adb is in?
...I had to change to the folder like this cd\program files (x86)\android\android-sdk\platform-tools
The one-click root method is bundled with adb.exe. Except for the driver and a USB cable, it contains everything needed to root.

Adb problems

When I try to run ./adb devices or ./adb shell it always says device not found. Yes USB debugging is turned on too. I'm on a mac also.
chron12 said:
When I try to run ./adb devices or ./adb shell it always says device not found. Yes USB debugging is turned on too. I'm on a mac also.
Click to expand...
Click to collapse
Mac might be your problem. Have you made sure your drivers are installed correctly?
If you just let it auto-install drivers, try finding a manual download online.
Tivo7 said:
Mac might be your problem. Have you made sure your drivers are installed correctly?
If you just let it auto-install drivers, try finding a manual download online.
Click to expand...
Click to collapse
no need to install drivers on a mac. what mode is you phone in. Try both PC Mode and Charge only...I had a few dab problems myself...so much that I restored it back to stock..which fixed all of them. I am set up on a mac and use a little batch file to show and hide hidden folders, then I dropped adb into /bin folder so I didn't have to keep putting the ./ in front of dab.
-Try killing adb in activity monitor, then retyping adb devices...if that doesn't work,
- have you tried resetting your computer too? Mine weirds out every now and again and a restart fixes dab
Good suggestions, however,you can stop the adb service with adb kill-server
Try typing just adb by itself to get a list of options
Sent from my DROID BIONIC using xda premium

MTP device problem HTC One M7

Hello, i searched but i couldn'tfind any solution. I connect my phone to laptop(xp) by usb but laptop doesnt recognize my phone. It says mtp driver couldnt install. I found some mtp driver installed but didnt solved again.Someone can help me about that.
Sent from my HTC One using XDA Free mobile app
Any support?
Sent from my HTC One using XDA Free mobile app
forcible79 said:
Hello, i searched but i couldn'tfind any solution. I connect my phone to laptop(xp) by usb but laptop doesnt recognize my phone. It says mtp driver couldnt install. I found some mtp driver installed but didnt solved again.Someone can help me about that.
Sent from my HTC One using XDA Free mobile app
Click to expand...
Click to collapse
Check out this FAQ #2 to see if it will fix your issue.
There was just windows 7 and 8. İ am using windows XP. This solution doesnt work for wndows xp. Any different idea?
There was just windows 7 and 8. I am using windows XP. This solution doesnt work for wndows xp. Any different idea?
forcible79 said:
There was just windows 7 and 8. I am using windows XP. This solution doesnt work for wndows xp. Any different idea?
Click to expand...
Click to collapse
The steps are basically the save for XP, Win 7 and Win 8. Here are the HTC drivers for XP it is labeled 2K.
majmoz said:
The steps are basically the save for XP, Win 7 and Win 8. Here are the HTC drivers for XP it is labeled 2K.
Click to expand...
Click to collapse
Still i have same failure. Computer see nothing about my phone. I put jpeg about problem
forcible79 said:
Still i have same failure. Computer see nothing about my phone. I put jpeg about problem
Click to expand...
Click to collapse
Have you tried different ports? Cables? Computers?
You can try Linux on a USB and you don't have to install it on your computer, here how:
HOW TO USE LINUX FOR FASTBOOT & ADB VIA USB
This guide originally posted by @Danny201281
http://forum.xda-developers.com/showpost.php?p=54272479&postcount=219​Linux is your friend; if your drivers are not working the chances of getting them working again without the phone booting are slim. But Linux doesn't need drivers to talk to your device.
Go here: http://www.pendrivelinux.com/ and download Universal USB Installer – Easy as 1 2 3
Then go here: http://releases.ubuntu.com/12.04/ and download Ubuntu from the first link at the top that says PC (Intel x86) desktop CD
Then use these files to create a bootable Linux USB drive with at least a 2 GB persistent file for storing files. You'll also probably need to change your boot settings in the computers bios to boot from USB.
MOVING YOUR FILES TO UBUNTU
Once booted you should be at a screen with options to "Try Ubuntu” or "Install Ubuntu". We don’t need to Install anything so just choose "Try Ubuntu" and the computer will boot to the Ubuntu Desktop (If you get a popup saying "system has encountered an error" or something similar just cancel and ignore it, it should have no effect on what we need to do as it is due to missing Linux OS updates we don’t need). On the left of the screen you'll see the Dock. Open the orange folder icon near the top this is the Home folder. It’s where we need to put any files we need to work with such as a rom.zip you want to push to the device or recovery.img files for flashing.
To get your files here is a simple drag and drop process. In the top left of the Home folder you'll see the drive structure of you pc under devices. Choose your PCs hard drive and Right-Click then" Open in a new window". Locate your .zip or .img files and drag them into the home folder. Now wait for the copy process to complete and rename them for easier typing later, e.g., rom.zip, firmware.zip or recovery.img etc.
USING ADB AND FASTBOOT
First you need to install adb fastboot; this is easy just 3 commands in the terminal. Thanks to Webupd8 team.
Code:
sudo add-apt-repository ppa:nilarimogard/webupd8
Code:
sudo apt-get update
Code:
sudo apt-get install android-tools-adb android-tools-fastboot
Make sure your connected to the internet and press Ctrl+Alt+T to open the terminal then type or copy and paste the above commands one at a time waiting for each to complete their output. It may seem to have stopped at times but be patient when the prompt returns to normal enter the next command and when there all done you’re ready to use adb and fastboot.
Once you've moved all the files you need to the home folder that’s it you’re ready to go. Close everything down on the desktop (optional) and press Ctrl+Alt+T this will open the terminal now connect your phone with the USB cable. All fastboot commands need to have the "sudo" prefix added at the start, e.g.
fastboot flash recovery recovery.img becomes sudo fastboot flash recovery recovery.img
fastboot devices becomes sudo fastboot devices
However, adb should work basically the same as on windows. If you do have problems with normal adb commands adding “sudo” can help here as well.
If you get "no permissions ?????????" when trying to use adb, type:
Code:
killall adb
Disconnect the phone for a few seconds, then reconnect and type:
Code:
sudo adb devices
adb should now work as normal without the sudo prefix.
Click to expand...
Click to collapse

[Q] Nexus 6 bootloader unlock problem on linux

Greetings. Looking for some pointers.
Just picked up a Nexus 6 (64) "unlocked" (carrier?) from Amazon and am having some trouble unlocking the bootloader.
Downloaded android-sdk_r24.1.2-linux.tgz, and then downloaded some additional packages, APIs 21 and 22.
Then on the phone I did the multi-tap on Build number to get the developer mojo, then set USB debugging and Enable OEM unlock. The USB debugging prompt showed, I checked the box to always allow and then OK.
The phone reported that updates were available, so I let it update to 5.0.1 and after a restart, updated to 5.1.
After all that, ran "./adb reboot bootloader" from the console which returned immediately - no console output.
BTW, the desktop is a Linux box running Fedora 20 64bit.
Following the ./adb, I ran "./fastboot oem unlock".
It responded with: no permissions fastboot
The text on the phone shows below the identifying stuff:
Console [NULL]: null
Device is LOCKED. Status code 2
Transfer Mode: USB Connected.
Then I ran ./android again and noticed the Google USB Driver rev. 11 and the note about it being Linux incompatible.
So how badly have I screwed this up?
Any help would be much appreciated.
-Joe
@jlfesslerkc,
Your post is a little confusing.
Are you able to boot your N6?
On your linux box, when you type "./adb devices" does it respond with the id of your N6? If not, go to the thread posted by @rootSU and follow the directions > http://forum.xda-developers.com/nexus-6/general/noob-read-adb-fastboot-how-help-t3006500
Linux needs some extra USB setup.
Try this:
Unplug your device, then open terminal and enter:
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
Then paste this:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}==“22b8”, MODE="0666", GROUP="plugdev"
Save it then execute:
Code:
sudo chmod a+r /etc/udev/rules.d/51-android.rules
Plug it in, if it doesn't work, unplug, log out and log back in and try again.
(Make sure you're using a good USB cable, if you're unsure then use the one that came with your Nexus 6, as that WILL work, make sure the USB is plugged into the BACK of the pc (if it's not a laptop) as the ones on the front are often actually USB hubs which don't work. If that doesn't work try all the USB ports.)
Use sudo ./fastboot oem unlock
It's telling you that you don't have permission. Sudo should fix that.
Or you could add the path to fastboot and adb to your ./bashrc
Did you ensure you selected OEM unlocking in the settings>developers menu? I turned it of once when I thought I turned it on lol. Have to double check the simple stuff
Don't you just love it when someone flies in, posts a help request, and then disappears?
The sudo command in fastboot only works in Linux?
_Dennis_ said:
Did you ensure you selected OEM unlocking in the settings>developers menu? I turned it of once when I thought I turned it on lol. Have to double check the simple stuff
Click to expand...
Click to collapse
I'm thinking this myself ... I hope the OP checks and then retries ...
sotnasnauj said:
The sudo command in fastboot only works in Linux?
Click to expand...
Click to collapse
sudo is a Linux command. Its nothing to do with fastboot.
cam30era said:
Don't you just love it when someone flies in, posts a help request, and then disappears?
Click to expand...
Click to collapse
Sorry, not disrespect intended. Life intruded and I didn't get back to this task until late today.
_Dennis_ said:
Did you ensure you selected OEM unlocking in the settings>developers menu? I turned it of once when I thought I turned it on lol. Have to double check the simple stuff
Click to expand...
Click to collapse
Right... I noticed the same thing. Thankfully my anal-retentiveness kicked in and I checked ir before each attempt.
It looks like moving the USB cable to the rear of the desktop did the trick. Although I take it for granted that it unlocked the bootloader, based largely on the phone's console showing Device is UNLOCKED Status Code 3.
It there a way to verify that independently or is that really too paranoid?
Thanks for the tips. I took the least intrusive step first just to see if it had any effect, namely moving the cable to a rear USB port. That seemed to do the trick, so I've not made the change to the rules.
Is that still recommended?
gorei23 said:
Linux needs some extra USB setup.
Try this:
Unplug your device, then open terminal and enter:
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
Then paste this:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}==“22b8”, MODE="0666", GROUP="plugdev"
Save it then execute:
Code:
sudo chmod a+r /etc/udev/rules.d/51-android.rules
Plug it in, if it doesn't work, unplug, log out and log back in and try again.
(Make sure you're using a good USB cable, if you're unsure then use the one that came with your Nexus 6, as that WILL work, make sure the USB is plugged into the BACK of the pc (if it's not a laptop) as the ones on the front are often actually USB hubs which don't work. If that doesn't work try all the USB ports.)
Click to expand...
Click to collapse
jlfesslerkc said:
Sorry, not disrespect intended. Life intruded and I didn't get back to this task until late today.
Click to expand...
Click to collapse
Welcome back. I'm glad you solved your problem.:good:
jlfesslerkc said:
Greetings. Looking for some pointers.
Just picked up a Nexus 6 (64) "unlocked" (carrier?) from Amazon and am having some trouble unlocking the bootloader.
Downloaded android-sdk_r24.1.2-linux.tgz, and then downloaded some additional packages, APIs 21 and 22.
Then on the phone I did the multi-tap on Build number to get the developer mojo, then set USB debugging and Enable OEM unlock. The USB debugging prompt showed, I checked the box to always allow and then OK.
The phone reported that updates were available, so I let it update to 5.0.1 and after a restart, updated to 5.1.
After all that, ran "./adb reboot bootloader" from the console which returned immediately - no console output.
BTW, the desktop is a Linux box running Fedora 20 64bit.
Following the ./adb, I ran "./fastboot oem unlock".
It responded with: no permissions fastboot
The text on the phone shows below the identifying stuff:
Console [NULL]: null
Device is LOCKED. Status code 2
Transfer Mode: USB Connected.
Then I ran ./android again and noticed the Google USB Driver rev. 11 and the note about it being Linux incompatible.
So how badly have I screwed this up?
Any help would be much appreciated.
-Joe
Click to expand...
Click to collapse
1) Fedora packages adb and fastboot... "yum -y install android-tools", no need for the sdk.
2) the fastboot usb device does not have general user RW permissions. Run fastboot as root.
$ adb reboot-bootloader
$ su
# fastboot oem unlock
If you can do adb and fastboot commands successfully then maybe it's just Debian distros that need this. Not sure how Fedora handles that.
gorei23 said:
If you can do adb and fastboot commands successfully then maybe it's just Debian distros that need this. Not sure how Fedora handles that.
Click to expand...
Click to collapse
Debian Distros need what?
rootSU said:
Debian Distros need what?
Click to expand...
Click to collapse
Apparently Debian Distros need to reply to threads where the OP has posted that his problem was solved by switching to another USB port.
cam30era said:
Apparently Debian Distros need to reply to threads where the OP has posted that his problem was solved by switching to another USB port.
Click to expand...
Click to collapse
haha.
I was wondering if it was the udev rules. Cause I just deleted my udev rules and rebooted and can still use adb and fastboot on a debian-based distro.
rootSU said:
haha.
I was wondering if it was the udev rules. Cause I just deleted my udev rules and rebooted and can still use adb and fastboot on a debian-based distro.
Click to expand...
Click to collapse
Really? I'm amazed.
cam30era said:
Really? I'm amazed.
Click to expand...
Click to collapse
When I looked in there, I clearly had added my Nexus 5 previously but not my nexus 6. My 6 worked obviously. So I just sudo rm /etc/udev/rules.d/51-android.rules and rebooted. Everything still works. Wasn't expecting it to. I wouldn't have added my Nexus 5 unless I had to.

Categories

Resources