2

For a hobby project I'm building a system manager for a gaming pc.

Instead of a custom touch screen and microcontroller I'm trying to use an old Samsung Galaxy S2 (i9100). For useabilty I'm trying to use reverse usb tethering to use the LAN connection of the pc.

I've managed to install LineageOS 14.1 with Gapps and Xposed framework.

Via the network settings on the S2 I've activated usb tethering

On the windows pc, a network adapter is added: NDIS based ethernet port with ip adress 192.168.137.1 and the local ethernet port is set for sharing the connection

Via Terminal Emulator for Android on the S2 with command ifconfig all the ip settings are confirmed and the NDIS is set to UP. I've also tried to reconfigure the default network route. Via the Xposed framework fakewifi connection is running for all the apps.

Still the S2 doesn't get internet connection. What am I doing wrong?

1 Answer 1

3

You just need to configure the dhcp.

Open Terminal emulator and type in: su . The $ will change to #.

  • Type the following command in Terminal Emulator:

     netcfg rndis0 dhcp
    

The name for usb interface inside Android may vary. It is usually rndis0 or usb0. Type busybox ifconfig to identify the name.

It can happen that automatic dhcp method does not work. In this case you have to do it manually:

Type these following commands in Terminal Emulator:

ifconfig rndis0 192.168.137.2 netmask 255.255.255.0 route add default gw 192.168.137.1 dev rndis0

If route fails, try: busybox route add default gw 192.168.137.1 dev

It has been noted that some applications (download in Google Play, Gmail, Facebook.) don't recognize Internet connection.

The following is a recommended workaround:

  • Enable temporarily 3G connection on your Android

  • Type: ifconfig rmnet0 0.0.0.0

The name for 3G interface inside Android may vary: ppp0, rmnet0... (Type busybox ifconfig to identify the name).

This will make applications see your Internet connection via USB as 3G.

3

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .