[GUIDE][wifi tweak]How to increase the wifi signal lenght

kylon

Senior Member
Dec 17, 2010
2,618
2,033
0
this tweak can help those who want a better wifi signal

some people asked to me to install this on my rempuzzle
but this is ALREADY INSTALLED.


if your modem if too far from you,and your wildfire can t use the wifi connection,this may help you

ok,now,maybe,someone doesn t understand me(because of my grammatical errors xd) so i ll show you what it does:



what you need:
the calibration file of your rom(step1)
smali and basksmali or this tool to decompile/compile in 1 click-download
the framework.jar of your rom
this zip-download updated
7-zip installed

step1
using a root file manager go to /proc
copy the file named calibration in your sdcard
now go to system/framework and copy the framework.jar in your sdcard

step2
move the calibration file from your sd to system/etc and set permissions in this way:
owner v v
group v
others v

step3
download the zip and flash it

step4
go to system/etc open the calibration file and add this line at the end of the file

rssi_offset=0

save it

ATTN: 0 is the default value.a good value is 20 or 30 but remenber to add this - before the number.
so for ex.

rssi_offset=-20

step5
download the tool(only windows)
extract it everywhere
move the framework.jar in the folder of the tool(wifitweak)
now open de-compile_tool.bat and wait
you will see a new folder named classout
go to classout/android/net/wifi and open WifiManager.smali with for ex. notepad++

you have to edit this values:

[.....]
Code:
.field private static final MAX_RSSI:I = [COLOR="red"][B]-0x37[/B][/COLOR]

.field private static final MIN_RSSI:I = [COLOR="red"][B]-0x64[/B][/COLOR]
[....]

Code:
.method public static calculateSignalLevel(II)I
    .registers 9
    .parameter "rssi"
    .parameter "numLevels"

    .prologue
    const/4 v6, 0x0

    const/16 v5, [COLOR="red"][B]-0x46[/B][/COLOR]

    const/16 v4, [COLOR="red"][B]-0x50[/B][/COLOR]

    const/16 v3, [COLOR="red"][B]-0x64[/B][/COLOR]

    const/4 v2, 0x1

    .line 769
    const/4 v1, 0x4

    if-ne p1, v1, :cond_1f

    .line 770
    if-lt p0, v5, :cond_f

    .line 771
    const/4 v1, 0x3

    .line 786
    :goto_e
    return v1

    .line 772
    :cond_f
    if-ge p0, v5, :cond_15

    if-lt p0, v4, :cond_15

    .line 773
    const/4 v1, 0x2

    goto :goto_e

    .line 774
    :cond_15
    if-ge p0, v4, :cond_1d

    const/16 v1, [COLOR="red"][B]-0x55[/B][/COLOR]

    if-lt p0, v1, :cond_1d

    move v1, v2

    .line 775
    goto :goto_e

    :cond_1d
    move v1, v6

    .line 777
    goto :goto_e

    .line 780
    :cond_1f
    if-gt p0, v3, :cond_23

    move v1, v6

    .line 781
    goto :goto_e

    .line 782
    :cond_23
    const/16 v1, [COLOR="red"][B]-0x37[/B][/COLOR]

you need to adjust these values according to your number in the calibration file
there is isn t a way,someone says subtract the number you wrote in the calibration
someone else says add the number you wrote in the calibration file
so you have to try
for ex. you wrote -20
you can try to subtract 20 or add 20 or subtract 10 or add 10
ie you need to find a working value (for you and your rom) between -20 and +20
or -30 and +30 if you wrote -30
or -50 and +50 if you wrote -50


how to do that
take the first value(max rssi)= -0x37
go to google and write: 0x37 in decimal
the first result is a calculator

now 55-20=35

go to google and write: 35 in hex
35 = 0x23
replace 0x37 with 0x23
and so on... min rssi -20 etc...

i hope it is clear:)

step6

to compile
open the tool again and wait
you will see a new file classes.dex
open the framework.jar with 7-zip file manager
move the classes.dex in the window of 7-zip and press YES
now replace your new framework.jar in system/framework
MAKE A BACKUP OF THE ORIGINAL
set permissions:
owner v v
group v
others v

and reboot

if the phone stuck on boot, use adb or android commander to restore the original framework.jar

thanks to gtg465x for the idea:)
 

Attachments

Last edited:

kylon

Senior Member
Dec 17, 2010
2,618
2,033
0
I don t have a cm7 now
Give me your framework

Or wait that i download it
Which version are you using?

sent from my desire s
 
Last edited:

Pator57

Senior Member
Jun 11, 2012
1,152
317
0
I don t have a cm7 now
Give me your framework

Or wait that i download it
Which version are you using?

sent from my desire s
I used the latest stable version.Can't upload my framework now because i can't use my computer now.And also do that with the cm9 framework (latest build who are upload in the latest page of the subject) like koolsavas say will be a good tweak.

If i helped press the thanks butom ;)
 

lo2ay

Senior Member
Aug 14, 2011
719
267
0
24
Alexandria, Egypt
I'm a little concerned, won't this affect the hardware?
take for example xloud plugin, it works but damages the speaker after some time. Will this tweak do the same to the Wi-Fi antenna ?

Sent from my HTC Wildfire using Tapatalk 2
 

Scratch0805

Senior Member
Jun 18, 2011
2,151
1,315
0
Sheffield
I'm a little concerned, won't this affect the hardware?
take for example xloud plugin, it works but damages the speaker after some time. Will this tweak do the same to the Wi-Fi antenna ?

Sent from my HTC Wildfire using Tapatalk 2
A speaker uses a physical motion to create sound, force this to be to much for the size & quality of your speaker & it'll go pop.

An antenna doesn't have any physical motion and uses software to tell it what to do so I don't think it should break.

"I don't look for trouble it just kind of follows me around"
 
  • Like
Reactions: lo2ay

GlennBrownie

Senior Member
May 31, 2011
301
48
48
Manchester
Followed Guide Exactly,
currently rebooting after replacing Framework.jar on CM7.2 RC1.
Will Post with results.

EDIT: stuck on boot, restoring old framework... :rolleyes:
 
Last edited:

MacGyver Jack

Senior Member
Mar 1, 2012
84
7
0
Cheshire
Hi there

Currently trying to do this but im at step 5 and it opens the command box but then after a while it closes and nothing happens. I tried replacing the framework but the same problem occured. I took a screenshot just before it close and it says

"Everything is OK

Size: 7329144
Compressed: 3110500
decompiling...
"java" is not recognized as an internal or external command, operable program or batch file.
doing some stuff
Deleted file - E:\wifitweak\wifitweak\classes.dex

If someone can shed some light on this that would be great!