- “List of devices attached” is empty on Ubuntu 16.04 using «adb devices»
- 4 Answers 4
- “adb devices” returns empty “List of devices attached” on Ubuntu
- 1 Answer 1
- ADB finds no devices on Ubuntu Linux
- ADB device list empty using WSL2
- 2 Answers 2
- [GUIDE] [LINUX] Installing ADB and Fastboot on Linux & Device Detection «Drivers»
- Breadcrumb
- XeoNoX
“List of devices attached” is empty on Ubuntu 16.04 using «adb devices»
I am unable connect my Android to Ubuntu.
On executing command lsusb . It shows attached device.
And I have created rule using this command.
And after running adb devices . It is not showing any attached device.
I have also reinstalled adb tools. Even though it is not working.
4 Answers 4
You need to enable USB debugging on your phone.
This video demonstrates this from 0:33 to 1:03.
Copying the steps here:
- On your android device, go to Settings → System → About phone . Scroll down to Build number and continuously tap on it for a few times until a popup announcing Developer options to have been activated appears.
- Go to Settings → Developer options → Debugging and activate USB debugging .
The device should now be listed under $ adb devices once connected.
Tested with Android 5.1 and Ubuntu 17.10.
First, try unplug then plug the device. Then check the the message log using dmesg instead lsusb, because it gives you more information about the idVendor and idProduct. Use the following command to show the last 10 message log:
Now, you can ge the idVendor and idProduct. It will be something like this:
add the following line to your /etc/udev/rules.d/51-android.rules (Beware, you need to change idVendor , idProduct and username to yours):
You also can use the 51-android.rules file from android-udev-rules.
Here I’m copying the step for Ubuntu from its documentation:
Источник
“adb devices” returns empty “List of devices attached” on Ubuntu
Based on react native documentation (https://facebook.github.io/react-native/docs/running-on-device) I wanted to connect to ADB in my ubuntu vm (Ubuntu 18.04.2 LTS) but my problem is that i keep getting an empty list.
So what steps I have followed :
- lsusb to extract mobile model (in my case 2a45)
Bus 001 Device 004: ID 2a45:2008 Meizu Corp. MX Phone (MTP)
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
- input this into your udev rules in order to get up and running
echo ‘SUBSYSTEM==»usb», ATTR
In order to troubleshoot based on
I followed the below steps :
- created adb_usb.ini file and restarted adb server
daemon not running; starting now at tcp:5037
daemon started successfully
- enabled usb debugging and checked again adb devices
In this case I noticed that lsusb doesn’t identify my mobile and adb devices command returns again an empty list as shown below
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
- checked android usb file configuration
root@greg_server:/etc/udev/rules.d# ls -lst
4 -rw-r—r— 1 root root 71 Oct 24 07:18 51-android-usb.rules
60 -rw-r—r— 1 root root 58549 May 8 06:28 70-snap.core.rules
root@greg_server:/etc/udev/rules.d# cat 51-android-usb.rules
Any help on what might be the case?
1 Answer 1
I’m attempting to get ADB up and running on an older version of ubuntu, but my problems are more fundamental (I’m trying to do this in Virtualbox as well).
However — I noticed that this answer didn’t contain something which has fixed the issue for others — the USB configuration mode (a developer option which should be under the dev settings somewhere).
On the device I’m using, this was under «Default USB Configuration» — advice from others appears to be that selecting PTP is the way to go.
Источник
ADB finds no devices on Ubuntu Linux
I think I’ve gone over just about every related thread on SO over this topic(there’s a lot), but none seem to solve my issue. Running Ubuntu 16.04 LTS, and have attempted to get ADB working with an Android 6.0.1 Galaxy Note 5 and an Android 5.0.1 Galaxy S4. Neither work as of right now.
For what it’s worth, this did work last week, and I’m not entirely sure what changed. There was a small systems update that included kernel firmware and udev updates, but not sure if that is the culprit.
Some basics I’ve tried:
- I’ve tried multiple USB cables and multiple ports
- Developer mode is on
- USB Debugging is turned on
- I have tried setting USB mode to Charging, PTP, and MTP
- I have restarted the adb server, and attempted to run it as root with no joy
- I have added the vendor ID in hex notation to
/.android/adb_usb.ini
Running adb devices shows no results, like so:
And lsusb does show my device:
I have my udev rules setup. Right now it’s at 70 priority to overrule another set of udev rules that were overriding my permissions, but note that I have tried it at priority 51.
The permissions set by udev appear correct:
And for good measure, the phone does show up in dmesg :
And finally, a udevadm test :
I’m about at the end of rope here, so I’d appreciate any ideas or solutions.
Источник
ADB device list empty using WSL2
I’m trying to debug / connect up a device for development using WSL2 (Ubuntu). I’ve followed steps on this post https://stackoverflow.com/a/58229368/21061 which sets up ADB on both Windows and Linux using the same ADB version.
Once I’ve done that however, I get an empty list of devices in the Ubuntu terminal. I’ve tried killing and restarting the ADB server from the Windows command line and that doesn’t seem to make any difference. Is this not possible in WSL2 or is there something I’m missing?
2 Answers 2
This answer worked for me using WSL 2:
If it’s the first time, it’s going to ask you for permission in your phone, make sure to check the box to always grant permission. Then restart adb and connect again:
You can get your [ip device] from: Settings > About device > Status. It has a form like: 170.100.100.100
Jorge’s answer is fine, but beginners like me may need some more details.
[ip device] is [YOUR_PHONE_IP] address. To get the IP address of your phone, go to «Settings -> About phone -> Status -> IP address». It will probably be something like 192.168.x.y.
I did not add adb to my PATH variable — neither in Windows nor in Linux/WSL2. Instead I just downloaded the latest version for both OS’s using the links below:
Once I unzipped platform-tools I had to change directory to the unzipped folder ( cd platform-tools ) in both PowerShell and WSL2.
Then in PowerShell on Windows, I run .\adb tcpip 5555 in the platform-tools folder.
In WSL2 terminal, I run ./adb connect 192.168.2.199:5555 (where 192.168.2.199 was my PHONE_IP address).
The first time you connect using [YOUR_PHONE_IP] address, you will be prompted to confirm the connection. The adb might say it failed to connect while it was waiting for the confirmation. If so, run ./adb kill-server in the WSL2 terminal and then run ./adb connect [YOUR_PHONE_IP]:5555 again.
You can display the list of attached devices via .\adb devices in PowerShell and ./adb devices in WSL2.
That is all. Now you should be able to debug your phone using WSL2.
Источник
[GUIDE] [LINUX] Installing ADB and Fastboot on Linux & Device Detection «Drivers»
Breadcrumb
XeoNoX
Senior Member
[GUIDE] [LINUX] Installing ADB and Fastboot on Linux & Device Detection «Drivers»
Reason for updated guide : Obsolete tutorials everywhere and info scattered, some are just for adb and others just for the drivers.
Before you begin be sure that you have set your Android Device
to enable USB Debugging . The steps are different for
every device. Google how to turn it on your specific device.
Google «Enable USB Debugging »
Once you have enabled USB Debugging you can follow the instructions below:
NOTE: the following APT-GET has been superseded by APT . Some Linux distributions will allow the usage of both still.
Also keep in mind your Linux repositories must be up to date for the following commands to work, if you get a repository or file not found message you will probably need to fix your repos to allow the downloading of FOSS (called universe in some distros) as well as allow distro Updates. Debian and Ubuntu users can refer to this for a quick reference for their proper repos https://debgen.simplylinux.ch/
Open «TERMINAL» and do the follow:
Installs android tools and fastboot:
The following commands may give you some messages about the packages not being installed because you have a newer version or the dependencies are no longer need. this is OK just ignore the message and continue to the next command, i left in the commands for those running legacy systems.
Installs 32 Bit Compatibility libraries for 64-Bit Systems
Packages needed for Ubuntu 13+ Updated 32-Bit Libraries
Источник