This page explains how to connect your Replicant device to the Internet via an USB connection to a computer connected to the Internet.
The reverse_tether.sh
script is part of AOSP and can be downloaded from: reverse_tether.sh
In order to start basic NAT networking between the host and the device, make sure to have installed ADB and to have the host daemon running as root. Then, use reverse_tether.sh
the following way:
./reverse_tether.sh rndis ./reverse_tether.sh nat
Replicant USB Networking requires two scripts: replicant_usb_networking_device.sh replicant_usb_networking_host.sh
However, you can avoid the host part if your network manager can manage a shared connection.
Make sure to have installed ADB and to have the host daemon running as root.
Push the device part on the device and make it executable:
adb push replicant_usb_networking_device.sh /data/ adb shell chmod a+x /data/replicant_usb_networking_device.sh
1. On your Linux PC, in the network manager applet (where you normally set up wired or wireless network connections), create a new "Shared" "Wired" connection, with default settings (connection type = Shared). (This is independent of the device, and only needs to be created once.)
2. Disconnect any other network connections (Wifi, 3G data) on the device.
3. Run the first part of the device-side script:
adb shell /data/replicant_usb_networking_device.sh start1 dhcp
adb shell /data/replicant_usb_networking_device.sh start2 dhcp
The connection should now work. To disconnect the device, run:
adb shell /data/replicant_usb_networking_device.sh stop
1. Disconnect any other network connections (Wifi, 3G data) on the device.
2. Run the first part of the device-side script:
adb shell /data/replicant_usb_networking_device.sh start1 static
adb shell /data/replicant_usb_networking_device.sh start2 static
sudo ./replicant_usb_networking_host.sh start
The connection should now work. To disconnect the device, run:
adb shell /data/replicant_usb_networking_device.sh stop
sudo ./replicant_usb_networking_host.sh stop