Get the App
SLTechnology News&Howtos  ›  Servers  › 

What if ADB debug Android can't find the device under Ubuntu

Shulou Source: shulou.com Published: 2022-06-01 05:19:38 09月30日 Update

Editor to share with you what to do if you can't find a device for ADB debugging Android under Ubuntu. I believe most people don't know much about it, so share this article for your reference. I hope you will gain a lot after reading this article. Let's learn about it together.

Recently, I was writing a test program to play rtsp, which needs to be tested on a real machine. As a result, on Ubuntu 11.04. after connecting to the phone of Android 2.1, adb service did not find the device, only the simulator. So I looked up the information on the Internet, and finally solved this problem after research.

First of all, confirm that I have ticked the settings-applications-development-debug mode of G1. And the phone also has a hint of connected, but adb doesn't recognize it. * A solution has been found to take shape at once.

First, follow the instructions on SDK to create the rules file for udev, and then:

When connecting an Android device through usb under Ubuntu 11.04, when using adb, the device cannot be found. The solution is as follows:

1. Run lsusb on the terminal

You will find that the result will have a similar record as follows:

Bus 001 Device 008: ID 0bb4:0c02 High Tech Computer Corp.

Type at this time

Sudo vim / etc/udev/rules.d/50-Android.rules

Add the following text to the open file:

SUBSYSTEM== "usb", SYSFS {"High Tech Computer Corp."} = "0bb4", MODE= "0666"

two。 Run the following command:

Sudo chmod a+rx / etc/udev/rules.d/50-Android.rules sudo / etc/init.d/udev restart

3. Run under Android sdk's tools directory (this step is important, it must be sudo, otherwise it won't work)

Sudo. / adb kill-server sudo. / adb devices

Then, you can operate directly with adb.

If you continue to execute the adb devices command under Ubuntu 11.04, the result returned is:

List of devices attached? No permissions

This means that the device connected to the USB is recognizable. After searching the Internet, I learned that adb server needs to be started with the authority of root, so I have the following command:

Www.linuxidc.com@linuxidc-laptop:~/Dev/Java/Android/android-sdk-linux_86/tools$. / adb kill-server www.linuxidc.com@linuxidc-laptop:~/Dev/Java/Android/android-sdk-linux_86/tools$ sudo. / adb start-server * daemon not running. Starting it now * * daemon started successfully *

The * command is used to kill the currently running server, and the second command starts the new server with the authority of root. We can look at devices again:

Www.linuxidc.com@linuxidc-laptop:~/Dev/Java/Android/android-sdk-linux_86/tools$. / adb devices List of devices attached HT848KV04386 device

This time the equipment was correctly identified. Naturally, tools like ddms can come in handy.

These are all the contents of this article "what to do if you can't find a device in ADB debugging Android under Ubuntu". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Devices commands runs articles results what to do content mobile phones files permissions tests important not so much again goodbye methods only most of them tools meaning Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Shulou Technology Apple OPPO Reno NVidia