Fix for no WiFi connection when Sim is active

Search This thread

mrsalmanaziz

New member
Apr 21, 2014
3
0
request for framework file

I imported my HTC first from America and a major problem I found was that the WiFi didn't work. I was prepared to return my phone citing hardware problems but I waited and instead tried to find a solution by myself. It took me 4 days but I finally got it working.
This thread is for all others who have the same problem that I did.

Here is what I did:

1) unlock boot loader, root and do s-off
2) you must be running ruu 1.08.502.1
3) make your way to http://forum.xda-developers.com/showthread.php?t=1445766
There you can see many people have the similar problem.
Follow the instructions and install the app by the OP
(Make sure push the wifix app in the /system/app folder) verify the app is working properly by dialing the code given in the other thread. Open the wifix manager and set code to 'us'
4) if you read the thread you will see the app works for android 4.0 but most users having jellybean report it as not working
5) try the steps of post #250 (I used the AT&T code)
6) now whenever you restart make sure WiFi is switched OFF before reboot. When your phone boots up again make sure you're getting network signals, then open the market changer app and select AT&T. Then turn on the WiFi.
7) your Wi-Fi can see and connect to access points!




--------------------------------------------------------------------------------------------------------------------------

UPDATE 17/3/2014

WIFI NOW WORKS 100%

Ok with a lot of digging around I finally managed to fix my wifi. Sim inserted or not, wifi on/off at reboot or whatever, it doesn't matter because wifi always works. And no need for any annoying apps to run at boot!

For this method I had to endure a lot of headaches -_-
Had to search the whole internet, learn about adb commands, logcat, compiling .jar files etc

1) unlocked bootloader, rooted , s-off and running deodexed 1.08.502.4 . I did this on a clean install with no wifix/wifi codes/market unlocker

2)
First you have to learn how to compile and extract jar files:
http://forum.xda-developers.com/showthread.php?t=2251719

You just have to read "1. How to Decompile and Recompile *.jar file or classes.dex"

3)
http://forum.xda-developers.com/showthread.php?t=2368501
There are different methods for different roms but the main idea is the same.

You dont have to modify the telephony-commons.jar because it is not present in our rom, instead you have to modify "framework2.jar" which is present in /system/framework of android

And after you have decompiled, open on your PC
classout/com/android/internal/telephony/MccTable.smali

Like the post says:

" .line 189
if-eqz v2, :cond_0

.line 190
invoke-static {p0, v2}, Lcom/android/internal/telephony/MccTable;->setTimezoneFromMccIfNeeded(Landroid/content/Context;I)V

.line 191
invoke-static {p0, v2}, Lcom/android/internal/telephony/MccTable;->setLocaleFromMccIfNeeded(Landroid/content/Context;I)V

.line 192
invoke-static {p0, v2}, Lcom/android/internal/telephony/MccTable;->setWifiCountryCodeFromMcc(Landroid/content/Context;I)V

.line 195
:cond_0
"
change it to

"
.line 189
goto :cond_0
"

recompile framework2.jar , put it back in androids /system/framework and set permissions to Rw-r-r

then do some extra steps like the author said:

"Extra step 1
click on "/system/build.prop" and open in ES Note Editor;
seek line
ro.product.locale.region=GB
and change GB to US; confirm OK for save file.
mount /system R

Extra step 2
because of first boots, in Settings database is written our country code,
which should be US.
for this: install "Sqlite Editor", run, grant ROOT access. after program finds
& lists databases, look for & open "Settings Storage" > settings.db > global:
find "wifi_country_code", select it and press menu button > Edit Record;
change value to US and press "save" "

4)
You're not done yet, you need to read this too:
http://forum.xda-developers.com/showthread.php?t=2628707

once again edit mcctable of framework2.jar like in the first step (remember its not telephony-common) and then we have to modify another jar file.
This time its the /system/framework/framework.jar
after decompiling open in PC : classout/com/android/net/wifi/WifiStateMachine.smali
and edit as per the second post, recompile and paste it back into system/framework

Congrats!! Wifi now works no matter what you do!
(as long as your wifi is on channels 1-11 , if youre on channel 12 or 13 then I think you need to change wifi country code to an european country instead of 'us')

Note: Be sure to thank the original authors in the threads i've linked.

As usual, do these steps at your own risk, I am not responsible for your bricked devices. Do report if it worked for you.

