Post Reply

[GUIDE][MOD]Add Jelly Bean Easter Egg with Bean Bag in system

17th November 2013, 04:22 AM   |  #1  
iamareebjamal's Avatar
OP Recognized Contributor / Themer
Flag Batcave
Thanks Meter: 4,713
 
3,609 posts
Join Date:Joined: Aug 2012
More
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




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:

Code:
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:

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

Code:
/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:

Code:
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


Code:
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 )
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
StackOverflow for codes regarding hiding of Status Bar
Eclipse, APK-Multitool for making this mod possible
Last edited by iamareebjamal; 24th November 2013 at 04:02 AM. Reason: Added Bean Bag
The Following 50 Users Say Thank You to iamareebjamal For This Useful Post: [ View ]
17th November 2013, 05:02 AM   |  #3  
AuliaYF's Avatar
Senior Member
Flag Bekasi, Indonesia
Thanks Meter: 143
 
140 posts
Join Date:Joined: Jun 2013
More
Thumbs up nice work :)
it is a great work i have made this but in other method, you can check HYPERION 8's PlatLogoActivity.

very interesting

Edit:
otherwise miniROM TouchWizUX already has this feature, go check it out doesnt mean that you're kanging his project.
Last edited by AuliaYF; 17th November 2013 at 05:08 AM. Reason: other rom
The Following 2 Users Say Thank You to AuliaYF For This Useful Post: [ View ]
17th November 2013, 06:20 AM   |  #4  
iamareebjamal's Avatar
OP Recognized Contributor / Themer
Flag Batcave
Thanks Meter: 4,713
 
3,609 posts
Join Date:Joined: Aug 2012
More
Quote:
Originally Posted by AuliaYF

it is a great work i have made this but in other method, you can check HYPERION 8's PlatLogoActivity.

very interesting

Edit:
otherwise miniROM TouchWizUX already has this feature, go check it out doesnt mean that you're kanging his project.

Didn't know that

Thanks for telling
17th November 2013, 06:24 AM   |  #5  
Akhilendra Gadde's Avatar
Recognized Contributor
Flag Mumbai
Thanks Meter: 1,521
 
738 posts
Join Date:Joined: Oct 2012
More
This thing is awesome!!! If bean gaming would work it would be the biggest success!. Great mod for gingerbread theming.

Sent from my A110 using XDA Premium HD app
17th November 2013, 07:29 AM   |  #6  
SpaceCaker's Avatar
Recognized Themer / Contributor
Flag netherlands
Thanks Meter: 10,749
 
13,339 posts
Join Date:Joined: Mar 2011
More
if possible could you share source code ?
looks pretty nice

Sent from my S500 using xda app-developers app
The Following 2 Users Say Thank You to SpaceCaker For This Useful Post: [ View ]
17th November 2013, 07:30 AM   |  #7  
aniket.lamba's Avatar
Senior Member
Flag New Delhi
Thanks Meter: 1,332
 
2,289 posts
Join Date:Joined: Jul 2012
Donate to Me
More
How bout a video guide on this!
And I guess it works with cm7
17th November 2013, 08:29 AM   |  #8  
m4RinKo2's Avatar
Senior Member
Thanks Meter: 460
 
828 posts
Join Date:Joined: Oct 2012
More
Damn, Areeb! U were faster than me. Great job!
Quote:
Originally Posted by Akhilendra Gadde

This thing is awesome!!! If bean gaming would work it would be the biggest success!. Great mod for gingerbread theming.

Sent from my A110 using XDA Premium HD app

I tried that. Needs many new files and animations which gb doesnt have

Sent from my GT-S5570I using Tapatalk 2

---------- Post added at 09:29 AM ---------- Previous post was at 09:26 AM ----------

Quote:
Originally Posted by SpaceCaker

if possible could you share source code ?
looks pretty nice

Sent from my S500 using xda app-developers app

https://github.com/android/platform_...oActivity.java


Sent from my GT-S5570I using Tapatalk 2
The Following User Says Thank You to m4RinKo2 For This Useful Post: [ View ]
17th November 2013, 08:34 AM   |  #9  
devilyuri's Avatar
Senior Member
Thanks Meter: 440
 
1,206 posts
Join Date:Joined: Mar 2013
If you press it,it will show all the beans like jellybean?

Sent from my BCM21553 using Tapatalk 2
17th November 2013, 09:10 AM   |  #10  
m4RinKo2's Avatar
Senior Member
Thanks Meter: 460
 
828 posts
Join Date:Joined: Oct 2012
More
Quote:
Originally Posted by devilyuri

If you press it,it will show all the beans like jellybean?

Sent from my BCM21553 using Tapatalk 2

No

Sent from my GT-S5570I using Tapatalk 2

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools
Display Modes


Top Threads in Galaxy Y GT-S5360 General by ThreadRank