Android 4.4 Kitkat Enable USB adb feature

Source: Internet
Author: User

Background
After Linux-3.8, the Android kernel branch, then removed the F_ADB, using USB function FS, the user space to implement the USB adb function. This article, based on the original author's Google + article, made a test on the Atmel SAMA5 Development Board, documenting steps such as the following for the reader to use, and you can view the author's original text: https://plus.google.com/ 111524780435806926688/posts/aaeccfjknhe

Enable USB ADB on Linux-3.10
enable USB Functionfs when compiling the kernel
When building your kernel, make sure to configure in Functionfs:
Device Drivers USB Support-USB Gadget support
USB Gadget Driver, Function Filesystem
Set the correct USB vendor ID and Product ID
This setting can be placed in the Bootcmd or loaded into the kernel module by the number of parameters passed: Modify your boot parameters to set the vendor and product IDs so adb on your host RECOG Nizes the device.
G_FFS.IDVENDOR=0X18D1 G_ffs.idproduct=0x4e26

Alternatively this can also is done if your built the gadget driver as a module at load time:
    Insmod G_ffs.ko idvendor=0x18d1 Idproduct=0x4e26




Start Android and Mount Functionfs to enable USB Adbnow 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 Director Y:
    # mkdir/dev/usb-ffs    # mkdir/dev/usb-ffs/adb    # mount-o uid=2000,gid=2000-t functionfs adb/dev/usb-ffs/adb



Restart ADBD Daemon If everything is working, you can kill adbd and when it restarts it should find the Functionfs mount and Mak e Use of it.
    # PS adbd    # kill <pid for Adbd>



Then go to cmd or Linux Host to successfully connect USB adb to get Android shell on your Host system, connect to the target using the ADB program:
    $./adb Shell    [email protected]:/#


Hooray there ' s your shell!


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.