From b18084fbfcac37d220fa3788eaaa51d9f19d4ba1 Mon Sep 17 00:00:00 2001 From: William Castro Date: Mon, 12 May 2014 13:51:05 -0700 Subject: [PATCH] add documentation and infrastructure for ADB and RNDIS over USB --- README.md | 13 +++++++++++++ system/adbd.service | 11 +++++++++++ tmpfiles.d/adbd.conf | 3 +++ 3 files changed, 27 insertions(+) create mode 100644 system/adbd.service create mode 100644 tmpfiles.d/adbd.conf diff --git a/README.md b/README.md index 00cdf4e..ee5fbc9 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,16 @@ exec awesome Since the MSMFB_SW_REFRESHER does not seem to be working i wrote this instead. Just compile and put in you ~/ or whereever so xinit can run it. +## Enabling ADB and RNDIS (reverse USB tethering) +1: Create this link for ADB to be able to find the shell, etc. + ln -s / /system + +2: Add the included systemd-tmpfiles config files. They go in /etc/tmpfiles.d, and require a reboot to apply them. + +ADB shell works, but you will need to set the size ($COLUMNS and $LINES) and terminal type ($TERM) manually. + +To use RNDIS, plug the Nexus into a computer and bridge the virtual ethernet adapter with your local network. Then, bring up the link and get an address as usual. The interface name should be 'usb0'. + # Kernel stuff You can use the kernel from here https://github.com/crondog/kernel_msm @@ -152,6 +162,9 @@ CONFIG_SECURITY_SELINUX_BOOTPARAM=y # Whats Working Wifi +ADB +USB Reverse Tethering/RNDIS (guest) +USB OTG (host) fb0 Audio -- Need to setup Pulse Audio as systemwide. Not sure why it does not work as a normal user You will also need the alsaucm files from libasound2-data_1.0.27.2-1ubuntu6_all.deb diff --git a/system/adbd.service b/system/adbd.service new file mode 100644 index 0000000..20b20a4 --- /dev/null +++ b/system/adbd.service @@ -0,0 +1,11 @@ +[Unit] +Description=ADB Daemon +After=systemd-tmpfiles-setup.service + +[Service] +Type=simple +ExecStart=/bin/bash -c '/sbin/adbd 2> /var/log/adbd.err 1> /var/log/adbd.out' + +[Install] +WantedBy=basic.target +Before=network.service diff --git a/tmpfiles.d/adbd.conf b/tmpfiles.d/adbd.conf new file mode 100644 index 0000000..87b4b0a --- /dev/null +++ b/tmpfiles.d/adbd.conf @@ -0,0 +1,3 @@ +w /sys/class/android_usb/android0/functions - - - - adb,rndis +w /sys/class/android_usb/android0/enable - - - - 1 +