"Go" Ubuntu connect Android device (with the simplest method)

Source: Internet
Author: User

Original URL: http://blog.csdn.net/maosidiaoxian/article/details/22661725

Connect Android devices under Ubuntu, though you don't have to install drivers like windows, but you will encounter an error: enter adb shell, prompt insufficient permissions for device, enter ADB Devices, the device name is displayed???????? Wait a lot of question marks.

This is because Ubuntu is running as a non-root user by default. If you want to use ADB for USB debugging, you can enter the ADB shell to use the root account to execute the command, but it is too cumbersome.

Another approach is to configure Udev rules. Here's how:

1. Enter LSUSB to view the ID number of the device. As I output the following:

Bus 002 Device 008:id 0bb4:0d02 High Tech computer Corp.
Bus 008 Device 002:id 046d:c52e Logitech, Inc.
Bus 001 Device 001:id 1d6b:0002 Linux Foundation 2.0 root Hub
Bus 002 Device 001:id 1d6b:0002 Linux Foundation 2.0 root Hub
Bus 003 Device 001:id 1d6b:0001 Linux Foundation 1.1 root Hub
Bus 004 Device 001:id 1d6b:0001 Linux Foundation 1.1 root Hub
Bus 005 Device 001:id 1d6b:0001 Linux Foundation 1.1 root Hub
Bus 006 Device 001:id 1d6b:0002 Linux Foundation 2.0 root Hub
Bus 007 Device 001:id 1d6b:0003 Linux Foundation 3.0 root Hub
Bus 008 Device 001:id 1d6b:0002 Linux Foundation 2.0 root Hub
Bus 009 Device 001:id 1d6b:0003 Linux Foundation 3.0 root Hub

One bus 002 Device 008:id 0bb4:0d02 High Tech computer Corp. This is the USB port of my HTC phone. Remember these two id:0bb4 and 0d02 in the middle.

2, sudo vi/etc/udev/rules.d/70-android.rules

If you do not have this file, you can create and then add the following content

subsystem== "USB", attrs{idvendor}== "0bb4", attrs{idproduct}== "0d02", mode= "0666"

3. Modify Permissions

sudo chmod a+rx/etc/udev/rules.d/70-android.rules

4. Restart the Udev service:

sudo service udev restart

5. Restart the ADB server.

Re-connect the device, and then execute sudo./adb kill-server

ADB start-server

Then see if the ADB devices has already shown the device name properly.

Ps:

The latest modification method, do not have to look at the device ID, directly under the RULES.D add a file 51-android.rules, the content is:

[Plain]View Plaincopy
    1. subsystem== "USB" env{devtype}== "Usb_device", mode= "0666"

Currently common to all Android devices. After saving as the above steps to modify permissions, restart Udev and ADB, and then plug in the phone again.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

"Go" Ubuntu connect Android Device (the simplest method)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.