5,603,729 Members 37,790 Now Online
XDA Developers Android and Mobile Development Forum

[MOD][GUIDE][JB 4.1.2][UPDATED/NATIVE] Lockscreen Blur Effect

Tip us?
 
BOOTMGR
Old
(Last edited by BOOTMGR; 21st February 2014 at 07:18 AM.)
#41  
Recognized Contributor - OP
Thanks Meter 1456
Posts: 668
Join Date: Aug 2010
Location: Ahmedabad
Quote:
Originally Posted by Vivek_Neel View Post
Thanks for your reply.

I have only .png

No .jpg

Do u have any blurred image mate?
Am on mobile. .can't use gimp to create one

Edit:

Its working. .

Sent from my GT-I9100 using Tapatalk 2
The reason is that you need to enable lockscreen wallpaper which is done automatically when you set it up via SecGallery. This mod requires that you did it before because we'll need Lockscreen wallpaper enabled & lockscreen_wallpaper.png & lockscreen_wallpaper.jpg because blurred image is written to it ( i'm a bad coder, forget to add code to create it if it doesn't exist :P).
If it is not present there then there'll be bootloop or black wallpaper.


Quote:
Originally Posted by Sami Kabir View Post
This was my third attempt for setting this up in my phone and as expected it did not work... As I told before that I don't use Samsung's Gallery app, all I did was change the path of the lockscreen image.. which is "/data/data/com.sec.android.app.wallpaperchooser/files/lockscreen_Wallpaper.jpg" for me.. so I used that... I've attached my both log file and my android.policy.jar below...
You'll require stock gallery app to enable lockscreen wallpaper. Path to lockscreen wallpaper is defined in settings storage database with id lockscreen_wallper_path.It is the path from where wallpaper is loaded & which you must use in my mod.Additionally you'll need to enable lockscreen wallpaper by changing value of lockscreen_wallpaper to 1 in same database which secgallery does automatically.
Which gallery are you using?
Are you able to change lockscreen wallpaper using that gallery?

About the log, as i edited first post, you'll need to enable lockscreen wallpaper first as mentioned above or set wallpaper through secgallery once or simply copy any valid png file to /data/data/com.sec.android.gallery3d/lockscreen_wallpaper.png


Quote:
Originally Posted by LifeAsADroid View Post
Ok thanks!

So I've managed to copy entire framework folder to computer, deodex, and decompile the android.policy.jar file. However, whilst navigating to the com\android\internal\policy\impl\sec folder, I noticed I don't have a \sec folder... is this due to me having a different phone (thus different code files) than you? I also checked the \impl folder for the wallpaperwidget.smali file and cannot find one... also due to the naming for my similar wallpaperwidget.smali file being different?

Thanks for all the help!

---------- Post added at 01:17 AM ---------- Previous post was at 01:12 AM ----------




Thanks, but the second link (to the .jpg file) isn't working.
This mod is samsung specific...
The world aint all sunshine and rainbows, its a very mean and nasty place and I dont care how tough you are, it will beat you to your knees and keep you there permanently if you let it.
You, me, or nobody, is gonna hit as hard as life; but it aint about how hard you hit, its about how hard you can get hit and keep moving forward, how much you can take and keep moving forward.
Thats how winning is done...
Donate me some "Thanks" if i've helped you...
 
Sami Kabir
Old
#42  
Sami Kabir's Avatar
Senior Member
Thanks Meter 625
Posts: 1,579
Join Date: Oct 2012
Location: Manama, BH

 
DONATE TO ME
@BOOTMGR

I don't use SecGallery.apk.. I use the Gallery and Camera app (Gallery2.apk) from CM 10.1.. and yes I can't use it to set lock screen wallpapers.. that's why I use the stock wallpaper choosing app (SecWallpaperChooser.apk)

I guess I'll have to use Samsung's laggy Gallery app to use this mod then...

Sent from my GT-I9070

I Currently own a Samsung Galaxy S Advance
Running Sami OS 2.0 (Alpha build) with CoCore E 8.2 Kernel
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
My Website | Me @ Twitter | Me @ YouTube | Me @ Instagram
 
Geddd
Old
(Last edited by Geddd; 21st February 2014 at 11:48 AM.)
#43  
Member
Thanks Meter 11
Posts: 92
Join Date: Nov 2013
@OP, Thank you so much bro. It works now, sorry for the late feed back..
just a little bit confusion
I have lockscreen_wallpaper.png and jpg (both transparent) in data/data/sec.android.sec...
here how it looks

do you think it's really working now?
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2014-02-21-19-46-37[1].png
Views:	154
Size:	24.1 KB
ID:	2592093  
 
