阅读更多 最近在看《Android.Programming.Pushing.the.Limits].Erik.Hellman》中写到关于使用何种操作系统开发Android:

Google supports Windows, Linux, and OS X for developing Android applications. Although Windows is officially
supported by the Android SDK, you’ll have problems if you decide to do advanced development, especially
when it comes to writing native applications or building your own custom ROM. The best choice is either Linux
or OS X. If possible, try to have one of these as your primary operating system, and you’ll run into far fewer
problems. Another reason for avoiding Windows on your Android development environment is that you won’t
need to install new USB drivers for every Android device you work on.

最后一个原因写到,使用linux 或者OS X不需要为新机器安装新的驱动,在windows上是需要的。

那 这个在linux上会用到lsusb命令和修改/etc/udev/rule.d/51-android.rules文件
转自: http://www.cnblogs.com/frydsh/archive/2013/03/07/2949089.html

为什么是“51-android.rules”?

      在Linux下进行Android开发,连接Android手机,可能会编辑到/etc/udev/rules.d/51-android.rules文件。

      那么,为什么这个文件要命名成51-android.rules,而不是其它的名字呢?

      详细的解释要求对udev子系统有一定了解。下面简要介绍一下udev。

      udev是Linux下的设备管理器,它支持即插即用,即自动识别新加入到系统中的外部设备,特别是USB设备。

      用惯Windows的人可能没有这个意识,因为Windows很早就支持即插即用,加入新设备一直都很方便。

      udev的一个特点是,它允许指定一系列响应规则,在它侦测到新设备加入的时侯,执行它们。

      udev要求将这些规则存储在/etc/udev/rules.d/目录下的文件中,该文件名必须以.rules结束。

      一些系统之中,udev默认的规则存储在/etc/udev/rules.d/50-udev.rules文件中。

      udev按照字母排序依次解释这些文件中的规则,因此,如果你希望自己添加的规则在默认规则之后处理,那么文件名开头必须大于50,比如51。

      这就是51-android.rules命名的缘由,它希望自己在默认的udev规则之后处理。

      另外,简要说一下USB的知识:

      一个USB设备由两个ID来标识,Vender ID和Product ID,Vender ID由设备制造商向USB执行论坛申请,Product ID则由设备制造商自行分配。

更多相关文章

  1. Android studio 提取文件指定字符串
  2. 如何获取Android设备名称(常用ADB命令介绍)
  3. Android http协议实现文件下载
  4. android 扫描SD卡与系统文件
  5. android保持在休眠时,后台程序继续运行(让程序获取设备电源锁)
  6. Android sdcard文件读写操作
  7. Android bluetooth介绍(三): 蓝牙扫描(scan)设备分析
  8. android的文件读写

随机推荐

  1. 闲来无事,分析一下淘宝千牛客户端
  2. Android ListView的addHeaderView注意事
  3. widget 常用UI控件介绍
  4. android中Uri.parse()用法
  5. Android常用布局颜色值大全
  6. android:自定义长按/长点击事件
  7. adb shell 是什么,如何进入?
  8. android-样式和主题(style&theme)
  9. android 反编译(转)
  10. This view is not constrained verticall