dimanche 25 janvier 2015

[Guide]How to add Lollipop Easter Egg in your Rom topic






Hey Guys, I am back with another guide and this time i will show you how to add Lollipop 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/BundleV
.registers 7
.parameter "savedInstanceState"

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

.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/StringV

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

const-string v3, "com.Droidbuster.droidbuster_LollipopEasterEgg"

const-string v4, "com.Droidbuster.droidbuster_LollipopEasterEgg.MainActivity"

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

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

.line 23
:try_start_16
invoke-virtual {p0, v1}, Lcom/android/internal/app/PlatLogoActivity;->startActivity(Landroid/content/IntentV
: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 Droidbuster 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 Contain important the Easter Egg code and that smali above redirects to it:



Download For GingerBread Platform Device: Idpi , Mdpi , Hdpi , Xdpi

Download For Ics+ Platform Device: Idpi , Mdpi , Hdpi , Xdpi

Note = Random Color Change Feature not work on 2.3 platform But on ICs + device its working Like a charm

XDA:DevDB Information
Droidbuster lollipop Easter Egg, Theme for the All Devices



Contributors
Droidbuster, m4rinko2, iamareebjamal, MuSaddiq

Version Information
Status: Stable
Current Stable Version: 1.0
Stable Release Date: 2015-01-25

Created 2015-01-25
Last Updated 2015-01-25






Aucun commentaire:

Enregistrer un commentaire