WiFix - Fixes regional Wi-Fi problems in Android 4.0

Search This thread

fardjad

Senior Member
Mar 31, 2011
92
305
www.fardjad.com
WiFi Fix for Android 4.0

Description

I recently found out many people in certain countries no matter what kinds of devices they're using, have issues with WiFi when SIM-Card is inserted.

I realized that changing the WiFi Country Code solves the problem and made an application that does this automatically on each boot and on network state changes.

Installation

It's pretty easy; first of all you should root your device.

Then install WiFixManager.apk.



Start WiFix Manager from applications menu and tap Install WiFix (allow SuperUser permission.)



Once installed, you're ready to go. The application will change the country code when needed. You can also invoke it manually by dialing *#94349# (*#WIFIX#) and pressing the call button (don't forget to press call button; it's not a MSL code).



Updates

You can check for updates and install them via WiFix Manager.



Code:
Change Log:
1/14/12 WiFix V1.0, WiFix Manager V1.1:
Initial Release
1/25/12 WiFix 1.1, WiFix Manager V1.2:
Changed minimum SDK version and API Level to 3
Minor layout changes
Minor bug fixes
1/30/12 WiFix 1.2, WiFix Manager V1.3:
Added custom country code support
7/3/12 WiFix V1.2, WiFix Manager V1.31:
Minor layout bug fixes
Compiled with Android SDK 14
12/9/12 WiFix V1.2, WiFix Manager V1.32
Minor bug fixes (Device compatibility improvement.)
Added reboot prompt after installation and removal.
Compiled with Android SDK 16
Known Issues

Sometimes when you reboot your phone with WiFi turned on, you won't have internet access (you can't open webpages, download files etc.) even though it says it's already connected to your AP.
This issue can be fixed by turning WiFi Off and On or dialing *#WIFIX# as described before.

For ROM Cookers

By placing WiFix.apk in /system/app you'll have a WiFix enabled ROM.
If you're publishing that ROM, please include a link to this thread :)

Newer fix by XDA Member HTCZ715E

As of today, most of the manufacturers (including HTC and Sony) solved this Wi-Fi issue with their ROMs. Fortunately, there's no need for WiFix anymore.

For those who still have issues with custom ROMs and WiFix, try this.
 
Last edited:

jhedfors

Senior Member
Oct 16, 2009
1,536
779
St Paul, MN
Moto G6
OnePlus 6T
Not working....

While I have given the app root permissions, when I click "Install WiFix" it replies with:

"Can't get root access. Either your device is not rooted, or SuperUser request has been rejected."

Ironically, it is immediately followed by:

"WiFi Manager has been granted Superuser permissions."

Any suggestions... am I missing something?
 
  • Like
Reactions: edsontzr

fardjad

Senior Member
Mar 31, 2011
92
305
www.fardjad.com
While I have given the app root permissions, when I click "Install WiFix" it replies with:

"Can't get root access. Either your device is not rooted, or SuperUser request has been rejected."

Ironically, it is immediately followed by:

"WiFi Manager has been granted Superuser permissions."

Any suggestions... am I missing something?

It's a little bit strange.

Root access checking routine, basically opens su, and checks the User ID. So either it can't execute su or the id is different when you're root (!!!) or there is a problem with IO streams (I hope not.)

Anyways, you can help me fix this problem by posting the steps (from installation to error message) to reproduce the error.
Please do the following and post the result:

  1. Install a Terminal Emulator app (this one for example) or get into shell with adb (note that installing Terminal Emulator is preferred since you always log-in as root with an insecure kernel.)
  2. Open it and type "su" (without quotes), and press enter.
  3. Allow SuperUser permission request.
  4. Type "id" (without quotes), and press enter.
  5. Post the result here.
  6. Type "exit" (without quotes), and press enter to logout.

It will be useful to post your device and ROM information as well.

Thanks in advance for your help,
I'll fix it as soon as I realize where the problem is :)
 
Last edited:

fardjad

Senior Member
Mar 31, 2011
92
305
www.fardjad.com
Thanks. Working fine. much simpler to setup than the script.

You're welcome :)

The main difference between this application and that script is, it sets the wifi_country_code property by interacting with Secure system settings provider, thus it doesn't need to gain root access and execute sqllite for changing the country code. However it should be placed in /system/app to work. (WiFix Manager does this automatically with one time root permission.)
 
Last edited:

jhedfors

Senior Member
Oct 16, 2009
1,536
779
St Paul, MN
Moto G6
OnePlus 6T
It's a little bit strange.

Root access checking routine, basically opens su, and checks the User ID. So either it can't execute su or the id is different when you're root (!!!) or there is a problem with output/input streams (I hope not.)

Anyways, if you like, you can help me fix this problem by posting the steps (From installation to error message) to reproduce the error and do the following and posting the result:

  1. Install a Terminal Emulator app (this one for example) or get into shell with adb (note that installing Terminal Emulator is preferred since in rooted devices when you get into shell with adb shell you're already logged in as root.)
  2. Open it and type "su" (without quotes), and press enter.
  3. Allow SuperUser permission request.
  4. Type "id" (without quotes), and press enter.
  5. Post the result here.
  6. Type "exit" (without quotes), and press enter to close the SuperUser session.

It will be useful to post your device and ROM information as well.

Thanks in advance for your help,
I'll fix it as soon as I realize where the problem is :)

My steps were:

1. Install WiFix Manager
-Successfully installed
2. Open WiFix Manager
3. Click "Install WiFix"
4. Click "Allow" on the Superuser Request pop-up
5. I then get the error above.

After entering ID in Terminal Emulator, I get the response "Toolbox!"

I have HTC Vision/G2, running "Virtuous Quattro Beta 9" in Boot Manager.

Thanks!
 

fardjad

Senior Member
Mar 31, 2011
92
305
www.fardjad.com
My steps were:

1. Install WiFix Manager
-Successfully installed
2. Open WiFix Manager
3. Click "Install WiFix"
4. Click "Allow" on the Superuser Request pop-up
5. I then get the error above.

After entering ID in Terminal Emulator, I get the response "Toolbox!"

I have HTC Vision/G2, running "Virtuous Quattro Beta 9" in Boot Manager.

Thanks!

OK, so the problem is the id command output. normally it should be something like uid=0(root) gid=0(root), most likely it's a rom issue (try fixing your permissions), however I will release another APK (after about 10 hours) that doesn't fail if id does not contain root.
 
Last edited:
  • Like
Reactions: omidreza

fardjad

Senior Member
Mar 31, 2011
92
305
www.fardjad.com
While I have given the app root permissions, when I click "Install WiFix" it replies with:

"Can't get root access. Either your device is not rooted, or SuperUser request has been rejected."

Ironically, it is immediately followed by:

"WiFi Manager has been granted Superuser permissions."

Any suggestions... am I missing something?

My steps were:

1. Install WiFix Manager
-Successfully installed
2. Open WiFix Manager
3. Click "Install WiFix"
4. Click "Allow" on the Superuser Request pop-up
5. I then get the error above.

After entering ID in Terminal Emulator, I get the response "Toolbox!"

I have HTC Vision/G2, running "Virtuous Quattro Beta 9" in Boot Manager.

Thanks!

OK, I updated the first post and uploaded a new APK and a Recovery Flashable Zip.

Please test and report the results :)
 
Last edited:

TheBishopOfSoho

Senior Member
Nov 7, 2008
150
31
London
I'm not really sure I understand what problem this is fixing. I have a problem with my wifi that I want to check with you first. Mine is basically where the wifi turns itself off when I go out of range of a connected router for a few minutes . When I come back in range of the router I have to manually turn wifi back on before it will connect back to the wifi. This is despite having the sleep policy set to never so I have no idea why wifi won't stay on. I don't want to install this without understanding the issue a bit more first!

Thanks
Shane
 

Tekn010933

Senior Member
While I have given the app root permissions, when I click "Install WiFix" it replies with:

"Can't get root access. Either your device is not rooted, or SuperUser request has been rejected."

Ironically, it is immediately followed by:

"WiFi Manager has been granted Superuser permissions."

Any suggestions... am I missing something?

Have you tried fixing permission first incase ur Su or binaries are out dated? Or maybe not.

Sent from my PC36100 using xda premium
 
  • Like
Reactions: abuulala

fardjad

Senior Member
Mar 31, 2011
92
305
www.fardjad.com
I'm not really sure I understand what problem this is fixing. I have a problem with my wifi that I want to check with you first. Mine is basically where the wifi turns itself off when I go out of range of a connected router for a few minutes . When I come back in range of the router I have to manually turn wifi back on before it will connect back to the wifi. This is despite having the sleep policy set to never so I have no idea why wifi won't stay on. I don't want to install this without understanding the issue a bit more first!

Thanks
Shane

I don't think that this application can solve your problem. Sorry :)

WiFix simply changes the WiFi country code which might be set incorrectly (?) in IceCream Sandwich builds when SIM-Card is inserted.
 
Last edited:

omar302

Senior Member
Feb 15, 2006
1,532
580
Doha
HTC 10
OnePlus 7 Pro
If your phone can't find WiFi networks or can't connect to them unless you remove the SIM-Card then you're affected.
I would suggest you put in the app introduction to explain in an easier:

"If wifi is working fine in Gingerbread roms, but does not when flashing/upgarding to IceCreamSanwich, then this app will try to fix it!"
 
Last edited:
  • Like
Reactions: fardjad

