Android 4.4 Kitkat 使能 USB adb 功能
来源:互联网 发布:股票交易软件下载排名 编辑:程序博客网 时间:2024/06/06 12:52
背景
在 Linux-3.8 以后,Android 的内核分支,便去掉了 f_adb,改使用 USB function FS,在用户空间实现 USB adb 功能。这篇文章根据原作者的 Google+ 文章,在 Atmel sama5 开发板上做了测试,将步骤记录如下,供需要使用的读者参考,你也可以查看作者原文:https://plus.google.com/111524780435806926688/posts/AaEccFjKNHE在 Linux-3.10 上使能 USB ADB
编译内核时使能 USB FunctionFS
When building your kernel, make sure to configure in FunctionFS:Device Drivers -> USB Support -> USB Gadget Support
-> USB Gadget Driver -> Function Filesystem
设置正确的 USB vendor ID 和 Product ID
这个设置可以放在 bootcmd 或者加载内核模块的时候通过参数传递: Modify your boot parameters to set the vendor and product ids so adb on your host recognizes the device.g_ffs.idVendor=0x18d1 g_ffs.idProduct=0x4e26
Alternatively this can also be done if you built the gadget driver as a module at load time:
1
insmod g_ffs.ko idVendor=
0x18d1
idProduct=
0x4e26
启动 Android 并挂载 functionFS, 使能 USB adb
Now here I'm assuming you've got a serial port working. Boot your target device with your new kernel (and insmod the g_ffs driver if necessary), and setup the functionfs directory:1
2
3
# mkdir /dev/usb-ffs
# mkdir /dev/usb-ffs/adb
# mount -o uid=
2000
,gid=
2000
-t functionfs adb /dev/usb-ffs/adb
重启 adbd 守护进程
If everything is working, you can kill adbd and when it restarts it should find the functionfs mount and make use of it.1
2
3
# ps adbd
# kill <pid
for
=
""
adbd=
""
>
</pid>
然后进入 cmd 或者 Linux Host 就可以成功连接 usb adb 获得 Android shell 了
On your host system, connect to the target using the adb program:1
2
$ ./adb shell
root
@android
:/#
0 0
- Android 4.4 Kitkat 使能 USB adb 功能
- Android 4.4 Kitkat 使能 USB adb 功能
- Android KitKat 4.4平台开发-添加USB ADB和MTP功能支持
- Android KitKat 4.4平台开发-添加USB ADB和MTP功能支持
- Android 4.4 Kitkat 使能有线网络 Ethernet
- Android 4.4 Kitkat 使能有线网络 Ethernet
- Android 4.4 Kitkat 使能有线网络 Ethernet
- Android 4.4 Kitkat 使能有线网络 Ethernet
- Android 4.4 Kitkat 使能有线网络 Ethernet
- Android 4.4 Kitkat 使能有线网络 Ethernet
- Android 4.4 KitKat 支持 u 盘功能
- Android 4.4 KitKat 支持 u 盘功能
- Android 4.4 KitKat 支持 u 盘功能
- android 4.4(KitKat)上,如何开发SMS功能的APP
- USB OTG及ADB功能
- usb adb 功能配置步骤
- Android ADB usb
- android adb usb配置
- VS 2008 可扩展性开发(五):操作Solution、Project和ProjectItem
- 数据表的垂直分隔
- Nginx SSL+tomcat集群,request.getScheme() 取到https正确的协议
- IO流
- 从源码级理解JAVA的并发修改异常
- Android 4.4 Kitkat 使能 USB adb 功能
- VS 2008 可扩展性开发(六):操作Solution Explorer
- 如何添加或删除 ubuntu 用户和组
- std--remove_if
- 社内敬语的使用方法
- Golang 通关初级(2)
- 常用设计者模式---命令模式
- C#--Switch Case语句的返回
- 上海之行