[GUIDE] [MOD] Add KitKat Easter Egg in your ROM [2.3+]

Search This thread

MuSaddiq

Senior Member
Aug 24, 2013
652
946
Hey Guys, I am back with another guide and this time i will show you how to add KitKat Easter Egg in your ROM.


Disclaimer: I and XDA are not responsible for the damage of your phone. Take necessary backup if you are indoubt.


Requirements:

  • framework.jar from your ROM
  • Know how to decompile APK
  • Easter Egg app attached below


Let's start


1. Decompile framework.jar

2. Go to smali/com/android/internal/app
and open PlatLogoActivity.smali

3. Select all and replace it with this code:

Code:
.class public Lcom/android/internal/app/PlatLogoActivity;
.super Landroid/app/Activity;
.source "PlatLogoActivity.java"


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 12
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    return-void
.end method


# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
    .registers 7
    .parameter "savedInstanceState"

    .prologue
    .line 16
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 18
    new-instance v1, Landroid/content/Intent;

    const-string v2, "android.intent.action.MAIN"

    invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 19
    .local v1, intent:Landroid/content/Intent;
    new-instance v2, Landroid/content/ComponentName;

    const-string v3, "ss.ms1410.kitkateasteregg"

    const-string v4, "ss.ms1410.kitkateasteregg.PlatLogoActivity"

    invoke-direct {v2, v3, v4}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v1, v2}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;

    .line 23
    :try_start_16
    invoke-virtual {p0, v1}, Lcom/android/internal/app/PlatLogoActivity;->startActivity(Landroid/content/Intent;)V
    :try_end_19
    .catch Landroid/content/ActivityNotFoundException; {:try_start_16 .. :try_end_19} :catch_1d

    .line 39
    :goto_19
    invoke-virtual {p0}, Lcom/android/internal/app/PlatLogoActivity;->finish()V

    .line 41
    return-void

    .line 31
    :catch_1d
    move-exception v0

    .line 35
    .local v0, e:Landroid/content/ActivityNotFoundException;
    const-string v2, "First install that app MuSaddiq told you to!"

    const/4 v3, 0x0

    invoke-static {p0, v2, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v2

    invoke-virtual {v2}, Landroid/widget/Toast;->show()V

    goto :goto_19
.end method

4. Recompile framework.jar
Push it into system/framework
Set correct permissions(rw-r--r--)

5. Install this app by me, it contains the Easter Egg code and that smali above redirects to it:

Download:

For LDPI Devices
For HDPI Devices
For XHDPI Devices

6. Now go to your Settings and multiple tap on Android Version

s75e.png
ar4n.png
qmnd.png
pwxs.png
urdz.png
0ftx.png



Credits:

m4rinko2
iamareebjamal





If you liked this MOD then just click here and here
 
Last edited:

MuSaddiq

Senior Member
Aug 24, 2013
652
946
Reserved 01


Note:
First you need to install Android 4.4's framework-res.apk to decompile KitKatEasterEgg.apk.


Change the letter K


To change the letter K follow the steps below

1. Decompile KitKatEasterEgg.apk

2. Go to smali/ss/ms1410/kitkateasteregg/
Open PlatLogoActivity.smali

3. Find
Code:
const-string v0, "K"

4. Change K to whatever your want.

5. Recompile and Sign the apk.



Change the ANDROID 4.4 Text


To change ANDROID 4.4 text follow the steps below

1. Decompile KitKatEasterEgg.apk

2. Go to smali/ss/ms1410/kitkateasteregg/
Open PlatLogoActivity.smali

3. Find
Code:
const-string v0, "ANDROID 4.4"

4. Change ANDROID 4.4 to whatever your want.

5. Recompile and Sign the apk.



Change the font


To change the font of letter K follow the steps below

1. Rename your font's file name to Roboto-Bold.
2. Decompile KitKatEasterEgg.apk
3. Copy and paste your font in assets folder
4. If asked to replace, click yes.
5. Recompile and Sign the apk.



To change the font of ANDROID 4.4 text follow the steps below

1. Rename your font's file name to Roboto-Light.
2. Decompile KitKatEasterEgg.apk
3. Copy and paste your font in assets folder
4. If asked to replace, click yes.
5. Recompile and Sign the apk.



Change the Android Logo


To change the Android Logo follow the steps below

1. Rename your Logo's file name to platlogo
2. Decompile KitKatEasterEgg.apk
3. Copy and paste your logo in res/drawable-nodpi folder
4. If asked to replace, click yes.
5. Recompile and Sign the apk.



Change the red background


To change the red background follow the steps below

1. Decompile KitKatEasterEgg.apk

2. Go to smali/ss/ms1410/kitkateasteregg/
Open PlatLogoActivity.smali


As the background color is in smali code so we can't use the hex color codes to change the bg color.
To get the color codes of smali use Android Color Converter.

Using Android Color Convertor:

Download and extract ACC.zip
Run ACC.
Paste the HEX color code in the HEX Tab.
Press the convert button.
It will automatically convert the hex color code into smali color code.
Now copy the smali color code from the SMALI Tab.


3. Find this line

Code:
.field static final BGCOLOR:I = [COLOR="Red"]-0x12E2DC[/COLOR]

Change the highlighted code(smali color code) to your code(smali color code)

4. Now find this line

Code:
const v0, [COLOR="red"]-0x12E2DC[/COLOR]

Again change the highlighted code(smali color code) to your code(smali color code)

5. Recompile and Sign KitKatEasterEgg.apk
 
Last edited:

GhostRider921

Member
Aug 29, 2013
40
8
Wow! Awesome guide sir...

Here is my easter egg:

attachment.php
attachment.php
attachment.php
 

Attachments

  • 1.png
    1.png
    63.5 KB · Views: 45,294
  • 2.png
    2.png
    65 KB · Views: 45,196
  • 3.png
    3.png
    19 KB · Views: 44,977

star-lord

Senior Member
Feb 25, 2013
109
60
Madurai
good guide dude!!! Thanks!!

---------- Post added at 04:17 PM ---------- Previous post was at 04:13 PM ----------

 
Last edited:

MuSaddiq

Senior Member
Aug 24, 2013
652
946
yup.. i dunno why.. there is no apktool.yml appearing.. error comes out when it is in the part of decompiling values xml
undefinedresobject: resource spec: 0x01030119

ill try to redownload the apk again
edit:same result ^_^

I am really sorry, I totally forgot to tell that first you need to install Android 4.4's framework-res.apk to decompile this apk.

Btw i will add this in op too.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 73
    Hey Guys, I am back with another guide and this time i will show you how to add KitKat Easter Egg in your ROM.


    Disclaimer: I and XDA are not responsible for the damage of your phone. Take necessary backup if you are indoubt.


    Requirements:

    • framework.jar from your ROM
    • Know how to decompile APK
    • Easter Egg app attached below


    Let's start


    1. Decompile framework.jar

    2. Go to smali/com/android/internal/app
    and open PlatLogoActivity.smali

    3. Select all and replace it with this code:

    Code:
    .class public Lcom/android/internal/app/PlatLogoActivity;
    .super Landroid/app/Activity;
    .source "PlatLogoActivity.java"
    
    
    # direct methods
    .method public constructor <init>()V
        .registers 1
    
        .prologue
        .line 12
        invoke-direct {p0}, Landroid/app/Activity;-><init>()V
    
        return-void
    .end method
    
    
    # virtual methods
    .method protected onCreate(Landroid/os/Bundle;)V
        .registers 7
        .parameter "savedInstanceState"
    
        .prologue
        .line 16
        invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
    
        .line 18
        new-instance v1, Landroid/content/Intent;
    
        const-string v2, "android.intent.action.MAIN"
    
        invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
    
        .line 19
        .local v1, intent:Landroid/content/Intent;
        new-instance v2, Landroid/content/ComponentName;
    
        const-string v3, "ss.ms1410.kitkateasteregg"
    
        const-string v4, "ss.ms1410.kitkateasteregg.PlatLogoActivity"
    
        invoke-direct {v2, v3, v4}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V
    
        invoke-virtual {v1, v2}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
    
        .line 23
        :try_start_16
        invoke-virtual {p0, v1}, Lcom/android/internal/app/PlatLogoActivity;->startActivity(Landroid/content/Intent;)V
        :try_end_19
        .catch Landroid/content/ActivityNotFoundException; {:try_start_16 .. :try_end_19} :catch_1d
    
        .line 39
        :goto_19
        invoke-virtual {p0}, Lcom/android/internal/app/PlatLogoActivity;->finish()V
    
        .line 41
        return-void
    
        .line 31
        :catch_1d
        move-exception v0
    
        .line 35
        .local v0, e:Landroid/content/ActivityNotFoundException;
        const-string v2, "First install that app MuSaddiq told you to!"
    
        const/4 v3, 0x0
    
        invoke-static {p0, v2, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
    
        move-result-object v2
    
        invoke-virtual {v2}, Landroid/widget/Toast;->show()V
    
        goto :goto_19
    .end method

    4. Recompile framework.jar
    Push it into system/framework
    Set correct permissions(rw-r--r--)

    5. Install this app by me, it contains the Easter Egg code and that smali above redirects to it:

    Download:

    For LDPI Devices
    For HDPI Devices
    For XHDPI Devices

    6. Now go to your Settings and multiple tap on Android Version

    s75e.png
    ar4n.png
    qmnd.png
    pwxs.png
    urdz.png
    0ftx.png



    Credits:

    m4rinko2
    iamareebjamal





    If you liked this MOD then just click here and here
    24
    Reserved 01


    Note:
    First you need to install Android 4.4's framework-res.apk to decompile KitKatEasterEgg.apk.


    Change the letter K


    To change the letter K follow the steps below

    1. Decompile KitKatEasterEgg.apk

    2. Go to smali/ss/ms1410/kitkateasteregg/
    Open PlatLogoActivity.smali

    3. Find
    Code:
    const-string v0, "K"

    4. Change K to whatever your want.

    5. Recompile and Sign the apk.



    Change the ANDROID 4.4 Text


    To change ANDROID 4.4 text follow the steps below

    1. Decompile KitKatEasterEgg.apk

    2. Go to smali/ss/ms1410/kitkateasteregg/
    Open PlatLogoActivity.smali

    3. Find
    Code:
    const-string v0, "ANDROID 4.4"

    4. Change ANDROID 4.4 to whatever your want.

    5. Recompile and Sign the apk.



    Change the font


    To change the font of letter K follow the steps below

    1. Rename your font's file name to Roboto-Bold.
    2. Decompile KitKatEasterEgg.apk
    3. Copy and paste your font in assets folder
    4. If asked to replace, click yes.
    5. Recompile and Sign the apk.



    To change the font of ANDROID 4.4 text follow the steps below

    1. Rename your font's file name to Roboto-Light.
    2. Decompile KitKatEasterEgg.apk
    3. Copy and paste your font in assets folder
    4. If asked to replace, click yes.
    5. Recompile and Sign the apk.



    Change the Android Logo


    To change the Android Logo follow the steps below

    1. Rename your Logo's file name to platlogo
    2. Decompile KitKatEasterEgg.apk
    3. Copy and paste your logo in res/drawable-nodpi folder
    4. If asked to replace, click yes.
    5. Recompile and Sign the apk.



    Change the red background


    To change the red background follow the steps below

    1. Decompile KitKatEasterEgg.apk

    2. Go to smali/ss/ms1410/kitkateasteregg/
    Open PlatLogoActivity.smali


    As the background color is in smali code so we can't use the hex color codes to change the bg color.
    To get the color codes of smali use Android Color Converter.

    Using Android Color Convertor:

    Download and extract ACC.zip
    Run ACC.
    Paste the HEX color code in the HEX Tab.
    Press the convert button.
    It will automatically convert the hex color code into smali color code.
    Now copy the smali color code from the SMALI Tab.


    3. Find this line

    Code:
    .field static final BGCOLOR:I = [COLOR="Red"]-0x12E2DC[/COLOR]

    Change the highlighted code(smali color code) to your code(smali color code)

    4. Now find this line

    Code:
    const v0, [COLOR="red"]-0x12E2DC[/COLOR]

    Again change the highlighted code(smali color code) to your code(smali color code)

    5. Recompile and Sign KitKatEasterEgg.apk
    3
    Great work @MuSaddiq

    Itz working on jb 4.1.2:thumbup:

    Sent from my GT-I8262 using XDA Premium 4 mobile app

    Great! Btw if u want the full easter egg of KitKat with the game then you can download Mr Easter from the playstore.

    Sent from my GT-S5360 using xda app-developers app
    2
    :(

    Not deodexed i have framwork.jar and apk

    Sent from my GT-S7562 using XDA Premium 4 mobile app

    Then sorry I am not ready to do it as it is one heck of a process!!
    if you can deodex your rom then i can help you !
    2
    Hello Guys, OP updated with HDPI and XHDPI versions of apk... Check it out!

    P.S: Will be making apk for MDPI and XXHDPI in couple of days..