-
-
Save gohilbhagirath90/b1cac45178eb33f4e95d to your computer and use it in GitHub Desktop.
USB Reverse Tethering Android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ work in only rooted android phone ] | |
Step 1: connect android via usb. | |
Step 2: enable usb tethering | |
GOTO : settings > more .. > Tethering & mobile hotspot > Usb tethering | |
Step 3: on Host Machine | |
$ ifconfig usb0 10.42.0.1 netmask 255.255.255.0 | |
$ echo 1 > /proc/sys/net/ipv4/ip_forward | |
Command for sudo will be: | |
$ sudo 'echo 1 > /proc/sys/net/ipv4/ip_forward' | |
Step 4: on Android device [for this step you must install adb on host pc] | |
$ adb shell | |
$ su | |
$ netcfg rndis0 dhcp | |
if it not get ip address than assign manually | |
$ netcfg rndis0 10.42.0.2 netmask 255.255.255.0 | |
$route add default gw 10.42.0.1 dev rndis0 | |
Now iternet is working in android phone. check ping www.google.com | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment