• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root tether by init.d? (theory only so far)

Nikguy

Member
So GameTheory started me on the hunt to figure out how to enable (non paid) tethering on the lucid 2.
The plan is to use GameTheory's new kernel used in his new rom and use an init.d script to try to enable access to wifi tethering.

The code that I have found for a possible script is:

[HIGH]#!/system/bin/sh
iptables -A bw_FORWARD -i !lo+
iptables -A natctrl_FORWARD -j RETURN -i rmnet+ -o wlan0 -m state --state RELATED,ESTABLISHED
iptables -A natctrl_FORWARD -j DROP -i wlan0 -o rmnet+ -m state --state INVALID
iptables -A natctrl_FORWARD -j RETURN -i wlan0 -o rmnet+
iptables -A natctrl_FORWARD -j DROP
iptables -A natctrl_nat_POSTROUTING -t nat -o rmnet+ -j MASQUERADE[/HIGH]

(source:WIFI TETHERING (WORKAROUND) FOR (CM 10, AOKP, SOURCE BASED Roms) ~ UPDATED - Page 4 - xda-developers)

This code is for another phone and so far does not seem to work for me (if other people want to test and confirm this, that would be great)

I have done a few tests and also tried running the script with the "scripter" on Rom Toolbox, but so far I haven't seemed to get it to work yet. I would try modding the code, but I am an amateur on my best day, and honestly do not quite know what is going on in the code....

Feel free to make suggestions, test the code, or help in any way you choose. Hopefully this helps some people. Thanks
 
In the post I made for you here I said that init.d support is for the kernel that comes with the rom, not the modded kernel. Please adjust that to not cause any confusion.

Thanks


.
 
For any of you guys that might try to write your own scripts or edit any, here's a couple tips...

At the top of your script you always need to have the following line...
#!/system/bin/sh

At the very bottom of the script there should be 1 empty line.

If your on windows you need to use Notepad plus plus since it maintains proper syntax. On linux I use gedit.

You can also make edits on your phone with a text editor like the one that comes with root explorer.
 
Back
Top Bottom