Also I know i've made quite a bit of mess. Do tell if you have any problems with the steps. I was thinking about posting my own framework.jar and framework2.jar but i'm not sure if they are safe to share or they contain private data. I'll need to confirm from someone.


dear dramon, i want to fix my htc first's wifi issue, can you help me in this regard... please....in any way either the chinese person rom... or this framework files...please help me sir...
 

maazz

Senior Member
May 7, 2012
145
12
Thanks Dramon for your help. My htc has the same wifi issue as mentioned by the OP and swiftly solved, though temporary, by market unlocker.:good:
 

ammar97

New member
Feb 10, 2016
4
0
Salaam bro how are you?? i also found the solution but for me its Wificodes and Market unlocker both together and its done wifi working..but one thing is your GPRS working?
can u tell how can fix wifi with market unlocker or wificodes and how can I root my htc first ?
 

w69

Senior Member
May 28, 2010
160
10
Islamabad
I imported my HTC first from America and a major problem I found was that the WiFi didn't work. I was prepared to return my phone citing hardware problems but I waited and instead tried to find a solution by myself. I finally got it working.
This thread is for all others who have the same problem that I did.


Temporary Fix
1) unlock boot loader, root and do s-off
2) you must be running ruu 1.08.502.1
3) make your way to http://forum.xda-developers.com/showthread.php?t=1445766
There you can see many people have the similar problem.
Follow the instructions and install the app by the OP
(Make sure push the wifix app in the /system/app folder) verify the app is working properly by dialing the code given in the other thread. Open the wifix manager and set code to 'us'
4) if you read the thread you will see the app works for android 4.0 but most users having jellybean report it as not working
5) try the steps of post #250 (I used the AT&T code)
6) now whenever you restart make sure WiFi is switched OFF before reboot. When your phone boots up again make sure you're getting network signals, then open the market changer app and select AT&T. Then turn on the WiFi.
7) your Wi-Fi can see and connect to access points!




--------------------------------------------------------------------------------------------------------------------------

UPDATE 13/5/2014

WIFI NOW WORKS 100%

Ok with a lot of digging around I finally managed to fix my wifi. Sim inserted or not, wifi on/off at reboot or whatever, it doesn't matter because wifi always works. And no need for any annoying apps to run at boot!

For this method I had to endure a lot of headaches -_-
Had to search the whole internet, learn about adb commands, logcat, compiling .jar files etc

1) unlocked bootloader, rooted , s-off and running deodexed 1.08.502.4 . I did this on a clean install with no wifix/wifi codes/market unlocker

2)
First you have to learn how to compile and extract jar files:
http://forum.xda-developers.com/showthread.php?t=2251719

You just have to read "1. How to Decompile and Recompile *.jar file or classes.dex"

3) THIS STEP NO LONGER NEEDED *Removed*


4)
You need to read this too:
http://forum.xda-developers.com/showthread.php?t=2628707

modify "framework2.jar" which is present in /system/framework
And after you have decompiled, open on your PC
classout/com/android/internal/telephony/MccTable.smali
recompile framework2.jar , put it back in androids /system/framework and set permissions to Rw-r-r

Now we have to modify another file
This time its the /system/framework/framework.jar
after decompiling open in PC : classout/com/android/net/wifi/WifiStateMachine.smali
and edit as per the second post in the link, recompile and paste it back into system/framework,set permissions to Rw-r-r

Note : its best to use adb commands to copy and paste the framework files from android to PC and vice versa
(namely adb pull and adb push)

then do some extra steps:
"Extra step 1
click on "/system/build.prop" and open in any text editor(on android);
seek line
ro.product.locale.region=GB
and change GB to US; confirm OK for save file.
mount /system R

Extra step 2
because of first boots, in Settings database is written our country code,
which should be US.
for this: install "Sqlite Editor" (android app), run, grant ROOT access. after program finds
& lists databases, look for & open "Settings Storage" > settings.db > global:
find "wifi_country_code", select it and press menu button > Edit Record;
change value to US and press "save" "

Reboot.

Congrats!! Wifi now works no matter what you do!
(as long as your wifi is on channels 1-11 , if youre on channel 12 or 13 then I think you need to change wifi country code to an european country instead of 'us')

Note: Be sure to thank the original authors in the threads i've linked.

As usual, do these steps at your own risk, I am not responsible for your bricked devices. Do report if it worked for you.

