如何使用“adb ppp”?
我正在尝试使用 USB 和 ppp 从 Android 设备连接到主机。
似乎有一个选项“adb ppp”可以使用。但我找不到解释 关于如何使用它。这里有一个古老的讨论。但他们结束了对 adb 的修补。我不敢相信这个问题现在还没有得到解决。
http://forum.xda-developers.com/showthread.php?p=4537323
这个是 adb 命令的解释,这就是我能找到的所有文档。
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
我不清楚 tty 的论点是什么。查看源代码,它似乎是一个服务,例如“shell”、“host:version”等。或者它可能是(如文档所说)dev:/dev/* 但我不知道该使用哪个。
另外,该命令似乎在主机中分叉了一个 ppp。但是,我不知道它在 Android 设备上如何运行。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
PTY/TTY 基本上是使用文件句柄的串行线路隧道。
就像套接字一样,PTY 是服务器端,TTY 是客户端。
下面是一个可以工作的示例命令。
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.
好的,要使用它来备份您的系统分区(或者使用 unyaffs2 解压 nandroid 备份):
deb s
-kit 设置)用于无密码登录,通过将主机密钥传输到设备 fe
在主机(10.0.0.1)和设备(10.0.0.2)之间设置网桥将主机密钥传输到设备fe:
备份系统分区(需要设备上的 rsync 可执行文件,即完整的 debian 或自定义 busybox 版本< /强>):
rsync -vaiuhhP 10.0.0.2:/system/where/to/backup/
大约需要 9 分钟:
Ok and to use this to f.e. make a backup of your system partition (alternative to unpacking a nandroid backup with unyaffs2):
deb s
with debian-kit set up)for password-less login transfer host key to device f.e. via
setup network bridge between host (10.0.0.1) and device (10.0.0.2):
backup system partition (needs rsync executable on device, i.e. full debian or custom busybox build):
rsync -vaiuhhP 10.0.0.2:/system /where/to/backup/
Comes down to about 9 minutes for my xperia mini pro with Android 4.04/RealICS custom firmware:
adb 的 ppp 选项对我不起作用。以下是我解决这个问题的方法...
您可能需要在设备上安装 busybox 才能获取“nc”命令。
在一个窗口中,键入...
在另一个窗口中,键入...
现在,设备与计算机之间已建立网络。运行“ifconfig”进行检查。
如果您希望设备获得正常的互联网连接,您需要在主机上设置一些 SNAT 路由。
adb's ppp option is not working for me. Here's how I got around it...
You may need to install busybox on the device to get the "nc" command.
In one window, type in...
In another window type in...
Now there's networking from the device to the computer. Run "ifconfig" to check.
If you want the device to get normal internet you'll need to set up some SNAT routing on the host machine.
如果
adb ppp
在您的设备上失败,并且您拥有 root 权限,请尝试以下操作:If
adb ppp
fail on your device, and you have root permission, try this: