Compiling the Kernel for Galaxy Nexus

Downloading from GIT repository for ICS and Compiling

CDC Ethernet works with Android-wired-tether (although it says ‘incompatible kernel’). My guess is that (1) the interface name is the same as the RNDIS kernel, and (2) android-wireless-tether probably just sets up iptables rules to route packets through that interface, so there’s not much difference between the two methods.

Compiling, with CDC Ethernet support

git clone -b android-omap-tuna-3.0-ics-mr1
cd omap
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=/path/to/cross/compiler/arm-eabi-
make tuna_defconfig
make menuconfig
#go to Device Drivers->USB Support->USB Gadget Support->USB Gadget Drivers->CDC Composite Device (Ethernet and ACM)
make -j12 EXTRA_AFLAGS=-mfpu=neon

CDC ACM Device

To get CDC ACM serial device working, use this mkbootimg.

mkbootimg --cmdline 'no_console_suspend=1 console=ttyGS0,115200,n8 androidboot.console=ttyGS0' --kernel ./zImage --ramdisk ./boot.img-ramdisk.gz -o boot-new-serial.img

Connecting to terminal using script in Linux. /dev/ttyACM0

CDC Ethernet Device

To get USB Ethernet working, install Android-wired-tether, hook up USB cable, and enable wired tether from the app.

To share your phone’s Internet with a Linux host, on the Linux machine’s command line type:

dhclient usb0

That’s it!


I have only been able to get the 4.4.3 eabi compiler (in Android NDK) to work.

Android Wired Tether gnex issue

Franco kernel gnex xda page