bamzzz
Old
#44  
bamzzz's Avatar
Member
Thanks Meter 82
Posts: 37
Join Date: Jun 2012
Location: Bandar Lampung

 
DONATE TO ME
I have create toggle for enable/disable this, but blur effect can't disable after set locksreen wallpaper with SecWallpaperChooser, if set locksreen wallpaper with SecGallery this working.. i think this called "lockscreen_wallpaper_path",, can anyone help me..! thank's..

Sorry my bad english
 
Vivek_Neel
Old
#45  
Vivek_Neel's Avatar
Recognized Contributor
Thanks Meter 16381
Posts: 6,070
Join Date: Dec 2012
Location: chennai

 
DONATE TO ME
Quote:
Originally Posted by Geddd View Post
@OP, Thank you so much bro. It works now, sorry for the late feed back..
just a little bit confusion
I have lockscreen_wallpaper.png and jpg (both transparent) in data/data/sec.android.sec...
here how it looks

do you think it's really working now?
Permission set to rw r r for both images?

Sent from my GT-I9100 using Tapatalk 2
 
Geddd
Old
(Last edited by Geddd; 2nd March 2014 at 04:47 AM.)
#46  
Member
Thanks Meter 11
Posts: 92
Join Date: Nov 2013
Quote:
Originally Posted by Vivek_Neel View Post
Permission set to rw r r for both images?

Sent from my GT-I9100 using Tapatalk 2
nope. rwrwrw


[hr]

edit: last attempt to try this mod, here's my log again.
http://www.datafilehost.com/d/125a562a
 
gerryS2
Old
#47  
Member
Thanks Meter 42
Posts: 68
Join Date: Apr 2013
Location: Avellino
Thanks @BOOTMGR for this effect, I have try to insert a smali to activate this effect with checkbox on the "fly" and it was a success
I would like to share the code that I inserted with you.
First search this line in WallpaperWidget:
Code:
invoke-direct {p0}, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->BlurImage()V
Under this line insert this code:
 
Code:
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "blur_checkbox"

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v0

    if-ne v0, v2, :cond_2
	
    .line 63
    invoke-virtual {p0}, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->updateWallpaper()V

    goto :goto_0
	
	:cond_2
    invoke-direct {p0}, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->setLockScreenWallpaper()V

    goto :goto_0
.end method

I hope I have been of help
The Following 3 Users Say Thank You to gerryS2 For This Useful Post: [ Click to Expand ]
 
BOOTMGR
Old
#48  
Recognized Contributor - OP
Thanks Meter 1456
Posts: 668
Join Date: Aug 2010
Location: Ahmedabad
Quote:
Originally Posted by gerryS2 View Post
Thanks @BOOTMGR for this effect, I have try to insert a smali to activate this effect with checkbox on the "fly" and it was a success
I would like to share the code that I inserted with you.
First search this line in WallpaperWidget:
Code:
invoke-direct {p0}, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->BlurImage()V
Under this line insert this code:
 
Code:
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "blur_checkbox"

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v0

    if-ne v0, v2, :cond_2
	
    .line 63
    invoke-virtual {p0}, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->updateWallpaper()V

    goto :goto_0
	
	:cond_2
    invoke-direct {p0}, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->setLockScreenWallpaper()V

    goto :goto_0
.end method

I hope I have been of help
Lockscreen constructor is called every time you press power key/ lock key so changes are on the fly. But it is better to avoid much toggles based on database because read/write to database is expensive operation. For better toggle you also need switch to System.Loadlibrary method in constructor so that RAM usage stays normal when it is not enabled. Look in my ROM for better toggle.
The world aint all sunshine and rainbows, its a very mean and nasty place and I dont care how tough you are, it will beat you to your knees and keep you there permanently if you let it.
You, me, or nobody, is gonna hit as hard as life; but it aint about how hard you hit, its about how hard you can get hit and keep moving forward, how much you can take and keep moving forward.
Thats how winning is done...
Donate me some "Thanks" if i've helped you...
The Following User Says Thank You to BOOTMGR For This Useful Post: [ Click to Expand ]
 
josephpatrick
Old
(Last edited by josephpatrick; 22nd March 2014 at 11:21 AM.)
#49  
Senior Member
Thanks Meter 52
Posts: 207
Join Date: Jan 2012
Default Blur effect not possible for stock lockscreen?

It works on swipe lockscreen only if ripple effect is disabled
 
phenomarc
Old
#50  
phenomarc's Avatar
Senior Member
Thanks Meter 52
Posts: 133
Join Date: Nov 2011
I have succesfully ported this to a SGS2 4.1.2 ROM, but it doesn't work with ripple lock because the png/jpg is called lockscreen_wallpaper_ripple, not lockscreen_wallpaper. There's a way to fix it?
Thanks in advance.
ROM: PHD v8 (GE Edition) / PAC 4.4
KERNEL: Dorimanx 8.43 DUALBOOT
MODEM: 250K

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes