yashsingh1/xdaforums huggingface dataset:
[Nexus 5 Q&A, Help & Troubleshooting] Letitride:
Mrs. L just got her own Nexus 5 in white yesterday & finally got around to edit the settings.db file - with both lines of WiFi & DUN added (after saving the original one & putting it away) - got the Nexus 7 now tethering to it with good speed - using her $30 T-Mo prepaid plan. The detailed steps above my followup post here is excellent & should work perfectly.

But, Grrrrrrrrr - it is NOT working for her rooted iPad2 running iOS 6.x - it just wouldn't connect via the N5's stock WiFi Hotspot App with its preset values, unlike my favorite "Wireless Tether for Root Users" by Muller, Lemons, Buxton on Play Store, For whatever reasons, getting the same error startup messages and I tried all the settings & entries within the app.

Has anyone tried to tether thru USB cable - although I haven't done that in a while traveling on the go, unless overnighting somewhere with absolutely no other broadband access or pricey $$$ options only.

KitKat 4.4 is relatively new & pretty confident developers here on XDA will figure ways to mod the settings along with "Wireless Tether" to make it KitKat friendly & compatible ... and T-Mo won't shut down the loopholes we found here.
[Nexus 5 Q&A, Help & Troubleshooting] mfaina:
Nexus 5 tethering

I have MetroPCS and paid $5 for the WIFi hotspot. CANNOT tether my laptop (MacBook) with USB, WiFi hotspot or BT. I have the WIFi hotspot visible when run diagnostics on it is OK but I cannot connect. Same with BT - it says connection shared but I cannot go on the internet. Did the gimmick with the SIM card, called MetroPCS and they are not blocking it. I tried Foxfi and USB works (so and so) but the hotspot and BT do not.

MetroPCS piggybacks on TMobile that's why I posted here. Anybody here was able to do it WITHOUT routing?

Thanks.
[Nexus 5 Q&A, Help & Troubleshooting] i2cube:
Potential MMS error?

This setting is great! I was able to tether both my Nexus 10 and my laptop. Quick question. There was a post in this thread previously where a user mentioned that s/he was unable to send/receive MMS after altering the settings.db. Anyone has experienced any difficulties with MMS? Or is it fine for most of you?
[Nexus 5 Q&A, Help & Troubleshooting] RussianBear:
No issues.
[Nexus 5 Q&A, Help & Troubleshooting] akmsr:
nexus 5 tethering works on Metropcs without rooting or settings.db hack

first of all let me say i am on metropcs with nexus 5 on 60$ unlimited plan. phone is stock, not even rooted. 60$ unlimited means i am not allowed to tether at all. i have been following this thread and was prepared to root my brand new phone to apply settings.db hack to have tether. its been only three days and so far i have used 3.93 GB of data (3.52 GB of that tethering my laptop). normally i don't gobble like that but i was testing to go beyond any reasonable doubt about supposedly allowed tethering limit of 2.5 GB of t-mobile (i know it does not apply to metropcs but just to be on the safe side). i downloaded small files, large files (1 GB in size) etc. all done on 3G/H connection upto 1.60 mbps down. i do not have LTE at my location.

all was done with the portable hotspot included in kitkat, just a user agent switcher string in firefox.
[Nexus 5 Q&A, Help & Troubleshooting] kayone73:
Thanks, i followed those instructions and it worked perfectly, in fact I'm replying on my tethered tablet right now with my phone in my shirt pocket.
[Nexus 5 Q&A, Help & Troubleshooting] jnbanda:
KitKat 4.4.1 Update Affecting Tether Mod?

anybody know if the changes to the settings.db file will be altered or reversed by allowing the OTA for 4.4.1 to install (for those with stock kernel/stock recovery/root) or manually flashing with a custom recovery? basically i want to know if i'll lose the tether mod by installing 4.4.1.
[Nexus 5 Q&A, Help & Troubleshooting] RussianBear:
Nope, still there!
[Nexus 5 Q&A, Help & Troubleshooting] Letitride:
No changes from flashing the newest 4.4.1 noted by RussianBear already. I tested it with the 4.4 radio and tethered the Nexus 7 just fine, speed seemed to be improved on d/l and u/l as added bonus.

Flashed the newest radio zip file, reboot & checked it again, all is good - 4G LTE speed is a blast, almost smoking our Fios WiFi signal.

I edited & use both lines of "codes" added - as discussed earlier - to the modified settings.db file and then move it back to data/data .... with roote permission set, exit & reboot for good measures.

As always, backup & save your work and originals - and wipe it down first, it is slower but be patient, less to no trouble later on.
[Nexus 5 Q&A, Help & Troubleshooting] tonyp:
Headsup: I didn't look deeper into the issue as it doesn't affect me, just thought I'd drop some ideas which might help to make the process of manually editing the sqlite db simpler :fingers-crossed:

I'm not sure if this works in the tethering context, but you could try to insert the value via adb:

adb shell content insert --uri content://settings/global --bind name:s:tether_dun_required --bind value:i:0

Or open a terminal emulator and execute that line (without the adb shell part).

Edit: confirmed working!

Edit2: I've changed system to global in the above command. It doesn't really matter as both places will be correctly read, but global is the correct one according to the doc.

As an alternative one could easily create a flashable zip which adds the dun line.

See here for instructions:

http://xdaforums.com/showthread.php?t=1621602

(it's probably best to ship the sqlite binary within the flashable zip and reference it as stock ROMs don't have it included)
[Nexus 5 Q&A, Help & Troubleshooting] goose71:
That looks exactly like the tweet from [MENTION=4913923]theKos[/MENTION]: "adb shell content insert --uri content://settings/global --bind name:s:tether_dun_required --bind value:i:0" for tethering (android 4.4)

Did anybody figure out if it's something usable?
[Nexus 5 Q&A, Help & Troubleshooting] nibrwr:
It works. (4.4.1)
[Nexus 5 Q&A, Help & Troubleshooting] belair56:
+ 1 adb shell commands worked like a charm.

STK 4.4.1
[Nexus 5 Q&A, Help & Troubleshooting] jsharper:
And it works without root! Sweet! I have tethering back! Thanks everyone who contributed to this solution/workaround!

Now IMO the holy grail is to put it back to use DUN for tethering, but change the APN for the DUN from pcweb.t-mobile.com to fast.t-mobile.com so the tethered devices get their own connection with ipv4, and the host device can stay in ipv6 only mode.
[Nexus 5 Q&A, Help & Troubleshooting] testinguser:
Confirmed this works for tethering on sprint Nexus 5 without needing root. Awesome!! Wondering if this would work on Samsung S4?
[Nexus 5 Q&A, Help & Troubleshooting] Jniede:
Thank you so much for the step by step walk through. Have not done it yet since I'm at work but I can't wait to try this at home.
[Nexus 5 Q&A, Help & Troubleshooting] abmone:
Was thinking that would a flashable zip would be awesome for some of us average users
[Nexus 5 Q&A, Help & Troubleshooting] akmsr:
could you guys please write the adb command exactly in a quote for a noob with out root. i am seeing differences between two commands thats posted so far. one has the word 'global' the other does not.

thanks.
[Nexus 5 Q&A, Help & Troubleshooting] shaklee3:
I'm getting limited or no connectivity on 4.4.1. Anyone else have luck?
[Nexus 5 Q&A, Help & Troubleshooting] jsharper:
Is your main data APN still set to IPv6?
[Nexus 5 Q&A, Help & Troubleshooting] wintrxtrem:
I flashed official CM 11 yesterday and tethering worked without modification. I'm on a Sprint SERO plan.

I haven't tried this mod, though PDANet also works on stock.
[Nexus 5 Q&A, Help & Troubleshooting] jakiah:
Its in global that you need to add the entry so i would guess it's that one that you need.
[Nexus 5 Q&A, Help & Troubleshooting] shaklee3:
IPV4
[Nexus 5 Q&A, Help & Troubleshooting] axtn95:
There are two ipv options in the APN, both need to be set to IPv4? Right?

Just verifying

ALSO, anybody know if this works across any device on T-mobile?
[Nexus 5 Q&A, Help & Troubleshooting] Crios:
Tether JB & KITKAT - NO ROOT !!

Hi all,

I try the following command from ADB shell without ROOT:

settings put global tether_dun_required 0

I tested this solution with success on JB (Galaxy Nexus) and KITKAT (Nexus 4 & 5).

tell me if this solution works on your devices.

Bye.
[Nexus 5 Q&A, Help & Troubleshooting] ad78:
now its not working on 4.4.2 damn!
[Nexus 5 Q&A, Help & Troubleshooting] RussianBear:
What isn't? Everything works fine here.
[Nexus 5 Q&A, Help & Troubleshooting] ad78:
something weird happening. it doesnt work on Chrome browser but on safari i can browse. i already uninstalled Chrome still the same issue

iTunes Cloud, Dropbox, Jump Desktop etc all works except Chrome browser
[Nexus 5 Q&A, Help & Troubleshooting] akmsr:
are you using a user agent switcher?
[Nexus 5 Q&A, Help & Troubleshooting] ad78:
the only extensions i have are mighty text and adblock plus..
[Nexus 5 Q&A, Help & Troubleshooting] RussianBear:
I'm using vpn. They can still tell if you're tethering without one (you can get by with agent switcher). Before they were able to tell if you have tethering enabled no matter what you did.
[Nexus 5 Q&A, Help & Troubleshooting] ad78:
thanks dude! im typing now on chrome! i installed agent switcher and change it to safari and now all works!
[Nexus 5 Q&A, Help & Troubleshooting] waxlabo:
awesome, this worked for me :)
[Nexus 5 Q&A, Help & Troubleshooting] axtn95:
This method worked partially for me. When I first tried it, it worked without a hitch.

But then next day with the laptop it brought up the offers screen.

Installing User Agent Switch on Chrome and setting to Safari circumvented it.
[Nexus 5 Q&A, Help & Troubleshooting] muyoso:
Change the user agent of the browser on the laptop and it should work fine. There are extensions for every browser pretty much that make this easy to accomplish in a couple mouse clicks.
[Nexus 5 Q&A, Help & Troubleshooting] acc3d:
After running the ADB command and rebooting (my Nexus 5 is running stock rooted 4.4.2), I'm able to tether to my Nexus 10 and don't see the T-Mobile login portal, but web traffic doesn't seem to work. Hangouts chats are coming through, and some apps seem to be connected (Twitter refreshed, Play Store was able to download updates, etc).

I also tried installing Firefox on the N10 and used a user agent modifying add-on, but that still won't work.

I'm using the $30 T-Mobile prepaid plan with 5GB at 4G speed. I would understand them limiting my tethering if I was using a ton of data, but I only use less than 1GB per month. I just want to tether my tablet for occasional browsing, etc. This is so annoying.
[Nexus 5 Q&A, Help & Troubleshooting] n1gh7m4r3:
Is your apn set to ip4?
[Nexus 5 Q&A, Help & Troubleshooting] fintheman:
Will try that - I can't root my device for corporate email reasons :(
[Nexus 5 Q&A, Help & Troubleshooting] GBP85:
I ran into this yesterday as I was trying to Ingress. I didn't have my IP settings to IP4. After that switch, everything was snappy and fully functional.

---------- Post added at 11:19 AM ---------- Previous post was at 11:18 AM ----------
[Nexus 5 Q&A, Help & Troubleshooting] GBP85:
Is there a way to backup these settings? I run nightly ROMs and I am able to backup items in the system folder using scripts in the /system/addon.d folder.

Or is there a way to configure Tasker for this?

Thanks,
[Nexus 5 Q&A, Help & Troubleshooting] zeppelin101:
Guys, I have T-Mobile and the Nexus 5, running stock 4.2.2 (rooted, with bootloader unlocked) and I can create a wifi hotspot and use it with no problems. I connected to the hotspot with my Nexus 7 and I got no re-directs. Is this normal? I'm not sure if I should even modify the database file. :confused:
[Nexus 5 Q&A, Help & Troubleshooting] RussianBear:
Do you have any kind of tethering built into your plan? If you do, then it will work until you run out.
[Nexus 5 Q&A, Help & Troubleshooting] axtn95:
Yup :) Thats what was written on the bottom of my post :)

