My Samsung phone uses LineageOS. The LineageOS USB modes include RNDIS (Microsoft's widely used Ethernet over USB protocol) and its settings also include tethering over USB.

My desktop is Windows 10 with a wired Intel NIC and the correct drivers for Samsung USB, Samsung+Microsoft RNDIS, and ADB.

I'm hoping to connect the phone in such a way that it:

  • acts as an IPv4 DHCP client device
  • gets an IP from the router
  • can be connected to using TCP/IP from my PC, like any other LAN device.

Most questions seem to be about the reverse connection (using the phone's connection to bridge a device to the internet) or about tunneling with adb, neither of which are applicable here.

I've got as far as getting Windows to automatically install its RNDIS device/driver when I switch the phone to RNDIS mode, but can't get further. I'm having difficulty finding a way to get this working, and not a lot of documentation about definitive instructions for the process.

If successful, most of my use will probably be SSH from the desktop using sshd on the phone (including SCP which runs over SSH), and perhaps at a later stage, a Samba server on the phone as well (anything but MTP!)

But first I need a working LAN over USB connection, which means directions for both the phone end and the Windows end. I would rather do things natively than with extra packages, if its easy.

  • So you want to create a wireless bridge using your existing home internet connection and wireless router on one end, and your phone and computer on the other end? Feb 23 '18 at 16:53
  • No, not at all. The LAN is wired, as I said. I want to share (bridge) the PC's LAN connection to also be used by the phone, over USB, with the eventual aim for the phone to pick up a DHCP LAN IP and be accessible via SSH or Samba from the PC (not so much to access the internet from the phone, although possible not my main goal). That's built in to both, as both can use RNDIS. But instructions how to do so are hard to find/minimal. No wireless at all is involved.
    – Stilez
    Feb 23 '18 at 17:31
  • "using the phone's connection to bridge a device to the internet" - are you sure that you are not confusing Internet Connection Sharing with Bridges? My knowledge tells me that bridging the two devices (the phone and the NIC) in Windows should work. Feb 23 '18 at 19:17
  • I'm using bridging, in its usual network sense, similar to creating a bridged interface in *nix (via ifconfig/pf), if that clarifies. Meaning that the interface is stacked on the PC so it acts as a virtual switch/hub and both the PC and (via USB+RNDIS) phone "see" themselves as having a bare native wired connection to a LAN Ethernet port, rather than one being explicitly a client of the other, or on a NATed subnet or whatever.
    – Stilez
    Feb 23 '18 at 20:54
  • Have you found a solution? I believe it is not supported on most Android phones (e.g. only the Xperia T3 is listed here), and I don't understand why. I'd be interested in knowing if that features is disappearing or not (i.e. if new phones tend to have it or not). Jun 9 '18 at 16:28

Browse other questions tagged or ask your own question.