您现在的位置是:首页 > 笔记 > adb shell device not found解决
推荐星级:
  • 1
  • 2
  • 3
  • 4
  • 5

adb shell device not found解决

更新时间:2023-09-14 21:24:01 大小:11K 上传用户:sun2152查看TA发布的资源 标签:adbshell 下载积分:1分 评价赚积分 (如何评价?) 收藏 评论(0) 举报

资料介绍

在Ubuntu12.04下连接设备后,显示:device not found,解决方法如下: 先试试: adb kill-server adb start-server adb shell 不行的话按照下面操作。 1)首先进入用户目录 cd ~ ls -al 可以看到一个/.android目录。 cd .android 应该有一个adb_usb.ini文件,没有则创建之。 touch adb_usb.ini 2)用lsusb看连接设备的VID。 先连接上设备,运行 alex@X:~/.android$ lsusb 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 Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 003 Device 002: ID 1234:0010 Bus 001 Device 003: ID 1bcf:2883 Sunplus Innovation Technology Inc. Bus 003 Device 007: ID 192f:0916 Avago Technologies, Pte. 拔掉设备,再次运行 alex@X:~/.android$ lsusb 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 Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 003: ID 1bcf:2883 Sunplus Innovation Technology Inc. Bus 003 Device 007: ID 192f:0916 Avago Technologies, Pte. 对比发现 Bus 003 Device 002: ID 1234:0010就是连接上的设备。 0x1234就是VID,后边的0x0010就是PID,记下这两个值。 3)打开刚才建立的adb_usb.ini文件 sudo gedit adb_usb.ini 在gedit里把以下内容放进去 # ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT. # USE 'android update adb' TO GENERATE. # 1 USB VENDOR ID PER LINE. 0x1234 最后一行的0x1234就是刚才记下的设备的VID。 如果有adb_usb.ini~这个文件的话,也添加下。 sudo gedit adb_usb.ini~ 注意:rockchip的我第一次按上面这样搞是ok了的,但是用了好久之后不知道怎么又不行了,后面必须调用一次rk自己编译出来的adb才可以重新用jdk里的标准adb。 4)以root身份运行 sudo su adb shell 到此应该可以看到连接上设备了。 5)最后,如果想以普通用户连接,可以在/etc/udev/rules.d/51-android.rules里添加owner参数。 SUBSYSTEM=="usb", ATTR{idVendor}=="1234", ATTR{idProduct}=="0010", MODE="0666", OWNER="alex" 1234和0010分别是VID和PID,OWNER填用户名。

部分文件列表

文件名 大小
adb_shell_device_not_found解决.docx 11K

全部评论(0)

暂无评论