Ubuntu under ADB shell installation

Source: Internet
Author: User

01) Installation

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install android-tools-adb

02) Environment variables

I. Introduction of TOOLS
Android-sdk-linux_x86/tools has a bunch of tools to use today: Android Debug Bridge, which is the most used tool in Android development. (abbreviated ADB, sort of like GCC's gdb)

ADB start-server– In fact it will start an ADB fork-server server
ADB Kill-server–kill off
ADB devices– List of all devices

Two. First need to download ADB for Linux Toolkit

Unzip it anywhere, don't drop it.

Because systems such as Ubuntu are running by default as non-root, you need sudo support to use USB debugging.

$ LSUSB View USB usage

Through two comparisons, it is found that the following USB port is currently in use: Bus 002 Devices 004:id 230b:0100

ID 230b is Idvendor, 0100 is idproduct.

Then create and edit a file

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

In the inside write:

My system is Ubuntu10.10, then write the following sentence

subsystem== "USB", attrs{idvendor}== "230b", attrs{idproduct}== "0100", mode= "0666"

Other manufacturers are as follows:

Acer 0502
Dell 413c
Foxconn 0489
Garmin-asus 091E
HTC (older phones) 0bb4
HTC (Newer phones) 18d1
Huawei 12d1
Kyocera 0482
Lg 1004
Motorola 22b8
Nexus one/s 18d1
Nvidia 0955
Pantech 10a9
Samsung 04e8
Sharp 04dd
Sony Ericsson 0fce
ZTE 19d2

Then save the exit, then set the permissions

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

You also need to edit the path of the ~/.BASHRC file into the ADB tool

VI ~/.BASHRC

Add at the end, where the red part is the path to the Unpacked toolkit that you just downloaded

Export Path=${path}:/home/luobin/platform-tools

To run the command, restart Udev:
$sudo Service Udev Restart
Now you need to restart your Ubuntu and then USB to connect your phone, make sure USB debugging is turned on, enter it under terminal

Third, restart ADB server
(very important) unplug the USB reconnect to perform:

sudo./adb kill-server
./ADB Devices
./adb root (This step is important)

Iv. using USB for debugging
The problem in the description of the problem has been resolved.

ADB start-server Open Service
If everything is fine.
Input
ADB devices
Can show the Android device currently connected to the computer ^_^

Try this command.
ADB shell
Can execute the android shell command on the Ubuntu terminal.

Ubuntu under ADB shell installation

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.