Also I know i've made quite a bit of mess. Do tell if you have any problems with the steps. I was thinking about posting my own framework.jar and framework2.jar but i'm not sure if they are safe to share or they contain private data. I'll need to confirm from someone.
Is this method still the best in 2016 to fix htc first wifi issue. I have at&t stock version using it in Pakistan (Pakistan frequency bands are similar to UK).
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    I imported my HTC first from America and a major problem I found was that the WiFi didn't work. I was prepared to return my phone citing hardware problems but I waited and instead tried to find a solution by myself. I finally got it working.
    This thread is for all others who have the same problem that I did.


    Temporary Fix
    1) unlock boot loader, root and do s-off
    2) you must be running ruu 1.08.502.1
    3) make your way to http://forum.xda-developers.com/showthread.php?t=1445766
    There you can see many people have the similar problem.
    Follow the instructions and install the app by the OP
    (Make sure push the wifix app in the /system/app folder) verify the app is working properly by dialing the code given in the other thread. Open the wifix manager and set code to 'us'
    4) if you read the thread you will see the app works for android 4.0 but most users having jellybean report it as not working
    5) try the steps of post #250 (I used the AT&T code)
    6) now whenever you restart make sure WiFi is switched OFF before reboot. When your phone boots up again make sure you're getting network signals, then open the market changer app and select AT&T. Then turn on the WiFi.
    7) your Wi-Fi can see and connect to access points!




    --------------------------------------------------------------------------------------------------------------------------

    UPDATE 13/5/2014

    WIFI NOW WORKS 100%

    Ok with a lot of digging around I finally managed to fix my wifi. Sim inserted or not, wifi on/off at reboot or whatever, it doesn't matter because wifi always works. And no need for any annoying apps to run at boot!

    For this method I had to endure a lot of headaches -_-
    Had to search the whole internet, learn about adb commands, logcat, compiling .jar files etc

    1) unlocked bootloader, rooted , s-off and running deodexed 1.08.502.4 . I did this on a clean install with no wifix/wifi codes/market unlocker

    2)
    First you have to learn how to compile and extract jar files:
    http://forum.xda-developers.com/showthread.php?t=2251719

    You just have to read "1. How to Decompile and Recompile *.jar file or classes.dex"

    3) THIS STEP NO LONGER NEEDED *Removed*


    4)
    You need to read this too:
    http://forum.xda-developers.com/showthread.php?t=2628707

    modify "framework2.jar" which is present in /system/framework
    And after you have decompiled, open on your PC
    classout/com/android/internal/telephony/MccTable.smali
    recompile framework2.jar , put it back in androids /system/framework and set permissions to Rw-r-r

    Now we have to modify another file
    This time its the /system/framework/framework.jar
    after decompiling open in PC : classout/com/android/net/wifi/WifiStateMachine.smali
    and edit as per the second post in the link, recompile and paste it back into system/framework,set permissions to Rw-r-r

    Note : its best to use adb commands to copy and paste the framework files from android to PC and vice versa
    (namely adb pull and adb push)

    then do some extra steps:
    "Extra step 1
    click on "/system/build.prop" and open in any text editor(on android);
    seek line
    ro.product.locale.region=GB
    and change GB to US; confirm OK for save file.
    mount /system R

    Extra step 2
    because of first boots, in Settings database is written our country code,
    which should be US.
    for this: install "Sqlite Editor" (android app), run, grant ROOT access. after program finds
    & lists databases, look for & open "Settings Storage" > settings.db > global:
    find "wifi_country_code", select it and press menu button > Edit Record;
    change value to US and press "save" "

    Reboot.

    Congrats!! Wifi now works no matter what you do!
    (as long as your wifi is on channels 1-11 , if youre on channel 12 or 13 then I think you need to change wifi country code to an european country instead of 'us')

    Note: Be sure to thank the original authors in the threads i've linked.

    As usual, do these steps at your own risk, I am not responsible for your bricked devices. Do report if it worked for you.

    Also I know i've made quite a bit of mess. Do tell if you have any problems with the steps. I was thinking about posting my own framework.jar and framework2.jar but i'm not sure if they are safe to share or they contain private data. I'll need to confirm from someone.
    1
    Is this method still the best in 2016 to fix htc first wifi issue. I have at&t stock version using it in Pakistan (Pakistan frequency bands are similar to UK).

    It should still work.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone