Following the instructions in this thread, I managed to enable RNDIS when the Nexus 7 is not acting as a host, using this in my terminal:
However, when my Nexus 7 is acting as a host and even with rndis_host.ko loaded, it doesn't work. I get this in dmesg
But rndis_host seems to do nothing. I guess the only way to this work is building the kernel with RNDIS Host support built-in, and not as a module.
Code:
echo 0 > /sys/class/android_usb/android0/enable
echo 18d1 > /sys/class/android_usb/android0/idVendor
echo 4e23 > /sys/class/android_usb/android0/idProduct
echo rndis > /sys/class/android_usb/android0/functions
echo 224 > /sys/class/android_usb/android0/bDeviceClass
echo 1 > /sys/class/android_usb/android0/enable
setprop sys.usb.state rndis
netcfg rndis0 dhcp
Code:
<6>[ 595.787467] rndis_function_bind_config MAC: C2:8C:59:6E:2C:C1
<4>[ 595.787580] android_usb gadget: using random self ethernet address
<4>[ 595.787697] android_usb gadget: using random host ethernet address
<6>[ 595.792019] rndis0: MAC 2e:22:6c:a0:e7:94
<6>[ 595.792138] rndis0: HOST MAC 56:2c:6e:e8:bc:52