Post Reply

WiFi Tethering on Android L!

OP Angel0fDeath

17th July 2014, 04:02 AM   |  #11  
Senior Member
Flag Toronto
Thanks Meter: 19
 
168 posts
Join Date:Joined: Sep 2008
More
buraktamturk has discovered a solution to tethering on L:

http://forum.xda-developers.com/show...postcount=3041

Quote:

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)

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

Code:
root@hammerhead:/ # route add default gw 10.64.70.124 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):

Code:
#!/bin/sh
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:

Code:
/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: [ View ]
25th July 2014, 05:23 PM   |  #12  
Angel0fDeath's Avatar
OP Senior Member
Flag Oklahoma City
Thanks Meter: 115
 
210 posts
Join Date:Joined: Aug 2013
More
Quote:
Originally Posted by jaron7_11

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.
19th October 2014, 08:10 PM   |  #13  
michael_ta315's Avatar
Senior Member
Mordor
Thanks Meter: 96
 
186 posts
Join Date:Joined: Oct 2012
More
Quote:
Originally Posted by Angel0fDeath

It hasn't for me.

Well thats fortunate? I cant get it to work on mine. It connects but does not transfer anything.

Weirdly the stock android L tether works for me but it uses my 5gb data..
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Nexus 5 Themes and Apps by ThreadRank