Before we start I have to throw out props to Eschelon, NxtGenCowboy, Virus, Ziggy471 and of course to the wifi-tether guys as well as cyanogen for the needed source/binaries (pre-11/18 versions) which allowed me to find the right path to get this 100% working. Also had awesome testers proxhack / jlmr731 and especially joshbeach. They all were essential to getting this all working. I still don’t have a GS3 so poor Eschelon/NxtGenCowboy probably wiped/installed about 100 builds before this worked (and after when I lost source… grumble). Thanks to everyone that helped.
Carriers hate tethering, you all know that. Use at your own risk/with common sense & dont blame me for anything that goes wrong
WifiTether is under the GPLv3 license, so below is the source for the mods
Original Source - https://code.google.com/p/android-wifi-tether/ Modded Source - http://svn.ziggy471.com/treve-tether
One setting you may have to pay attention to:
|-Wifi Driver Reload 1/2 Starting 11/20 build this is important. Change it if you have issues with adapters. Valid combinations are no reloads checked or one of the reload methods. Do not check both (theres no code to stop you from doing it now)|
you should not have to touch these settings at all for the GS3/Evo3d/Tab2.
|-Device-Profile: Leave this on auto (default)
-Setup-Method: For GS3: Netd-ndc, E3D use SoftAP (auto should have right defaults, might need to force)
-Netdndc Max Client Cmd: Required for GS3ish devices. If not enabled you will likely get an AP but cannot connect.
-MSS clamping: on (default)
-Routing fix: on (default)
Heres some geek details on basic binaries how the backend of wifi-tether works. The main modes I played with and required files are as detailed below:
Netd-ndc mode (Wifi Tether JB Default) -/system/bin/ndc (wrapper for netd) -/system/bin/netd (actual netd service) --Commands Executed /system/bin/ndc softap stopap /system/bin/ndc softap stop wlan0 /system/bin/ndc softap fwreload wlan0 AP /system/bin/ndc softap start wlan0 /system/bin/ndc softap set wlan0 wlan0 SSID encryption key channel (maxclients) 0 8 /system/bin/ndc softap startap /system/bin/ndc interface setcfg wlan0 192.168.2.254 255.255.255.0 up Netd mode -/system/bin/netd (netd service) --Commands are basically the same as above, but direct to netd service HostAP mode (used by stock tether app/fallback mode) -/system/bin/hostap (hostap service, init.qcom.rc looks for config /data/hostapd/hostapd.conf)
Use this if you have issues with wifitether mode. It forces on a wifihotspot using just framework. This has been reported to not throw up the paywall nag screen on some devices/carriers but YMMV. It may be able to be used nonroot as well if you ignore the initial warning.
Send NetdNDC Max Client CMD
This modifies the standard ndc command string to add in the Max Client parameter. More details are in post here
This is the standard driver reload for wifi tether. It runs inside one script “./tether start|stop”.
Wifi-Driver reload 2
This is a modified command that reloads firmware in a separate su request before the tether-edify code is run. May require SuperSU.apk
Use Cyanogen Hostapd Binary
This is the old method and is totally removed stating with the 11/20 update
The hostapd binary contained in atleast touchwiz JB contains extra fields explained above. If the extra commands are not working on X device you can try to fall back to this binary. This uses a dirty hack which installs hostapd and symlinks between versions for native or WifiTether mode. As long as you start and stop wifitether things should always line up. If you get into an issue where you crash things might get out of sync but should fix themselves next toggle of wifi tether. I have also added in menu items for the gs3 to manually swap binaries around.
*You must have a proper setup busybox for the GS3 code to work right. It moves system files around – you might win a reflash if things really go bad*
*Cyanogen Hostapd Symlink option only*- Make a system backup, it modifies sys files so theres a chance it will break something
- You might have to toggle stuff on and off once first if you run into errors. I think there’s an error on first creation of config
- If you switch modes between native wifitether and fallback mode (or stock tethering), your phone may spontaneously combust(wifi crashes) after the routing mess that ensues. Just reboot and you’ll be all set again.
- Seems to work better on SuperSU – Probably due to the per-app permissions vs per command.
**EVERY BUILD YOU MUST UNINSTALL OLD VERSIONS FIRST OR ATLEAST CLEAR APP DATA, IT DOES NOT UPGRADE NICELY**
-If you have problems, scroll down and read FAQ in post2 before posting
|WifiTether_TrevE_Mod_11_22_2012 (defaults to Wifi Driver Reload 1) - http://www.androidfilehost.com/?fid=9390195663897100312
WifiTether-TrevE_Mod_11_22_2012_driverReload2 (defaults to Wifi Driver Reload 2) - http://www.androidfilehost.com/?fid=9390208427046731813
Try to merge together what worked for everyone across different devices. There are 2 options in settings with mild enhancements
Please report in with Carrier/Device and what option works best for you. Valid combinations are no reloads checked or one of the reload methods. Do not check both (theres no code to stop you from doing it now)
|Apparently I botched code along the line somewhere between 18-20. Please let me know which one of these versions you are on and what works.
WifiTether_TrevE_Mod_11_20_2012_insmodv3.apk - If v2 doesnt work this should - http://www.androidfilehost.com/?fid=9390169635556426691
WifiTether_TrevE_Mod_11_20_2012.apk - Broken – Thanks halmo20 for catching that
GS3/E3D driver load/unload methods cleaned up, wifi driver reload checkbox should now be used, it was forced previously in code.
NetDndc Max client mode ported down to netd as well. Setting enables/disables with netd
WifiTether_TrevE_Mod_11_18_2012.apk - http://www.androidfilehost.com/?fid=9390190389996027907
WifiTether-TrevE_Mod_11-17-2012.apk - http://www.androidfilehost.com/?fid=9390188424645836869
cut down symlinks to only move hostapd around.
WifiTether_TrevE_Mod_11_12_12.apk - http://www.androidfilehost.com/?fid=9390169635556426338
***This app is signed with my certificate, you will need to uninstall old versions of wifitether first to use this***
- AP Starts but unable to connect - Make sure Send Netd max client mode option is on if your on JellyBean. read p1 for required settings
- Tether does not start / Adapter does not work after tether- Try to turn off Wifi-Driver Reload #1 and turn on Wifi-Driver Reload #2
- Tether cuts off on on charger connect/disconnect- Try to turn off connection optimizer. More here from eyecon82http://forum.xda-developers.com/show…&postcount=148
mystery_tx_man suggests removing connection manager apk - http://forum.xda-developers.com/show…&postcount=218
- Phone takes back control of wifi- Youll notice a “What the hell” toast message. Somehow the phone moved wifi state, either you toggled an app that turns on wifi or some system process was thinking for you. Disable whatever is doing it.
cyrnel suggests disabling wireless network location services - http://forum.xda-developers.com/show…&postcount=200
If you get it on screen shut off try changing “Wifi During Sleep” – on htc its menu -> settings – wifi -> menu -> Advanced -> Keep Wifi on during sleep -> Always
- You get a Tmobile Hotspot page-
Changing APNs is reported to work by Gandoff without changing useragent- http://forum.xda-developers.com/show…&postcount=191
Changing user agents works as described by mad_unix http://forum.xda-developers.com/show…9#post34388089 and free_man http://forum.xda-developers.com/show…9#post34500399
open1your1eyes0 has some vpn setup links which should also work - http://forum.xda-developers.com/show…&postcount=211
- XXXX still doesnt work - First try SuperSU. This will avoid a lot of headaches. Then make sure you are on latest version and that you have uninstalled/cleared app data when you went to a newer version. Read over the last few pages of thread at least too to make sure its not a known issue then go for it and post away. Make sure you include Carrier / Device / Rom / SU application.
For those people having issues on other gs3 like devices / roms / whatever I do not even have a gs3 so this is all blind. To try to help debugging I created a script to hopefully grab information needed. This should help from both working/nonworking devices to help eliminate the stupid symlink code and fix up other devices.
The scripts point is to try to get a working AP. If you can post how you did it and we can get source changed. By default it does no driver reloads and starts an Open AP with SSID TrevScript.
First grab the latest script from svn (ill update it with more info after I get some logs so make sure you have latest)
http://svn.ziggy471.com/treve-tether/ grab tetherdebug.sh
adb push tetherdebug.sh /system/xbin/ adb shell chmod 755 /system/xbin/tetherdebug.sh adb shell busybox dos2unix /system/xbin/tetherdebug.sh
Make sure wifi is on but do not start witfitethering. All you want to do is run “Set Binaries to WifiTether” option in the menu of app then follow below code
adb shell su -c tetherdebug.sh adb pull /data/local/tmp/tether.log
rename the file to tether_wifibinaries.log. Check to see if any AP is available.
now run “Set Binaries to Native” option in app and reboot device
When the device comes back up, rerun the script.
adb shell su -c tetherdebug.sh adb pull /data/local/tmp/tether.log
rename the file to tether_nativebinaries.log. Check to see if any AP is available.
reboot after you get the file.
If you know what you are doing you can try to find a working combo. I added in the following command line args
ARG1 = ENCRYPTION. NONE/WPA2
ARG2 = DRIVERRELOAD. NONE/insmod/mfgloader
ARG3 = DRIVERTOLOAD. /system/lib/modules/dhd.ko (or whatever module is, required if ARG2 is set)
Make sure wifi is on but do not start witfitethering. All you want to do is run “Set Binaries to WifiTether” option in the menu of app to start with a known working base then follow below code
try no encryption with insmod where your wifi module is /system/lib/modules/dhd.ko
adb shell su -c tetherdebug.sh NONE insmod /system/lib/modules/dhd.ko
try no encryption with mfgloader where your wifi module is /system/lib/modules/dhd.ko
adb shell su -c tetherdebug.sh NONE mfgloader /system/lib/modules/dhd.ko
try wpa2 (password is Trev) with insmod where your wifi module is /system/lib/modules/dhd.ko
adb shell su -c tetherdebug.sh WPA2 insmod /system/lib/modules/dhd.ko
There shouldn’t be personal information in the debug logs, the most I can think of that would be displayed is if you have an encryption passphrase set in wifitether. Sending the 2 files named with what mode you were in will help get it going elsewhere and hopefully kill the symlink code