android 手机通过 usb 共享电脑网络
来源:互联网 发布:网络用语2017最新数字 编辑:程序博客网 时间:2024/06/11 20:44
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!
参考:How to set up reverse tethering over USB?
1、Connect Android device via USB.
2、Enable USB tethering. To do so, go to
Settings → More... → Tethering & mobile hotspot → Usb tethering.
3、At host machine, the usb tethering connection may be detected by the network manager.
Its name will be something like "Wired connection 2" (or 3).You must edit it's "IPV4/Method" to "Shared to other computers".
3.1、Without the network manager, you will have to do it manually:
$ sudo ifconfig usb0 10.42.0.1 netmask 255.255.255.03.2、modify iptables with
$ echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
$ sudo iptables -t nat -A POSTROUTING -j MASQUERADE4、At Android device
$ adb shell su -c "ifconfig rndis0 10.42.0.2 netmask 255.255.255.0"
$ adb shell su -c "route add default gw 10.42.0.1 dev rndis0"
0 0
- Android手机通过USB共享电脑网络
- android手机通过USB共享电脑网络
- android 手机通过 usb 共享电脑网络
- [Android]手机通过USB绑定共享电脑网络
- Android手机通过USB线共享电脑的网络上网
- Android手机通过USB数据线共享Linux电脑网络
- Android手机通过USB网络共享限速
- 手机或pad通过usb共享网络给电脑
- G1 Android手机通过USB线共享电脑的网络上网
- Linux下完美驱动HTC Android手机的Internet传输(通过USB共享电脑网络)
- Android手机利用USB共享网络通过Ubuntu连接网络
- 小米手机通过USB连接电脑,共享使用电脑的网络
- Android通过USB共享网络
- Android手机通过usb连接电脑上网
- ubuntu电脑使用Adroid手机中的<USB共享网络>上网
- 手机共享电脑网络
- Android手机通过USB线连接PC共享上网
- 手机共享电脑网络上网
- 终于开通博客了
- JavaScript特性(attribute)、属性(property)和样式(style)
- 紫书动规 例题9-6 UVA
- JAVA生产者与消费者
- 2017全国深度学习技术应用大会
- android 手机通过 usb 共享电脑网络
- PostgreSQL导入备份文件
- [P1208]混合牛奶
- 程序员的薪资都很高么
- map使用
- 习题3-4 周期串(Periodic Strings, UVa455)
- git commit amend 修改已经提交的注释
- 数值分析:数据插值方法
- Struts2控制器以及struts.xml与web.xml的配置(1)