Just interesting how the one method worked for a bit then they caught that too, and the second step (user agent) was required.

I never had lasting success using one of the methods, had to combine both!
[Nexus 5 Q&A, Help & Troubleshooting] Letitride:
As noted already by RussianBear, good for you - as some T-Mo plan (grandfathered ones ?) might have included tethering with a cap.

If it ain't broke, don't change to fix it. Just leave it alone - if and when you hit the redirect or upsell webpage. I have an old T-Mo PAYG prepaid line by the minutes & no data, and when I put the micro Sim in the N5, I get the message to change plan and/or add data, etc. Is your APN set to IPV6 or IPV4 by default?

Both of our N5 running rooted 4.2.2 stock rom & kernel will connect but no connectivity when the WiFi Hotspot is enabled - leaving it on IPV6 won't work either. But, editing the settings.db file from within Global/Data plus setting to IPV4 would get WiFi tethering functional and no redirect or warnings, etc. from T-Mobile. Great speed too on 4G LTE and even when restricted to 3G only.
[Nexus 5 Q&A, Help & Troubleshooting] rcauvin:
I don't understand this issue that some of you are experiencing with the user agent.

I installed the fix on my rooted Nexus 5 over a month ago and haven't seen the dreaded T-Mobile log-in screen since then. Last night, I updated from Android 4.4 to Android 4.4.2 OTA (losing root in the process) and it appears the fix remained. I'm writing this message in my Chrome browser on my Windows laptop, connected to the hotspot on my Nexus 5 phone. Web pages are also loading fine on my Firefox browser. I've also been using my Nexus 7 connected to the Nexus 5 phone. Everything is working smoothly so far. I'm not using any user agent switchers and no VPN or proxies.

I have the $30 per month, 5 GB data, 100 minutes, pre-paid plan with T-Mobile.
[Nexus 5 Q&A, Help & Troubleshooting] jenenser83:
Must be rooted do this for unlimited tethering:

1. Install terminal app

Su

Settings put global tether_dun_required 0

Change: APN protocol ipv4

APN roaming protocol ipv6

Reboot.

Enjoy tethering.
[Nexus 5 Q&A, Help & Troubleshooting] *child:
I know you guys already have a few ways to add tether_dun_required = 0 to settings.db, but I just thought I'd make a flashable zip for those that want it. All credit goes to yakman66. If you are going to thank this post, please thank his first.

To install, download the installer ZIP to your device, flash from recovery and reboot. An uninstaller is also available.

For more information, see GitHub.

Downloads:

1.0 Installer

1.0 uninstaller

Let me know how it goes.
[Nexus 5 Q&A, Help & Troubleshooting] teddat:
thank you!
[Nexus 5 Q&A, Help & Troubleshooting] Leecrow:
thanks
[Nexus 5 Q&A, Help & Troubleshooting] :
This worked for me without root.
[Nexus 5 Q&A, Help & Troubleshooting] rcauvin:
How did you run ADB shell? From your PC, attached via USB? Is there a way of successfully running this command from the phone itself, without root?

