How to use "adb ppp"?

huherto picture huherto · Dec 30, 2010 · Viewed 18.3k times · Source

I am trying to connect from my Android device to the host using usb and ppp.

There seems to be an option "adb ppp " that can be used. But I can't find an explanation on how to use it. There is an old discussion here. But they ended patching adb. I can't believe this hasn't being fixed by now.

http://forum.xda-developers.com/showthread.php?p=4537323

This is the explanation of the adb command, and that is all the documentation I have been able to find.

networking:
  adb ppp  [parameters]   - Run PPP over USB.
 Note: you should not automatically start a PPP connection.
  refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
 [parameters] - Eg. defaultroute debug dump local notty usepeerdns

I am not clear on what the tty argument. Looking at the sources it seems to be a service such as "shell", "host:version", etc. Or it could be (as the doc says) dev:/dev/* but I don't know which to use.

Also, the command seems to fork a ppp in the host. But, I don't know how it runs on the android device.

Answer

Alessandro Persano picture Alessandro Persano · Apr 19, 2011

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.

Below an example command that could work.

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