android-tools adb for ARM Linux

/*************************************************************************
 *                 android-tools adb for ARM Linux 
 * 说明:
 *     有时候还真是系统通过USB线直接连接到ARM主板,这样就不一定需要网络才
 * 能传输文件,在做系统更新的时候,有时候也是不错的。
 *
 *                                      2017-1-16 深圳 南山平山村 曾剑锋
 ************************************************************************/

一、参考文档:
    1. [Buildroot] [PATCH v4] android-tools: add new package
        http://lists.busybox.net/pipermail/buildroot/2015-November/145112.html
    2. Linux modules install
        http://www.cnblogs.com/helloworldtoyou/p/6180404.html

二、内核配置:
     .config - Linux/arm 3.0.35 Kernel Configuration
     ──────────────────────────────────────────────────────────────────────────────
      ┌────────────────────────── USB Gadget Support ───────────────────────────┐
      │  Arrow keys navigate the menu.  <Enter> selects submenus --->.          │  
      │  Highlighted letters are hotkeys.  Pressing <Y> includes, <N> excludes, │  
      │  <M> modularizes features.  Press <Esc><Esc> to exit, <?> for Help, </> │  
      │  for Search.  Legend: [*] built-in  [ ] excluded  <M> module  < >       │  
      │ ┌────^(-)─────────────────────────────────────────────────────────────┐ │  
      │ │            Freescale USB Device Controller                          │ │  
      │ │    [ ]       Use i.MX SoC USB charger detect function               │ │  
      │ │    <M>   USB Gadget Drivers                                         │ │  
      │ │    < >     Gadget Zero (DEVELOPMENT)                                │ │  
      │ │    < >     Audio Gadget (EXPERIMENTAL)                              │ │  
      │ │    < >     Ethernet Gadget (with CDC Ethernet support)              │ │  
      │ │    < >     Network Control Model (NCM) support                      │ │  
      │ │    <M>     Gadget Filesystem (EXPERIMENTAL)                         │ │  
      │ │    <M>     Function Filesystem (EXPERIMENTAL)                       │ │  
      │ │    [ ]       Include configuration with CDC ECM (Ethernet)          │ │  
      │ └────v(+)─────────────────────────────────────────────────────────────┘ │  
      ├─────────────────────────────────────────────────────────────────────────┤  
      │                    <Select>    < Exit >    < Help >                     │  
      └─────────────────────────────────────────────────────────────────────────┘  
    
三、运行流程:
    1. 编译拷贝模块:make modules && make modules_install INSTALL_MOD_PATH=~/rootfs
    2. modprobe g_ffs idVendor=0x18d1 idProduct=0x4e42 iSerialNumber="buildroot"
    3. mkdir -p /dev/usb-ffs/adb
    4. mount -t functionfs adb /dev/usb-ffs/adb -o uid=2000,gid=2000
    5. adbd &
    6. 插上USB OTG线,会先安装驱动,安装完成后,可以使用adb工具了。
7. Ubuntu里可以直接安装一下android adb tool就可以连接了。

 

posted on 2017-01-16 15:37  zengjf  阅读(5443)  评论(0编辑  收藏  举报

导航