0

sometimes I have to connect my Nexus 5 to a WiFi network only to share some files with other devices, but this network does not have Internet access. I would like to use 3G for data connection while the phone is connected. Obviously I have root access. Is there any way to achieve this? (Not necessary a simple way)

1 Answers1

0

My phone isn't rooted and I don't have a shell installed on it to test, but off the top of my head maybe this could help?

route -n - determine what routes are available

route add default gw <<ip address>> - replace with the gateway's IP address that you want to be the default. Make sure to run this command as root or with sudo.

I'm not familiar with Android shell access or the internals of how Android manages its networking. For all I know, the entire 3G Internet connection may shut down by default when you are on wifi. If all else fails, you could also consider a "mobile hotspot" app for your phone, and have the devices connect to you (as a bonus, they would have Internet access too).

More information on viewing default gateway with route command

Community
  • 1
  • 1