Top Liked Posts

  • There are no posts matching your filters.
  • 205
    WiFi Fix for Android 4.0

    Description

    I recently found out many people in certain countries no matter what kinds of devices they're using, have issues with WiFi when SIM-Card is inserted.

    I realized that changing the WiFi Country Code solves the problem and made an application that does this automatically on each boot and on network state changes.

    Installation

    It's pretty easy; first of all you should root your device.

    Then install WiFixManager.apk.



    Start WiFix Manager from applications menu and tap Install WiFix (allow SuperUser permission.)



    Once installed, you're ready to go. The application will change the country code when needed. You can also invoke it manually by dialing *#94349# (*#WIFIX#) and pressing the call button (don't forget to press call button; it's not a MSL code).



    Updates

    You can check for updates and install them via WiFix Manager.



    Code:
    Change Log:
    1/14/12 WiFix V1.0, WiFix Manager V1.1:
    Initial Release
    1/25/12 WiFix 1.1, WiFix Manager V1.2:
    Changed minimum SDK version and API Level to 3
    Minor layout changes
    Minor bug fixes
    1/30/12 WiFix 1.2, WiFix Manager V1.3:
    Added custom country code support
    7/3/12 WiFix V1.2, WiFix Manager V1.31:
    Minor layout bug fixes
    Compiled with Android SDK 14
    12/9/12 WiFix V1.2, WiFix Manager V1.32
    Minor bug fixes (Device compatibility improvement.)
    Added reboot prompt after installation and removal.
    Compiled with Android SDK 16
    Known Issues

    Sometimes when you reboot your phone with WiFi turned on, you won't have internet access (you can't open webpages, download files etc.) even though it says it's already connected to your AP.
    This issue can be fixed by turning WiFi Off and On or dialing *#WIFIX# as described before.

    For ROM Cookers

    By placing WiFix.apk in /system/app you'll have a WiFix enabled ROM.
    If you're publishing that ROM, please include a link to this thread :)

    Newer fix by XDA Member HTCZ715E

    As of today, most of the manufacturers (including HTC and Sony) solved this Wi-Fi issue with their ROMs. Fortunately, there's no need for WiFix anymore.

    For those who still have issues with custom ROMs and WiFix, try this.
    11
    any one try this app by recovery method in 4.3 or 4.4 not apk type .....work with him or also freeze ?
    Hmm.. Upgraded N7 3g 2012 from 4.2.2 to 4.4.2 and got similar problem, wifix didn't help, so I tried "manual" method for wifixing. Looks like the only problem was in tablename. Option wifi_country_code moved (as for 4.4) from "secure" to "global" table of /data/data/com.android.proveders.settings/databases/settings.db , so general method forr changing country code still works.

    I wrote a short script (tried to run as init.d - but it has no sense as country code is beeing read from simcard when all init.d scripts are finished), so i used free Script Manager - SManager (https://play.google.com/store/apps/details?id=os.tools.scriptmanager) to launch script after boot.

    That's script code (just changed wifi_country_code location):
    Code:
    #!/bin/sh
    sleep 10
    sqlite3 /data/data/com.android.providers.settings/databases/settings.db "INSERT INTO global (name, value) VALUES ('wifi_country_code', 'EU');"
    svc wifi disable
    sleep 10
    svc wifi enable
    Also i've added sleep for 10 seconds for ensure that sim data is already read, and added wifi down - sleep - wifi up for reestablish network connection (as i'm using n/g network for old devices, so Nexus is connected in g-mode to my router when script is executed).

    Instruction:
    1. Download sqlite3 binary from any source (I've got it from xda http://xdaforums.com/showpost.php?p=45442929&postcount=2) and move it to /system/xbin, set permissions 755 (rwx-rx-rx)

    2. Save script to internal SD-card, f.e. as "fix_country_code.sh",

    3. Install script-manager, that is able to run scripts on boot, and set to execute script with root rights (like on screenshot if SManager is used). Also it's possible to test script w/o reboot
    10

    Hi everyone,

    Here's few tips to help you get your wifi working:


    Requirements:

    Rooted android phone.


    Steps:

    1. Download Market Unlocker (Google it, as you might not find the APK on Google play).

    2. After download is complete, open it and give Root privileges.

    3. On last tab, pick USA T Mobile, and wait until you see "Your mobile have changed to T Mobile successfully".

    4. Make sure Wifi is off and reboot your device.




    Notes:


    1. When you reboot your phone, make sure the wifi is off, or your wifi will freeze as usual.

    2. after reboot or boot up, make sure not to enable wifi until you see your mobile signal working(Means the mobile
    is not still searching for signal).

    3. Market unlocker should change your mobile SIM Code every time you reboot (It will give a
    notification). in case you are not sure if it worked, open market unlocker and pick USA T Mobile again.

    4. Open Wifi and Violla.

    happy rooting.
    4
    I was using this app on evervolv ics 4.0.4 and it worked nice.
    Now i have switched to evervolv 4.2.2 and it doesnt work. It works if i tap on "install wifix", put my phone on airplane mode and restart it. Then i can use wifi, until i connect to the phone netwrok again. After that again wifi doesnt work.

    Can you update the app?
    And can you open source it?
    Thanx a lot ;)
    4
    Can I suggest something?

    Why not make a flashable zip so "wifix.apk" can be flashed directly to "system/app" without having to use "wifixmanager.apk"

    Of course :)

    Here it is.