I have Ubuntu 16.04 on my PC.
Is there a way to create a wired connection between my PC and smartphone so the smartphone can be connected to internet via the PC?
I have Ubuntu 16.04 on my PC.
Is there a way to create a wired connection between my PC and smartphone so the smartphone can be connected to internet via the PC?
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.
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.
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.
Ethernet Connection 1
orEthernet Connection 2
.Copy the information in the Device field:
Press cancel button to get out of the Network Edit menu. Do not close the Network Connections window yet.
Second, setup a new network connection
Click Add in network connections:
Give the new connection a new name if you want.
Go to the Ethernet tab and paste the device information you copied.
Go to the IPv4 Settings tab and select Shared to other computers:
Save and close network connection windows.
Third, Test with your phone
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
Gnirehtet
I've found this tool to work out of the box.
The name is "tethering" in reverse, see what they did there.
Usage is pretty simple:
adb
.One tiny caveat is that Android sees the tethered connection as "not wifi", so that if you've configured some apps to only do certain things on wifi (to save on data), you may need to adjust those settings.