Connect USB devices to your Nexus One
Required hardware
Rooted Nexus One (Desire /Incredible port)
Micro USB OTG cable (e.g. , advantage: ID pin connected to ground for future auto detection) or Micro USB cable and adapter
Powered USB 2.0 hub. Hubs known to provide their power to the upstream port:
If your hub doesn't provide its power to the upstream port (the Nexus One isn't charged): USB Dual Power Cable (e.g.) , since the Nexus One doesn't provide bus power to the hub chip
For mobile use: battery (e.g.) (measurements)
Software based on Android 2.2 Froyo FRF91
Download binaries…
…or build from source
Install kernel
Boot from RAM (till next reset)…
/android-sdk -linux_86/tools/fastboot boot arch/arm/boot/zImage
…or write to flash (boot.img from your nandroid backup)
/getramdisk.py /boot.img
/android-sdk-linux_86/tools/fastboot -b 0x20000000 flash:raw boot arch/arm/boot/zImage ramdisk.img
Start ConnectBot , enable full screen and connect to Local
su
insmod drivers/usb/core/usbcore.ko
# Ignore the Unbalanced enabled for IRQ 58 stack trace for now
insmod drivers/usb/host/ehci-hcd.ko
Substitute device mode over TCP/IP (or port Andrew de Quincey's work )
adb
adb connect IP_address :5555
Filesystem access
Nexus One's
PC's
insmod fs/cifs/cifs.ko
mount -t cifs -o username="username ",password="password " //IP_address /share /mnt/sdcard/cifs
HID input devices
insmod drivers/hid/usbhid/usbhid.ko
X11
/etc/X11/xorg.conf
apt-get install lxde
startx
USB storage
insmod drivers/usb/storage/usb-storage.ko
# Wait for device enumeration
mount -t vfat /dev/block/sda1 /mnt/sdcard/usb-storage
Ethernet
insmod drivers/net/usb/usbnet.ko
insmod drivers/net/usb/asix.ko
dhcpcd eth1
setprop net.dns1 IP_address
External displays
Hardware
Software
SlugTerm DL
mount -t usbfs none /proc/bus/usb
/data/local/bin/slugterm -k /dev/input/event8 -p 0377 -i 00cfa43c4e5573712b7152ffffeeca0640e257fffffff904b00402907e -f /mnt/sdcard/usr/local/share/fonts/FON2FNT/dosapp_18.FNT -c /system/bin/sh
Framebuffer
insmod drivers/video/syscopyarea.ko
insmod drivers/video/sysfillrect.ko
insmod drivers/video/sysimgblt.ko
insmod drivers/video/fb_sys_fops.ko
# Source +xf86Crtc.h ; disable CONFIG_FB_DEFERRED_IO
insmod drivers/staging/udlfb/udlfb.ko
# Wait for device enumeration
Android framework
chmod 666 /dev/graphics/fb1
/system/build.prop:
dalvik.vm.heapsize=42m
Framebuffer fb=new Framebuffer(1);
Bitmap bm=fb.createBitmap();
fb.tranfer(bm, true);
Also included: Display images on a DisplayLink device from all Android apps through SEND Intent :
Console (Warning: once it scrolled, Nexus One won't shutdown completely)
insmod drivers/video/console/font.ko
insmod drivers/video/console/softcursor.ko
insmod drivers/video/console/bitblit.ko
insmod drivers/video/console/fbcon.ko
Android framework
chmod 666 /dev/console
PrintWriter pw=new PrintWriter("/dev/console");
pw.println("Hello Android!");
X11
As primary display (BeagleBoard)
Audio/MIDI devices
insmod sound/soundcore.ko
insmod sound/core/snd.ko
insmod sound/core/snd-timer.ko
insmod sound/core/snd-hrtimer.ko
insmod sound/core/snd-page-alloc.ko
insmod sound/core/snd-pcm.ko
insmod sound/core/snd-rawmidi.ko
insmod sound/core/snd-hwdep.ko
insmod sound/usb/snd-usb-lib.ko
insmod sound/usb/snd-usb-audio.ko
Android framework
insmod sound/core/oss/snd-mixer-oss.ko
insmod sound/core/oss/snd-pcm-oss.ko
chmod 666 /dev/snd/dsp
FileInput/OutputStream("/dev/snd/dsp")
Hardware
Receiver (e.g. DVB-T )
ALSA Audio device
Software
Ideas to enable deinterlacing and scaling
Thread @ xda-developers
Sven Killig 2010