Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Help setting TTL on a rooted Android.

Credits go to Thomas Fjellstrom for helping out!
This thread is locked; no one can reply to it. rss feed Print
Help setting TTL on a rooted Android.
type568
Member #8,381
March 2007
avatar

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
Member #476
June 2000
avatar

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

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

type568
Member #8,381
March 2007
avatar

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
Member #476
June 2000
avatar

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.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

type568
Member #8,381
March 2007
avatar

/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
Member #476
June 2000
avatar

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)

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

type568
Member #8,381
March 2007
avatar

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
Member #476
June 2000
avatar

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.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

type568
Member #8,381
March 2007
avatar

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
Member #476
June 2000
avatar

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

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

type568
Member #8,381
March 2007
avatar

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

Thomas Fjellstrom
Member #476
June 2000
avatar

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

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

type568
Member #8,381
March 2007
avatar

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
Member #476
June 2000
avatar

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?

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

type568
Member #8,381
March 2007
avatar

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.

Go to: