[MISC] Activate and Adjust Wifi HotSpot Settings, No Root Necessary

Search This thread

oldsk00lz

Senior Member
Nov 14, 2008
233
14
Ok, this works great! Thanks guys.

I was getting errors running the wifi.sh until I actually ran:

Regarding launching the wifi ap settings, if you don't want to bother with making a shortcut, you can run the following (from terminal emulator or adb):

Code:
am start -a android.settings.SETTINGS -n com.android.settings/.wifi.WifiApSettings

I'll need to remember how to set it up with Anycut now. :)

Here's a workaround to get things working (for now)

Step 1 - Step 8 <snip>
Credit to teferi for his original USB tether script.

:)

Thanks HamNCheese, bentglasstube, tefari, sherifone...

-oldsk00lz
 

ochlo

Member
Feb 1, 2009
13
0
Seattle
wpa_supplicant Hosed

Update: Encryption works w/ android-wifi-tether pre-11 and VISIONary! I haven't tested to see if VISIONary fixed the issue or if the new version of a-w-t fixed the issue...

This works for me without encryption only. Same with android-wifi-tether. I am going to grep to find out where the config is stored from the hidden WiFi AP menu but I am wondering if it is a driver issue... In the source for android-wifi-tether they comment on the hardware detection:
"we really need a better method to detect such stuff."

I also noticed that for the method mentioned in this thread you have to kill dnsmasq if you toggle the AP setting off and want to use it at a later time. I added it to my wifi.sh:

Code:
killall dnsmasq
echo 1 > /proc/sys/net/ipv4/ip_forward
busybox ifconfig wl0.1 192.168.1.1
dnsmasq --strict-order --bind-interfaces --pid-file=/data/local/tmp/dnsmasq.pid --conf-file=/data/local/tmp/dnsmasq.conf  --listen-address 192.168.1.1  --dhcp-range 192.168.1.2,192.168.1.11 --dhcp-lease-max=10
iptables -t nat --append POSTROUTING --out-interface rmnet0 -j MASQUERADE
iptables --append FORWARD --in-interface wl0.1 -j ACCEPT
 
Last edited:

InkBlot14

Member
Oct 4, 2010
9
0
:directory nonesistent: cannon create /proc/sys/net/piv4/pi_forward
:not found
/data/local/tmp/wifi.sh: ./busybox :not found
:not found

dnsmasq: bad command line options: try --help
:not found
'ptables v1.3.7: invalid target name 'MASQUERADE
Try 'iptables -h' or 'iptables --help' for more information.
:not found

Like mikebot and others, I was getting this error message when running wifi.sh. After poking at it today, i figured out my problem and got it to work!

I'd created the wifi.sh using TextPad, it's an app like Notepad++, and I like it because it's a bit more robust than plain ol' Notepad. After I used adb push to get it to the phone, anytime I ran it I'd get those errors. Then I looked at the file on the phone. It looked just liked I entered it, with a /M at the end of each line!

It's something to do with how Windows/DOS treats text files, versus how UNIX based systems treat text files. Now, in textpad, my solution was to go to File > SaveAs, and change the save type to "Text file - UNIX". I believe Notepad++ can also do this, but the stock Notepad in windows does not.

So, if your wifi.sh isn't working, look at on your phone in Terminal Emulator (I used 'vi wifi.sh' to do so), and see if there's extra characters at the end of each line. If so, there's your problem.
 

androidtoy09

Senior Member
Jun 2, 2009
1,074
200

HamNCheese

Senior Member
Apr 15, 2010
247
63
Hollywood, FL
They aren't going to give you tethering for free in any OTA... Not after reducing the data cap and reminding everyone that it's prohibited just couple of days ago...
 

selectodude

Senior Member
Apr 7, 2010
69
14
Los Angeles, CA
They aren't going to give you tethering for free in any OTA... Not after reducing the data cap and reminding everyone that it's prohibited just couple of days ago...

They're going from throttling at 10GB to throttling at 5GB and they've always allowed tethering on all their blackberries so I don't know why they would nix it in an android device.

Could be worse, we could be paying an extra 15 dollars to access 2GB using the computer instead of the phone.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I feel like a goof asking again but has anyone got this working. I even deleted the files and readded it.
    I did install wifi tether for root users. Do you think that may have caused a problem with it. But was uninstalled and still not working

    Basically I reboot the phone.
    run scripts to get root
    start wifi tether on device in settings menus
    config the name and wpa security
    try and run the script and that is when I get the error.