Help setting TTL on a rooted Android.
type568

I got a tablet, & I wanna share the internet with it. Unfortunately when I tether internet, the provider redirects me to authentication offering me cut the speed in half(& well, I need to agree to it). I don't all that much care about the speed(although wtf, I paid for what I paid. They didn't warn me. Yes it was in small text somewhere.. Oh well).

The issue was easily worked around on my desktop PC- set TTL from default 64 to 65, and viola! No warnings, no speed cuts. I even used it once when I had an internet outage & it was a nice backup. No one interupteh my stock tradeh!

Now with phone.. Well, I don't have the understanding of linux to find the right config and change it. Any help? :)

Thanks.

Thomas Fjellstrom

It's the same kernel, the same ttl settings aught to work. somewhere in /sys or /proc I assume.

type568

What should be the config filename?
Or what tool should I be using while searching for what parameter in the file content?
Unfortunately most of my text epxerience with linux is either yum install or sudo apt-get :(

Thomas Fjellstrom

cat "foo" > /path/to/magic/file

in a rc.local file, or maybe there's a /etc/sysctl.conf file you can modify the net settings in.

type568

/proc/sys/net/ipv4/ip_default_ttl

Was 64,set to 65. Reboot- doesn't work, check it again- it's 64 :S

Thomas Fjellstrom

Yeah, it won't save across boots. you need to set it via a boot up script, like /etc/rc.local (plain shell script) or /etc/sysctl.conf (config for sysctl)

type568

Interstingly.. Without a reboot I can't connect to a WiFi, can't get ip address. :S

Another thing. Wether or not it is possible to force the tablet not decrease TTL? My router for example has such a featre despite any lack of need in one.

To what script shoult I add it, and what should the line look like?
Also how can I ensure it's updated before read(well I guess need a place for script to exec first).

Append:
I don't have either of the "files"(if it's or anything else in this tree is even a file) you mentioned. If I create one, it is to be executed?

Thomas Fjellstrom

I honestly don't know. I'm sure theres something you can change. but I've not played with it. I assume google will know.

type568

Thanks. Well, google has to know.. But kind of complex to find, without your hint on location of the file to edit I couldn't google where it can be. Looks like nobody cares about TTL on android :(

Thomas Fjellstrom

I think maybe search for places to set sysctl values, or places to put startup scripts or commands.

type568

ATM changing TTL disables wifi connectivity. Do you think there's chance it will work if value set on boot?

Thomas Fjellstrom

It might, since it would be set before wifi comes up. I give no guarantees though.

type568

I bricked it. SPent half night repairing it, it didn't wanna get flashed because of.. The USB port. I mean it. It could do SOME tasks via the usb, including all filetransfer & charging. But not flashing.

I'll try to get some boot-time cmd run :)

Thomas Fjellstrom

If you can't flash via usb, then maybe your phone got relocked? Could you enter recovery (the screen that lets you wipe stuff and re-flash) at all?

type568

No, no.. It's flashed with default ROM & rerooted. It was bricked at some point in time. There are two debugging modes: fastboot, & flashmode. Fastboot requires unlocking, flashmode doesn't. Fastboot is kind of a little bit more limited with flashing, although it was enough to brick the phone after i flashed an inappropriate kernel or something.

And the whole flashmode just wasn't working from start, although it should be. The solution has fucking killed me. Changing USB port on my PC. Why did everything but specific flashmode was working I've no clue. The fact has taken couple hours of my life, although there was some bonus in shape of very interesting experience.

Append:
Made it work with this app. It didn't immediately work because of lack of a tutorial. It couldn't set any settings, but it did set'em with order to set on boot. Also weirdly it does see all connections, but nevertheless you have to type the needed one manually.

Thread #614960. Printed from Allegro.cc