-[MOD] TreVe Wifi Tether App for Galaxy S III and Galaxy Note 2

[App-Mod/Source] WifiTether for JB TouchWiz Roms

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.

Legal/GPL Stuff
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 -
Modded Source -

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 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)

New Options
Framework Tether(Fallback)
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

Wifi-Driver reload
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.

-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) -
WifiTether-TrevE_Mod_11_22_2012_driverReload2 (defaults to Wifi Driver Reload 2) -

Try to merge together what worked for everyone across different devices. There are 2 options in settings with mild enhancements
-Wifi-Driver Reload – Driver reload inside of tether script. Similar to 11/20 version
-Wifi-Driver Reload 2 – Driver reload outside of tether script. Similar to 11/18 version

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)
There is no code differences between the two apk versions, I just recently added in reload method 2 so rom devs can cook in whatever apk just works without changing settings.

Older Versions:

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 -
If insmod v2 doesnt work, insmod v3 switches to insmod on load, rrmod to unload, then reloads the driver when finished with with mfgloader -u / mfgloader -l

 - Hopefully working-
Driver Reload did not like loading with mfgloader in original build. This switches to insmod on load, mfgloader/rrmod to unload, then reloads the driver when finished with mfgloader -u / mfgloader -l

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
all superuser code removed outside of tether binary, should have less popups for non-supersu users
Framework tether mode moved to setup
Fixed settings being applied reverting user settings at first start
All Cyanogen hostapd binary leftovers removed
Busybox check removed

WifiTether_TrevE_Mod_11_18_2012.apk -
Bam – Symlinks gone by default thanks joshbeach for all testing
New option Netdndc Max mode, this should be devices default setting.
Encryption works starting this build with netdndc max mode

WifiTether-TrevE_Mod_11-17-2012.apk -

cut down symlinks to only move hostapd around.
Made a checkbox that controls symlink code. Trying to axe it all. Moved this and fallback to settings screen. now save/load
define wifi.interface where it is undefined like on t0ltespr (hack to wire it to ndc settngs)
try to work with t0ltespr’s /lib/ directory
cut down root code significantly (hopefully spam/timing issues resolved)

WifiTether_TrevE_Mod_11_15_12.apk - 
Code cleanup
e3d code driver reload mess moved
samsung symlink mess in separate class, hoping to ditch this all soon
fallback mode in separate class, wired up to wifitether settings (encryption should work)

WifiTether_TrevE_Mod_11_12_12.apk -

***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 eyecon82…&postcount=148
    mystery_tx_man suggests removing connection manager apk -…&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 -…&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-…&postcount=191

    Changing user agents works as described by mad_unix…9#post34388089 and free_man…9#post34500399

    open1your1eyes0 has some vpn setup links which should also work -…&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.

Debugging Issues

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) grab

adb push /system/xbin/
adb shell chmod 755 /system/xbin/
adb shell busybox dos2unix /system/xbin/

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
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
adb reboot

When the device comes back up, rerun the script.

adb shell su -c
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.
adb reboot

If you know what you are doing you can try to find a working combo. I added in the following command line args

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 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 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 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

DONATE TO THE EFF Let them know XDA-Developers sent you or you support the cause (…s-legal-threat)

Your email address will not be published. Required fields are marked *