Make UDC & Android ADB Gadget driver work

1. Open the config menu, enable USB Gadget support and choose PXA27x UDC driver support and Android ADB Gadget driver support.

If you don't have PXA27x item appeared in the menu, copy pxa27x_udc.c and pxa27x_udc.h from Linux 2.6.27 source tree into drivers/usb/gadget directory and make the modifications of Kconfig and Makefile files accordingly.

If you don't have Android ADB Gadget item appeared in the menu, copy android_adb.c from the kernel directory of Android source code tree into drivers/usb/gadget directory and make the modifications of Kconfig and Makefile files accordingly.


2. Open the devices.c in directory arch/arm/mach-pxa, locate at struct platform_device pxa_device_udc, make sure the .name field value is "pxa27x-udc ". If not, change it.

3. Write p535_udc.c , in which calls the pxa_set_udc_info function to do the initial work for the PXA27x UDC driver.

4. Make and generate the zImage file.

5. Run Android on your P535 with the new zImage.

6. In your host Linux PC (I am using Ubuntu), create a file "/etc/udev/rules.d/50-android.rules " with following contents:
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"

In which, the "18d1 " is the USB device's vendor ID which is hard-coded in android_adb.c . Actually P535's VID is 0B05 , you can change it or not, but if you change, remember to change both the
50-android.rules file and android_adb.c file.

After creating the file, execute command:
chmod a+rx /etc/udev/rules.d/50-android.rules


7. Now connect your P535 with your host PC with USB cable, go to "out/host/linux-x86/bin " in your
Android source tree directory and execute command:
./adb devices

You will get:
List of devices attached
0123456789ABCDEF device


Which shows that your device has been connected. Now you can use the adb tool in whichever way you like.

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. Android中图形参数及图形内存信息获取
  2. Android使用URLConnection显示网络图片
  3. Android实现体重测量仪的源码
  4. android 线程学习
  5. Android的NDK开发(1)————Android(安
  6. android图形验证码
  7. Android(安卓)binder 实例
  8. 判断可用的intent和更改Drawable的透明度
  9. android md5加密
  10. Android(安卓)Google 地图学习