troubleshooting wifi tethering hotspot failure - General Questions and Answers

I am trying and failing to get wifi tethering to work. I am using a Nokia 6.1 running android v9 on AT&T in the US.
I go through settings to the wifi hotspot page, toggle off to on, and nothing happens.
If I leave the wifi hotspot page and return to it, the toggle is off again (I expect it to remain on). I never see the hotspot network name on my other wifi devices (I expect to be able to see and connect to the network).
I have seen some pages about APN settings being the problem, especially missing dun from apntype. I have tried a few different ones, without effect. My current apntype=default,mms,supl,dun.
I have looked at `adb logcat` while enabling the hotspot. There is nothing obvious in the log about the connection failing. I'm not sure what I'd be looking for, though.
Tethering did work on my previous phone (Moto G5) on AT&T on the same plan and in the same place. I don't have access to that phone now, though, to test what else might have changed.
How can I troubleshoot this issue and get wifi tethering working?

androidapollo said:
How can I troubleshoot this issue and get wifi tethering working?
Click to expand...
Click to collapse
You can try adb shell ip a sh command.
From the output you have to see youre WIFI interfase with the assigned IP.
For example on my phone, with hotspot activated the output is:
Code:
....
36: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 3000
link/ether 80:72:c0:f0:82:ac brd ff:ff:ff:ff:ff:ff
inet 192.168.43.74/24 brd 192.168.43.255 scope global wlan0
valid_lft forever preferred_lft forever
inet6 fe80::2282:c0ff:fef0:72ac/64 scope link
valid_lft forever preferred_lft forever
...

Related

Default communication for IP

After I recently installed Pocketping 1.6, I noticed that even after I enabled WiFi on my Fuze, the IP address of my phone was not given from my local network. It was still based off of my 3G connection.
Question is, is there a way to change settings so that if I enable WiFi it will use that over the 3G without having to disable my Data Connection?
TIA -- and if this is in another thread, please point me in the right direction

Wifi issue - constant reconnection

