5,814,981 Members 40,183 Now Online
XDA Developers Android and Mobile Development Forum

WiFi Tethering on Android L!

Tip us?
Senior Member
Thanks Meter 19
Posts: 167
Join Date: Sep 2008
Location: Toronto
buraktamturk has discovered a solution to tethering on L:


Lightbulb Tethering Fix
Here is solution for tethering (both usb and wireless).

Tether just as usual. Then disable tethering and re-enable it. (this step is important otherwise dhcp server is not started)
After doing that both your phone and computer will not connect internet, because of invalid routing table. (internal bug from l preview)

just connect to the phone shell with 'adb shell', or terminal software on android (connectbot or android terminal emulator will fine)

shell@hammerhead:/ $ su
root@hammerhead:/ # ip route | grep rmnet0 | grep link dev rmnet0 proto kernel scope link src
Note the gateway here (, and set this default gateway. (and yes, my provider gives me nat'ed private ip addresses)

root@hammerhead:/ # route add default gw dev rmnet0
Enjoy the tethering!

Note your phone must be rooted otherwise you will not able to pass beyond 'su' command.
I packaged up the following in a sh script that gets run with Tasker when enabling tethering (I use it for my Nexus 7 in my car):

ip=$(ip route | grep mnet0 | grep link | sed 's/.*src //')
route add default gw ${ip} dev rmnet0
I saved the above in /sdcard/gateway.sh

I then run a command in Tasker:

/system/bin/sh /sdcard/gateway.sh
I "think" this is working. Since I ran it manually, the IP is now stored in the routing table. If the IP switches and tethering suddenly stops working, ill know it's not functioning anymore and will tweak the script.
The Following User Says Thank You to r3ferrei For This Useful Post: [ Click to Expand ]
Angel0fDeath's Avatar
Senior Member - OP
Thanks Meter 112
Posts: 203
Join Date: Aug 2013
Location: Oklahoma City
Originally Posted by jaron7_11 View Post
Working for me... One more q do you know if this counts data.. Meaning towards the 5gb teather on the plan

Sent from my Nexus 5 using XDA Free mobile app
It hasn't for me.
Hit the thanks button if I helped

Phone: LG Google Nexus 5 (32 GB)
Rom: Nexus 5 Experience Roml
Tablet: Rooted Amazon Kindle Fire HDX 7"

"I'd rather be hated for who I am than loved for who I am not." ~ Kurt Cobain
“You laugh at me because I am different; I laugh because you are all the same.” ~ Daniel Knode
”Nothing is impossible, the word itself says ‘I’m possible’!” ~Audrey Hepburn
"I don't insult, I diagnose."
Device Timeline:
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes