How to use USB connection for Internet from a PC to a cellphone?

The answer may not work on your phone. The following worked on my phone

My phone was Google Nexus 6P running factory standard Android 8.x Oreo

This process is called USB reverse tethering. Not all phones support it. Some Android phones have to be rooted for this to work. There are some guides in the links below.

  1. https://forum.xda-developers.com/showthread.php?t=2287494
  2. https://www.howtogeek.com/214375/how-to-reverse-tether-an-android-smartphone-or-tablet-to-your-pc/

    You may need an app on your phone. I didn't need it.

  3. https://medium.com/genymobile/gnirehtet-reverse-tethering-android-2afacdbdaec7

My phone is not rooted. This is what I did:

First, find the MAC address of the USB port you will use

Connect your phone to your PC using an USB cable.

  1. Turn USB tethering on in your phone. This will use your phone's mobile data to connect the PC to the Internet. This is not what we want, but this will give us the device address we will use later.
  2. Open the Network Manager edit window from the Network icon on the top right corner.
  3. Highlight the USB connection. It may be called Ethernet Connection 1 or Ethernet Connection 2.
  4. Click on the Edit button and go to the Ethernet tab.
  5. Copy the information in the Device field: enter image description here

  6. Press cancel button to get out of the Network Edit menu. Do not close the Network Connections window yet.

  7. In your phone turn off USB tethering.

Second, setup a new network connection

  1. Click Add in network connections:

    enter image description here

  2. Give the new connection a new name if you want.

  3. Go to the Ethernet tab and paste the device information you copied.

  4. Go to the IPv4 Settings tab and select Shared to other computers: enter image description here

  5. Save and close network connection windows.

Third, Test with your phone

  1. In your phone, turn off mobile data, and WiFi while connected by USB to the PC.
  2. Surf the web and use other Internet connected apps.

It looks like the USB port gets a random Ethernet MAC address every time it is plugged in. If this is the case, you will have to first find the MAC address and then edit the saved settings every time you want to do this.

Hope this helps