ADB for mainline kernels (usefull for the GTA04).

Denis 'GNUtoo' Carikli GNUtoo at
Thu Nov 21 20:20:41 UTC 2013


I found a post[1] from John Stultz documenting how to get ADB on a
mainline kernel:

For me the process was as follows:

1) Make sure you have Jelly Bean 4.2 Android userland image.
Linaro provides a number of images for different boards here:

2) When building your kernel, make sure to configure in FunctionFS:
    Device Drivers -> USB Support -> USB Gadget Support
        -> USB Gadget Driver -> Function Filesystem

3) Modify your boot parameters to set the vendor and product ids so adb
on your host recognizes the device. g_ffs.idVendor=0x18d1

Alternatively this can also be done if you built the gadget driver as a
module at load time: insmod g_ffs.ko idVendor=0x18d1 idProduct=0x4e26

4) 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: # mkdir /dev/usb-ffs #
mkdir /dev/usb-ffs/adb # mount -o uid=2000,gid=2000 -t functionfs
adb /dev/usb-ffs/adb

5) If everything is working, you can kill adbd and when it restarts it
should find the functionfs mount and make use of it. # ps adbd
    # kill <pid for adbd>

6) On your host system, connect to the target using the adb program:
    $ ./adb shell
    root at android:/#

    Hooray there's your shell!



More information about the Replicant mailing list