Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,733,899 Members 48,519 Now Online
XDA Developers Android and Mobile Development Forum

WiFi Tethering on Android L!

Tip us?
Senior Member
Thanks Meter 16
Posts: 160
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/

I then run a command in Tasker:

/system/bin/sh /sdcard/
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.
Angel0fDeath's Avatar
Senior Member - OP
Thanks Meter 93
Posts: 199
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
Display Modes


TWRP Now Available for the LG G Watch and Samsung Gear Live

Over the past week or so, we’ve talkedquite a bit about the first … more

Slate Calendar Helps You Organize Your Life

Without calendars in some form or another, most of our lives would be utter chaos. Unless you are … more

Shane Francis to Talk Android, Robotics, and Vision at XDA:DevCon 2014

Our international xda:devcon 14in Manchester, UK on the weekend of … more

LG G Watch Tool is a Toolkit all Owners Need

The LG G Watch is one of the first two devices hitting the market rocking the highly anticipated … more