Xperia ports always manage to steal the show in any development forum, thanks to the brilliant and unique looks of the Xperia UI in the Sony flagships. Sony is one of the OEMs which focuses more on the usability and software experience rather than stuffing the device with more-than-necessary hardware. Sony flagships come preloaded with many cool features like the Bravia engine, Xperia home launcher, Walkman music player and many more which will differentiate them from the other devices in the shelf. Previously we have shown many Xperia ports, you can download the Xperia home launcher for all devices from the link below.

Today we are bringing you yet-another Xperia Z3 port which brings a lot of SystemUI features and the Lockscreen particle effect on your CM12 powered device. STRYDER~007 of XDA came up with a special Xperia Z3 SystemUI & Lockscreen port  which will bring a lot of features to your CM12 device, however the saddest part is that this port is confirmed not working on CM12.1 devices which is a bit of surprise as both the CM versions are nearly similar. Nevertheless, there is a huge CM12 crowd to grab this awesomeness, so here goes the feature list and screenshots of this Xperia Z3 port.

Features:

  • Drag And Drop To Add Or Remove Quick Settings (some of them are not working)
  • Added New Animations
  • Z3 Particle Effect Lockscreen With 3 Different Clocks On Lockscreen
  • Xperia Z3 Lollipop Live Wallpaper
  • Xperia Z3 Lollipop Clock Widgets
  • Xperia Z3 Media Sounds

Screenshots:

xperia-z3-SystemUI

xperia-z3-Lockscreen

Quite an impressive UI, isn’t it? Now it’s time to see how to get this beauty on your CM12 device. The developer made the port as a simple flashable zip file, so all you need is a custom recovery to flash the file and you’re good to go but there’re is a catch. You need to disable the signature verification for all the apps on your device so that the apps in the port can work on your device with different signatures. So, let’s see how to disable the signature verification on your device.

Disable Signature Verification on your Device

  1. Firstly, you need to pull the Services.jar file which is located in the /system/framework directory on your device (Take a backup of the Services.jar file for safety). You can pull the file from your device directly using ADB Pull command.
  2. Decompile the Services.jar file using the baksmali technique. You can find the step-to-step guide to decompile .Jar files here.
  3. From the decompiled classes.dex folder, navigate to \smali\com\android\server\pm\ path and open the PackageManagerService.smali using any text editor. (Preferably Notepad++)
  4. Find the below method in the smali file:
    .method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
        .locals 11
        .param p0, "s1"    # [Landroid/content/pm/Signature;
        .param p1, "s2"    # [Landroid/content/pm/Signature;
    
        .prologue
        const/4 v6, 0x1
    
        const/4 v8, -0x3
    
        const/4 v7, 0x0
    
        .line 2955
        if-nez p0, :cond_1
    
        .line 2956
        if-nez p1, :cond_0
    
        .line 2988
        :goto_0
        return v6
    
        .line 2956
        :cond_0
        const/4 v6, -0x1
    
        goto :goto_0
    
        .line 2961
        :cond_1
        if-nez p1, :cond_2
    
        .line 2962
        const/4 v6, -0x2
    
        goto :goto_0
    
        .line 2965
        :cond_2
        array-length v9, p0
    
        array-length v10, p1
    
        if-eq v9, v10, :cond_3
    
        move v6, v8
    
        .line 2966
        goto :goto_0
    
        .line 2970
        :cond_3
        array-length v9, p0
    
        if-ne v9, v6, :cond_5
    
        .line 2971
        aget-object v6, p0, v7
    
        aget-object v9, p1, v7
    
        invoke-virtual {v6, v9}, Landroid/content/pm/Signature;->equals(Ljava/lang/Object;)Z
    
        move-result v6
    
        if-eqz v6, :cond_4
    
        move v6, v7
    
        goto :goto_0
    
        :cond_4
        move v6, v8
    
        goto :goto_0
    
        .line 2976
        :cond_5
        new-instance v3, Ljava/util/HashSet;
    
        invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
    
        .line 2977
        .local v3, "set1":Ljava/util/HashSet;, "Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
        move-object v0, p0
    
        .local v0, "arr$":[Landroid/content/pm/Signature;
        array-length v2, v0
    
        .local v2, "len$":I
        const/4 v1, 0x0
    
        .local v1, "i$":I
        :goto_1
        if-ge v1, v2, :cond_6
    
        aget-object v5, v0, v1
    
        .line 2978
        .local v5, "sig":Landroid/content/pm/Signature;
        invoke-virtual {v3, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
    
        .line 2977
        add-int/lit8 v1, v1, 0x1
    
        goto :goto_1
    
        .line 2980
        .end local v5    # "sig":Landroid/content/pm/Signature;
        :cond_6
        new-instance v4, Ljava/util/HashSet;
    
        invoke-direct {v4}, Ljava/util/HashSet;-><init>()V
    
        .line 2981
        .local v4, "set2":Ljava/util/HashSet;, "Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
        move-object v0, p1
    
        array-length v2, v0
    
        const/4 v1, 0x0
    
        :goto_2
        if-ge v1, v2, :cond_7
    
        aget-object v5, v0, v1
    
        .line 2982
        .restart local v5    # "sig":Landroid/content/pm/Signature;
        invoke-virtual {v4, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
    
        .line 2981
        add-int/lit8 v1, v1, 0x1
    
        goto :goto_2
    
        .line 2985
        .end local v5    # "sig":Landroid/content/pm/Signature;
        :cond_7
        invoke-virtual {v3, v4}, Ljava/util/HashSet;->equals(Ljava/lang/Object;)Z
    
        move-result v6
    
        if-eqz v6, :cond_8
    
        move v6, v7
    
        .line 2986
        goto :goto_0
    
        :cond_8
        move v6, v8
    
        .line 2988
        goto :goto_0
    .end method
  5. Replace this method with the below method:
    .method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
        .locals 11
        .param p0, "s1"    # [Landroid/content/pm/Signature;
        .param p1, "s2"    # [Landroid/content/pm/Signature;
    
        .prologue
        const/4 v7, 0x0
    	
        .line 2934
        return v7
    .end method
  6. Find the below lines in the same file:
    invoke-static {v4, v0}, Lcom/android/server/pm/PackageManagerService;->compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
    
        move-result v4
    
        if-nez v4, :cond_c
    
        .line 5572
        new-instance v4, Lcom/android/server/pm/PackageManagerException;
    
        const/16 v5, -0x13
    
        const-string v11, "Cannot install platform packages to user storage!"
    
        invoke-direct {v4, v5, v11}, Lcom/android/server/pm/PackageManagerException;-><init>(ILjava/lang/String;)V
    
        throw v4
    
        .line 5578
        .end local v89    # "s1":[Landroid/content/pm/Signature;
        :cond_c
  7. Now make the changes to the content marked in Red in the below code.
    invoke-static {v4, v0}, Lcom/android/server/pm/PackageManagerService;->compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
    
        move-result v4
    
        if-eqz v4, :cond_c
    
        .line 5572
        new-instance v4, Lcom/android/server/pm/PackageManagerException;
    
        const/16 v5, -0x13
    
        const-string v11, "Cannot install platform packages to user storage!"
    
        invoke-direct {v4, v5, v11}, Lcom/android/server/pm/PackageManagerException;-><init>(ILjava/lang/String;)V
    
        throw v4
    
        .line 5578
        .end local v89    # "s1":[Landroid/content/pm/Signature;
        :cond_c
  8. Save the file and recompile it to the Services.jar file. You can find the step-to-step guide to decompile Jar files here.
  9. Now push the file back to the /system/framework location and assign the rw-r–r– permissions or you can simply do an ADB Push command.
  10. Reboot the device and you’re done with this part.

Now that you’ve disabled the signature verification on your CM12 device, you can simply grab the Xperia Z3 port zip from below and flash it through any custom recovery. Make sure to wipe the Cache and ART/Dalvik Cache after flashing the zip file.

Note: To get the particle effect lockscreen on your device, simply set the Xperia live wallpaper as your default wallpaper.

Let us know how it’s to your liking in the comments section below.

This site uses Akismet to reduce spam. Learn how your comment data is processed.