USB debugging not working properly (on Ubuntu) - HTC U11 Questions & Answers

Hello,
I just got a new U11, hoping to use it to test/debug my Android apps. But I cannot get it connect to ADB reliably. I have tried everything I could, including
enabling developer options + USB debugging
adb kill-server, adb start-server and adb devices
revoking USB debugging authorizations
authorizing & remembering my PC
I've tried countless combinations of the above, but adb keeps showing unauthorized or offline. Very very occasionally adb shows "connected", but Android Studio freezes when I run my app. When I unplug, Android Studio immediately unfreezes. But again, when I plug my phone it becomes unauthorized/offline.
My other Android phone works without any issues. Is it a bug with the stock firmware?
The phone is running stock European firmware, with everything stock (including locked bootloader).

Could anyone please test/confirm this on their Linux laptop/desktop? Any fixes? Thanks a lot!

Strangely, it works on Windows. Maybe Ubuntu kernel update yesterday broke adb :crying:

I get my phone tomorrow and will update adb and try to connect. Have you tried starting the adb server as root?
sudo adb start-server
Sent from my XT1575 using Tapatalk

drzoo2 said:
I get my phone tomorrow and will update adb and try to connect. Have you tried starting the adb server as root?
sudo adb start-server
Click to expand...
Click to collapse
Yes, I did all adb commands after $ sudo -s
As it works without any problems on Windows, perhaps I should ask on a Linux forum?
For now I would use Windows until I found a solution

spolarbear said:
Yes, I did all adb commands after $ sudo -s
As it works without any problems on Windows, perhaps I should ask on a Linux forum?
For now I would use Windows until I found a solution
Click to expand...
Click to collapse
I have the same problem.
I have Debian in my computer (MSI GS40 6QE) and in my girlfriend's computer (Asus UX32V) . Same update state in both of them.
I'm unable to use adb or fastboot in my computer but it works correctly in my girlfriend's computer.

microcris said:
I have the same problem.
I have Debian in my computer (MSI GS40 6QE) and in my girlfriend's computer (Asus UX32V) . Same update state in both of them.
I'm unable to use adb or fastboot in my computer but it works correctly in my girlfriend's computer.
Click to expand...
Click to collapse
Haha, at least the issue is not unique to my phone (and laptop) :laugh:
I suspect Android SDK is most well tested on Windows, at least everything is already set up for you. But Linux allows you to run most dev tools in your HOME folder, so they don't mess things up.
Hopefully someone comes up with a fix.

My Xiaomi running LineageOS (basically AOSP) doesn't have any issue. Perhaps HTC Sense heavily modified some USB options?

spolarbear said:
Haha, at least the issue is not unique to my phone (and laptop) :laugh:
I suspect Android SDK is most well tested on Windows, at least everything is already set up for you. But Linux allows you to run most dev tools in your HOME folder, so they don't mess things up.
Hopefully someone comes up with a fix.
Click to expand...
Click to collapse
I have no problem with my M8 and my computer.
Android "is" Linux. By that, at least, tools like adb and fastboot must be very well tested under Linux :angel:.
Try to open you computer file browser and to browse or copy some files from/to your computer/phone. I'm unable to do that also.
I tried to root my phone in the same day I received it and I was getting really worried because I was unable to use fastboot (I by that I was thinking that my device was defective), even the simple "fastboot getvar all". Then I remembered to switch to another computer and voilĂ , everything was working perfectly.
Maybe HTC has something broken in the USB3.0 stack.

File transfer and fastboot don't work on my Ubuntu either.

spolarbear said:
File transfer and fastboot don't work on my Ubuntu either.
Click to expand...
Click to collapse
I don't know if it related with kernel (in computer side). I already tried version 4.9, 4.10 and 4.11 (the one I'm running right now).

microcris said:
I don't know if it related with kernel (in computer side). I already tried version 4.9, 4.10 and 4.11 (the one I'm running right now).
Click to expand...
Click to collapse
I tried 4.10 and 4.4, neither worked

I have same problem with Windows 10 64Bit.

All working fine here.
Sounds like udev. Have you followed the setting up usb access part of
https://source.android.com/source/initializing?

I have solved my problem. I have install Windows 10 new and now all working.

Flinny said:
All working fine here.
Sounds like udev. Have you followed the setting up usb access part of
https://source.android.com/source/initializing?
Click to expand...
Click to collapse
What Linux distro/version are you running? I've been trying to get this working with Arch and it's driving me nuts!

I run various flavours of Debian and Ubuntu across my machines and have ADB working on them all..

Flinny said:
All working fine here.
Sounds like udev. Have you followed the setting up usb access part of
https://source.android.com/source/initializing?
Click to expand...
Click to collapse
Flinny said:
I run various flavours of Debian and Ubuntu across my machines and have ADB working on them all..
Click to expand...
Click to collapse
Got it working by downloading adb straight from Google instead of using the Arch package.

Related

Issue using ADB and Windows 7?

I apologize if this is not the right forum and I would request that it be moved, not deleted, if possible if its the wrong forum. I'm kind of stuck here.
Have a bit of an interesting situation. I am running Windows 7,
got the USB driver successfully installed... boot up the command prompt and BAM:
C:\android>adb remount
* daemon not running. starting it now *
* daemon started successfully *
error: device not found
C:\android>adb devices
List of devices attached
Here is the weird thing...
C:\android>fastboot devices
HT97JLV05321 fastboot
It looks like the fastboot is recognizing that my phone is attached but the adb shell will not. Any ideas what the issue could be?
LOL, I just switched back from Ubuntu to Windows 7 just to see how things have progressed. There are so many little Windows 7 quirks that drive me crazy that drove me back to Ubuntu almost instantly. Give Linux a try. A good starting Linux OS would be Linux Mint:
http://www.linuxmint.com/index.php
I had a similar issue when I tried it. Despite the fact that there are 64-bit drivers for Vista/7 available, I don't believe they actually work for ADB currently. I'm pretty sure everyone who has ADB working is using Windows XP 32-bit.
I actually burned a copy of Ubuntu that I was just going to run off of the CD. I'll give that a shot and see if it lets me do what I need to do. Thanks for the quick responses.
I am using Windows 7 final (RTM) (64-bit) and also Windows 7 Beta (32-bit) on two different computers. They all work fine with adb commands.
ch4dr0x said:
I apologize if this is not the right forum and I would request that it be moved, not deleted, if possible if its the wrong forum. I'm kind of stuck here.
Have a bit of an interesting situation. I am running Windows 7,
got the USB driver successfully installed... boot up the command prompt and BAM:
C:\android>adb remount
* daemon not running. starting it now *
* daemon started successfully *
error: device not found
C:\android>adb devices
List of devices attached
Here is the weird thing...
C:\android>fastboot devices
HT97JLV05321 fastboot
It looks like the fastboot is recognizing that my phone is attached but the adb shell will not. Any ideas what the issue could be?
Click to expand...
Click to collapse
I faced the same problem a few days ago. I have Windows 7 Ultimate x64 and in a first installations the drivers work fine and the device has been displayed, but BAM when I try to use ADB no way.
After many tries I resolved the issue running the Command Prompt as "Run as administrator" and VOILA worked fine.
I hope this can help you.
ch4dr0x said:
I actually burned a copy of Ubuntu that I was just going to run off of the CD. I'll give that a shot and see if it lets me do what I need to do. Thanks for the quick responses.
Click to expand...
Click to collapse
Try Mint instead of Ubuntu. Mint is Ubuntu based. The big difference with Mint is that it already has all of your codecs installed - great for beginners.
If you installed first the htc sync, you have to remove the current drivers..
and had the drivers from the androidsdk pack! There's is a a lot of program who delete usb installed hardware/drivers.. delete all from htc on this programs!
Hope this solves ur issue!
I use Win7 64bit(rc1) .. i have the amd64 driver installed..
I see the phone from adb (not fastboot) when it's normally connected with USB debugging turned on.
I see the phone from fastboot (not adb) when it's in fastboot mode.
I have no choice but to laugh at myself, just realized I was IN FASTBOOT on my phone and not recovery. Fail me.
Now if I could just edit this apps2hd code /sigh.
ricardomega said:
If you installed first the htc sync, you have to remove the current drivers..
Click to expand...
Click to collapse
and remove htc sync, there are a process than cause problem with adb (i don't remember the name)
I kill this process and adb 100% work fine, or unistall HTC Sync..
GOOGLE KNOWS EVERYTHING!!
http://www.google.com/search?hl=en&rlz=1C1CHNB_enUS326US327&q=remove+usb+drivers+programs+android+htc&aq=f&oq=&aqi=
ricardomega said:
GOOGLE KNOWS EVERYTHING!!
http://www.google.com/search?hl=en&rlz=1C1CHNB_enUS326US327&q=remove+usb+drivers+programs+android+htc&aq=f&oq=&aqi=
Click to expand...
Click to collapse
Except that... that wasn't my issue Its ok thanks for the input.
"error: device not found"
I can't get ADB to work with my Windows 7 X64 Ultimate. Windows automatically install a driver for the phone when I plug it in. When I try to install my own driver with the one in the SDK, I get:
"....doesn't contain a compatible software driver for your device. If the folder contains a driver, make sure it is designed to work with Windows for x64-based systems."
Doing a update to the driver, it says the one I have installed is already up to date.
I have the latest Win 7 with all important Window updates.
parrot5 said:
I am using Windows 7 final (RTM) (64-bit) and also Windows 7 Beta (32-bit) on two different computers. They all work fine with adb commands.
Click to expand...
Click to collapse
The same confi, the same result
Everything works fine here with Win 7 Ultimate x64, you just install the driver in the Android SDK.
make sure u have usb debugging checked... cause i have windows 7 rtm ultimate and my adb works fine... i just loaded the needed file into windows/system32 and also put my fastboot.exe in there and added the tools folder to the environment variables and have no problems
What do I load to the system32 folder? I can't install the drivers from the SDK package. Is there a way to overwrite the ones Windows automatically installs and thinks is more up to date?
detonate said:
"error: device not found"
I can't get ADB to work with my Windows 7 X64 Ultimate. Windows automatically install a driver for the phone when I plug it in. When I try to install my own driver with the one in the SDK, I get:
"....doesn't contain a compatible software driver for your device. If the folder contains a driver, make sure it is designed to work with Windows for x64-based systems."
Doing a update to the driver, it says the one I have installed is already up to date.
I have the latest Win 7 with all important Window updates.
Click to expand...
Click to collapse
Make sure your phone is in recovery mode and NOT fastboot mode.
Finally, I experienced that error you people had been reporting. It MAY have to do with the HTC Sync driver, as suggested, but it really had worked fine with other roms before, so I am not sure. I tried uninstalling and reinstalling the driver, tried to push the ADB driver manually, but that didn't work. And, before I try to uninstall the HTC Sync driver as suggested (I don't even know if I have that installed), I got it working by just plugging in another USB flash drive. Go figure.
So for anyone still having the issue after trying all other solutions, try this bizarre one:
1. Go to device manager and uninstall the HTC disk drive device. (This alone won't work, I tried)
2. With phone still plugged in, plug in a USB disk drive (or maybe just any USB device?) into another USB port.
3. Suddenly Windows 7 detect that unknown ADB driver, as it should. Now you can go ahead to install the correct ADB driver.
As a side note, this computer running Windows 7 Beta/RC have had a lot of problems with USB disk drives in general. The problems disappear after Windows 7 RTM (final).

[solved] fix for adb on osx!

Ok I think im going crazy, I cant find anything about this.
Im trying to access my tab via ADB in OSX. My Evo works just fine, but I just cant find the gtablet. I see in Windows driver's ini has to be modded to include tegra device ID and vendor ID, but I dont see anything for osx and my device is not getting recognized!
Thanks for your help!
Click to expand...
Click to collapse
Ok so after some time, I just found the solution, I dont know why I need it, and some people didnt but anyway, for whoever is having the same problem as I did, this is the solution!
This steps are assuming you have ADB ready and installed!
First, open terminal (/Applications/Utilities/Terminal.app)
Run the command:
Code:
android update adb
Then you will get a adb_usb.ini file in your $HOME/.android directory. Open that file and you will have the following..
Code:
# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
Add in the 4rth line the following (Device vendor code, this case NVIDIA 0x0955):
Code:
0x0955
Save the file and exit.
On terminal window type
Code:
adb kill-server
and then
Code:
adb start-server
Adb devices should now show up your device!, if by any reason you get "device offline" a re-plug fixed it!
thanks!
damn! bumping this thread, really nothing? I just want to know if anyone can ADB with osx??? Its just me? or what?! thanks
Works fine for me.
OSX is the only OS I've used (so far) to connect to my G-Tablet via ADB.
Make sure USB Debugging is on on the 'pad, and it's Plug and Play. No udev stuff like on Linux, no USB driver issues like on Winhose.
I have had troubles in the past connecting through USB hubs. I'm currently using the front connectors on a Mac Pro.
Just another trivia note on the subject:
adb remount
Works for me on ZPad, it does not on TnT Lite.
I have a hackintosh netbook, but I don't really use it in this space. Nor Windows. Sorry about that.
Linuxslate said:
Works fine for me.
OSX is the only OS I've used (so far) to connect to my G-Tablet via ADB.
Make sure USB Debugging is on on the 'pad, and it's Plug and Play. No udev stuff like on Linux, no USB driver issues like on Winhose.
I have had troubles in the past connecting through USB hubs. I'm currently using the front connectors on a Mac Pro.
Just another trivia note on the subject:
adb remount
Works for me on ZPad, it does not on TnT Lite.
Click to expand...
Click to collapse
Thanks for your reply, so...TnT Lite doesnt work for you?..mh that may be. I have not tried Zpad!
Will keep trying!
roebeet said:
I have a hackintosh netbook, but I don't really use it in this space. Nor Windows. Sorry about that.
Click to expand...
Click to collapse
no worries! Thanks for the reply man!
Fix posted on OP!

no ADB connection anymore

ok guys, here you go:
my phone doesn't make any ADB connections anymore with my mac.
points i already tested:
- reinstalled all the android dev tools
- flashed several rome on my sensation (tried: Beast rom, pyramid, arhd)
- reboot without fast boot
- usb debugging is active!
when i'm typing in terminal: "ADB devices" --> i get no devices.
where is the problem?
i already used adb while s-off my device, but now it won't work anymore.
just remember, i'm using a MAC, so i haven't got a pc!
yasinis said:
ok guys, here you go:
my phone doesn't make any ADB connections anymore with my mac.
points i already tested:
- reinstalled all the android dev tools
- flashed several rome on my sensation (tried: Beast rom, pyramid, arhd)
- reboot without fast boot
- usb debugging is active!
when i'm typing in terminal: "dab devices" --> i get no devices.
where is the problem?
i already used adb while s-off my device, but now it won't work anymore.
just remember, i'm using a MAC, so i haven't got a pc!
Click to expand...
Click to collapse
shouldnt it be adb devices instead of dab ?
I wanna try this ABD but there no link?!!
Shouldn't this ABC post be somewhere else?
you guys should quit cluttering this thread and help him figure this whole KFC thing out....
sheetmetalninja said:
you guys should quit cluttering this thread and help him figure this whole KFC thing out....
Click to expand...
Click to collapse
You're right.
But I also don't know anything about BAD or FASTBOOB or anything like that. I don't like reading. :[
yasinis said:
ok guys, here you go:
my phone doesn't make any ADB connections anymore with my mac.
points i already tested:
- reinstalled all the android dev tools
- flashed several rome on my sensation (tried: Beast rom, pyramid, arhd)
- reboot without fast boot
- usb debugging is active!
when i'm typing in terminal: "dab devices" --> i get no devices.
where is the problem?
i already used adb while s-off my device, but now it won't work anymore.
just remember, i'm using a MAC, so i haven't got a pc!
Click to expand...
Click to collapse
go into devmgmt.msc and see if your phone shows up under adb interfaces. if not, could be 1) bad usb cable, 2) bad usb port, 3) bad adb driver.
Check the drivers, you may need to update them
Sent from my Desire HD using XDA App
taney said:
go into devmgmt.msc and see if your phone shows up under adb interfaces. if not, could be 1) bad usb cable, 2) bad usb port, 3) bad adb driver.
Click to expand...
Click to collapse
how 2 do that? i mean what do you mean with devmgmt.msc(device management...?)
1) usb cable is good, the original one. also tried different usb cables, it doesn't matter.
2) usb port is also ok, other devices running out of the box (f.e. dvd drive oder dslr)
3) adb driver already updated via "Android SDK and AVD Manager".
i installed Android SDK tools, SDK Platform tools, sdk platform (--> is there sth. missing?)
Try disabling debugging on the phone, plug it in, reboot it, then enable debugging again
Romanbb said:
Try disabling debugging on the phone, plug it in, reboot it, then enable debugging again
Click to expand...
Click to collapse
no sorry...won't work..
getting the same:
Code:
adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
also tried without fastboot rebooting.
there are news guys:
just got an windows 7 personal computer for a couple of days.
installing the sdk and usb driver just worked fine.
why it doesn't work for mac?
already installed all new...
You may also check the cable you're using to connect the phone to your Mac. I was getting the same problem when trying to use the cable from my car charger - the phone was not even visible on the system list of USB devices. Using the cable that came with the phone did the trick.
(although if you used the same cable with Windows and it worked, my hint won't be of much help)
Do you got HTC sync installed on your PC?
TheStigx said:
Do you got HTC sync installed on your PC?
Click to expand...
Click to collapse
please remember - i'm using a MAC!
so finally i tested my device with several computers at the university.
i just found out, that the problem may been caused of my installed mac osx lion - but don't ask me why!
on the mac of my prof (also osx lion with latest updates) it worked out of the box...
--> so i'm gonna making backups now and will format my hard disk and reinstall lion again.
i'll give u feedback again ;-)
Have you closed the htc-sync application? solved the connection-error for me...
Maeffjus said:
Have you closed the htc-sync application? solved the connection-error for me...
Click to expand...
Click to collapse
again guys:
I'm using a MAC!
is there any official sync app for mac i don't know about??
ok guys,
just reinstalled my system an got the problem away..
i don't know why this was so, but i'm happy to make it work now.
yasinis said:
ok guys,
just reinstalled my system an got the problem away..
i don't know why this was so, but i'm happy to make it work now.
Click to expand...
Click to collapse
ok, just found out where the problem was caused. it was EasyTether!
this will help:
Code:
If you have installed EasyTether on OS X, the EasyTetherUSBEthernet.kext can prevent adb from communicating with your mobile device.
If you use Easy Tether, BEFORE you plug in your phone run:
sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext
(or unplug/plug your phone in after)
If you are done debugging and want to use EasyTether again, either restart or:
sudo kextload /System/Library/Extensions/EasyTetherUSBEthernet.kext
If you want to remove the EasyTether kext so it never hassels you again:
sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext
sudo rm -rf /System/Library/Extensions/EasyTetherUSBEthernet.kext

[Q] Linux ADB and my GT 7+

For whatever reason, my GT 7+ is showing: ????????? offline/device when I run adb devices. I've tried running adb kill/start as root, still nothing. I've cycled "USB debugging". I'm running ubuntu 10.10. Every thing but adb is working but adb
Any insight or help would be helpful.
udev.
See: http://wiki.cyanogenmod.com/wiki/Udev
Answered
Here's the rule I put up in /etc/udev/rules/98-android.rules:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666" #all samsung devices
Then restart udev and then restart adb and it's up!
This method is hard to remember. You can also start adb as root with:
adb start-server
and it should work that way, at least until adb is closed. You do not have to do all the adb commands as root, only the start.
Jason_25 said:
This method is hard to remember. You can also start adb as root with:
adb start-server
and it should work that way, at least until adb is closed. You do not have to do all the adb commands as root, only the start.
Click to expand...
Click to collapse
Why do you need to remember it? Create a udev rule once and you never have to deal with it again.
Running things as root should be avoided if possible.
I have found that there may be an issue with ubuntu 10.10 and this tablet. For me, it seems that the MTP crud is interfering with adb. If I freeze the MTP application on the tablet, I have no problem.
...and now it gets even stranger: If I boot ubuntu 10.10 in a virtual machine (vmware 8.x), its fine even with mtp enabled.
I haven't had any issue at all with my gentoo boot. (However, I've been trying to do the android development with ubuntu as it appears to be directly supported by google.)
(This really isn't an issue for me, as I actually prefer to keep MTP disabled so I don't get popups.)
Entropy512 said:
Why do you need to remember it? Create a udev rule once and you never have to deal with it again.
Running things as root should be avoided if possible.
Click to expand...
Click to collapse
Because I work on computers other than my own?
Because I have more than one computer?
Because I sometime reinstall the OS?
Because I don't have magical fail-proof hardware?
Because udev gets messed up and apt-get replaces the rules file?
This method is simpler for new users. The adb tools are straight from google so can be trusted and the udev approach just adds a lot of complexity.
edit:
garyd9 said:
I have found that there may be an issue with ubuntu 10.10 and this tablet. For me, it seems that the MTP crud is interfering with adb. If I freeze the MTP application on the tablet, I have no problem.
Click to expand...
Click to collapse
I do not seem to have any problem using 64-bit debian, which you probably know Ubuntu is based on. I have even built the AOSP with it without much trouble. Though, deploying it to a device is a different matter for me.

ADB is not detecting my phone

Hi guys, I have been having major reboots problem with my Sensation after upgrading to the new ICS firmware. I have described my problem in this thread. The last attempt to fix my problem was flashing the firmware from this thread. I'm trying to flash other firmwares from the development section, but i keep getting the wrong model ID error. After some research, I believe I need to change my phone's CID to superCID using ADB.
And I have followed the instructions from this thread to do the superCID on my phone. Unfortunately, ADB is not detecting my phone. I installed ADB on two other Windows machines with the same result. Any help is greatly appreciated.
If you're running ADB from Linux (Ubuntu or something like it) by chance, you can run the commands as root. Put 'sudo' in front of the commands. That might fix it.
Also, try killing the server and restarting it. I don't know if this works in Windows.
Linux commands....
sudo ./adb kill-server
sudo ./adb start-server
./adb devices
Windows commands....if this even works in Windows (I've never tried using ADB in Windows so I have no idea)
Same, just take out sudo and "./"
Not sure if needed, but do you need to have HTC sync for adb to work properly?
Skipjacks said:
If you're running ADB from Linux (Ubuntu or something like it) by chance, you can run the commands as root. Put 'sudo' in front of the commands. That might fix it.
Also, try killing the server and restarting it. I don't know if this works in Windows.
Linux commands....
sudo ./adb kill-server
sudo ./adb start-server
./adb devices
Windows commands....if this even works in Windows (I've never tried using ADB in Windows so I have no idea)
Same, just take out sudo and "./"
Click to expand...
Click to collapse
Thanks for the reply buddy. I don't have any machine running Linux at the moment, but I will try killing the server in Windows.
In the mean time, can anyone help me find an older/stable firmware please? My phone have been rebooting every 2 minutes. Opens camera, reboots. Opens youtube app, reboots. Makes a call, reboots. It's driving me crazy!!
i had the same problem when i tried to flash the radio for my new ics...
so what i did was to to untick and retick the usb debugging mode and suddenly my windows 7 can automatically install some drivers in my computer... i also install htc sync too... then only my phone can be detected by my computer and i was able to flash the radio...
Thank you for the help guys. It turns out i didn't install HTC Sync. I just flashed a new firmware from the dev forum. Hopefully it will solve my nightmare.
I have come to the conclusion that the latest firmware broke all the gingerbread based rom , and so far only the 4.0.3 Sense ROM works, and not even the asop based 4.0.3 rom.
Sent from my HTC Sensation using Tapatalk

Categories

Resources