1. Are you ready for the Galaxy S20? Here is everything we know so far!

[MetroPCS] [Tether] Simple tether script for root users

Discussion in 'Android Devices' started by ccaapton, Sep 27, 2014.

  1. ccaapton

    ccaapton Newbie
    Thread Starter

    I wrote two simple scripts for tethering on our LG F6. "tether.sh" will start the tether, while "untether.sh" will stop it. Both need to be run by root.

    You need to modify tether.sh and add your own SSID and password.

    I recommend the "script manager" to manage and fast access the scripts.

    It is definitely not as powerful as other GUI apps, but the scripts are simple and flexible enough so you can play with it, add or remove whatever stuff. Enjoy:D
     

    Attached Files:




    1. Download the Forums for Android™ app!


      Download

       
  2. ccaapton

    ccaapton Newbie
    Thread Starter

    Reserved for future use.
     
  3. giomiguelito

    giomiguelito Newbie

    Is this for Metro tether or non-metro tether? Does it work with CM11?
     
  4. ccaapton

    ccaapton Newbie
    Thread Starter

    I'm tethering on T-mobile and stock ROM. Never tested it on CM11, maybe you can try it for us.
     
  5. SP4WND

    SP4WND Well-Known Member

    Is there. Need for.user agent?
     
  6. ccaapton

    ccaapton Newbie
    Thread Starter

    Sorry I don't know if useragent needs to be changed on windows. I only tested with a linux machine and it works.

    Why not take a minute and run the scripts, and tell us what happened? :D
     
  7. giomiguelito

    giomiguelito Newbie

    So when you tether with this method T-Mobile doesn't know? I will test it on Angablade's CM11 V9 Rom and let you know what happens...
     
  8. giomiguelito

    giomiguelito Newbie

    Does not work on Angablade's CM11 V9 Rom.

    "Error connecting (Permission Denied)"
    "Failed to connect to hostapd - wpa_ctrl_open: Permission Denied"

    Ran as root. Anyone else tried this on CM11?
     
  9. giomiguelito

    giomiguelito Newbie

    Same thing on Xperion rom and stock 12b. Are you sure you got this to work?? lmao
     
  10. ccaapton

    ccaapton Newbie
    Thread Starter

    Why don't you run the commands in tether.sh line by line in adb or smanager, then tell me which line cause such error?

    If you are running tether.sh as a whole, do with with
    . This is because of the "noexec/nosuid" property on sdcard partition.
     
  11. Xieon

    Xieon Well-Known Member

    When executing as root this is the output error.

    stderr:
    Failed to connect to hostapd-wpa_ctrl_open: no such file or directory
     
  12. ccaapton

    ccaapton Newbie
    Thread Starter

    Are u on stock rom? I never test it on other rom
     
  13. Xieon

    Xieon Well-Known Member

    No, Xperion
     
  14. kevev

    kevev Lurker

    F6 running b12 on MetroPCS. I can connect to the AP but no internet access. Screenshot attached. I receive the same ERROR when running the script in terminal as root.

    h**p://imgur.com/RLlbE0P
     
  15. ccaapton

    ccaapton Newbie
    Thread Starter

    You can connect to the AP, good. The last "Fail" is irrelevant.
    Can you ping 192.168.43.41 on your computer? If yes, how about 8.8.8.8?
    What is the ip address assigned to your computer?

    I also need the output of the follow commands for diagnostics(run them one by one as root in sManager):
    1). ip r show
    2). ip rule show
    3). iptables -S
     
  16. kevev

    kevev Lurker

    Ping to 192.168.43.41 & 8.8.8.8 fail. The DHCP IP I receive is 192.168.43.84.

    Command:
    '/storage/sdcard0/Tether_Scripts/diag.sh'
    -------------
    Out:
    h '/storage/sdcard0/Tether_Scripts/diag.sh' <
    default via 100.152.225.41 dev rmnet0
    10.168.183.116 via 100.152.225.41 dev rmnet0
    10.177.0.34 via 100.152.225.41 dev rmnet0
    100.152.225.40/30 dev rmnet0 proto kernel scope link src 100.152.225.40
    100.152.225.41 dev rmnet0 scope link
    192.168.43.0/24 dev wlan0 proto kernel scope link src 192.168.43.1
    0: from all lookup local
    32765: from 100.152.225.40 lookup 1
    32766: from all lookup main
    32767: from all lookup default
    -P INPUT ACCEPT
    -P FORWARD ACCEPT
    -P OUTPUT ACCEPT
    -N bw_FORWARD
    -N bw_INPUT
    -N bw_OUTPUT
    -N costly_rmnet0
    -N costly_shared
    -N natctrl_FORWARD
    -N penalty_box
    -A INPUT -j bw_INPUT
    -A FORWARD -j bw_FORWARD
    -A FORWARD -j natctrl_FORWARD
    -A OUTPUT -j bw_OUTPUT
    -A bw_INPUT ! -i lo+ -m quota2 ! --name globalAlert --quota 2097152
    -A bw_INPUT -i rmnet0 -j costly_rmnet0
    -A bw_INPUT -i lo -j RETURN
    -A bw_INPUT -m owner --socket-exists
    -A bw_OUTPUT ! -o lo+ -m quota2 ! --name globalAlert --quota 2097152
    -A bw_OUTPUT -o rmnet0 -j costly_rmnet0
    -A bw_OUTPUT -o lo -j RETURN
    -A bw_OUTPUT -m owner --socket-exists
    -A costly_rmnet0 -m quota2 ! --name rmnet0 --quota 9223372036854775807 -j REJECT --reject-with icmp-net-prohibited
    -A costly_rmnet0 -j penalty_box
    -A costly_shared -j penalty_box
     
  17. ccaapton

    ccaapton Newbie
    Thread Starter

    Everything appears fine on android side. I suspect something is wrong in the routing table of windows.

    What is the result of cmd "route print" on windows?
     
  18. 3finger

    3finger Well-Known Member

    Just a thought, is there any way creating a new apn could bypass the tethering 'lock out' from the mpcs servers?
     
  19. kevev

    kevev Lurker

    Thank You for the scripts and assistance. I went ahead and flashed the KitKat ROM by hroark13 and figured out how to bypass tether restrictions on that ROM.

    These steps may help MetroPCS & T-Mobile users who use your scripts:

    http://androidforums.com/6773560-post716.html
     
  20. joseh

    joseh Newbie

    I'm on xpeeion thou ilthis will work but no luck...man nothing works on this fine grr...
     
  21. joseh

    joseh Newbie

    Here my log

    Command:
    '/storage/sdcard0/Download/Archive-1/tether.sh'
    -------------
    Out:
    / # exec /system/bin/sh '/storage/sdcard0/Download/Archive-1/tether.sh'
    200 0 Softap operation succeeded
    600 Iface linkstate wlan0 up
    200 0 Softap operation succeeded
    200 0 Softap operation succeeded
    600 Iface linkstate wlan0 down
    200 0 Softap operation succeeded
    600 Iface linkstate wlan0 up
    200 0 Interface configuration set
    200 0 Tether operation succeeded
    200 0 ipfwd operation succeeded
    200 0 Tether operation succeeded
    200 0 Tether operation succeeded
    FAIL
     
  22. ccaapton

    ccaapton Newbie
    Thread Starter

    Can you find any new hotspot on your computer? Try to connect it if anything come out.

    I'm currently on CarbonROM now, and I only tested my scripts on stock 4.1.2 . So I can not help much.
     
  23. joseh

    joseh Newbie

    Im on xperion cant find a way to tether, tryed a few ways cant seem to make it work or i am doin something wrong
     
  24. Droid Star

    Droid Star Lurker

    I'm having the same problem the untethered script is fine the tether script just dont provide internet
     

LG Optimus F6 Forum

The LG Optimus F6 release date was September 2013. Features and Specs include a 4.5" inch screen, 5MP camera, 1GB RAM, Snapdragon 400 processor, and 2460mAh battery.

September 2013
Release Date
0
Reviews
Loading...
Similar Threads - MetroPCS Tether Simple
  1. 4554551n
    Replies:
    1
    Views:
    422
  2. AppleUser
    Replies:
    7
    Views:
    1,428
  3. Papamalo
    Replies:
    4
    Views:
    1,100
  4. Ajay Valand
    Replies:
    3
    Views:
    1,165
  5. 5g Moto Android 11
    Replies:
    2
    Views:
    2,678
  6. ramennoodels
    Replies:
    2
    Views:
    3,946
  7. medusa193
    Replies:
    10
    Views:
    2,176
  8. mortpiedra
    Replies:
    1
    Views:
    873
  9. AppleUser
    Replies:
    7
    Views:
    5,056
  10. PhoenixDoe
    Replies:
    5
    Views:
    3,093

Share This Page

Loading...