[Xiaomi Redmi 1S] Tech N You:
[GUIDE][NOOBS] Adding Lollipop Easter Egg for 4.4+ ROM (CM11, PA, PAC-MAN, AOSP etc)

Hello all,

I rewrite this tutorial for Android 4.4+

Note you must have a deodexed ROM for this if you try on stock ROM.

I also have attached a flashable zip in the end that'll work for all users on any android version. GB, JB or KK

Let's begin

GUIDE

Tools we need for this are Notepad++, Jar editing tool (don't just use any apktool or you'll end up with smaling error) and your correct dpi resolution apk

Download the tool to decompile from here http://www.mediafire.com/download/h...l+-+baksmali+-+Signer+v3+Mixed+by+ibanez7.zip (thanks to [MENTION=4569900]ibanez7[/MENTION]) or this tool from here http://www.mediafire.com/download/yx8lswms7ocd4oh/Apk+Changer+forked+by+gamzekal+11.3.2014.exe (thanks to [MENTION=4780167]gamzekal[/MENTION])

1) Pull out framework2.jar from your device. Make sure you have necessary adb files or minimal-sdk package (adb files). If you dont have then download from below adb.zip and extract them to C:/adb(Recommended for ease of use) or any folder.

Now connect your device with PC make sure USB Debugging is on and accept any RSA Fingerprint prompt on your device.

Now hold right Shift and press right click. From the menu choose "Open command window here" and copy or type the following code.

adb pull framework2.jar /system/framework

You'll see a file named framework2.jar in the adb folder. Congrats you got your file! :D Now moving on.

2) Decompile using any of the given tools, here I explain using ibanez7 tool. Download the tool and extract it to C:\Users\here don't keep spaces between any folder/file name. For more accurate tutorial how to setup the tool go to this thread here http://xdaforums.com/showthread.php?t=2251719

- Copy framework2.jar file to apktool folder (make sure is the same folder).

- Open framework2.jar using Winrar or 7zip and extract classes.dex file (Recommended WinRAR)

- Drag & drop classes.dex to Quick-Baksmali.cmd (decompile process)

- Wait and you will see a folder with the name "classout"

- Now you can start editing smali file on classout folder (use Notepad++ only for editing it)

- Go to classout/smali/com/android/internal/app and search for PlatLogoActivity.smali, right click it and open it with Notepad++

- Easy just select all of the code and delete it and replace it with OP's code, Here

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

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

.prologue
.line 12
invoke-direct {p0}, Landroid/app/Activity;->()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;->(Ljava/lang/String;)V

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

After pasting make sure that every line that begins with # Blabla has

two lines

gap before it and after the .end method line when next # Blabla line start it should have two line gap. For eg

# direct methods
.method public constructor ()V
- Code here
.end method
1st line gap
2nd line gap
# virtual methods
.method (rest code here)
-Code here
.end method

Hope you got my point. If you still dont get it the check the existing smali's in the folder for example.

-After editing the file save it and close Notepad++.

- After editing is complete, Drag & drop classout folder to Quick-Smali.cmd (recompile process)

- After recompile is complete, there will be a file with a name "new-classes.dex"

- Open framework2.jar using WinRAR or 7zip (Recommended WinRAR)

- Rename new-classes.dex to classes.dex, and Drag & drop to framework2.jar with normal compression and your done.

For noobs who have trouble with framework2.jar flashing I have attached flashable zip in the post below just make necessary changes and then open the flashable zip package attached below and add framework2.jar[For 4.4.x]/framework.jar[For 2.3-4.3] to framework folder with normal compression and flash the zip through custom recovery. Remember to make a nandroid backup before you flash anything and make sure to Wipe Cache and Dalvik cache before flashing

Next install the apk as suggested by OP and enjoy :)

All credits to [MENTION=5678869]Droidbuster[/MENTION] for this awesome guide and congrats to be on portal ;)