Android Ubuntu platform under ADB-driven installation

Source: Internet
Author: User

  in the Android platform to do development, ADB always need to use, and, because Linux does not have windows such as a fool, some things still need to set their own, otherwise it will not be connected.

Google also has a description of these content, can refer to http://developer.android.com/tools/device.html

1. Make sure the device is connected properly

First you need to get root permission, this is nothing to say. Then use the LSUSB command to list all USB devices as shown in:


Here can be relatively clear to see there is a device, ID number is 1782:5D04, if your system has a lot of USB device connection you can not see clearly, Plug and play the device ID number comparison, make sure to find this ID.

The front of this ID is actually the vendor number, followed by the product number. The vendor number is unique, such as HTC is 0x0bb4,samsung is 0x04e8,qualcomm is 0x05c6, Huawei is 0x12d1. The 0x1782 we see here is the company number of Spreadtrum.

2. Create a configuration file under/etc/udev/rules.d/, or add it to an existing profile

This configuration file will be queried when the device is connected, such as 51-android.rules.

Edit the contents as follows:




Also, there are times when we see sysfs{"High Tech computer Corp." Such an item, this parameter is also the device manufacturer's meaning, it seems that the previous official was so written, originally because HTC helped Google phone, so the first use case was written "High Tech Computer Corp.", but now the official example has been changed to attr ( Idvendor).

3. Set permissions for this file

chmod a+r/etc/udev/rules.d/51-android.rules

4. Restart Udev

/etc/init.d/udev restart

5. Add Adb_usb.ini File

In the ~/.android directory to add a Adb_usb.ini file, where the path is actually the root of each user, if you need to switch users, remember that each user needs to add this stuff.

Adb_usb.ini file to write the vendor ID number, and the difference is that it needs to write 0x prefix, for example, my Spreadtrum phone is to write 0x1782

Search online A lot of information, this step some of the information did not mention, estimated that they did not use this step to succeed, but I am not successful, until the addition of this document, card a lot of time.

6. Restart ADB

ADB kill-server

ADB start-server

ADB devices

At this point you should be able to see the device, the following will be normal use of ADB




Also, there are times when we see sysfs{"High Tech computer Corp." Such an item, this parameter is also the device manufacturer's meaning, it seems that the previous official was so written, originally because HTC helped Google phone, so the first use case was written "High Tech Computer Corp.", but now the official example has been changed to attr ( Idvendor).

3. Set permissions for this file

chmod a+r/etc/udev/rules.d/51-android.rules

4. Restart Udev

/etc/init.d/udev restart

5. Add Adb_usb.ini File

In the ~/.android directory to add a Adb_usb.ini file, where the path is actually the root of each user, if you need to switch users, remember that each user needs to add this stuff.

Adb_usb.ini file to write the vendor ID number, and the difference is that it needs to write 0x prefix, for example, my Spreadtrum phone is to write 0x1782

Search online A lot of information, this step some of the information did not mention, estimated that they did not use this step to succeed, but I am not successful, until the addition of this document, card a lot of time.

6. Restart ADB

ADB kill-server

ADB start-server

ADB devices

At this point you should be able to see the device, the following will be normal use of ADB

subsystem== "USB", action== "Add", attr{idvendor}== "0bb4", mode= "0666", owner== "K"

Here's a few options to explain,

subsystem is the logo which is a USB device,

ATTR (Idvendor) R This is a description of the manufacturer's ID number,

Mode describes access rights.

Group is described as Plug and Play, but it is not very useful here, can not write

The owner entry, which specifies which user has permission to operate, is root (not accessible to all users) if not written, and sometimes some alumni are stuck here. If you are using root permissions, this is omitted.


Also, there are times when we see sysfs{"High Tech computer Corp." Such an item, this parameter is also the device manufacturer's meaning, it seems that the previous official was so written, originally because HTC helped Google phone, so the first use case was written "High Tech Computer Corp.", but now the official example has been changed to attr ( Idvendor).

3. Set permissions for this file

chmod a+r/etc/udev/rules.d/51-android.rules

4. Restart Udev

/etc/init.d/udev restart

5. Add Adb_usb.ini File

In the ~/.android directory to add a Adb_usb.ini file, where the path is actually the root of each user, if you need to switch users, remember that each user needs to add this stuff.

Adb_usb.ini file to write the vendor ID number, and the previous difference is that it is necessary to write a 0x prefix, such as my HTC phone is to write 0x0bb4

Search online A lot of information, this step some of the information did not mention, estimated that they did not use this step to succeed, but I am not successful, until the addition of this document, card a lot of time.

6. Restart ADB

ADB kill-server

ADB start-server

ADB devices

At this point you should be able to see the device, the following will be normal use of ADB

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.