[Galaxy Y GT-S5360 General] iamareebjamal:
Jelly Bean Easter Egg​

Integrating in system​

Note: Do at your own risk, I won't take responsibility of any haphazard you may cause to your or your friend/wife/husband/sister/blah phone by adding this mod. Neither will I account for any misuse of it

Again, don't add this in your ROM to fool people in believing it's real Jelly Bean(as it's seen previously)

It ALSO contains the Game (BeanBag - Bean Flinging)

No flaming tolerated :rolleyes:

Pre-Requisite

framework.jar

Deodexed ROM

ADB (Optional)

APK-Multitool to decompile framework.jar classes.dex

Easter Egg app attached below

GUIDE​

1. Pull your framework.jar in your working folder. You can do this manually or by adb

Shift+Right Click in your working folder and choose Open command Window here and type:

adb pull /system/framework/framework.jar

2. Rename your framework.jar to framework.apk.

Place it in "place-apk-here-for-modding" folder

Go to script.bat of APK-Multitool, choose 24 and select framework.apk

Choose 9 and decompile it .

3. Go to projects folder, and in framework.apk folder

Go in /smali/com/android/internal/app/PlatLogoActivity.smali

Now I have made a very simple code to make it work rather than just adding the Jelly Bean PlatLogoActivity in GingerBread and solving errors. Short and sweet and easy as hell.

Select all and replace it with this 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, "iaj.areeb.jellybean"

const-string v4, "iaj.areeb.jellybean.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 iamareebjamal 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

Also, I've made it noob proof by ActivityNotFoundException so if someone does not follow full guide, his framework doesn't crash

4. Now, go again to script.bat and choose 11 to compile it.

Then choose 8 to push it in your system and type

/system/framework/framework.jar

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

Download (Version 1.1- Contains Bean Bag (Game too))

6. Now, Hot Reboot your Phone. Rebooting is too long

You can either do that by EPM or by following code in command prompt:

adb shell killall system_server

7. Now go in your Settings and multiple tap on Android Version

​

Voila!

​

I removed the Build.Version information from code as it will look funny if it said Android 2.3.6 JELLY BEAN, as most of us have build.prop set as original 2.3.6

You can change the amount of Beans by going into Menu -> Number of beans. Remember: Less beans, more smoothness

GitHub Source

Source is licensed under GPL. I think you know what that means. If you don't, read this

​

Changelog

Version 1:

Platlogo only

Version 1.1:

Added Bean Bag
Reduced amount of Beans from 30 to 20 to reduce lag

Credits

Google for the PlatLogo Code (Obviously :silly:)

Geo Piskas for app source for adding Bean Bag and ability to change number of beans

m4rinko2 for giving me idea of adding it in my app :) :good:

StackOverflow for codes regarding hiding of Status Bar

Eclipse, APK-Multitool for making this mod possible