5,603,729 Members 37,178 Now Online
XDA Developers Android and Mobile Development Forum

[How To] Integrate Original KK Easter Egg in Your JB Rom

Tip us?
 
EnricoD
Old
#1  
EnricoD's Avatar
Recognized Contributor - OP
Thanks Meter 3194
Posts: 1,857
Join Date: May 2013
Location: Roma
Default [How To] Integrate Original KK Easter Egg in Your JB Rom




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\Dev iceInfoSettings.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

    .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;

    .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

    .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;

    .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!


Kitkat-EasterEgg.apk





Thank goes to jetx2x for the easter egg source
http://forum.xda-developers.com/show....php?t=2511147

to Adhi1419 for his build
http://forum.xda-developers.com/show....php?t=2544030

and Zamzaimer

RASTAKAT Rom /// BaNkS Minimal Gapps

RastaKat works



The Stuff Song (click to show)
 

The Following 2 Users Say Thank You to EnricoD For This Useful Post: [ Click to Expand ]
 
Nephilim
Old
#2  
Nephilim's Avatar
Recognized Contributor
Thanks Meter 8867
Posts: 6,375
Join Date: Aug 2010
Location: Milwaukee

 
DONATE TO ME
What is the point of this?


Click "Show Content" For Links To My Custom Kernel Settings Thread and Official Google+ Community
 
Nephilim's Custom Kernel Settings Thread: http://forum.xda-developers.com/show...6#post44514476
Nephilim's Android Resource Community on Google+: https://plus.google.com/communities/...81984046422598
 
changguangyu
Old
#3  
Member
Thanks Meter 48
Posts: 53
Join Date: Oct 2011
Quote:
Originally Posted by enricocid View Post



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\Dev iceInfoSettings.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

    .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;

    .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

    .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;

    .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!


Attachment 2451034





Thank goes to jetx2x for the easter egg source
http://forum.xda-developers.com/show....php?t=2511147

to Adhi1419 for his build
http://forum.xda-developers.com/show....php?t=2544030

and Zamzaimer
Can the jigsaw game be ported?
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes