A whole line of tablets don't show at ADB devices anymore (they worked just fine one week ago). Other Android devices do work (like my Nexus 5 phone). This is first time I face this problem. I've read and tried most solutions I've found at SO and other sites to no avail. Here's the situation:
They show in lsusb as Bus 010 Device 004: ID 18d1:dddd Google Inc..
Created/edited /etc/udev/rules.d/51-android.rules and added SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", MODE="0666" (and several other attribute combinations here).
Restarted udev via sudo service udev restart.
Restarted ADB server via adb kill-server; adb start-server`.
Tried all USB ports on PC.
Tried another USB cable.
Restarted PC and tablet.
A strange thing is that even if I empty /etc/udev/rules.d/51-android.rules file and restart the udev daemon, adb still detects my Nexus 5 phone.
Changes I remember I did before this problem started to happen:
Started using Android Studio instead of Eclipse (although I'm using the same ADK) and tools)
Upgraded Ubuntu to latest version 14.04 (maybe some udev changes/problem here?)
Any further suggestions are welcome, thanks in advance.
EDIT: When running lsusb -v as suggested in the comments, I can see this description:
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 1 Mass Storage
while the Nexus 5 shows as
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 0
iInterface 4 MTP
EDIT: The tablets are working perfectly through ADB in other computers (Windows and Linux). So it must be a problem with my box.
EDIT: As suggested in the comments, I tried ADB in TCP mode and works fine. After running dmesg I can see the system is trying to load the Windows driver for ADB using ndiswrapper
[277701.803751] usb 1-4: reset high-speed USB device number 48 using ehci-pci
[277701.952803] ndiswrapper (load_wrap_driver:103): couldn't load driver android_winusb; check system log for messages from 'loadndisdriver'
This message doesn't show on the other Linux boxes where ADB works fine through USB.
Since the same devices work on other PCs, you can already rule out hardware issues on the tablets' side. Further things to check are:
USB permissions on the PC: Though other devices work, you might still have insufficient permissions to access the tablets using adb. The udev rules you've mentioned are vendor-specific, and sometimes also device-specific. The only way to rule permissions out as a problem is to start adb as the root user. adb forks a daemon, so you've got to kill any instances of adb before attempting to do that:$ pkill adb$ sudo adb devicesIf the device does show up in the list, you've got to adjust the udev rules. Temporarily, you can continue to use adb normally - it will connect to the service that is now running as root and therefore working as expected.
Driver issues: In the developer menu on your tablet, you can select "adb over tcp" as an option. Enable it and then connect to it from your PC. If this works, the debug bridge itself is fine and the USB connection must therefore be the source of the issue. We can already rule out a defective cable, because the device does show up in lsusb and other functionality works as expected. Running dmesg should give you the required information to solve your problem, likely it's an interfering device driver. Try unloading it using rmmod/modprobe.
A difference since 12.10+ is MTP support. I know 14.04 uses it automatically as soon as a phone is plugged in. This is supposed to be a faster and more simpler than "Mass Storage". Perhaps it's getting in your way and you should find a way to disable it either from the PC end or on the device?
Related
My USB-connected Android phone (a Redmi Note 4, not that it matters) is not being displayed by adb devices. I'm aware of this question on the subject. But in my case the odd thing is that the device is visible in Chrome devtools, and I can "Inspect" webviews. Obviously, I've set USB debugging on on the device. All my Windows USB drivers are installed properly. I've done adb kill-server && adb start-server. I've put the device into MTP/PTP USB mode. I've tried any number of combinations of cables and ports and sequences of plugging in and unplugging and turning USB debugging on and off again. The device is visible under "Portable Devices" in Device Manager.
Things were working fine up until a few days ago. I can think of nothing obvious that changed in the meantime.
After first posting this question, things started working again by accident--I cannot remember the sequence of things I did. Then just recently, the problem reared its ugly head again.
What could account for this state of affairs?
In Your case, the simple and tested solution for Xiaomi Phones.
Go to developer options, scroll down to bottom and turn of MIUI Optimization. It would then visible in your android studio.
Did you tried to add VendorID for your device ?
for that please do the following:
Run below on terminal to find your VENDOR ID;
lsusb
Find your phones vendor id (it will be probably without any company names) and type,
sudo gedit ~/.android/adb_usb.ini
and your adb_usb.ini file should look like:
# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
# ie 0x2207
0x<Add Your Vendor ID here>
Disconnected and reconnected device and also needed to run below commands on terminal;
sudo adb kill-server && adb start-server
This question describes an equivalent problem with Windows 7. The problem is that adb devices shows no devices, although the latest Android SDK is installed, and USB debugging was turned on in the tablet.
My case is with Android 5.1.1 on a Nexus 9. I gather the problem also exists on other devices. I do not know about other Android versions.
One solution is to disable MTP on the device:
Settings --> Storage --> Top Left Option (Computer USB Connection) tap--> uncheck "choose MTP"
However this may not be possible if you wish to automate the process.
A workaround solution for Linux is to prevent MTP probes from happening (this allows the Android device to keep appearing as a composite device with both an MTP and ADB interface). The simplest way to do this on Ubuntu is sudo apt get remove libmtp-common libmtp-runtime libmtp9, then reboot. You will no longer be able to use MTP on that computer.
You can use lsusb -v to verify that the MTP/ADB issue is fixed; If you see multiple bInterfaceDescriptors under your device, and one has a bInterfaceSubClass of 66 (0x42), but you still see no entries in adb devices, you have a different problem.
After installing Eclipse Luna and set up the environment to develop Android applications I have tried to run an application on my BQ Aquaris E5 HD. Then, neither eclipse nor the adb devices command detect the device even though I have enabled usb debugging in the device. Moreover the lsusb command does not list the USB connection for the device.
So I followed the android tutorial http://developer.android.com/tools/device.html but in the list of USB Vendor ID BQ as a vendor does not appear. I've searched a little bit and I have found that BQ USB Vendor ID was 2207 although I'm not sure. At this point it still does not work. I am stuck at this point and I do not know what to try or how to continue.
I faced a similar problem recently, but in my case was an aquaris 4.5. At least, in ubuntu, I added the next string to the file located in /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="2a47", MODE="0666" , ATTRS{idProduct}=="0c02|2008", TAG+="uaccess"
Be careful with the idProduct. In my case, lsusb returns the following code:
Bus 002 Device 015: ID 2a47:0c02
Just replace idProduct value with the one of your device. Then execute:
sudo udevadm control --reload-rules
And after that kill the adb server, launch it again, disconnect your device from the pc and reconnect it again. Cross your fingers and maybe, it will be listed with the adb devices :)
Hope it helps
I realized that the lsusb command was not detecting my device because the USB cable was not making proper connection although the charging LED was on. Before editing the /etc/udev/rules.d/51-android.rules file I edited the ~/.android/adb_usb.ini file and I added the vendor ID, so it looks like this:
# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
0x2a47
After doing that and try the adb devices command, I get an alert in my Bq asking me to authorize my laptop. Next, the device appeared in the adb device list.
It was useful for me to resort to the Bq Official website forum, specially this link:
http://www.mibqyyo.com/comunidad/discussion/35998/conseguir-que-eclipse-o-android-studio-reconozcan-nuestro-bq-en-ubuntu/p1
LG Nexus 4
Android 4.3 (USB DEBUGGING ACTIVE)
ADB 1.0.31
on Kubuntu 13
My /etc/udev/rules.d/51-android.rules is taken from here https://code.google.com/p/51-android/
Like i said everything i got with #adb devices command is:
List of devices attached
00b453e41****** offline
(i censored the id)
Any other info that could be userful?
Ok i solved by myself, it seems it was an issue of permissions.
Just made my user:group owner of the /home/user/.android folder (and all files inside), the owner was root before and i think this was the problem. Now everything works.
Another solution for people that might find themselves looking for one:
For Android 4.3
Under Developer options, click "Revoke USB debugging authorizations:
(I have no idea if in case of multiple authorized computers the additional keys are in a new line of the file or if they are in new files. I have only 1 computer.)
stop all adb processes "killall adb" in linuxoids and "taskkill /IM adb.exe" in windows or simply the taskmanager in both.
restart the phone
toggle usb debugging off and on
connect
use adb
click authorize
works
I have two Android phones
Alcatel One Touch 4030D, Android version 4.1.1, kernel version 3.4.0
Highscreen Spark, Android version 4.0.4, kernel version 3.0.21-perf.
adb devices detects the Alcatel phone, but not the Highscreen phone.
I tried to run adb kill-server; adb start-server, but it didn't help. Switching between different connection modes (Media device (MTP), USB storage) didn't help either. USB debugging is enabled.
Here are the screenshots of the Developer options settings:
How can I make adb recognize the Highscreen device?
Update 1 (03.08.2013 19:00 MSK): Adding the line 0454 to adb_usb.ini didn't help.
Update 2 (03.08.2013 19:59 MSK): My attempt to follow the official Google recommendations failed because I couldn't find the drivers for the Highscreen Spark device.
If you could setup an ADT on Linux or Mac, it will work out of the box.
We were able to connect all sorts of devices to adb easily with ADT on Linux/Mac.
If you haven't managed to connect it through usb, you can try the network connection.
Add your device to the same network, then type in the command prompt:
adb connect your_device_ip_address
Hey try to dig for drivers at Official website.
May be search other sites for USB drivers, that may help you to come out of your problem.
I had the same problem .Try it again by activating the usb mass storage.
Without adb driver for device (in your case Highscreen Spark) it is almost impossible to create a bridge(connection) between your program and device, as adb (Android Debug bridge) makes a connection between your PC/laptop to your android device And without Adb in windows Pc/Laptops its not easily possible to debug.
Because of this, Companies like samsung, lg, htc are providing adb drivers to users for easy debugging, if you dont have a adb driver for Your Device you have only one choice left , Change your operating System into linux and then see the magic.
I had this same problem. Turns out, the issue was the USB Port I plugged in to. The port directly on my laptop does not allow for ADB to see the device. The port on the back of my docking station does allow ADB to see the device. I believe it has to do with USB 3.0 vs. 2.0. I believe 3.0 blocks the protocol ADB needs to use.
You will actually require the device drivers to connect it, so try insatalling Highscreen Spark's PC Suite.
If that dosen't work or you don't find the PC Suite you can download Moborobo from here which is a universal PC Suite for smart phones and connect the device with it and then try connecting the device from abd
It may be a problem with your adb.exe. I had the same problem earlier for connecting HCL G1 tablet. I also added lines in android_winusb.ini, but could not connect yet. Then I found out this link. I got solution by changing the adb.exe file. Try this link : http://www.slatedroid.com/topic/37692-adb-drivers-problem/ Or just download the adb.exe from following link and replace it with you adb.exe file. http://sdrv.ms/NepKED It is also suggested run this command to make adb_usb.ini effective for respective adb after modifying. echo 0x2207 >> %USERPROFILE%.android\adb_usb.ini
Try these drivers
x86
x64
It works for me.
After head banging for more than a day - a small thing saved my life on my RK3066 based device:
after you update the adb_usb.ini and everything else,
and after you do a
adb kill-server
do a
adb usb
and only then do a
adb devices
saved my life
By the way
Adding the line 0454 to adb_usb.ini didn't help.
you should be adding 0x454
I was having issues with my android phone showing up when I typed adb devices but found out that it was the usb cable which caused the issue, members in my family have two different android phones each with their own charging cable. I was using one phone with the other phones usb cable just because it was the nearest and I didn't think it would make a difference but it did.
Try a different usb cable and that might help.
I have the same issue in the past but i don't found the driver on my computer today, so :
You can go on http://www.alcatelonetouch.com and find the call center for your land.
Call them , and explain the issue , they have to send you a driver to connect your phone to the computer. This drivers is very easy to install.
I have make that and i can use it for debbuging
I whish you good luck... Sorry for my English