[MOD][GUIDE]Remove cloudy overlay and improve ripple lockscreen - All Samsung Devices

Search This thread

Goldie

Inactive Recognized Developer
Oct 16, 2010
9,965
22,758
Hi all

Me and Dazznuts been playing with ripple renderer and found the following to remove the hazy overlay that made dark lockscreen wallpapers look bad on our devices. The mod makes two changes. One to remove the cloud and one to improve ripple visibility on dark walls. We just replace some values with 0x1 and 0x0.

We changed the refractiveIndex because if using a black heavy background the ripple became hard to see. Changing the refractiveIndex makes it refract a greater distance so it will usually pick up some of the colored part of the wallpaper. Using a totally black wallpaper with no image will result in ripple being invisible.

Decompile android.policy.jar and open CircleUnlockRippleRenderer.smali.

Search for this...

Code:
    .line 159
    const v5, 0x3f666666

    iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->mReductionRate:F

    .line 162
    const v5, 0x3f6e147b

    iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->refractiveIndex:F

    .line 163
    const v5, 0x3e051eb8

    iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->reflectionRatio:F

    .line 164
    iput v10, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->alphaRatio1:F

We need to change refractiveIndex and alphaRatio1. So at this line...

const v5, 0x3f6e147b

iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->refractiveIndex:F

Change it to....

const/4 v5, 0x1

iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->refractiveIndex:F

That improves ripple and now we remove cloudiness.....

This line...

iput v10, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->alphaRatio1:F

Becomes...

const/4 v5, 0x0

iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->alphaRatio1:F

So full code is....

Code:
    .line 159
    const/4 v5, 0x3f666666

    iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->mReductionRate:F

    .line 162
    const v5, 0x1

    iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->refractiveIndex:F

    .line 163
    const v5, 0x3e051eb8

    iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->reflectionRatio:F

const v5, 0x0

    .line 164
    iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->alphaRatio1:F

And thats it. Should work on any device. Renderer may be a little different but post and ask if you're not sure :)

Have fun and please spread the word to your respective devices devs :)

Sent from my GT-I9305 using Tapatalk 4
 
Last edited:

Goldie

Inactive Recognized Developer
Oct 16, 2010
9,965
22,758
Oh...screenshots...

Before....

sa6ypetu.jpg


After....

3une9u3y.jpg


Video... (laggy due to screen capture app)

https://www.youtube.com/watch?v=wDhLA-Zmo78&feature=youtube_gdata_player

Sent from my GT-I9305 using Tapatalk 4
 

tdunham

Recognized Contributor
Jun 21, 2008
13,686
36,462
TampaBay
Just thought I would add a couple of things for anyone trying this mod...
(it works perfectly btw. Thanks for this guys :))

From the code above, this line (actually, mReductionRate is missing entirely) does not exist in all smali codes. It is missing from the version I am using for JB 4.1.2:
iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->mReductionRate:F
It doesn't really matter but just saying if someone is looking for an exact match, they may not find it. ;)

Also, for newbies, just do a search for something simple like refractiveIndex
instead of the entire line since the public values are going to be different from rom to rom and the variables are also going to change.
For instance before I change the refractiveIndex value my line reads:
const v3, 0x3f6e147b

new line would be:
const/4 v3, 0x1
 
Last edited:

Goldie

Inactive Recognized Developer
Oct 16, 2010
9,965
22,758
From the code above, this line (actually, mReductionRate is missing entirely) does not exist in all smali codes. It is missing from the version I am using for JB 4.1.2:
iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->mReductionRate:F
It doesn't really matter but just saying if someone is looking for an exact match, they may not find it. ;)

Yeah smalis will differ. Mine is different. If using ink effect smalis its different for a start :)

Also, for newbies, just do a search for something simple like refractiveIndex
instead of the entire line since the public values are going to be different from rom to rom and the variables are also going to change.
For instance before I change the refractiveIndex value my line reads:
const v3, 0x3f6e147b

new line would be:
const/4 v3, 0x1

You mean the v rather than an ID? There is no public ids in that bit of code :)

Registers can indeed be different though with v5 vs v3 like you say :)

Sent from my GT-I9305 using Tapatalk 4
 

Sami Kabir

Senior Member
Oct 3, 2012
2,233
1,406
@Goldieking, Hey mate, I tried to replicate your mod but apktool gives me an error(s) and it won't recompile my android.policy.jar

I've attached both my CircleUnlockRippleRenderer.smali (zipped) and a picture of what error I'm getting in apktool...

(edit: sorry for the picture's bad quality, xda must have compressed it while uploading it...)

Please help me out :eek:
 

Attachments

  • error.jpg
    error.jpg
    59.3 KB · Views: 364
  • CircleUnlockRippleRenderer.zip
    18 KB · Views: 78
Last edited:

Goldie

Inactive Recognized Developer
Oct 16, 2010
9,965
22,758
@Goldieking, Hey mate, I tried to replicate your mod but apktool gives me an error(s) and it won't recompile my android.policy.jar

I've attached both my CircleUnlockRippleRenderer.smali (zipped) and a picture of what error I'm getting in apktool...

(edit: sorry for the picture's bad quality, xda must have compressed it while uploading it...)

Please help me out :eek:

Im guessing you're alphaRatio1 was v10 like alphaRatio2. You should leave the v as they were and just replace what is after the ","

Sent from my GT-I9305 using Tapatalk
 
Last edited:

Sami Kabir

Senior Member
Oct 3, 2012
2,233
1,406
Im guessing you're alphaRatio1 was v10 like alphaRatio2. You should leave the v as they were and just replace what is after the ","

Sent from my GT-I9305 using Tapatalk

Sorry mate, I didn't exactly get you.. can you elaborate on what line (or lines) I should and shouldn't edit? :eek:
 

Goldie

Inactive Recognized Developer
Oct 16, 2010
9,965
22,758
Actually scratch that. Are you sure you didn't edit anything else? Try to put const/4 instead of just const in the two lines.

Sent from my GT-I9305 using Tapatalk
 

Sami Kabir

Senior Member
Oct 3, 2012
2,233
1,406
Actually scratch that. Are you sure you didn't edit anything else? Try to put const/4 instead of just const in the two lines.

Sent from my GT-I9305 using Tapatalk

Okay, I found out that one of the lines/codes in my smali file had "const/4 v5" and the other one was "const v5"... so all I had to do was remove the "4" from that line

So, yeah now your mod works perfectly!! THANKS FOR SHARING THIS MATE!

One more thing, the first time when I tap on my lockscreen, the ripple effect will either not work or will lag.. But then if I tap again and again, it becomes normal and lag free... I've noticed this before applying your mod, but I just want to know that did you ever experience it or do you know how to solve it?

Its not a major issue but it gives a bad "first impression" if you know what I meant.. :eek:
 
Last edited:

dazznuts2000

Senior Member
Jan 20, 2011
285
361
Okay, I found out that one of the lines/codes in my smali file had "const/4 v5" and the other one was "const v5"... so all I had to do was remove the "4" from that line

So, yeah now your mod works perfectly!! THANKS FOR SHARING THIS MATE!

One more thing, the first time when I tap on my lockscreen, the ripple effect will either not work or will lag.. But then if I tap again and again, it becomes normal and lag free... I've noticed this before applying your mod, but I just want to know that did you ever experience it or do you know how to solve it?

Its not a major issue but it gives a bad "first impression" if you know what I meant.. :eek:

Cant say ive seen this myself, just tested a few times aswell.
 
  • Like
Reactions: bombaybadboy

glowerita

Senior Member
Apr 16, 2012
205
71
Udine (Italy)
Just thought I would add a couple of things for anyone trying this mod...
(it works perfectly btw. Thanks for this guys :))

From the code above, this line (actually, mReductionRate is missing entirely) does not exist in all smali codes. It is missing from the version I am using for JB 4.1.2:
iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->mReductionRate:F
It doesn't really matter but just saying if someone is looking for an exact match, they may not find it. ;)

Also, for newbies, just do a search for something simple like refractiveIndex
instead of the entire line since the public values are going to be different from rom to rom and the variables are also going to change.
For instance before I change the refractiveIndex value my line reads:
const v3, 0x3f6e147b

new line would be:
const/4 v3, 0x1

Hi. I'm on JB 4.1.2. I've try to change the Value like You suggest (const/4 v3, 0x1).

The Phone start, but cause me big quantity of FC. It doesn't arrive to the Lock Screen.

Mod work, in fact If I push Power button... the display turn off regulary and I can see the hazy overlay fixed. But, like said... all in FC.

Where I Wrong? :(
 

Top Liked Posts

  • There are no posts matching your filters.
  • 35
    Hi all

    Me and Dazznuts been playing with ripple renderer and found the following to remove the hazy overlay that made dark lockscreen wallpapers look bad on our devices. The mod makes two changes. One to remove the cloud and one to improve ripple visibility on dark walls. We just replace some values with 0x1 and 0x0.

    We changed the refractiveIndex because if using a black heavy background the ripple became hard to see. Changing the refractiveIndex makes it refract a greater distance so it will usually pick up some of the colored part of the wallpaper. Using a totally black wallpaper with no image will result in ripple being invisible.

    Decompile android.policy.jar and open CircleUnlockRippleRenderer.smali.

    Search for this...

    Code:
        .line 159
        const v5, 0x3f666666
    
        iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->mReductionRate:F
    
        .line 162
        const v5, 0x3f6e147b
    
        iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->refractiveIndex:F
    
        .line 163
        const v5, 0x3e051eb8
    
        iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->reflectionRatio:F
    
        .line 164
        iput v10, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->alphaRatio1:F

    We need to change refractiveIndex and alphaRatio1. So at this line...

    const v5, 0x3f6e147b

    iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->refractiveIndex:F

    Change it to....

    const/4 v5, 0x1

    iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->refractiveIndex:F

    That improves ripple and now we remove cloudiness.....

    This line...

    iput v10, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->alphaRatio1:F

    Becomes...

    const/4 v5, 0x0

    iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->alphaRatio1:F

    So full code is....

    Code:
        .line 159
        const/4 v5, 0x3f666666
    
        iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->mReductionRate:F
    
        .line 162
        const v5, 0x1
    
        iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->refractiveIndex:F
    
        .line 163
        const v5, 0x3e051eb8
    
        iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->reflectionRatio:F
    
    const v5, 0x0
    
        .line 164
        iput v5, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockRippleRenderer;->alphaRatio1:F

    And thats it. Should work on any device. Renderer may be a little different but post and ask if you're not sure :)

    Have fun and please spread the word to your respective devices devs :)

    Sent from my GT-I9305 using Tapatalk 4
    16
    Oh...screenshots...

    Before....

    sa6ypetu.jpg


    After....

    3une9u3y.jpg


    Video... (laggy due to screen capture app)

    https://www.youtube.com/watch?v=wDhLA-Zmo78&feature=youtube_gdata_player

    Sent from my GT-I9305 using Tapatalk 4
    6
    And it really does just give ripple that nice finish :)
    6
    Great work :thumbup::thumbup:

    +100
    Bravo :thumbup::thumbup:

    Sent from my NeatRom'ed GT-I9300 wifi hotspoting from my NeatRom'ed GT-I9100
    5
    Android 4.4.2 Galaxy S5 Update

    CircleUnlockRippleRenderer.smali no longer exists in android.policy.jar.

    The edit is now in framework/com.sec.android.visualeffect.jar and the file to edit is RippleInkRenderer.smali.

    The same edits from the OP apply.
    Cheers - TD
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