1、通过apt-get安装adb

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

将android设备连接至电脑,执行adb shell会提示“error: device not found”


2、将android设备连接至电脑,通过lsusb查看usb设备,如下红色部分对应的就是android设备

Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 003 Device 009: ID 18d1:4e12 Google Inc. Nexus One (debug)
Bus 003 Device 003: ID 0bda:b728 Realtek Semiconductor Corp.
Bus 003 Device 004: ID 17ef:6018 Lenovo
Bus 003 Device 005: ID 17ef:6019 Lenovo
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:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub


3、创建adb_usb.ini文件,写入id

echo 0x18d1> ~/.android/adb_usb.ini


4、添加权限

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

加入以下内容,注意红色部分对应的就是lsusb得到的id

UBSYSTEM=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4e12",MODE="0666"


5、重启USB服务

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


6. 重启adb服务,adb devices有设备说明adb安装成功

$adb kill-server

$sudo adb start-server

$adb devices

List of devices attached
12345678900    device



更多相关文章

  1. android adb 通过adb连接制定设备
  2. Android(安卓)学习 设备管理器勾选后不能再取消了
  3. Android(安卓)5.0 API 的变化——开发人员注意
  4. android去除状态栏和下面视图之前的黑线
  5. android 传统蓝牙开发 (附示例源码)
  6. Android(安卓)----蓝牙架构
  7. Android之开发BLE 详细步骤
  8. android USB通信
  9. [Android] Nexus 7 二代连接 Windows 7

随机推荐

  1. App Framework of Android
  2. Android一行代码 搞定图片太多,太大OOM(内
  3. ok6410 android driver(2)
  4. Android(安卓)Canvas练习(9)自已绘分割突
  5. Android(安卓)自定义TextView实现文本内
  6. 程序员的双十一剁手指南,看完不剁手算我输
  7. Android之SharedPreferencesUtils,支持对
  8. Arouter异常汇总
  9. Android(安卓)Notification基础知识
  10. Android(安卓)自定义Dialog 的使用