[Galaxy S III Themes and Apps] Arsaw:
Hello,

This is Xperia Z lockscreen ported for Galaxy S3 I9300. Mod is currently based on Samsung rom version ZSEMA1 & XXEMR2. I will try to add more rom version whenever possible.

This modified android.policy.jar. So please do not try it on other phone models.

If you have other mods in your android.policy.jar, this mod will break it.

This mod doesn't gives you toggle between Samsung Ripple lockscreen and Xperia Z lockscreen. You will get only Xperia Z lockscreen.

If you do not know how Xperia Z lockscreen looks like, watch this video prepared by MohammedAzi (included a guide to change lockscreen wallpaper) : YOUTUBE Thank you MohamedAzi.

How to install

1) Download the main mod zipfile below. Then choose the right framework for your phone. I'll try to add more

2) Backup your rom (Nandroid backup)

3) Flash the main mod zipfile first and then flash the chosen framework in CWM (Don't reboot in between)

4) Done

Bugs

1) Upon unlocking, Samsung lockscreen's wallpaper is still visible for about 0.3-0.5 second. Solution by JoFury: set fully black wallpaper for samsung lockscreen. Then go to settings - developers option and set windows animation to 0.5 or off. Thanks JoFury.

2) The music control/widget in lockscreen doesn't works with Samsung music player. Install third party apps as workaround.

3) The music control/widget always show "No Tracks Available". Maybe installing Sony music player would solve it.

4) No shortcut to change Xperia Z lockscreen wallpaper. Workaround:

Solution by RocketSauce83

Replace the UxpNxtLockscreen.apk with this version : http://xdaforums.com/showthread.php?p=39354512

Thanks RocketSauce83

Solution by Hyperrunner :

http://xdaforums.com/showthread.php?p=38960185

Thanks Hyperrunner

5) Samsung Ripple Effects will cause screen to freeze, so please turn it off when you're using XZ lockscreen.

That's it. Thanks

Download

Main Mod

http://www.mediafire.com/?un6239axlgsqys6

Choose framework based

XXEMB5

ZSEMA1

XXEMR2

XXEMB1

ELLC

Screenshot

Guide

How to add XperiaZ lockscreen to Samsung based rom. I use stock rom 4.1.2 for this guide.

This is my method to mod XperiaZ lockscreen for Samsung based rom. This guide assume you already familiar with apktool/baksmali/smali process.

Required tools

1)Apktool and baksmali/smali program

2)7zip

3)Notepad ++

Required files from XperiaZ rom

1)UxpNxtLockScreen.apk (need to be modified)

2)WallpaperPicker.apk

3)com.sonyericsson.navigationbar_impl.jar from system/framework

4)SoMADigitLight.ttf from system/fonts

5)customization folder from system/etc

6)com.sonyericsson.navigationbar.xml from system/etc/permissions

7)XperiaZ framework-res.apk & SemcGenericUxpRes.apk from system/framework

8)XperiaZ android.policy.jar (for source code)

I already packed Item 1-6 into flashable zipfile as “main mod”. Download at OP. You can skip to step 2 if you want to use my main mod.

Step 1

1)Install XperiaZ frameworks in apktool

2)Decompile UxpNxtLockScreen.apk with apktool.

3)Find smali/com/sonyericsson/lockscreen/uxpnxt/UxpNxtLockScreen.smali and open it up

4)Find invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->isIccInvalidCard()Z

5)Samsung framework doesn’t support this method. So

6)Change it to invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->hasIccCard()Z

That’s it, recompile it with apktool

Step2

1)Decompile XperiaZ android.policy.jar with baksmali/smali program

2)From the output, go to smali/com/android/internal/policy/impl and copy ExtendedKeyguardScreen.smali and ExternalLockScreen.smali

3)ExternalLockScreen.smali need to be modified to prevent package validation

4)I’m sure there is easy way to turn package validation off but here’s what I did:

Find invoke-static {p0, v4}, Lcom/android/internal/policy/impl/ExternalLockScreen;->validateExternalLockScreen(Landroid/content/Context;Landroid/content/ComponentName;)Z

Delete the red one

.line 238
sget-object v9, Lcom/android/internal/policy/impl/ExternalLockScreen;->sLockScreenInfoLock:Ljava/util/concurrent/locks/Lock;

invoke-interface {v9}, Ljava/util/concurrent/locks/Lock;->unlock()V

[COLOR="Red"] .line 241
if-nez v4, :cond_2[/COLOR]

.line 242
invoke-static {p0}, Lcom/android/internal/policy/impl/ExternalLockScreen;->getExternalLockScreenPackage(Landroid/content/Context;)Landroid/content/ComponentName;

move-result-object v4

[COLOR="red"].line 246
:cond_2
invoke-static {p0, v4}, Lcom/android/internal/policy/impl/ExternalLockScreen;->validateExternalLockScreen(Landroid/content/Context;Landroid/content/ComponentName;)Z

move-result v8

.line 250
if-eqz v8, :cond_3[/COLOR]

.line 251
invoke-virtual {v4}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;

move-result-object v9

Find .method private static validateExternalLockScreen(Landroid/content/Context;Landroid/content/ComponentName;)Z

Delete the red one

.method private static validateExternalLockScreen(Landroid/content/Context;Landroid/content/ComponentName;)Z
.locals 4
.parameter "context"
.parameter "info"

.prologue
const/4 v1, 0x0

.line 131
[COLOR="red"] if-eqz p1, :cond_0[/COLOR]

invoke-virtual {p1}, Landroid/content/ComponentName;->getClassName()Ljava/lang/String;

move-result-object v2

[COLOR="red"] if-eqz v2, :cond_0[/COLOR]

invoke-virtual {p1}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;

move-result-object v2

[COLOR="red"] if-nez v2, :cond_1

.line 132
:cond_0
const-string v2, "ExternalLockScreen"

const-string v3, "External lockscreen name and package info has not been set correctly!"

invoke-static {v2, v3}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
[/COLOR]
.line 147
:goto_0
return v1

.line 140
:cond_1
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

move-result-object v0

.line 141
.local v0, pm:Landroid/content/pm/PackageManager;
const-string v2, "com.sonyericsson.permission.EXTERNAL_LOCKSCREEN"

invoke-virtual {p1}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;

move-result-object v3

invoke-virtual {v0, v2, v3}, Landroid/content/pm/PackageManager;->checkPermission(Ljava/lang/String;Ljava/lang/String;)I

move-result v2

[COLOR="red"] if-nez v2, :cond_2[/COLOR]

.line 143
const/4 v1, 0x1

goto :goto_0

[COLOR="red"] .line 146
:cond_2
const-string v2, "ExternalLockScreen"

const-string v3, "Validation of external lockscreen failed!!"

invoke-static {v2, v3}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

goto :goto_0[/COLOR]
.end method

That's it. Save it.

Step 3

1)Next extract your phone/rom android.policy.jar and decompile it with baksmali/smali program. From the output, copy and paste the ExtendedKeyguardScreen.smali and the modified ExternalLockScreen.smali to smali/com/android/internal/policy/impl

2)Then open smali/com/android/internal/policy/impl/ LockPatternKeyguardView.smali. Add the codes (highlighted in blue) and amend the codes (highlighted in green) as below

.field private mHasDialog:Z

.field mInfoCallback:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$InfoCallbackImpl;

[COLOR="Blue"].field private mIsExternallyLoadedLockScreenEnabled:Z[/COLOR]

.field private mIsTalkbackDrvModeOn:Z

Find # virtual methods.method public cleanUp()V

# virtual methods
.method public cleanUp()V
.locals 2

.prologue
const/4 v1, 0x0

[COLOR="blue"]const/4 v0, 0x0

iput-boolean v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mIsExternallyLoadedLockScreenEnabled:Z[/COLOR]

.line 1096
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockScreen:Landroid/view/View;

Find .method createLockScreen()Landroid/view/View;

.prologue
[COLOR="blue"] iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;

iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;

invoke-static {v1, v2}, Lcom/android/internal/policy/impl/ExternalLockScreen;->getLockScreen(Landroid/content/Context;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)Landroid/view/View;

move-result-object v0

.local v0, lockView:Landroid/view/View;
if-eqz v0, :cond_1

const/4 v1, 0x1

:goto_0
iput-boolean v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mIsExternallyLoadedLockScreenEnabled:Z

.line 1038
iget-boolean v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mIsExternallyLoadedLockScreenEnabled:Z

if-nez v1, :cond_0[/COLOR]

.line 1268
new-instance v0, Lcom/android/internal/policy/impl/sec/LockScreen;

[COLOR="blue"] .end local v0 #lockView:Landroid/view/View;[/COLOR]
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;

iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;>mConfiguration:Landroid/content/res/Configuration;

iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;>mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;

iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;>mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;

iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;>mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;

invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/sec/LockScreen;->(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V

.line 1274
[COLOR="Lime"] .restart local v0 #lockView:Landroid/view/View;[/COLOR]
[COLOR="blue"] :cond_0[/COLOR]
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V

.line 1275
return-object v0

[COLOR="Blue"] :cond_1
const/4 v1, 0x0

goto :goto_0[/COLOR]
.end method

That's it. Recompile it and push it together with all the required files (item1 - item6) mentioned above into your phone and reboot.