Android Development Summary: adb configuration in Ubuntu

Source: Internet
Author: User

1. Configure Environment Variables

Enter the terminal and enter

Sudo gedit ~ /. Bashrc

Append at the end of the file:

1 #set path for android sdk tools
2 export PATH=$PATH:/your_android-sdk-linux_path/tools/
3 export PATH=$PATH:/your_android-sdk-linux_path/platform-tools/

The your_android-sdk-linux_path here is the absolute path


2. Save and synchronize updates

Source ~ /. Bashrc

3. If adb is directly run

Adb devices
* Daemon not running. starting it now *
* Daemon started successfully *
List of devices attached
???????????? No permissions

No permission


4. Switch to root and run steps 1 and 2 again.

Then restart the adb service.

Adb kill-server
Adb start-server

After leaving root, you can also use adb.

5. If Step 3 still does not work, refer to the following methods:

(1) plug in the mobile phone and enter the terminal:
Lsusb

Will list all occupied usb devices.
Find your own device:

Bus 002 Device 004: ID 17ef: 6019 Lenovo
Bus 002 Device 003: ID 04c5: 1356 Fujitsu, Ltd <-------- this is my Device. Write down this line.
Bus 002 Device 002: ID 8087: 0024
Bus 002 Device 001: ID 1d6b: 0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087: 0024
Bus 001 Device 001: ID 1d6b: 0002 Linux Foundation 2.0 root hub

(2) Continue terminal Input
Sudo gedit/etc/udev/rules. d/70-android.rules

Add the following statement
SUBSYSTEM = "usb", ATTRS {idVendor} = "04c5", ATTRS {idProduct} = "1356", MODE = "0666"

(The red and green words are the ones we wrote above, respectively)

Save.

(3) terminal Input
Sudo chmod a + rx/etc/udev/rules. d/70-android.rules
Sudo service udev restart

(4) unplug the usb, re-connect it (very important), and then execute:
Adb devices
In this way, you can view the device.

Related Article

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.