Per prima cosa si deve mettere il telefono in modalita' Aereo e poi come root sulla Linux Box lanciare il seguente script (dove 192.168.1.7 e' l'IP del computer che deve essere modificato secondo le necessita')
--------------------------------------------------------------------------
# Linux <-> Android Reverse Tethering Script
# This script tether the internet from your PC *to* the phone
# Some apps will not recognize the connection
# See http://ajasmin.wordpress.com/2011/07/24/android-usb-tethering-with-a-linux-pc/
# Path to ADB
export ADB=/home/luca/android_sdk/platform-tools/adb
if [ $USER != "root" ]; then
echo "Please run this script as root"
exit
fi
echo "Enabling NAT on `hostname`..."
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -F
iptables -t nat -A POSTROUTING -j MASQUERADE
echo "Connecting to the phone via 'adb ppp'..."
$ADB ppp "shell:pppd nodetach noauth noipdefault defaultroute /dev/tty" nodetach noauth noipdefault notty 192.168.1.7:10.0.0.2
echo "Done."
--------------------------------------------------------------------------
successivamente si lancia da utente normale il comando adb shell e si digita
--------------------------------------------------------------------------
sh-3.2# setprop net.dns1 151.99.125.2
--------------------------------------------------------------------------------------------
dove 151.99.125.2 e' il DNS di riferimento
Nessun commento:
Posta un commento