6 ms·
Android connects to the phone network using a different type of connection (DUN) to send tethered data. The code to do that is in android here: https://github
by londons_explore 7y ago
Android connects to the phone network using a different type of connection (DUN) to send tethered data.
The code to do that is in android here:
https://github.com/aosp-mirror/platform_frameworks_base/blob/355dbae680994002c48d7a66cb276a65393ecbbb/services/core/java/com/android/server/connectivity/Tethering.java#L1090 https://github.com/aosp-mirror/platform_frameworks_base/blob...
There is a setting you can set to disable it and make the provider treat all traffic as if it is non-tethered.
adb shell settings put global tether_dun_required 0
Considering how knowledgeable the HN crowd is on all things networking, it surprises me to see so much uncertainty on something so easy to check in the code!
- jm_l 7y agoOn AOSP master I believe the new setting is: net.tethering.noprovisioning consumed here: https://android.googlesource.com/platform/frameworks/opt/telephony/+/refs/heads/master/src/java/com/android/internal/telephony/dataconnection/DcTracker.java#1740 https://android.googlesource.com/platform/frameworks/opt/tel...
- JTbane 7y agoFeels good that since I use LineageOS, I can disallow cell providers from blocking me if I tether.
- tinus_hn 7y agoThe provider can see all your traffic. It’s not hard to tell the traffic isn’t coming from a phone, even if you try to be clever.
- wwright 7y agoHow much would something like Wireguard mitigate this?
- simcop2387 7y agoJust about entirely. They could block the VPN or try to say that it's got to be teathered but it's much more difficult for them to say that or back without causing serious issues for customers.
- microcolonel 7y agoAll the traffic would be tunneled, so unless they're using heuristics or ML to determine "phoney" and "desktop/laptopy" timing in the packets, they can't really tell what's going on.
- tinus_hn 7y agoWho knows? It’s still obvious if you look at the traffic patterns, a VPN can’t hide that. But as long as you stay under the radar they might never know. Or you might be booted and blacklisted from the network.
- lone_haxx0r 7y agoIt's not hard to tell, but it's hard to prove. "Hey, your service doesn't work even though I'm sending those packets from my phone. Give me my money back".
- eridius 7y agoThey don't really need to prove it though. You've got a contract with them, and they have reasonable evidence that you're doing something disallowed which would be a defense against claims that they're breaking the contract.
- gargravarr 7y agoAgreed with the comment below, the ball is firmly in your mobile provider's court. The contract will almost certainly state that service can be withdrawn at any time on their sole discretion for any suspected breaches; if you're tethering on a contract that doesn't allow it, they're well within their rights (which you've agreed to by accepting the contract) to block your service until you comply or close your account completely. You have no recourse in this situation according to their T&Cs. They don't need to prove it and they have no obligation to give you your money back, either. Be careful.
- tinus_hn 7y agoThey don’t have to prove it. If they detect it you are a customer they don’t want so they can just tell you to take it or leave it.
- dheera 7y ago> something so easy to check in the code! Except it's Java ... too much bloat to go through.
- nimajneb 7y agoI did something similar to bypass Verizons $5 per month surcharge to tether. I think it was a different variable I set though, not tether_dun_required. I think it was something like don't check if the tether enable bit is 1. I haven't tethered in several years and several Verizon plan types though.
- notyourwork 7y agoVerizon allows don't they?
- inlined 7y agoIirc they did until they got in a bidding war with Google for the RF spectrum. Google bid Pi billion dollars, which pushed the government contract into a net neutrality clause that forced tethering to be free.
- bubblethink 7y agoI think that's only half of the picture. You also need to disable the dun provisioning. If you are building AOSP, it ends up being two patches. And that still leaves TTL or any other deeper inspection methods.
- crispyporkbites 7y agoWhy does it do this?
- lstamour 7y agoBusiness relationships with carriers, and similarity to iOS which disables tethering by carrier settings. Carriers strongly objected to tethering and sometimes still do because they would prefer every device register individually with the carrier on a paying plan. This has changed in subsequent years but carriers did and still do lock down their networks to prevent devices from connecting or billing different devices at different rates. Generally though it’s a profit motive, followed by a network protection measure.
- azernik 7y agoFor the carriers it's not just about wanting to squeeze customers for more revenue (though it is also that). Their networks are often provisioned under the assumption of super bursty traffic, where not all phones will be pulling at throughputs all the time. Laptop users will tend to use high throughput more consistently, and so be bad for their business model on the cost side.
- heyoni 7y agoBut data caps will force users to be mindful or pay exorbitant fees.
- lone_haxx0r 7y agoAnd why does Android have that enabled by default when in 90% cases it's better for the user to have it disabled?
- sporkland 7y agoI imagine it's because the cell providers asked for it. The first 2 or 3 google phones I had let me turn on tethering with no problems despite it not being in my contract and somewhere around the pixel 2 it stopped working. So it seems like an intentional change on their part, and likely one that Apple also enforces. To change the flags mentioned previously you also need root, so it provides quite a speed bump for folks trying to use tethering despite it not being in their contracts.
- tbrock 7y agoNot sure if you realize this but google doesn’t build android for you, it builds it for the carriers so what is in your best interest is not really considered. You aren’t the client.
- inlined 7y agoI don’t think it’s quite that simple. Google builds Androids for users, but the primary retail space is owned by the carriers. There are occasionally a few lines the carrier could tell manufactures (including anyone selling android) not to cross or they won’t sell that phone.
- wut444 7y agoGoogle builds in interest of Google profits. Phone manufacturers alter from there per carrier demands. Phone manufacturers us Android because it's free. It's brilliant on Google's end. Perfect example, is WiFi calling. That was available on Android forever, but only T-Mobile didn't restrict it. ATT and Verizon had it disabled because of how profits are calculated on cell sites. There's a whole per minute, text, and data calculation that shows money flow. T-Mobile allowed WiFi calling way back when because the network was a dwarf to the big carriers. And then apple caught up like normal and acted like they invented it, but don't even get me started on apple.
- est 7y agoReading the related https://danielpocock.com/android-betrays-tethering-data/ https://danielpocock.com/android-betrays-tethering-data/ I am a little confused, this creates a new interface named `rndis0` how does the carrier know it's tethered? Because of the new MAC address?
- bubblethink 7y agoThere's also a separate APN for dun. So tethering traffic goes through the dun APN. And that's just the most basic form of classification that Android does voluntarily. Carriers can additionally do more tricks like the TTL one mentioned.
- foobarbecue 7y agoIt would be nice of you to post this as an answer on the original question.
- inlined 7y agoThe question is locked and cannot be modified.
- ethbro 7y agoAs with all useful StackOverflow questions.
- Noumenon72 7y agoIt's my number one negative experience with the site. I might get an answer downvoted once a year. I see the mod cabal shut down proven useful content several times a week. It's like a politician who insists on doing highly publicized bank bailouts instead of backroom deals. It's not smart to rub it in people's face that you run things and their opinion doesn't matter.