Related
Disclaimer: I am not responsible for any damage you do to yourself or your device by following this guide (Although it seems very unlikely to happen).
USB Tether Phone to XOOM Guide.
I could not find a guide for this anywhere and it took me quite a while to figure out how it works so I thought I'll post a guide for other noobs like me, who want to share their phones data plan with their XOOM via USB tethering.
Since I only got a Wifi XOOM because I didn't want to spend money on a second data plan I used to wifi-tether my phone to my XOOM for internet connection. Unfortunately, Wifi-tethering drains the battery of my phone quite fast and the battery gets extremely hot so I was looking for an alternative.
Finally, I managed to share my phones internet connection with my XOOM via USB tether. Here is how it goes:
What you need:
* USB OTG cable (micro! not mini) - can be found at amazon, ebay, etc. for $5
* Phone that is capable of USB tethering (e.g. Xperia X8 \w miniCM7 / nAa kernel)
* XOOM running Team EOS ICS
* Tegra Development Overlay Rev 4 [link]
* Terminal Emulator (can be found in the play store)
I wont cover how to install Team EOS ICS since this can be found elsewhere.
What to do:
Step One - Install and Load the Drivers Needed
After you downloaded the Tegra Development overlay, flash it using eg. CMW over your existing Team EOS ICS. This will ad a whole bunch of extra modules (drivers) and a couple of init files to your system. Including the modules needed to USB tether your phone to the XOOM.
I don't know what would happen if you flashed the Development Overlay over any other ROM/Kernel than the one provided by Team EOS. But I would not recommend it!
[ADDITIONAL REMARK]
Note: If you really dont know anything about working with adb just ignore the following lines and go straight to Step Two. This is not necessary to get USB tethering working.
The Tegra Development Overlay contains the modules (drivers) needed for USB tethering a phone to the XOOM (and loads of others). The modules needed are: rndis_wlan.ko and rndis_host.ko.
After you flash the Dev Overlay, there will be a file called 06modules at /system/etc/init.d/. This file loads all 99 modules found at /system/lib/modules/. Since you actually just need 1 of those modules you might want to delete the "06modules" file and load the module needed manually by typing the following into your terminal emulator:
Code:
[STRIKE]modprobe rndis_wlan[/STRIKE]
modprobe rndis_host
This should load the module. You can check if the module was loaded successfully by using the following command:
Code:
lsmod
This will list all currently loaded modules.
Step Two - Connecting Your Phone
Switch on USB tethering on your phone and connect it to your XOOM via the OTG cable.
In the Terminal Emulator type:
Code:
dmesg
the output should look something like this:
Code:
[...]
<6>[ 150.829115] usb 2-1: new high speed USB device number 2 using tegra-ehci
<3>[ 154.608633] usb 2-1: device not accepting address 2, error -71
<3>[ 154.667257] hub 2-0:1.0: unable to enumerate USB device on port 1
<6>[ 154.945974] usb 2-1: new high speed USB device number 4 using tegra-ehci
<6>[ 155.002843] usb 2-1: New USB device found, idVendor=0fce, idProduct=812e
<6>[ 155.003359] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
<6>[ 155.004103] usb 2-1: Product: SEMC HSUSB Device
<6>[ 155.004388] usb 2-1: Manufacturer: SEMC
<6>[ 155.004658] usb 2-1: SerialNumber: CB511N60A1
<6>[ 155.066353] rndis_host 2-1:1.0: [B]usb0[/B]: register 'rndis_host' at usb-tegra-ehci.0-1, RNDIS device, 4e:7e:5d:7e:b9:1d
This indicates that your phone was successfully connected to your XOOM and the respective modules were loaded. Note the last line, right where it says rndis_host 2-1:1.0: usb0. Don't worry if it does not say "usb0" but e.g. "usb1" just keep it in mind for later.
Step Three - Assigning an IP Adress and Setting up the DNS server
Now that your phone is connected and registered the xoom needs to get an ip adress and a DNS server. This is done by typing the following into the Terminal Emulator:
Code:
su
dhcpcd [B]usb0[/B]
setprop net.dns1 8.8.8.8
"su" grants the terminal emulator SuperUser rights which are needed for the next step.
"dhcpcd usb0" starts an DHCP client for the interface "usb0" and asks for an IP adress. Now if you did not get "usb0" in step two but e.g. "usb1" then change the command accordingly.
"setprop net.dns1 8.8.8.8" sets the DNS server to Google's DNS Server (8.8.8.8), but you can, of course, use any DNS server you like.
If you write "ifconfig" in the Terminal Emulator you now should get an output like
Code:
usb0 Link encap:Ethernet HWaddr 4E:7E:5D:7E:B9:1D
[B]inet addr:192.168.42.187 [/B] Bcast:192.168.42.255 Mask:255.255.255.0
inet6 addr: fe80::4c7e:5dff:fe7e:b91d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:295 errors:0 dropped:0 overruns:0 frame:0
TX packets:420 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:108787 (106.2 KiB) TX bytes:81153 (79.2 KiB)
Indicating that an IP adress has been successfully assigned to your XOOM.
And voilà. Now you have a working internet connection via USB tethering from your phone to your XOOM.
Unfortunately there are a couple of downsides:
* There seems to be a glitch in the rndis_wlan.ko or rndis_host.ko module causing a reboot of the XOOM whenever you disconnect your phone from your XOOM after USB tether or force unload the module after you tethered your phone. This issue is known and I hope it will be fixed in the future.
* The procedure described will only enable internet for your Browser, not for your mail apps (confirmed) and possibly not for any other app (did not try yet). Apparently you need to alter some settings (like adding the DNS server for the Browser) to make those apps work properly. Now, this might be very easy but since I'm a linux/android noob I did not yet figure out how.
TO DO
* The modules need to be fixed to solve the reboot issue. However, I am likely not skilled enough to do so, so this is up to Team EOS.
* Settings need to be passed to mail apps. Now this should be fairly easy and I'll try to figure that out.
* A one click app to configure the internet connection would be great. I never did any linux/android coding, but I'll give it a shot.
Thanks a lot to bigrushdog for helping with the rndis_host.ko bugs!!!
Any suggestions or thanks are welcome!
I'm gonna grab this spot cause you are gonna need some help on this one. Good post.
I have a lot of info on this, and will post what I got shortly. LTE devices use usb0 to facilitate radio operations. So rndis host assigns usb1 in this case. I'm not sure about the other builds. Also, ill take a fresh look at the hard reboot issue. I know something causes a kernel panic, but I'm not sure where the fail lies.
modprobe rndis_host
The rndis_wlan is not needed. That's for a rare build of wireless dongles.
I just tried to use USB tethering a couple days ago and had an issue... Thanks for this I was hoping it would be implemented in an updated kernel...
playya said:
I just tried to use USB tethering a couple days ago and had an issue... Thanks for this I was hoping it would be implemented in an updated kernel...
Click to expand...
Click to collapse
I'm about 100% sure it won't be in the release versions of the tiamat kernel. Rndis is just too unstable and wonky to be in a distro kernel. We need the distro kernel to be as stable as possible. That's why I do the overlay. Also, I use overlay users a guinea pigs to see what works and what don't. My test build with a new rndis driver doesn't work. Ill keep at it.
bigrushdog said:
I'm gonna grab this spot cause you are gonna need some help on this one. Good post.
I have a lot of info on this, and will post what I got shortly. LTE devices use usb0 to facilitate radio operations. So rndis host assigns usb1 in this case. I'm not sure about the other builds. Also, ill take a fresh look at the hard reboot issue. I know something causes a kernel panic, but I'm not sure where the fail lies.
modprobe rndis_host
The rndis_wlan is not needed. That's for a rare build of wireless dongles.
Click to expand...
Click to collapse
Thanks a lot for your help on this!
Wow! Awesome this really works , thanks for sharing this mate, and I hope the reboot problem will be fix.
just curious, if your phone have support by cm7, you can also use bluetooth tethering which is less of a work. My wife's htc hero doesn't support infrastructure mode but her phone run cm7 and in there I can bluetooh tether to the xoom without a single problem. Just thought I'd ask.
dumb question. why use usb tether. wifi tether works just fine on my tbolt using opengarden wi-tether. dont think the battery drains any different since data pull is more. Also what device do you have that the battery is getting hot?
I got an Xperia X8 running MiniCM7. The X8 doesnt offer any kinder of tethering from stock and miniCM7/nAa kernel only offers usb or wifi tether. So bluetooth tether is no option for me.
And my phone is draining a large amount of battery when wifi AP and 3G is enabled. This also results in the phone getting hot. It needs excessive amounts of power and this heats up the battery.
Using USB tethering has a couple of advantages. First it is safer since you dont use wireless connections apart from 3G, second you consume less battery (wifi AP does need a lot of power) and third I actually charge my battery while sharing my internet connection with my XOOM.
Also I really just like the idea of USB tethering my phone to my XOOM...
MagicVie said:
I got an Xperia X8 running MiniCM7. The X8 doesnt offer any kinder of tethering from stock and miniCM7/nAa kernel only offers usb or wifi tether. So bluetooth tether is no option for me.
And my phone is draining a large amount of battery when wifi AP and 3G is enabled. This also results in the phone getting hot. It needs excessive amounts of power and this heats up the battery.
Using USB tethering has a couple of advantages. First it is safer since you dont use wireless connections apart from 3G, second you consume less battery (wifi AP does need a lot of power) and third I actually charge my battery while sharing my internet connection with my XOOM.
Also I really just like the idea of USB tethering my phone to my XOOM...
Click to expand...
Click to collapse
Fair enough but according to Cyanogenmod site your x8 can run cm7.1. In CM7.1 when you paired the xoom and your x8, and going into the xoom bluetooth properties there's an option to share internet from your paired phone (x8).
Just thought I'd give you an alternative option from usb tether that's all. Take care!
I'm running the Team EOS wingray "nightly build 90" and can't seem to get past "modprobe rndis_host" (the lsmod output does not include rndis_host - when I execute "modprobe rndis_host" without "su" first, I get "modprobe: 'rndis_host.ko': Operation not permitted" - if I execute after su, I get "modprobe: 'rndis_host.ko': invalid module format") - any suggestions?
Tom
tadiv said:
I'm running the Team EOS wingray "nightly build 90" and can't seem to get past "modprobe rndis_host" (the lsmod output does not include rndis_host - when I execute "modprobe rndis_host" without "su" first, I get "modprobe: 'rndis_host.ko': Operation not permitted" - if I execute after su, I get "modprobe: 'rndis_host.ko': invalid module format") - any suggestions?
Tom
Click to expand...
Click to collapse
I fell back to build 84 and got the same results...
Sent from my Xoom using XDA
I think I understand
tadiv said:
I fell back to build 84 and got the same results...
Sent from my Xoom using XDA
Click to expand...
Click to collapse
Other related posts (such as http://forum.xda-developers.com/showthread.php?t=1513490 ) suggest that this overlay is for version 3.0.5 of the kernel - both of the builds I noted above have later versions of the kernel...
Tom
---------- Post added at 10:30 AM ---------- Previous post was at 09:44 AM ----------
tadiv said:
Other related posts (such as http://forum.xda-developers.com/showthread.php?t=1513490 ) suggest that this overlay is for version 3.0.5 of the kernel - both of the builds I noted above have later versions of the kernel...
Tom
Click to expand...
Click to collapse
Yup, I loaded the Team EOS 1.0.0 and it works - in fact, this post is via usb tethering from my Xoom!
Tom
---------- Post added at 10:52 AM ---------- Previous post was at 10:30 AM ----------
MagicVie said:
.
TO DO
* The modules need to be fixed to solve the reboot issue. However, I am likely not skilled enough to do so, so this is up to Team EOS.
* Settings need to be passed to mail apps. Now this should be fairly easy and I'll try to figure that out.
* A one click app to configure the internet connection would be great. I never did any linux/android coding, but I'll give it a shot.
Thanks a lot to bigrushdog for helping with the rndis_host.ko bugs!!!
Any suggestions or thanks are welcome!
Click to expand...
Click to collapse
I have successfully used the 'scripter' app to set this up -
My script is as follows:
modprobe rndis_host
dhcpcd usb0
setprop net.dns1 8.8.8.8
Scripter reports errors, but it works...
Tom
The latest overlay contains our 3.0.9 version kernel. And the overlay works with any eos build and likely any rom. We continue to research the reboot issue .
I do show the 3.0.9 kernel now with the overlay on the 1.0.0 ROM - but I assure you, I could not load the module with the nightly builds I mentioned above...
Tom
tadiv said:
I do show the 3.0.9 kernel now with the overlay on the 1.0.0 ROM - but I assure you, I could not load the module with the nightly builds I mentioned above...
Tom
Click to expand...
Click to collapse
With the overlay, there is no need to load any modules. They load automatically on boot.
bigrushdog said:
With the overlay, there is no need to load any modules. They load automatically on boot.
Click to expand...
Click to collapse
Sure enough - I don't know what I was doing wrong before, but now I have rndis_host in the lsmod output like it should be on the nightly build 90 and the overlay... As a point of detail, I restored my nandroid of nightly 90 then applied the overlay and it just worked.
Thanks!!
Tom
P.S. The working scripter script is now:
dhcpcd usb0
setprop net.dns1 8.8.8.8
Modified 06modules
Instead of deleting the 06modules file, I edited it to look like:
--------------------------------
#!/system/bin/sh
#
# Load any extra modules
#
#MODPATH=/system/lib/modules/
#
#for i in `ls $MODPATH`
#do
#modprobe `basename $i .ko` >/dev/null 2>&1
#done
#exit 0
modprobe rndis_host
--------------------------------
commenting out everything but the last line that I added. This way I keep the original code, but only load the module I want to use... The editor I used created a 06modules.bak and that file had to be deleted, because it was also executed with the result of loading all the modules... Once it was deleted, only the rndis_host module is being loaded.
Tom
For the adventurous type look here
http://forum.xda-developers.com/showthread.php?t=1494891
This is a thread on using 3g dongles. However, there is a.wealth of information on IP routing that should apply here as well.
Has anyone managed to get IPTV Multicast video streams to playback on the g pad v500? I am referring to the kind of IPTV multicast that several telcos provide, see e.g. http://grinch.itg-em.de/entertain/faq/allgemein/multicastadressliste/
When I try to open such a stream in VLC on my gpad, nothing happens. No error message, playback just indicates it's stopped. On the galaxy s5 it works without problems.
I did some google research and it seems that the kernel needs to be compiled with a multicast switch/flag. So I tried several firmwares; I came from v50020d and I tried the 5.0 CM nightly build and LiquidSmooth, but the problem remains the same, so I guess it is no use to randomly try other builds (by the way, it took me ages to get TWRP running, but now it works without a problem )
Any suggestions?
Take a look at this config. I think it blocks multicast by default.
http://forum.xda-developers.com/showthread.php?p=57231715
thanks for the hint.
indeed my system/firmware/wlan/prima/WCNSS_qcom_cfg.ini had
Code:
# Flags to filter Mcast and Bcast RX packets.
# Value 0: No filtering, 1: Filter all Multicast.
# 2: Filter all Broadcast. 3: Filter all Mcast and Bcast
McastBcastFilter=3
and the file config suggested there has McastBcastFilter=0.
However it still doesn't work; VLC now says "No media found" (instead of no message) - are there further configs that may block multicast traffic?
following https://code.google.com/p/android/issues/detail?id=51195, the option CONFIG_IP_MULTICAST=y needs to be set when building the kernel. Indeed /proc/net/igmp does not exist.
Perhaps one of the available custom kernels in addition to changes in the WiFi config would work. The easiest solution would probably be to use CM and get ckret or Rick_Roll to add the multicast module support to their kernels or build the cm kernel yourself.
With http://forum.xda-developers.com/lg-g-pad-83/development/rom-android-5-0-lollipop-lrx21m-t2941207 it works!
I prefer the CM GUI though, so I will try to get it in there.
thanks again.
solution
Thanks to rick.roll, I've got a solution now.
The working configuration is:
* cm-12-20150106-NIGHTLY-v500.zip - http://get.cm/get/mkB
* RedKernel r014 with Multicast support - https://www.androidfilehost.com/?fid=95887005526789182
I guess it would work on any CM12 build with this kernel.
NONE of the ROMs provided by official miui or unofficial miui.eu or even cyanogenmod that I have been trying has /system/lib/modules/tun.ko included.
The kernel sources provided by:
github.com/karthick111/android_kernel_xiaomi_hydrogen/blob/cm-14.1/drivers/net/tun.c
github.com/zhaochengw/android_kernel_xiaomi_hydrogen/blob/mkm/drivers/net/tun.c
github.com/TheStrix/android_kernel_xiaomi_msm8956/blob/cm-14.1/drivers/net/tun.c
already have required files on it.
All I need to request to developers here is to "Edit the file .config, and check for the value CONFIG_TUN
If there is not a line CONFIG_TUN=m, create it" while compiling the kernel.
This module is essential to make VPN connection especially for those who lives inside Middle Kingdom.
Thanks in advance.
What VPN protocol are you trying to use? I've successfully used OpenVPN on MIUI 8 and the latest RR on Hydrogen, both within the Middle Kingdom and outside.
Cisco AnyConnect will not connect to its server with or without certificate.
IPSec & ShadowSocks will connect, but NO data traffic.
I have tried those with Cyanogenmod (karthick111, zhaochengw & TheStrix) builds.
I also tried with official MIUI and miui.eu builds too.
What specific MIUI 8 build do you use? Global version? Any link that I can try?
Do you have /system/lib/modules/tun.ko inside it? Please share with us if you have it
I'm only using OpenVPN, not those protocols you mentioned. I got it working with MIUI 8 global beta and the latest Xiaomi EU ROMs, along with RR. I looked for that tun.ko file but couldn't find it on RR. Guess you do need someone to recompile the kernel with tun.ko support.
This request is not true with regards to Cisco AnyConnect & ShadowSocks VPN as I updated each apk to the latest releases :silly:
However, (built-in) IPSec is still not working for me.
Anyone here have IPSec VPN protocol works with hydrogen on any ROM?
IPSec protocol solved by adding "esp=aes128-sha1" into /etc/ipsec.conf on strongswan's server side. :laugh::laugh:
This config is works with both iOS & android clients. :victory::victory:
Sorry to waste your time xda developers. Module for VPN (/system/lib/modules/tun.ko) is NOT required to run most popular VPN protocols as /dev/tun already provided by built in kernel. :good::good:
Obviously we all know this, but I'll say it anyway: I bear no responsibility for your device!
Background:
Initially I recompiled the kernel, but thanks to @fddm I was able to get this into a Magisk module. This is a take-off from https://forum.xda-developers.com/t/...-tether-lineageos-18-1.4295601/#post-86183959 Feel free to read that (minimal reading) for additional details.
What is this?
This Magisk mod adds the required iptables kernel module for TTL/Tether/unmetering for using your phone as a hotspot. I have Tmobile & with my plan, when I connect any device to the phone it is extremely throttled to around 0.5Mbps. With this mod and the settings below, you can get around that limitation. I go from 0.5Mbps=>80+Mbps with this mod. Root is required (look at above thread for details on that if needed).
Compatibility:
Confirmed OS's that work: LineageOS18.1, LineageOS19.1
ROMs: At this point I can't indicate what ROMs this will be compatible with, but it appears LineageOS18.1 works. I'm attaching that as well as a Android/AOSP12 version if anyone wants to test that. I'm also not sure if this is exclusive to the bramble/Pixel 4a5g device (If anyone knows what they're doing or wants to get ballsy, test & report your results!)
Carrier: I tested this against Tmobile. It depends on how your carrier throttles your hotspot connected devices; Tmobile uses the TTL to determine if its the phone vs a connected device. If your carrier uses that method this should work.
xt_HL.ko: This is the kernel module we're inserting to allow the "iptables ttl set" command. I tested the Android12 xt_HL.ko file on my LineageOS18.1 OS and it does NOT work. This tells me there is some type of versioning. OR: there's an issue with the A12 file...
InCompatibility: (as reported by users in the thread)
ProtonAOSP 12, pixel 4a5g
Steps:
Install Magisk module & read the output; Verify it installed successfully.
Download Termux app from playstore
Termux App: (Shouldn't be necessary if running latest script since that does this step for you on every boot)
su (Grant permissions)
iptables -t mangle -A POSTROUTING -j TTL --ttl-set 64 (should be no errors - if you have errors my kernel is not installed)
Test: Turn on phone Hotspot, connect any device, do a speed test comparing speed on phone should be similar to the connected device.
If any limitations/blocks: (Not sure but maybe http vs https is blocked sometimes)
Install VPN Hotspot app (Green key icon): "Wi-Fi hotspot" ON, wlan1 ON, DISABLE "Tethering HW Acceleration" in settings
Issues:
After running the iptables command you get this error: iptables v1.8.4 (legacy): unknown option "--ttl-set" Try 'iptables -h' or 'iptables --help' for more information. This means the module was not loaded (or isn't compatible. Assuming the correct version was selected, there's no fix. Likely your OS isn't compatible with this module. If anyone has additional troubleshooting to add feel free to chime in.
Technical Additional Info:
ttl_magisk_L18.1: This contains the xt_HL.ko file compiled from the lineage-18.1-20220102-nightly-bramble-signed repo
ttl_magisk_A12: This contains the xt_HL.ko file compiled from AOSP kernel: android-msm-redbull-4.19-android12
Updates:
* I updated the thread title since no one reporting the Android 12 kernel mod is working (only 11 works this far)
* I added "ttl_magisk_L19.zip" script which runs the iptables command for you on every boot. I just tested this on LineageOS19.1 and it works good. I'm working on testing it on LineageOS20.0...
Based on what @fddm said though, it sounds like a Magisk module like this will not work on stock AOSP because it "enforces signatures on modules". If anyone can confirm that, or a workaround that would be helpful. Also https://forum.xda-developers.com/t/...l-tether-lineageos-18-1.4295601/post-86173703 indicates we'll want to disable IP6 via these commands:
ndc interface ipv6 rndis0 disable
ndc interface ipv6 wlan0 disable
If anyone wants to test & get back that'll be great. With Tmobile I didn't need to do that (yet), but again feedback would be great.
I had checked the stock and Lineage configs and neither had signature enforcement enabled. I only had access to this phone for a couple days, so I unfortunately can't test for you.
fddm said:
I had checked the stock and Lineage configs and neither had signature enforcement enabled. I only had access to this phone for a couple days, so I unfortunately can't test for you.
Click to expand...
Click to collapse
So you think this should work on stock? Thanks man! I need my phone for work so can't put it offline for hours atm, but maybe over the weekend I can. I'd like to reflash android 12 stock & see if this works. I'd have to assume there's some interest in this... Someone else to test...who knows
hi, I am on ProtonAOSP 12, pixel 4a5g, tested the ttl A12 zip file. But it gave me error when trying to run the iptables command as per your instruction. So I guess it is not loading the module maybe
creezalird said:
hi, I am on ProtonAOSP 12, pixel 4a5g, tested the ttl A12 zip file. But it gave me error when trying to run the iptables command as per your instruction. So I guess it is not loading the module maybe
Click to expand...
Click to collapse
Apologies for your results. I just updated the OP with an "Issues" section I'll update with issues reported, and any fixes if we discover any. I've only successfully tested this against LineageOS18.1, and was only hopeful it would work against other OS's. Just for kicks, since it's a pretty simple/quick process, you may want to try the ttl_magisk_L18.1 version. BTW that entire command is case-sensitive in case someone didn't know (Eg. Iptables... will not work; iptables... will).
Regarding the fix for your issue...I think Proton is based just on AOSP, and nothing to do with LineageOS. I wouldn't think that would matter but pointing. I would've made an Android12/LineageOS19.0 module but it isnt official yet for this device. I'm not sure how willing the Proton folks would be, but the next logical step would be to have them add the following options to their ProtonAOSP12 "redbull_defconfig" file (or equivalent), build it, and send me over the xt_HL.ko file. Then I'll add a magisk module for that for you to test.
Side note: there are 4 recent AOSP kernel versions for this device. So if there are compatibility restraints with versions, I'd guess we'd have a maximum of 4 to deal with, depending on what OS you have. I don't know for sure, but wouldn't think your ROM being AOSP, LIneageOS, or Proton would make a difference, since typically custom ROMs only customize overlays, features, preferences, 3rd party SW, etc - they don't typically rewrite the kernel for example. But we'll find out. The modules I posted reflect LineageOS18.1 (should be android-msm-redbull-4.19-android11-qpr3 but I didn't verify; though this does work with a June 2021 build which is likely android-msm-redbull-4.19-android11-qpr2 or before) & Android12 (android-msm-redbull-4.19-android12). I don't have one for android-msm-redbull-4.19-android12-qpr1 yet, but there's a chance that's what you need. Recent bramble kernels:
android-msm-redbull-4.19-android11-qpr2
android-msm-redbull-4.19-android11-qpr3
android-msm-redbull-4.19-android12
android-msm-redbull-4.19-android12-qpr1
kevin71246 said:
Apologies for your results. I just updated the OP with an "Issues" section I'll update with issues reported, and any fixes if we discover any. I've only successfully tested this against LineageOS18.1, and was only hopeful it would work against other OS's. Just for kicks, since it's a pretty simple/quick process, you may want to try the ttl_magisk_L18.1 version. BTW that entire command is case-sensitive in case someone didn't know (Eg. Iptables... will not work; iptables... will).
Regarding the fix for your issue...I think Proton is based just on AOSP, and nothing to do with LineageOS. I wouldn't think that would matter but pointing. I would've made an Android12/LineageOS19.0 module but it isnt official yet for this device. I'm not sure how willing the Proton folks would be, but the next logical step would be to have them add the following options to their ProtonAOSP12 "redbull_defconfig" file (or equivalent), build it, and send me over the xt_HL.ko file. Then I'll add a magisk module for that for you to test.
Side note: there are 4 recent AOSP kernel versions for this device. So if there are compatibility restraints with versions, I'd guess we'd have a maximum of 4 to deal with, depending on what OS you have. I don't know for sure, but wouldn't think your ROM being AOSP, LIneageOS, or Proton would make a difference, since typically custom ROMs only customize overlays, features, preferences, 3rd party SW, etc - they don't typically rewrite the kernel for example. But we'll find out. The modules I posted reflect LineageOS18.1 (should be android-msm-redbull-4.19-android11-qpr3 but I didn't verify; though this does work with a June 2021 build which is likely android-msm-redbull-4.19-android11-qpr2 or before) & Android12 (android-msm-redbull-4.19-android12). I don't have one for android-msm-redbull-4.19-android12-qpr1 yet, but there's a chance that's what you need. Recent bramble kernels:
android-msm-redbull-4.19-android11-qpr2
android-msm-redbull-4.19-android11-qpr3
android-msm-redbull-4.19-android12
android-msm-redbull-4.19-android12-qpr1
Click to expand...
Click to collapse
Another note: it appears Proton does quite a bit of work with the kernel, mods/etc (eg. Features list here: https://forum.xda-developers.com/t/kernel-pixel-4a-5g-proton-kernel.4194685/ ). I'm not sure if you flashed their kernel (1 ROM says its not required), but if you did that may explain the incompatibility - but I'm just guessing.
kevin71246 said:
Another note: it appears Proton does quite a bit of work with the kernel, mods/etc (eg. Features list here: https://forum.xda-developers.com/t/kernel-pixel-4a-5g-proton-kernel.4194685/ ). I'm not sure if you flashed their kernel (1 ROM says its not required), but if you did that may explain the incompatibility - but I'm just guessing.
Click to expand...
Click to collapse
Not at all, I am just using the Proton without the Proton Kernal (this is optional). If not mistaken, the Dev mentioned somewhere that by default, the kernel is same as stock
creezalird said:
Not at all, I am just using the Proton without the Proton Kernal (this is optional). If not mistaken, the Dev mentioned somewhere that by default, the kernel is same as stock
Click to expand...
Click to collapse
Mind going into your phone settings & post your kernel version? Thx
kevin71246 said:
Mind going into your phone settings & post your kernel version? Thx
Click to expand...
Click to collapse
sure, here you go
kevin71246 said:
Obviously we all know this, but I'll say it anyway: I bear no responsibility for your device!
Background:
Initially I recompiled the kernel, but thanks to @fddm I was able to get this into a Magisk module. This is a take-off from https://forum.xda-developers.com/t/...-tether-lineageos-18-1.4295601/#post-86183959 Feel free to read that (minimal reading) for additional details.
What is this?
This Magisk mod adds the required iptables kernel module for TTL/Tether/unmetering for using your phone as a hotspot. I have Tmobile & with my plan, when I connect any device to the phone it is extremely throttled to around 0.5Mbps. With this mod and the settings below, you can get around that limitation. I go from 0.5Mbps=>80+Mbps with this mod. Root is required (look at above thread for details on that if needed).
Compatibility:
ROMs: At this point I can't indicate what ROMs this will be compatible with, but it appears LineageOS18.1 works. I'm attaching that as well as a Android/AOSP12 version if anyone wants to test that. I'm also not sure if this is exclusive to the bramble/Pixel 4a5g device (If anyone knows what they're doing or wants to get ballsy, test & report your results!)
Carrier: I tested this against Tmobile. It depends on how your carrier throttles your hotspot connected devices; Tmobile uses the TTL to determine if its the phone vs a connected device. If your carrier uses that method this should work.
xt_HL.ko: This is the kernel module we're inserting to allow the "iptables ttl set" command. I tested the Android12 xt_HL.ko file on my LineageOS18.1 OS and it does NOT work. This tells me there is some type of versioning. OR: there's an issue with the A12 file...
InCompatibility: (as reported by users in the thread)
ProtonAOSP 12, pixel 4a5g
Steps:
Install Magisk module & read the output; Verify it installed successfully.
Download Termux app from playstore
Termux App:
su (Grant permissions)
iptables -t mangle -A POSTROUTING -j TTL --ttl-set 64 (should be no errors - if you have errors my kernel is not installed)
Test: Turn on phone Hotspot, connect any device, do a speed test comparing speed on phone should be similar to the connected device.
If any limitations/blocks: (Not sure but maybe http vs https is blocked sometimes)
Install VPN Hotspot app (Green key icon): "Wi-Fi hotspot" ON, wlan1 ON, DISABLE "Tethering HW Acceleration" in settings
Issues:
After running the iptables command you get this error: iptables v1.8.4 (legacy): unknown option "--ttl-set" Try 'iptables -h' or 'iptables --help' for more information. This means the module was not loaded (or isn't compatible. Assuming the correct version was selected, there's no fix. Likely your OS isn't compatible with this module. If anyone has additional troubleshooting to add feel free to chime in.
Technical Additional Info:
ttl_magisk_L18.1: This contains the xt_HL.ko file compiled from the lineage-18.1-20220102-nightly-bramble-signed repo
ttl_magisk_A12: This contains the xt_HL.ko file compiled from AOSP kernel: android-msm-redbull-4.19-android12
Click to expand...
Click to collapse
Hi, I followed the steps and I am able to get this to work after making the changes to iptables. I did notice that if I reboot the phone the changes are not persisting. Is there any way to fix this?
Thanks!
ankur414 said:
Hi, I followed the steps and I am able to get this to work after making the changes to iptables. I did notice that if I reboot the phone the changes are not persisting. Is there any way to fix this?
Thanks!
Click to expand...
Click to collapse
That is odd. That iptables command should be persistent across a reboot. The steps in the OP are all I did. In fact once I get it working it's hard to undo it! Like I'll delete the iptables rule, reboot, and usually I still get I throttled data. Eventually it'll break again after messing with it. No clue why. Hopefully sometime else can chime in. For reference, please post your OS, build, kernel, assume Pixel 4a5g?...
kevin71246 said:
That is odd. That iptables command should be persistent across a reboot. The steps in the OP are all I did. In fact once I get it working it's hard to undo it! Like I'll delete the iptables rule, reboot, and usually I still get I throttled data. Eventually it'll break again after messing with it. No clue why. Hopefully sometime else can chime in. For reference, please post your OS, build, kernel, assume Pixel 4a5g?...
Click to expand...
Click to collapse
Hi, thanks for the response. I am using a Pixel 4a 5G:
LineageOS 18.1-20220116
Build: lineage_bramble-userdebug 11 RQ3A.211001.00110038514
Kernel: 4.19.160-ge469934bead0
it seems to be working fine connecting with my pc.
Shared out from pc both hotspot and ICS to router connecting devices register no internet
connection from META (oculus) Quest 2 shows connected, Internet works but ( BEATSABER WILL NOT CONNECT TO MULTIPLAYER ) .
Sorry.
tested the ttl A12 zip
Termux commands in op gave no error.
also ran #ndc interface ipv6 wlan0 disable (accepted)
#ndc interface ipv6 rndis0 disable would not take
noT Mobile buy metropolitition
if anyone could give me some advice for my quest2 multiplayer problem would have much love ... its the main reason I run hotspot.
OnePlus 6T
Model: A6013
Android 12
Sec. patch 1/5/2022
ProtronExtended version
12.2.1
[ROM][12L][fajita] ProtonXtended (PXOSP) [AOSP]
ProtonXtended (PXOSP) Android 12 based ROM About Project PXOSP (Proton Xtended Open Source Project) is a fork based on ProtonAOSP to enhance the user experience with useful addition features. Screenshots Screenshots of the PXOSP Installation...
forum.xda-developers.com
Kernel ver.
4.9.227Syberia+-g44a024f66f1a
#1 Tue Jan 25 19:55:25 UTC 2022
Linux version 4.9.227Syberia+-g44a024f66f1a ([email protected]) (Android (7485623, based on r416183b1) clang version 12.0.7 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee)) #1 SMP PREEMPT Tue Jan 25 19:55:25 UTC 2022
Magisk custom update channel
24.1 (24100)
@topjohnwu
kevin71246 said:
That iptables command should be persistent across a reboot.
Click to expand...
Click to collapse
iptables rules shouldn't be persistent unless you add them via script at startup. If anything, the opposite should be true. I know some devices will refresh their firewall rules after some time, at which point you have to add it back.
everburn said:
it seems to be working fine connecting with my pc.
Shared out from pc both hotspot and ICS to router connecting devices register no internet
connection from META (oculus) Quest 2 shows connected, Internet works but ( BEATSABER WILL NOT CONNECT TO MULTIPLAYER ) .
Click to expand...
Click to collapse
I have a very hard time believing that module worked for your device, are you sure your kernel doesn't already have xt_HL builtin? That aside, were you having issues before trying this? It's probably a compatibility issue between your unnamed provider and the platforms you want to use. If that's the case, just try out a bunch of VPNs until you find one that works and use it with VPN Hotspot.
fddm said:
iptables rules shouldn't be persistent unless you add them via script at startup. If anything, the opposite should be true. I know some devices will refresh their firewall rules after some time, at which point you have to add it back.
I have a very hard time believing that module worked for your device, are you sure your kernel doesn't already have xt_HL builtin? That aside, were you having issues before trying this? It's probably a compatibility issue between your unnamed provider and the platforms you want to use. If that's the case, just try out a bunch of VPNs until you find one that works and use it with VPN Hotspot.
Click to expand...
Click to collapse
yes its running according to magisk log. I was previously on pixel exp. rom android 12 and termux cmd ended in error
that is why I switched for the kernel. and from what i can tell all data is used as talk text data.... as my wifi hotspot 15GB still shows i have only used 2GB (which i have). as far as my B.S. problem I think it has something to do with multiplayer servers. it works fine on wifey's hotspot same carrier LG stylo 6 stock..
everburn said:
yes its running according to magisk log. I was previously on pixel exp. rom android 12 and termux cmd ended in error
that is why I switched for the kernel. and from what i can tell all data is used as talk text data.... as my wifi hotspot 15GB still shows i have only used 2GB (which i have). as far as my B.S. problem I think it has something to do with multiplayer servers. it works fine on wifey's hotspot same carrier LG stylo 6 stock..
Click to expand...
Click to collapse
If I'm understanding - it works, but some devices connected have random results? TMobile, or any cell phone provider, are known for issues with VPN, etc, so that doesn't surprise me. And a total guess, but TMobile uses cgnat & ip6, so maybe that's causing issues as well - but not sure what provider u have.
kevin71246 said:
If I'm understanding - it works, but some devices connected have random results? TMobile, or any cell phone provider, are known for issues with VPN, etc, so that doesn't surprise me. And a total guess, but TMobile uses cgnat & ip6, so maybe that's causing issues as well - but not sure what provider u have.
Click to expand...
Click to collapse
thats probably it right there thanks
Have tried both on Pixel 4a 5G, Android 11 stock, rooted, RQ1C.210205.006
"unknown option --ttl-set" on both
I read that the kernel source for the op11 was released. Does anyone know how to make a module to add ttl-set to the kernel? If not does anyone know how to build a kernel? I know during building I can add xt_HL.ko. I can't believe how hard it is to add ttl-set to iptables.
Check out this link where they achieve patching using magiskboot.
It does not work... · Issue #13 · cyborg-one/nfqttl
I am connected to the phone using USB tethering. Ping from phone to google: 64 bytes from 172.217.21.14: icmp_seq=1 ttl=106 time=94.7 ms Ping from pc to same address: 64 bytes from 172.217.21.14: i...
github.com
That guy zibri has a better patch that works great on my Pixel 7 Pro. This is a kernel patch that gets rid of code that decrements the TTL during routing. See: https://github.com/Zibri/ttl_fix