[Samsung Epic 4G Touch] rujelus22:
images are examples of live wallpapers showing through the lock screen

To start we will be editing 2 files Gallery3d.apk and android.policy.jar. I am not going to be going into how to decompile or compile things. There are plenty of great guides on xda about that already.

The edits made in gallery3d will allow for setting png wallpapers and lock screens. The reason we do this is because jpgs can not be transparent but pngs can. So we need to set the gallery to save new images as pngs. Here is how.

Gallery3D

Open

com\cooliris\media\LockScreenPhotographs$SetWallpaperThread.smali

Search for

const-string v2, "zzzzzz_lockscreen_wallpaper.jpg"

Change to

const-string v2, "zzzzzz_lockscreen_wallpaper.png"

Search for

sget-object v5, Landroid/graphics/Bitmap$CompressFormat;->JPEG:Landroid/graphics/Bitmap$CompressFormat;

Change to

sget-object v5, Landroid/graphics/Bitmap$CompressFormat;->PNG:Landroid/graphics/Bitmap$CompressFormat;

Open

com\cooliris\media\Photographs$SetWallpaperThread.smali

Search for

const-string v2, "zzzzzz_lockscreen_wallpaper.jpg"

Change to

const-string v2, "zzzzzz_lockscreen_wallpaper.png"

Search for

sget-object v5, Landroid/graphics/Bitmap$CompressFormat;->JPEG:Landroid/graphics/Bitmap$CompressFormat;

Change to

sget-object v5, Landroid/graphics/Bitmap$CompressFormat;->PNG:Landroid/graphics/Bitmap$CompressFormat;

Compile Gallery3D and put it aside for a min.

Now that we have the gallery setting the wallpapers as pngs we need to have the system look for png images instead of jpgs. To do that decompile android.policy.jar

android.policy.jar

Open

com\android\internal\policy\imp\WallpaperWidget.smali

Search for

const-string v1, "/data/data/com.cooliris.media/files/zzzzzz_lockscreen_wallpaper.jpg"

Change to

const-string v1, "/data/data/com.cooliris.media/files/zzzzzz_lockscreen_wallpaper.png"

Search for

const-string v4, "/system/wallpaper/default_lockscreen/default_lockscreen.jpg"

Change to

const-string v4, "/system/wallpaper/default_lockscreen/default_lockscreen.png"

Search for

const-string v3, "/data/data/com.cooliris.media/files/zzzzzz_lockscreen_wallpaper.jpg"

Change to

const-string v3, "/data/data/com.cooliris.media/files/zzzzzz_lockscreen_wallpaper.png"

Search for

const-string v6, "/data/data/com.cooliris.media/files/zzzzzz_lockscreen_wallpaper.jpg"

Change to

const-string v6, "/data/data/com.cooliris.media/files/zzzzzz_lockscreen_wallpaper.png"

That will allow the system to use transparent pngs for the wallpapers and lock screens but if you set one at this point you will always have a black background not transparent. To make the black background go away.

Open

com\android\internal\policy\impl\KeyguardViewBase$1.smali

Search for

const/high16 v0, 0x7000

Change to

const v0, 0x106000d

All set, compile android.policy.jar.

Flash both android.policy.jar and the gallery3d we made earlier and you will now be able to set the lock screen image to any transparent image that you have on your phone. When the screen is locked you will see your wallpaper image, or live wallpaper!!

Pre-compiled for deodexed Stock FH13

Transparent Lock Screen FH13

MD5: f294d408128131f433fe39480745e2ac