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

sherifone

Senior Member
May 29, 2009
53
0
0
Interestingly enough if you install Launcher Pro or similar you can pop right on over to the Froyo AP settings.

Its very straight-forward, all you need to do is long press your homescreen, create a shortcut/activity that goes directly to the Wifi AP settings, what you are looking for is:

com.android.settings.wifi.WifiApSettings

Its as exactly as you would find on the Nexus One, its just hidden from the standard menus to keep the noobs out I suppose. Hopefully they leave this in, since the cat is out of the bag! :)

Edit:

HamNCheese has figured out that the temp root is necessary to kick things off. Its not really complex, here is his instructions:



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

Step 1: get root

Step 2: Add the wifi settings shortcut as posted in this thread and configure your AP

Step 3: Create dnsmasq.conf:

Code:
no-resolv
no-poll
server=208.67.222.222
server=208.67.220.220
dhcp-authoritative
Step 4: adb push dnsmasq.conf to /data/local/tmp

Step 5: create wifi.sh:

Code:
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.254 --dhcp-lease-max=253

iptables -t nat --append POSTROUTING --out-interface rmnet0 -j MASQUERADE

iptables --append FORWARD --in-interface wl0.1 -j ACCEPT
Step 6: adb push wifi.sh to /data/local/tmp

Step 7: su, change to /data/local/tmp and run wifi.sh

Step 8: (important) Connect to your AP only after dnsmasq is started, otherwise you will get weird DNS failures.

Credit to teferi for his original USB tether script.

:)
 
Last edited:

InGeNeTiCs

Senior Member
May 31, 2007
835
73
0
You beat me to it! I was just noticing that switchpro has an option to enable hotspot access. I still couldn't get to it, but the ssid popped up on my laptop.

This feature would make waiting for root soooo much easier. lol

Stupid dhcp...
 

cmstlist

Senior Member
Jan 11, 2010
3,359
517
243
Toronto
Rather than install an entirely new launcher, you could probably access this by installing AnyCut and creating a shortcut from there. Good luck to all you folks in G2 land!

Sent from my Nexus One using XDA App
 

philosophics

Senior Member
Dec 28, 2009
1,269
172
0
Um... Does anyone have gps these days?
Interestingly enough if you install Launcher Pro or similar you can pop right on over to the Froyo AP settings.

Its very straight-forward, all you need to do is long press your homescreen, create a shortcut/activity that goes directly to the Wifi AP settings, what you are looking for is:

com.android.settings.wifi.WifiApSettings

Its as exactly as you would find on the Nexus One, its just hidden from the standard menus to keep the noobs out I suppose. Hopefully they leave this in, since the cat is out of the bag! :)
I can't get anything to connect with it though so that's kind of a bust. Nice work on the hunt though!


Sent from my HTC Vision
 

InGeNeTiCs

Senior Member
May 31, 2007
835
73
0
To all of you trying to make it work, it doesn't. Something is disabled in the IP tables or something to that effect. The hotspot menu was removed from the settings.apk from the g2 shipped rom as another way to try and disable hotspot access. Looks like we're getting close!
 

mingkee

Senior Member
May 5, 2006
3,327
795
253
Brooklyn, NY
I think I found a solution.
We need to have an application to direct 3G data through post-added firewall and DHCP server, and direct to "hidden" hotspot.
When the application starts, it'll enable hotspot, and it'll get data from the network like other internet-based application, and direct to firewall/DHCP, and finally goes to the hotspot.
It's much like easytether or PDAnet, but the destination is hotspot instead of USB.
In addition, this application should have more options than native mobile hotspot like SSID hiding, site filtering, MAC address filtering.
 

HamNCheese

Senior Member
Apr 15, 2010
247
63
0
Hollywood, FL
Here's a workaround to get things working (for now)

Step 1: get root

Step 2: Add the wifi settings shortcut as posted in this thread and configure your AP

Step 3: Create dnsmasq.conf:

Code:
no-resolv
no-poll
server=208.67.222.222
server=208.67.220.220
dhcp-authoritative
Step 4: adb push dnsmasq.conf to /data/local/tmp

Step 5: create wifi.sh:

Code:
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.254 --dhcp-lease-max=253

iptables -t nat --append POSTROUTING --out-interface rmnet0 -j MASQUERADE

iptables --append FORWARD --in-interface wl0.1 -j ACCEPT
Step 6: adb push wifi.sh to /data/local/tmp

Step 7: su, change to /data/local/tmp and run wifi.sh

Step 8: (important) Connect to your AP only after dnsmasq is started, otherwise you will get weird DNS failures.

Credit to teferi for his original USB tether script.

:)
 

mingkee

Senior Member
May 5, 2006
3,327
795
253
Brooklyn, NY
YOUR CAN TETHER YOUR PHONE TO YOUR PC WITH "EASY TETHER"
Edit: IT WORKS You can Tether your phone using it

Has Anyone Tried "Easy Tether"

Can easytether do it over wifi????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
 

Anomaly

Senior Member
Oct 11, 2005
52
6
0
Gotta wait till next month to get this phone. :( But.

Why can't you give yourself a static IP in the same subnet as the phone and use the phone as your DNS server? Or is it not routing either?
 

sherifone

Senior Member
May 29, 2009
53
0
0
Gotta wait till next month to get this phone. :( But.

Why can't you give yourself a static IP in the same subnet as the phone and use the phone as your DNS server? Or is it not routing either?
Haven't tried that, but there might be an issue with trying to steal an IP from the T-Mobile dhcp pool.