Hi,
It seems that my 1S have a wifi issue.
I can successfully connect to a wifi network, but every 2-3 sec signal is lost, then the wifi icon in the status bar disappears, then it reappears and reconnect and so on.
I am running an unlocked german tmobile (from ebay), SW version 1.77.111.5
Is someone else having the same issue?
I dont have a device which is in that connect-disconnect loop, but it does not hold onto the Wifi signal, it seems to want to fall back to using 3G/HSDPA if it can, and only after a few mins of data on the 3G/HSDPA connection does it attempt to connect to Wifi.
Does you Wifi AP broadcast its SSID? Are there many devices on the same Wifi channel as the one you are using? Use Wifi-Analyser to find out.
pzboyz said:
I dont have a device which is in that connect-disconnect loop, but it does not hold onto the Wifi signal, it seems to want to fall back to using 3G/HSDPA if it can, and only after a few mins of data on the 3G/HSDPA connection does it attempt to connect to Wifi.
Does you Wifi AP broadcast its SSID? Are there many devices on the same Wifi channel as the one you are using? Use Wifi-Analyser to find out.
Click to expand...
Click to collapse
yes the ap broadcasts its SSID
As for WIFI channel, I'll check it out
Yea I get problem at work I think its more of a router issue cause at my house it stays connected to my WiFi all day
Sent from my HTC VLE_U using XDA
jguedj said:
Hi,
It seems that my 1S have a wifi issue.
I can successfully connect to a wifi network, but every 2-3 sec signal is lost, then the wifi icon in the status bar disappears, then it reappears and reconnect and so on.
I am running an unlocked german tmobile (from ebay), SW version 1.77.111.5
Is someone else having the same issue?
Click to expand...
Click to collapse
I'm having same issue - anyone found a solution.
It is really annoying, as quite often when I go to refresh email/facebook/twitter/ etc its says cannot update (or whatever app error), but if I wait a few moments again, it works. Really annoying when playing Draw Something, as it interrupts the game!
Any ideas - is it phone, or is it something on my router??
M
I was having this exact same issue. I went into settings, Wi-Fi, Menu, Advanced, and checked the "Best Wi-Fi performance" option and ever since I have had no problems.
jguedj said:
Hi,
It seems that my 1S have a wifi issue.
I can successfully connect to a wifi network, but every 2-3 sec signal is lost, then the wifi icon in the status bar disappears, then it reappears and reconnect and so on.
I am running an unlocked german tmobile (from ebay), SW version 1.77.111.5
Is someone else having the same issue?
Click to expand...
Click to collapse
Ok i think i had the same issue and i read in some threads around and you can try this:
1 - Connect to your wireless network but in settings disable DHCP and assign an manual IP (and you can disable the "best WiFi performance" because it drain lots of battery.
2 - Take out the SIM cover and pull up with care the contact pins for better connection with cover
Now i have a strong wifi signal without drops, before this i was thinking in return back my 1S but not now.
Sorry my bad English
If i help hit the "Thanks"
MRKikas said:
Ok i think i had the same issue and i read in some threads around and you can try this:
1 - Connect to your wireless network but in settings disable DHCP and assign an manual IP (and you can disable the "best WiFi performance" because it drain lots of battery.
2 - Take out the SIM cover and pull up with care the contact pins for better connection with cover
Now i have a strong wifi signal without drops, before this i was thinking in return back my 1S but not now.
Sorry my bad English
If i help hit the "Thanks"
Click to expand...
Click to collapse
Cannot find manual settings for ip. Please can someone direct me...
Sent from my HTC One S using XDA
Android_Mark said:
Cannot find manual settings for ip. Please can someone direct me...
Sent from my HTC One S using XDA
Click to expand...
Click to collapse
First select "forget Network " then select your Network again, then bellow the password field select the manual configuration...
Sent from my HTC One S using xda premium
MRKikas said:
First select "forget Network " then select your Network again, then bellow the password field select the manual configuration...
Click to expand...
Click to collapse
I decided to attempt this manual configuration as well...and it works great! Very fast login, and my network speed even seems quicker (although it probably isn't, but who knows)?
But I had a few problems along the way, but managed to fix them. Here is what you need to do:
First, before you do this, you need to use any network info app to see what your wifi router gateway is. You can pick an IP number based on that number... [Also, while it is unlikely anyone did this, you should confirm that the router doesn't do any MAC filtering (this just means the router will only connect with specific devices based on their wifi radio unique ID number... it's a overzealous way to prevent someone hacking your router and it prevents any non-authorized device from associating with it).]
Once you get that info, change the setting under wifi connect from DHCP to "Static", and below this, enter the gateway and a IP number based on your gateway... Most routers have NAT configurations that allow ~100 or 255 devices, like 192.68.X.2 thru 192.68.X.255 (or 10.1.X.2 thru 10.1.X.255) where the IP number where X=1 is typically the gateway. So just pick a number where the last number is between ~10 and 50 (just in case your router hasn't allotted the full 255 addresses). This is a good range to choose from because if your router has DHCP on (which is typical), your household probably does not have more than 10 or 11 devices connected at any given time....so you are picking an IP address at the end of this range.... So for instance, if your gateway is 192.68.1.1, pick a static IP address of 192.68.1.11 or 192.68.1.15.
Below this enter "24" for Network Prefix Length.
Below this, it has boxes for DNS servers. I ran into some problems here. I figured that since my wireless router has DNS servers already configured in its settings, I could skip this (it lets you hit connect without entering then). You can try this, and it may work (depending on your router/setup), but when I left them blank, I noticed frequent reconnections and no signal really at all.
In my case I had to enter DNS server addresses. I already had purchased an app called "Set DNS Pro" (there is a free version though) so I used that to select publicly available DNS servers. If you don't want to use the app, you can enter Google's DNS servers, 8.8.8.8 and 8.8.4.4, or check with your ISP to use theirs (which they prefer because it is easier to keep track of or control your web browsing).
So my takeaway from this was that if you do not enter DNS, you might have problems.
Sent from my HTC One-S (rooted), stock ROM

[Q] How to change MTU for 2G networks?

I usually use WiFi or 2G. I noticed some sites don't load fully or stalls forever. So I wanted to change the mtu just like I did in my PC.
With wifi it is easy. "1460" >> sys/class/net/wlan0/mtu and an startup script to change it every time! It worked great.
It is easy to figure out wlan0 is for WiFi, one of them in the "net" directory. The thing is I can't get figure what is the interface for 2G network.
So what is it or is there another way?
Am I asking it in the wrong section?

Tethering w/T-Mobile & EasyTether now counted as tethering (SIM1/SIM2 issue or DPI)?

Tethering w/T-Mobile & EasyTether now counted as tethering (SIM1/SIM2 issue or DPI)?
Hi Everyone,
Been using my OP6 and loving it on TMobile. I noticed, as with other unlocked phones, tethering with EasyTether USB does not get detected as tethering...until today. For example, last month I had 0.0GB Tethering and did occasionally tether with Easy Tether.
My cable modem was acting up today and I switched to Easy Tether to do a WebEx video call (and forgot about it)...and happened to check and they counted 1.1 GB of tethering in 4 hours -- ouch!
The only change was I switched the SIM card to SIM slot 1 a few days ago, as it had been in SIM 2 because of some VM clearing issue I read about.
I am wondering if they detected tethering in because of SIM1 vs. SIM2, or did deep packet inspection and picked something up?
BTW...I also noticed today that tethering was slower than it usually was...not throughput which is usually 70-80Gbits around here, but more latency (like they were monitoring something).
Has anyone gotten WiFi Tether Router working on this phone? Any other thoughts?
BTW -- I did switch back to SIM2 because my VM's have not been getting erased since using SIM1. Also rooted on OOS 5.1.9 if that matters.
I also have a 3 year VPN subscription so I can avoid DPI but it's a hassle...
MW
How are you using it? Without a vpn or with a vpn? Because I have read Sprint and T-Mobile are really looking at vpn usage, And T-mobile has been warning people and Sprint counting as hotspot. I personally on my own if no one knows about this would run it over a https tunnel, then your vpn is hidden the software is called stunnel. Many vpn providers use stunnel now, you just have to enable it.
Just noticed it has been awhile since they were last on here.
155424 said:
How are you using it? Without a vpn or with a vpn? Because I have read Sprint and T-Mobile are really looking at vpn usage, And T-mobile has been warning people and Sprint counting as hotspot. I personally on my own if no one knows about this would run it over a https tunnel, then your vpn is hidden the software is called stunnel. Many vpn providers use stunnel now, you just have to enable it.
Just noticed it has been awhile since they were last on here.
Click to expand...
Click to collapse
This will cover you 95% f the time, and you don't even need VPN or EasyTether:
1) Install VPN Hotspot (great open source app), use it to turn on system WiFi tethering, and then route all the traffic over WAN0 even if you are not using a VPN.
2) Note that root su "Settings put global tether_dun_required = 0" should do the same thing, but you can do both to be sure.
3) Install Change TTL, set enable on boot, and tell it to set TTL to 64.
Now occasionally, T-Mobile will still detect some tethering, but it only picks up maybe 5%, and even if you go over the limit they don't seem to be able to throttle since your traffic is routed over the non tethering APN. They may also be detecting some because I am not sure if Change TTL supports IPV6...the IPV6 TTL setting is Hop Limit or HL and since TMobile uses IPv6 by default...? To test this if you care, you could setup an IPv4 APN.
Regarding VPN -- I think they may automatically count this as tether, but I don't really know. I have NordVPN and a PPTP VPN to our home and vacation home and could test further, but I haven't because you don't really need a VPN.
Hope this helps,
MW
What is the limit on tethering? I've never run into a problem but don't use it much either.
nujackk said:
What is the limit on tethering? I've never run into a problem but don't use it much either.
Click to expand...
Click to collapse
On my plan TMobile 1+ for business it is 10G before throttling.
One month my home internet was down and I was tethering and had switched to iDrive cloud backup from CrashPlan so for two days it was just blasting data through the tethering connection. It registered 35.1 GB Tethering and 389 GB of non-tethering (nearly all tethering) and was still not throttling at all.
Besides that one special case, I have never registered more than 1 or 2GB tethering using the method outlined above even though I have probably used well over 10 a few times....
MW
Sounds like I don't need to worry about it then. I only use it for my android deck in my truck. Mostly music

