Ubuntu配置Android开发环境无法连接手机
2013-04-25 22:14
549 查看
因为一直使用Ubuntu,所以想把Android也放在Ubuntu开发了,不过用小米MiOne连接后不能识别,SN是乱码,在网上找到如下解决方法:
在/etc/udev/reles.d 文件夹下创建 51-android.rules 文件
写入 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0666"
重启adb:
再试成功。
记得一定要断开手机连接后再连接一下。
以上是在32bit下的配置方式,在64bit需要先安装如下包:
否则会报如下错误:
检测是否正常:
不链接手机时输入命令lsusb,查看结果:
链接手机后输入命令lsusb,查看结果:
可以看到端口为9025就是小米手机,“Bus 003 Device 006: ID 18d1:9025 Google Inc. ”
参考:
http://blog.csdn.net/chenghai2011/article/details/7270664
在/etc/udev/reles.d 文件夹下创建 51-android.rules 文件
写入 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0666"
重启adb:
$ cd your-android-sdk-linux/platform-tools $ sudo ./adb kill-server $ sudo ./adb devices
再试成功。
记得一定要断开手机连接后再连接一下。
以上是在32bit下的配置方式,在64bit需要先安装如下包:
sudo apt-get install lib32asound2 lib32z1 lib32ncurses5 lib32bz2-1.0
否则会报如下错误:
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
检测是否正常:
不链接手机时输入命令lsusb,查看结果:
arron:/etc/udev/rules.d$ lsusb 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 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 003: ID 064e:c21c Suyin Corp. Bus 001 Device 006: ID 046d:c52e Logitech, Inc. Bus 001 Device 005: ID 0489:e04e Foxconn / Hon Hai
链接手机后输入命令lsusb,查看结果:
arron:/etc/udev/rules.d$ lsusb 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 006: ID 18d1:9025 Google Inc. 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 003: ID 064e:c21c Suyin Corp. Bus 001 Device 006: ID 046d:c52e Logitech, Inc. Bus 001 Device 005: ID 0489:e04e Foxconn / Hon Hai
可以看到端口为9025就是小米手机,“Bus 003 Device 006: ID 18d1:9025 Google Inc. ”
参考:
http://blog.csdn.net/chenghai2011/article/details/7270664
相关文章推荐
- ubuntu环境下android开发连接手机
- Ubuntu环境下android开发,连接真实手机调试方法
- Ubuntu环境下android开发,连接真实手机调试方法
- Ubuntu环境下android开发,连接真实手机调试方法
- 【转】Ubuntu 14.04配置安装java环境和android开发环境(包括真机调试环境)
- Android开发环境搭建(一) —Ubuntu虚拟机安装配置
- Ubuntu中Android开发环境配置
- 在手机上配置Android开发调试环境
- 配置ubuntu下android开发环境
- ubuntu下android开发环境配置
- ubuntu配置python for android开发环境的日志
- Unity3D Android手机开发环境配置,可真机发布调试
- Ubuntu 配置 Android 开发环境遇到的问题
- (转)Unity3D Android手机开发环境配置,可真机发布调试
- Ubuntu的Android开发环境配置
- Android开发环境搭建(一) —Ubuntu虚拟机安装配置
- Ubuntu中Android开发环境配置
- ubuntu配置android开发环境和编译源码遇到的一些问题
- Ubuntu下配置Intellij的Android开发环境