Configure android debugging tool adb under ubuntu16.04

What is adb

The adb we talked about is a general term, and there are two tools-Fastboot and ADB

Fastboot: means fast boot.

In Android phones, fastboot is a lower-level flashing mode than recovery. It is a flashing mode that connects the phone with a USB data cable. Compared with card swiping in some systems (such as ios), wire swiping is more reliable and safer. The use of fastboot on the PC requires the corresponding fastboot tool. We usually use the tool to flash the Recovery image, which is actually implemented by the fastboot tool.

ADB: The full name of ADB is Android Debug Bridge, which is a debugging bridge, which is convenient for debugging devices or developing Android APP. ADB is a tool in the android sdk, with this tool you can directly operate and manage the android emulator or real android device.

Install adb under ubuntu

 sudo apt install android-tools-adb

Build a debugging environment##

To use adb, you need to configure the environment, otherwise you will not have permission.

The configuration must first know the ID of the corresponding device.

Get ID

$ lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 003 Device 002: ID 413c:2107 Dell Computer Corp. 
Bus 003 Device 014: ID 057b:901d Android, Inc. 
Bus 003 Device 015: ID 05ac:12a8 Apple, Inc. iPhone5/5C/5S/6
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The current concern is Android.

Add permissions

Create the file 70-android.rules under /etc/udev/rules.d/:

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

Add the following content to the file:

SUBSYSTEM=="usb", ATTRS{idVendor}=="057b", ATTRS{idProduct}=="901d", MODE="0666"

The content in ATTRS{idVendor} and ATTRS{idProduct} is the ID obtained by lsusb.

Restart service####

Restart the adb service:

sudo adb kill-server
sudo adb start-server
adb devices 

Then you can debug directly.

debugging####

adb shell

Recommended Posts

Configure android debugging tool adb under ubuntu16.04
Small tool: install screenshot tool under ubuntu
Configure Nginx + PHP 7.0 + MySQL environment under Ubuntu 16.04
Configure node js and npm under Ubuntu 14.04
Problems encountered in pip tool installation under Ubuntu
Ubuntu configure Apache
Audio and video editing tool stack under ubuntu
Install apache+PHP under Ubuntu
Install node.js under Ubuntu
Install python3.6 under Ubuntu 16.04
Install mysql under Ubuntu 16.04
Install Thrift under ubuntu 14.10
Install OpenJDK10 under Ubuntu
Install Caffe under Ubuntu 14.04
Python MySQLd under Ubuntu
Start working under ubuntu
Ubuntu builds Eclipse+JDK+SDK Android
[python] python2 and python3 under ubuntu
Use iptables under ubuntu
ubuntu 14.04 configure 3-wire 3IP
2018-09-11 Install arduino under Ubuntu
Ubuntu configure network commands
LNMP installation under Ubuntu
Network configuration under Ubuntu
Configure lamp under centos6.8
Ubuntu ssh Android phone
Ubuntu18.10 configure Java environment
Install ROS under ROS Ubuntu 18.04[2]
Ubuntu 18.10 configure Nvidia driver
Install MySQL under Ubuntu
Install Yarm-PM2 under Ubuntu
Ubuntu configure SecureCRT login