[APP][ROOT][6+] Tether TPROXY v0.1 (USB, Wifi Hotspot, Ethernet)

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Tether TPROXY uses iptables tproxy rules to capture tethered traffic and route it through a local proxy. This allows you to tether through your phone's internet source, be it a VPN or whatever else. Should also bypass APN classification and TTL/HL DPI checks. It supports TCP and UDP for IPv4 and IPv6. It can not proxy raw packets like ICMP, you can disable "Prevent Leaking" if required for your setup.
Tether TPROXY should support all tethering operations(USB, Wifi Hotspot, Ethernet). It does not enable tethering, that needs to be done manually.
Options:
Prevent Leaking - Allow traffic to exit through tproxy exclusively. Drops traffic on the forward chain of the filter table.
DPI Circumvention - Passes traffic on ports 80 and 443 to tpws to skirt DPI. Gives you proper fast.com scores.
Enable Dnsmasq - Bypass the built-in services and use Dnsmasq to provide DHCP/DHCP6/SLAAC/DNS.
IPv4 Address* - Lets you pick your IPv4 address/prefix. Makes it possible to set static addresses on your devices.
IPv6 Prefix* - ULA makes devices prefer using IPv4, GUA makes devices prefer IPv6.
*Only takes effect when Dnsmasq is enabled
Notes:
-After disabling the service, you will need to restart any active tethers you have running
-You may need to set APN protocol to IPv6 or IPv4/IPv6 to enable IPv6 for your mobile network.
-Dnsmasq can be used to get IPv6 working, but it is not recommended if you want traffic to leak.
-When using Dnsmasq, clients connected before the service is started will need to reconnect to get new addresses/routes.
Requires a kernel built with CONFIG_NETFILTER_XT_TARGET_TPROXY
Dependencies:
hev-socks5-server - https://github.com/heiher/hev-socks5-server
hev-socks5-tproxy - https://github.com/heiher/hev-socks5-tproxy
tpws - https://github.com/bol-van/zapret
Dnsmasq - https://github.com/worstperson/dnsmasq
Source:
GitHub - worstperson/TetherTPROXY
Contribute to worstperson/TetherTPROXY development by creating an account on GitHub.
github.com
Download:
[How it works]
When the service is enabled, it applies iptables rules and starts any servers required. These rules do not depend on the interface so they apply to all tethered traffic with no additions. This alone is enough for IPv4 to work.
The service also listens to "android.net.conn.TETHER_STATE_CHANGED" which fires whenever tethering is enabled or disabled. The service waits 5 seconds and then checks for Android's Dnsmasq listening on port 53 to tell if tethering is active. That IP is checked against established routes to get the active tether interface. With that, we can find it's IPv6 address and add an exception to allow IPv6 to work. If Dnsmasq is enabled, we also set IPs and routes at this point.
To get Dnsmasq to work, we need to make it use alternative ports with the options "--port=5353" and "--dhcp-alternate-port=6767,68". Then 3 iptables are used to make clients use them. One takes DHCP broadcasts and redirects them to port 6767, the second takes DNS requests and redirects them to port 5353, and the final rule blocks Router Advertisement packets from non-root processes.
(reserved)
Is this tested on Android 12.1? I enable the service, and the app shows Kernal TPROXY Support = PASS as well as having DPI Circumvention enabled selected.
I turn on my hotspot after enabling the service and I am still getting throttled to ~.5 mpbs. Are there any additional steps I missed or should try?
I'm using a Pixel 5A 5G on T-mobile with March update.
kkuhle said:
I turn on my hotspot after enabling the service and I am still getting throttled to ~.5 mpbs. Are there any additional steps I missed or should try?
Click to expand...
Click to collapse
Thanks for reporting!
Since you have "Prevent Leaking" enabled in your picture and the client(s) you have tested are able to access the internet after the service is started, I can know for sure that everything has loaded up correctly and tethered traffic is being successfully routed through the hex-socks5 and tpws proxies. I thought maybe tpws was exposing the TTL/HL of your traffic, but that is not the case, both hex-socks5 and tpws recreate packets with the TTL of the host(64).
I'm afraid I don't have a solution for you if the above information is correct/complete, it really should be working.
Just an added note, DPI Circumvention is mostly just for video, to access higher resolutions on services like Youtube or Netflix.
I tested this on Android 11, and it generally worked pretty flawlessly. I tried going back to Android 12 and seemed that it was working (speeds were not being capped). However, it seems to generally sooner than later start causing data connection to stop working altogether so hotspot clients of course aren't able to get an internet connection either.
kkuhle said:
I tested this on Android 11, and it generally worked pretty flawlessly. I tried going back to Android 12 and seemed that it was working (speeds were not being capped). However, it seems to generally sooner than later start causing data connection to stop working altogether so hotspot clients of course aren't able to get an internet connection either.
Click to expand...
Click to collapse
Thank you for the report! My devices are all A11 atm, I'll flash a GSI to one of them to see if I can reproduce. I'll also try to post a new version soon as this initial release is very rough.
fddm said:
Thank you for the report! My devices are all A11 atm, I'll flash a GSI to one of them to see if I can reproduce. I'll also try to post a new version soon as this initial release is very rough.
Click to expand...
Click to collapse
Welcome! I wanted to add that I started trying to use USB tethering hotspot yesterday instead of wifi hotspot. With usb tethering, my connection seemed to be rock solid (still A12) for a few hours as I used it. I had a couple additional devices that I just extended my hotspot on from my laptop settings. I only selected "Enable Service" in Tether TPROXY this time. Here is my usage from yesterday.
Total data over 15G and only 2.5 being recognized as Hotspot. There were some times where I disabled the service as it was causing me issues with the wifi hotspot (before I figured out the USB tethering was working nicely), so it may all be from that. I also didn't enable "Prevent Leaking" so I'll have to mess around with that next time I need it and see how/if usage changes.
I haven't been able to find anything else for Android 12 that has done what it claims when I was searching a couple weeks ago. Thanks a ton for this!
I spoke too soon. I can't get this to work anymore. It generally seems to cause my mobile network to stop working. I am over my mobile hotspot cap, so maybe that has someting to do with it.
I know it’s a dumb question. But I rooted my phone with only READ access to system files since I still can’t figure out how to do that. I wonder if it’s possible for me to use this app with just root?
shield616_666 said:
I know it’s a dumb question. But I rooted my phone with only READ access to system files since I still can’t figure out how to do that. I wonder if it’s possible for me to use this app with just root?
Click to expand...
Click to collapse
Only root is required, you do not need system r/w. This app is in an still in an early alpha state though.
fddm said:
View attachment 5572677
Tether TPROXY uses iptables tproxy rules to capture tethered traffic and route it through a local proxy. This allows you to tether through your phone's internet source, be it a VPN or whatever else. Should also bypass APN classification and TTL/HL DPI checks. It supports TCP and UDP for IPv4 and IPv6. It can not proxy raw packets like ICMP, you can disable "Prevent Leaking" if required for your setup.
Tether TPROXY should support all tethering operations(USB, Wifi Hotspot, Ethernet). It does not enable tethering, that needs to be done manually.
Options:
Prevent Leaking - Allow traffic to exit through tproxy exclusively. Drops traffic on the forward chain of the filter table.
DPI Circumvention - Passes traffic on ports 80 and 443 to tpws to skirt DPI. Gives you proper fast.com scores.
Enable Dnsmasq - Bypass the built-in services and use Dnsmasq to provide DHCP/DHCP6/SLAAC/DNS.
IPv4 Address* - Lets you pick your IPv4 address/prefix. Makes it possible to set static addresses on your devices.
IPv6 Prefix* - ULA makes devices prefer using IPv4, GUA makes devices prefer IPv6.
*Only takes effect when Dnsmasq is enabled
Notes:
-After disabling the service, you will need to restart any active tethers you have running
-You may need to set APN protocol to IPv6 or IPv4/IPv6 to enable IPv6 for your mobile network.
-Dnsmasq can be used to get IPv6 working, but it is not recommended if you want traffic to leak.
-When using Dnsmasq, clients connected before the service is started will need to reconnect to get new addresses/routes.
Requires a kernel built with CONFIG_NETFILTER_XT_TARGET_TPROXY
Dependencies:
hev-socks5-server - https://github.com/heiher/hev-socks5-server
hev-socks5-tproxy - https://github.com/heiher/hev-socks5-tproxy
tpws - https://github.com/bol-van/zapret
Dnsmasq - https://github.com/worstperson/dnsmasq
Source:
GitHub - worstperson/TetherTPROXY
Contribute to worstperson/TetherTPROXY development by creating an account on GitHub.
github.com
Download:
Click to expand...
Click to collapse
Thank you for this. Works like a charm to bypass a T-Mobile hotspot throttle. Awesome job, thank you
Something weird happens with this app, don't know if it supposed to happen like that but when this app is enable on my pixel 7 pro I'm able to share my hotspot with no problem but my current device gets no data at all, I don't know how to explain it, i might do a vid to show this to you
J0nhy said:
Something weird happens with this app, don't know if it supposed to happen like that but when this app is enable on my pixel 7 pro I'm able to share my hotspot with no problem but my current device gets no data at all, I don't know how to explain it, i might do a vid to show this to you
Click to expand...
Click to collapse
That is very weird and unintended. I suppose your running Android 13, so I'll need to get a test device set up so I can reproduce. Thanks for reporting!
Bro is this project dead? Btw it works fine on TMobile, but can't get it to work on Verizon
J0nhy said:
Bro is this project dead? Btw it works fine on TMobile, but can't get it to work on Verizon
Click to expand...
Click to collapse
Mind sharing more information? Are these the same device, stock or custom firmware? If it's carrier software/modifications flagging traffic, I can add some code automatically add 'dun' to your APN type and it should work around it.
fddm said:
Mind sharing more information? Are these the same device, stock or custom firmware? If it's carrier software/modifications flagging traffic, I can add some code automatically add 'dun' to your APN type and it should work around it.
Click to expand...
Click to collapse
Yep same device both on esim 5g, custom firmware "paranoid android" on pixel 7 pro, but i have tested on stock firmware and it's the same, I'm able to hotspot using "hotspot vpn" but traffic needs to go thru a VPN
J0nhy said:
Yep same device both on esim 5g, custom firmware "paranoid android" on pixel 7 pro, but i have tested on stock firmware and it's the same, I'm able to hotspot using "hotspot vpn" but traffic needs to go thru a VPN
Click to expand...
Click to collapse
Is this a dual esim setup? Mind sharing the output of this command from adb or a terminal app so I can be sure the patch updates the correct APN?
Code:
su
content query --uri content://telephony/carriers/preferapn
The fix will look something like this, but I don't have a device with multiple SIMs, so it only touches the first APN returned currently.
Java:
static void setDunApn() {
Log.w("TetherTPROXY", "Checking APN type for dun");
// get current id and apn type
Shell.Result command = Shell.cmd("content query --uri content://telephony/carriers/preferapn --projection _id:type | awk -F '[=,]' '{print $2,$4}'").exec();
if ( command.isSuccess() ) {
String[] parts = command.getOut().get(0).split(" ");
if ( parts.length == 2 && !parts[1].contains("dun")) {
Log.w("TetherTPROXY", "Setting APN type for dun");
// update type field with dun
Shell.cmd("content update --uri content://telephony/carriers --where \"_id=" + parts[0] + "\" --bind type:s:" + parts[1] + ",dun --bind edited:i:0").exec().getOut();
// restart data
Shell.cmd("svc data disable").exec().getOut();
Shell.cmd("svc data enable").exec().getOut();
}
}
}
Thanks for developing this app. I will have to try it even though I already have a couple of free working tethering solutions. It never hurts to have another tool for the toolshed given how things change with carriers. I take it that your app basically "proxifies/socksifies" traffic on the phone's tether interfaces to a local SOCKS5 proxy service/app on the phone.
By the way too many acronyms above. "DPI" is "deep packet inspection" for anyone else who wondered. I understand why you abbreviated it in the UI due to the length, but not in the description.
For IPv6 "GUA" is global unicast addresses (Internet routable) and "ULA" is unique local addresses (private IP addresses). I am not sure why you would want to choose a ULA in this situation since the goal is Internet access. Are the IP addresses on that configuration screen in the screenshot above the local addresses for the SOCKS5 proxy? If so, would using a ULA address for its IPv6 address mean that the clients would also need ULA addresses to access it? If so, how would the clients get those addresses? Self-generate them or does that setting set dnsmasq to issue ULA IPv6's to the tethered clients? Since (if?) you are using a SOCKS5 proxy to send the Internet traffic I am not sure why you say above that using "ULA" for IPv6 will prefer IPv4 when the IPv4 address is also a private one. Why favor private IPv4 over private IPv6?
fddm said:
Is this a dual esim setup? Mind sharing the output of this command from adb or a terminal app so I can be sure the patch updates the correct APN?
Code:
su
content query --uri content://telephony/carriers/preferapn
The fix will look something like this, but I don't have a device with multiple SIMs, so it only touches the first APN returned currently.
Java:
static void setDunApn() {
Log.w("TetherTPROXY", "Checking APN type for dun");
// get current id and apn type
Shell.Result command = Shell.cmd("content query --uri content://telephony/carriers/preferapn --projection _id:type | awk -F '[=,]' '{print $2,$4}'").exec();
if ( command.isSuccess() ) {
String[] parts = command.getOut().get(0).split(" ");
if ( parts.length == 2 && !parts[1].contains("dun")) {
Log.w("TetherTPROXY", "Setting APN type for dun");
// update type field with dun
Shell.cmd("content update --uri content://telephony/carriers --where \"_id=" + parts[0] + "\" --bind type:s:" + parts[1] + ",dun --bind edited:i:0").exec().getOut();
// restart data
Shell.cmd("svc data disable").exec().getOut();
Shell.cmd("svc data enable").exec().getOut();
}
}
}
Click to expand...
Click to collapse
The outcome for that command is:
i content://telephony/carriers/preferapn <
Row: 0 _id=1229, name=Verizon, numeric=311480, mcc=311, mnc=480, carrier_id=-1, apn=VZWINTERNET, user=, server=, password=, proxy=, port=, mmsproxy=, mmsport=, mmsc=, authtype=-1, type=default,dun,supl, current=1, protocol=IPV4V6, roaming_protocol=IP, carrier_enabled=1, bearer=0, bearer_bitmask=0, network_type_bitmask=0, lingering_network_type_bitmask=0, mvno_type=, mvno_match_data=, sub_id=-1, profile_id=0, modem_cognitive=1, max_conns=0, wait_time=0, max_conns_time=0, mtu=0, mtu_v4=0, mtu_v6=0, edited=0, user_visible=1, user_editable=1, owned_by=1, apn_set_id=0, skip_464xlat=-1, always_on=0

Categories

Resources