The EXACT way to tether with Android on Linux / Ubuntu
Make sure to stop Vmware
service vmware stop
if you want to use your wifi (i.e. use your phone as a wireless adapter), after connecting then you can connect to your wifi network.
If you can’t ping be sure to adjust TTL
Also don’t forget to check your default route.
Simply route del default will fix most problems.
No need to put any usb configuration in /etc/network/interfaces file.
Execute dmesg command and check for any errors:
[ 460.096267] rndis_host 7-1:1.0 enx0257676d6033: renamed from usb0
# ping 18.104.22.168
Disable Vmware from startup (interferes with tethering)
# update-rc.d vmware disable
# update-rc.d vmware-USBArbitrator disable
# ifconfig enx0257676d6033 up
service stop vmware-USBArbitrator
iface enx0257676d6033 inet dhcp
#route add default enx0257676d6033
# /etc/init.d/networking restart
The correct answer to any MTP questions is “ALLOW”.
Default for USB connection (i.e. Charging, Transfer Media Files, etc) is best left at Transfer Media Files. The phone will still charge albeit slowly.
For Fault-Tolerance/High Availability be sure to enable options to automatic switch between WiFi and cell network in Developer options.