1. Download our Official Android App: Forums for Android!

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

Discussion in 'Android Devices' started by Nikguy, Dec 23, 2013.

  1. Nikguy

    Nikguy Member
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    60
    Joined:
    May 5, 2013

    May 5, 2013
    60
    2
    16
    Male
    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
     

    Advertisement

  2. GameTheory

    GameTheory Android Expert
    Rank:
     #28
    Points:
    743
    Posts:
    4,283
    Joined:
    Jul 23, 2012

    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


    .
     
  3. Nikguy

    Nikguy Member
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    60
    Joined:
    May 5, 2013

    May 5, 2013
    60
    2
    16
    Male
    Fixed. Thanks for the heads up
     
  4. GameTheory

    GameTheory Android Expert
    Rank:
     #28
    Points:
    743
    Posts:
    4,283
    Joined:
    Jul 23, 2012

    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.
     
Tags:

Share This Page

Loading...