[PORT]Kitkat Easter Egg for 4.x

Search This thread

Adhi1419

Senior Member
Dec 22, 2012
87
522
26
Bangalore
Hi guys!

You all may have come across the latest version of Android "Kitkat"..
There are so many things a developer would like to port from it to earlier versions of Android! And here I am, after porting the Kitkat Easter Egg(or PlatLogo) to ICS+ devices.. For those who haven't heard of this before, it is the animation that appears when tapped multiple times on "Android Version" in "About Phone" menu of Settings! It is different for different versions of Android :D

If you want to Integrate it into your About Phone Menu, check this post by enricocid

Check this Video out on getting a brief Idea about it (Thanks to Android Central):


 
Last edited:

whyalwaysme

Senior Member
Mar 22, 2013
188
50
Apparently it is not working on my 4.3 slimbean gnex. :(

Sent from my Galaxy Nexus using Tapatalk 2
 
Last edited:

zamzameir

Senior Member
Sep 11, 2013
347
418
Kuala Lumpur
@Adhi1419 first of all..thank you..I just love your work man ;) its working..any idea to implement this directly to settings>about phone>android version instead of apps? I'm sure many people will love this..thnks again :)
 
  • Like
Reactions: root user
E

EnricoD

Guest
I found a way to integrate this directly in settings info... but i forked your repo because i wanna try to build for all android versions and to build a system app ;)
 
E

EnricoD

Guest
How I integrate in Settings info (replacing the stock 4.3 easter egg):

1) Decompile Settings.apk

2) Open C:\apktool\Settings\smali\com\android\settings\DeviceInfoSettings.smali

3) Search for "Plat"

Delete red code

Code:
    .line 167
    new-instance v0, Landroid/content/Intent;

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

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

[COLOR="Red"]    .line 168
    const-string v1, "android"

    const-class v2, Lcom/android/internal/app/PlatLogoActivity;

    invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;[/COLOR]

    .line 171
    :try_start_0
    invoke-virtual {p0, v0}, Lcom/android/settings/DeviceInfoSettings;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

and replace with blue code:

Code:
    .line 167
    new-instance v0, Landroid/content/Intent;

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

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

  [COLOR="Blue"]  .line 168
    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 169
    .local v1, intent:Landroid/content/Intent;
    new-instance v2, Landroid/content/ComponentName;

    const-string v3, "com.adhi.kitkat.easteregg"

    const-string v4, "com.adhi.kitkat.easteregg.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;[/COLOR]

    .line 171
    :try_start_0
    invoke-virtual {p0, v0}, Lcom/android/settings/DeviceInfoSettings;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

4) Recompile back

5) Install this EasterEgg app (modded to remove the launcher) as user app (install as a normal apk) and You're done!



View attachment Kitkat-EasterEgg.apk


@jetx2x I added the Easter Egg this way... Just replacing the platlogo activity with the app one... :)

but ..just a question .. can I leave line .167 and delete the 169? like this:

Code:
    .line 167
    new-instance v0, Landroid/content/Intent;

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

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

  [COLOR="Blue"]  .line 168
    .local v1, intent:Landroid/content/Intent;
    new-instance v1, Landroid/content/ComponentName;

    const-string v2, "com.adhi.kitkat.easteregg"

    const-string v3, "com.adhi.kitkat.easteregg.PlatLogoActivity"

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

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;[/COLOR]

    .line 171
    :try_start_0
    invoke-virtual {p0, v0}, Lcom/android/settings/DeviceInfoSettings;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
 
Last edited:

jetx2x

Senior Member
Jun 21, 2012
144
407
How I integrate in Settings info (replacing the stock 4.3 easter egg):

1) Decompile Settings.apk

2) Open C:\apktool\Settings\smali\com\android\settings\DeviceInfoSettings.smali

3) Search for "Plat"

Delete red code

Code:
    .line 167
    new-instance v0, Landroid/content/Intent;

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

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

[COLOR="Red"]    .line 168
    const-string v1, "android"

    const-class v2, Lcom/android/internal/app/PlatLogoActivity;

    invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;[/COLOR]

    .line 171
    :try_start_0
    invoke-virtual {p0, v0}, Lcom/android/settings/DeviceInfoSettings;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

and replace with blue code:

Code:
    .line 167
    new-instance v0, Landroid/content/Intent;

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

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

  [COLOR="Blue"]  .line 168
    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 169
    .local v1, intent:Landroid/content/Intent;
    new-instance v2, Landroid/content/ComponentName;

    const-string v3, "com.adhi.kitkat.easteregg"

    const-string v4, "com.adhi.kitkat.easteregg.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;[/COLOR]

    .line 171
    :try_start_0
    invoke-virtual {p0, v0}, Lcom/android/settings/DeviceInfoSettings;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

4) Recompile back

5) Install this EasterEgg app (modded to remove the launcher) as user app (install as a normal apk) and You're done!



View attachment 2450908


@jetx2x I added the Easter Egg this way... Just replacing the platlogo activity with the app one... :)

but ..just a question .. can I leave line .167 and delete the 169? like this:

Code:
    .line 167
    new-instance v0, Landroid/content/Intent;

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

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

  [COLOR="Blue"]  .line 168
    .local v1, intent:Landroid/content/Intent;
    new-instance v1, Landroid/content/ComponentName;

    const-string v2, "com.adhi.kitkat.easteregg"

    const-string v3, "com.adhi.kitkat.easteregg.PlatLogoActivity"

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

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;[/COLOR]

    .line 171
    :try_start_0
    invoke-virtual {p0, v0}, Lcom/android/settings/DeviceInfoSettings;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

This is exactly what I did for my friend... I made both a jellybean and kitkat easter egg app... His ROM is using my jellybean one

Taptalked u see ... əəs n pəʞlɐʇdɐʇ
 
  • Like
Reactions: joeyhuab

Prowler

Senior Member
Mar 31, 2013
483
520
Samsung Galaxy S8
What is the sense of this? You're happier if seen a Kitkat thing in your nonkitkat rom? :facepalm:
haha just kidding..
 
Last edited:

XperiaJuser

New member
Dec 22, 2013
2
0
Welcome. What can I do to easter egg from 4.4 to put in android 4.1.2?
"settings >> info ... system ver." ?

I use Xperia J with CyanogenMod 10.
 
Last edited:
E

EnricoD

Guest
Hi did all under the instruction, but when you click on the item "About phone" crash bug, if that here are my file View attachment 2494074, what is the my error?
Android 4.2.1

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

Remove the brackets and try again :p

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

const-string v3, "com.adhi.kitkat.easteregg"


---------- Post added at 08:12 PM ---------- Previous post was at 08:11 PM ----------

Welcome. What can I do to easter egg from 4.4 to put in android 4.1.2?
"settings >> info ... system ver." ?

I use Xperia J with CyanogenMod 10.

can You post \Dev iceInfoSettings.smali ? I will add the mod and then You'll recompile yourself... sorry, i can't use other frameworks
 
U

userlight245

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

Remove the brackets and try again :p




But now the error when assembling

attachment.php
 

Top Liked Posts