Project

General

Profile

Reverse Tethering (Internet via USB port)

Added by _ n0airc0n about 4 years ago

Hi,

I run Replicant on a Samsung Galaxy 2 without WIFI, Bluetooh and mobile data, although basic phone functionality is enabled. My only option to install/update packages via fdroid is to use reverse tethering. This works well using the USB Reverse Tethering Guide published on http://forum.xda-developers.com/showthread.php?t=2287494 . Unfortunately this solution does not work for most other applications.

Reasons I found are at least related the following problems:
- appl. check for active network interface (3G or WLAN)
see low level API ConnectivityManager/ConnectivityService and NetworkInfo
- some appl. even depend on active WLAN
- it seems DNS does not work in this setup

It would be outstanding to have a easy to use solution for this. Either being part of Replicant or available via Fdroid. Any ideas/comments?


Replies (4)

RE: Reverse Tethering (Internet via USB port) - Added by Paul Kocialkowski about 4 years ago

Perhaps try the scripts from ReplicantUSBNetworking, they usually work properly.

RE: Reverse Tethering (Internet via USB port) Replicant 6.0 - Added by F Staub about 1 year ago

I used this instructions https://redmine.replicant.us/projects/replicant/wiki/ReplicantUSBNetworking with a Samsung S2, Replicant 6.0 and openSUSE Tumbleweed as host.

After

$ adb shell /data/usb_networking_device.sh start1
Starting Replicant USB networking, phase 1

I created a connection and ran:

$ adb shell /data/usb_networking_device.sh start2
error: insufficient permissions for device
$ adb devices 
List of devices attached
???????? no permissions

I had to reconnect USB to gain again permissions for the device.

I tried the start2 script alone with this result:

$ adb shell /data/usb_networking_device.sh start2
Starting Replicant USB networking, phase 2
Clearing network configuration
400 0 destroyNetwork() failed (Machine is not on the network)
200 0 Interface IP addresses cleared
Configuring DHCP, please wait
ifconfig: ioctl 8913: No such device

Any idea what could be done?

RE: Reverse Tethering (Internet via USB port) Replicant 6.0 - Added by Fil Bergamo about 1 year ago

F Staub wrote:

I used this instructions https://redmine.replicant.us/projects/replicant/wiki/ReplicantUSBNetworking with a Samsung S2, Replicant 6.0 and openSUSE Tumbleweed as host.

After
[...]

I created a connection and ran:
[...]

I had to reconnect USB to gain again permissions for the device.

I tried the start2 script alone with this result:
[...]

Any idea what could be done?

Just a quick suggestion, try:

adb root

before doing anything mentioned in the instructions.. might work..

RE: Reverse Tethering (Internet via USB port) - Added by Kurtis Hanna 3 months ago

I just got done testing Wolfgang's reverse tethering scripts, SimpleRT [1], and gnirehtet [2]. All three of them gave me internet connections, but gnirehtet was the only one that worked without any issues or errors. It is the only project that is actively being maintained and I think that we should recommend it to Replicant users instead of recommending SimpleRT or Wolfgang's scripts. I should mention that I've only tested the Rust version of gnirehtet and haven't tested the Java version.

[1] https://github.com/vvviperrr/SimpleRT
[2] https://github.com/Genymobile/gnirehtet

    (1-4/4)