(I spent about 30 minutes on Google searches and trying out a couple of terminal emulator Android apps, and I wasn't able to find anything that successfully executed the command.)
[Nexus 5 Q&A, Help & Troubleshooting] unknown1205:
just tried it on my rooted phone but didnt need to use root and it works. the $ sign proves it. did it on my computer but you can prolly doit in terminal emulator on the device.
[Nexus 5 Q&A, Help & Troubleshooting] rcauvin:
It worked from my computer as well, but not from the two terminal emulators I tried on my Nexus 5. I tried Android Terminal Emulator by Jack Palevich and Shell Terminal Emulator by MobilDev. They both gave me error messages about accessing the resource.

While I have the Android SDK and appropriate USB drivers installed on my computer, not all people want to go through that rigmarole. A solution that works using just the device in question - without root or custom installs - would be ideal.
[Nexus 5 Q&A, Help & Troubleshooting] axtn95:
I think it has to do with the plan you are on. I'm on the completely unlimited internet, they get a bit more aggressive on tethering blocks when you are on this plan, if I'm not wrong.
[Nexus 5 Q&A, Help & Troubleshooting] TewFast:
This is the easiest method by far. Thanks.
[Nexus 5 Q&A, Help & Troubleshooting] Piero88:
I'm sorry guys I just did this on my Nexus 5, (the adb shell command without root,) and apparently right now I can only go on Facebook or Google with my computer browser and nothing else..

---------- Post added at 12:57 AM ---------- Previous post was at 12:51 AM ----------

Or is there a way I can undo this? I'm panicking right now lol

---------- Post added at 01:07 AM ---------- Previous post was at 12:57 AM ----------

And also USB tethering doesn't seem to work anymore. Just wifi hotshot with the usage limited to Facebook and Google, no other websites work.. Really weird..
[Nexus 5 Q&A, Help & Troubleshooting] Ok_Kaleidoscope5109:
This belongs in the OP.
[Nexus 5 Q&A, Help & Troubleshooting] galaxys:
+1
[Nexus 5 Q&A, Help & Troubleshooting] freshlysqueezed:
Android terminal emulator worked fine for me. (I asked for superuser access first, su). Sprint is my carrier.
[Nexus 5 Q&A, Help & Troubleshooting] Piero88:
What's the reverse command line to put it back like it was?
[Nexus 5 Q&A, Help & Troubleshooting] nibrwr:
Change 0 to 1
[Nexus 5 Q&A, Help & Troubleshooting] rcauvin:
You ran an Android terminal emulator app on your phone? Not from your PC? Are you rooted?

I just tried again using Android Terminal Emulator by Jack Palevich. I executed "su" first, and I still got an exception.

Again, the simplest solution would be one that doesn't require root or custom installations, and that doesn't require issuing commands from a PC.
[Nexus 5 Q&A, Help & Troubleshooting] DaveB666:
I got my shiny new Nexus 5 yesterday but I'm on the 'Three' network (UK) not T-Mobile. I use my phone for Linux torrenting and my previous phone (Samsung Galaxy Nexus) worked perfectly.

Using the same app, Kickass.to, I get a SIM002 error from Three saying I shouldn't be using my phone for tethering - but I'm not!

I've tried making the change noted in this thread but it's made no difference. Any ideas?
[Nexus 5 Q&A, Help & Troubleshooting] freshlysqueezed:
Yes, it worked, no errors. I am running the latest cataclysm ROM with Franco kernel. I tethered my nexus 10 after I rebooted the nexus 5. I used the built in native tethering from settings.
[Nexus 5 Q&A, Help & Troubleshooting] *child:
As long as I'm credited, feel free to add my post to the OP.

You can use my uninstaller.
[Nexus 5 Q&A, Help & Troubleshooting] rcauvin:
Thanks, but were you rooted? Pardon my ignorance, but can you install custom ROMs and kernels without root?

Either way, again, the goal is to simplify things so people don't have to root, don't have to install custom ROMs and kernels, and don't have to use a PC to perform this fix. You succeeded in the latter, but it appears you didn't satisfy the first two criteria.
[Nexus 5 Q&A, Help & Troubleshooting] h20wakebum:
I did this but now when i try using it as a hotspot i just get the tmobile upsell page.

any thoughts?

View attachment 2462325
[Nexus 5 Q&A, Help & Troubleshooting] freshlysqueezed:
rcauvin,

Sorry my bad. Its so hard to keep up with all the xda posts on my 4 devices. I didn't read your requirements, carefully. Yes, all my devices are rooted.
[Nexus 5 Q&A, Help & Troubleshooting] TewFast:
Other than the standard answer below I do not have any additional help.

1. Reboot after changes to the system file.

2. Change APN to IPv4

3. Make sure the browser you are using is set for something other than desktop. Modify the User Agent. You can find extensions that will do this for you.

You can even simulate the Nexus 5 with the following User Agent Settings.

Mozilla/5.0 (Linux; Android 4.4; Nexus 5 Build/KRT16M) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36

Just search for User Agent to find out more.
[Nexus 5 Q&A, Help & Troubleshooting] klone96:
Correct me if I'm wrong but will this .zip work on stock rooted 4.4.2 unlimited everything on T-Mobile network? On my GNexus I tethered with no problem bit now I can't and its annoying.
[Nexus 5 Q&A, Help & Troubleshooting] GBP85:
It should work on any ROM. All this zip does is change two settings on your phone. Flash and enjoy.
[Nexus 5 Q&A, Help & Troubleshooting] ajpatel:
If I flash CM nightlies, will I have to do this edit each time I flash a new nightly?
[Nexus 5 Q&A, Help & Troubleshooting] abmone:
The settings stayed for me after flashing cm but unfortunately I still get the redirect.

Tmo $30 plan FYI. I really wonder why we have half success and half fails?
[Nexus 5 Q&A, Help & Troubleshooting] RussianBear:
You still have to "hide"your data. Either thru a vpn or user agent.
[Nexus 5 Q&A, Help & Troubleshooting] klone96:
How do u do that? Hide VPN/Agent?
[Nexus 5 Q&A, Help & Troubleshooting] dimebagdan65:
Explanation here... Fix is coming https://plus.google.com/101108577859647659705/posts/jEfib2rZaXm
[Nexus 5 Q&A, Help & Troubleshooting] rcauvin:
No, not necessarily.

As I wrote earlier in this thread, I installed the fix on my rooted Nexus 5 over a month ago and haven't seen the dreaded T-Mobile log-in screen since then. I documented the procedure I followed here:

https://docs.google.com/document/d/1Wso8Cb3rU0DApFe2lg5RcMrelAEoYY-fZ4MAghnIuqs/edit?usp=sharing

I have the same T-Mobile $30 per month pre-paid plan as h20wakebum and abmone.

I've been using the phone as a hotspot and connecting to it from my Windows laptop and Nexus 7. All of the Internet activities on those devices are working fine, with no user agent switching or VPN.
[Nexus 5 Q&A, Help & Troubleshooting] movielover76:
Think this is a placebo

the settings global stuff doesn't seem to actually work on an account that doesn't allow tethering. My APN is also set to IPv4 and I'm rooted on otherwise stock nexus5

Prepaid and Postpaid T-mobile now provide some tethering included, I think at best this hides the data and T-mobile might not count it against your tethering allotment.

I'm on MetroPCS using the T-mobile network, $60 unlimited unthrottled plan and the fix does absolutely nothing for me.

Devices connect, but cannot access the network. I tested by connecting my work android phone to the mobile hotspot. figuring that would resolve any user agent issues during testing.
[Nexus 5 Q&A, Help & Troubleshooting] klone96:
Following this procedure should fix the issue for stock tethering under 'Wireless&Networks' right? No need for 3rd party apps?

Update.

** I followed the steps and the only thing I get when WiFi/USB tether on my laptop is Facebook/Google. Could it be bcuz I have the .Zip installed and also used the above settings?
[Nexus 5 Q&A, Help & Troubleshooting] rcauvin:
Hard to say. There are a few variables here, including:

1. You have CM installed, right?

2. What is your plan under T-Mobile?

I wonder if CM even uses the same flag (tether_dun_required). Not sure how that works.

When I was running stock Android 4.4, I applied the fix. I accepted an OTA 4.4.2 updated a couple of weeks ago and lost root. Hotspot has been working for me perfectly, both before and after the 4.4.2 update.
[Nexus 5 Q&A, Help & Troubleshooting] nibrwr:
CM doesn't have the same flag; tethering works out of the box. (Disclaimer: Sprint user)
[Nexus 5 Q&A, Help & Troubleshooting] klone96:
No CM I'm on stock 4.4.2/Rooted and I installed the .Zip/used SQLite and can't get USB/WiFi tether with stock tether.. Should I try using a 3rd part app such as FoxFi?
[Nexus 5 Q&A, Help & Troubleshooting] cthip:
I can verify that this method (the "no-root" method) using ADB at the bottom of the google doc works on the T-Mobile $30 plan. I should also note that it triggers the "Mobile Hotspot Usage" counter as well. Unsure as to whether this will have any ramifications on cost or throttling. I use tethering only very sparingly in case of travels or if my home ISP goes down.