[Galaxy S I9000 General] Hexabit:
My development environment has a collection of native tools that blend with the target (the Galaxy) using X11 and NFS. For that I need a cabled network connection. adb hints that it supports PPP, and adb also uses the USB cable making it a perfect solution.

Sadly, "adb ppp" did not work, help hints are cryptic and useless and documentation is missing. Digging through the source reveals that it is possible, even without applying patches or other nasties.

A little understanding of PPP aids in explaining how this works.

PPP is basically a IPv4/IPv6 tunnel over anything that behaves like a serial line.

PTY/TTY is basically a serial line tunnel using file handles. Just like sockets, the PTY is the server side and the TTY the client.

adb basically transports multiple file handles over USB. You can have more than one "adb shell".

adbd is a good actor in opening remote resources and connecting them to file handles.

PPP is usually the initiator. It assumes that stdin/stdout are pre-opened handles to a device driver. If not, it wraps a user supplied script such a way in a PTY/TTY pair that the script can behave as a device driver.

When two ends of a network tunnel are set up in such a way, and the drivers/scripts make contact, PPP will start negotiating with it's peer until both agree to start transport. When that happens a new network interface "pppN" will appear.

On a different level: "abd shell" is usually the initiator and when invoked, it will contact the remote adbd through some custom protocol. When contacted, adb will function as a data pump and translator.

Now to mix these two worlds...

Connection setup - who invokes who

adb contacts the remote adbd, requesting it to setup the other end

adb creates a PTY/TTY pair

adb invokes pppd with the created TTY as its stdin/stdout

pppd creates a new network interface

the remote adbd creates a PTY/TTY pair

adbd invokes pppd with the created TTY as its stdin/stdout

pppd creates a new network interface

Data transport - who plays what role:

adb's pppd acts as a data pump between TTY and the local interface

adb acts as a data pump between PTY and the remote adbd

adbd acts as a data pump between PTY and the remote pppd

adbd's pppd acts as a data pump between TTY and the remote interface

Iniatives:

adb's pppd starts negotiating and generates output

adb will detach the sub-process tree

you can "adb shell" and access the Galaxy at the same time

How does this translate to something workable.

adb ppp "shell:pppd nodetach noipdefault" nodetach noipdefault <local-ip>:<remote-ip>

But this will not work because both pppd's will start authenticating, so both need the noauth option. Also the local pppd needs an extra notty to stop it complaining about /dev/tty not being a terminal, and the remote pppd needs an explicit ttyname as it complains about an unimplemented ttyname().

The follwing should work:

adb ppp "shell:pppd nodetach noauth noipdefault /dev/tty" nodetach noauth noipdefault notty <local-ip>:<remote-ip>

Note: local-ip and remote-ip should not be existing IP addresses.

Note: do not use dev: instead of shell: as the help suggests. Doing so will cause the USB data transport between adb and adbd to corrupt resulting in all open shell connections to terminate.