(Guide) How to add Lollipop Platlogo in your Rom 2.3+ - Micromax A57 Ninja

Hey Guys, I am back with another guide and this time i will show you how to add Lollipop Easter Egg in your ROM.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
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/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, "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/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
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:
V1.2 Announced for GB
Change Log
Force close fixed while holding long on Platlogo:fingers-crossed:
size decreased
Some layout problem fixed
Download For GingerBread Platform Device: Idpi , Mdpi , Hdpi , Xdpi​​Download For Ics+ Platform Device: Idpi , Mdpi , Hdpi , Xdpi
Download For GingerBread Platform Device V1.2: 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.2
Stable Release Date: 2015-01-25
update v1.2 Release Date: 2015-01-29
Created 2015-01-25
Last Updated 2015-01-25

Reserved

Droidbuster said:
Hey Guys, I am back with another guide and this time i will show you how to add Lollipop Easter Egg in your ROM.
Awesome man :laugh:
Finally GB developers can add Lolipop Easter Egg in their rom ​
Click to expand...
Click to collapse

yes But it for Ics + too
Yes bro
Its for ics+ device too
If you see
Random color Feature not work on Gb. so i am finding a way to do it

Nice Job Bro...:good::laugh:

Not working
Not working at all....
unable to compile classout folder...
getting this error while compiling...
Code:
classout\com\android\internal\app\PlatLogoActivity.smali[19,35] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[19,38] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[25,64] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[25,67] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[32,62] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[32,67] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[42,91] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[42,96] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[48,92] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[48,100] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[19,27] no viable altern
ative at input 'Landroid'
classout\com\android\internal\app\PlatLogoActivity.smali[25,56] no viable altern
ative at input 'Landroid'
classout\com\android\internal\app\PlatLogoActivity.smali[32,57] no viable altern
ative at input 'Ljava'
classout\com\android\internal\app\PlatLogoActivity.smali[42,86] mismatched input
'Ljava' expecting CLOSE_PAREN
classout\com\android\internal\app\PlatLogoActivity.smali[46,0] mismatched input
'.line' expecting CLOSE_PAREN
classout\com\android\internal\app\PlatLogoActivity.smali[48,84] no viable altern
ative at input 'Landroid'

ekansh02 said:
Not working at all....
unable to compile classout folder...
getting this error while compiling...
Code:
classout\com\android\internal\app\PlatLogoActivity.smali[19,35] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[19,38] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[25,64] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[25,67] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[32,62] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[32,67] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[42,91] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[42,96] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[48,92] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[48,100] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[19,27] no viable altern
ative at input 'Landroid'
classout\com\android\internal\app\PlatLogoActivity.smali[25,56] no viable altern
ative at input 'Landroid'
classout\com\android\internal\app\PlatLogoActivity.smali[32,57] no viable altern
ative at input 'Ljava'
classout\com\android\internal\app\PlatLogoActivity.smali[42,86] mismatched input
'Ljava' expecting CLOSE_PAREN
classout\com\android\internal\app\PlatLogoActivity.smali[46,0] mismatched input
'.line' expecting CLOSE_PAREN
classout\com\android\internal\app\PlatLogoActivity.smali[48,84] no viable altern
ative at input 'Landroid'
Click to expand...
Click to collapse
sorry bro facing some problem in xda template
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, "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/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
try this

ekansh02 said:
Not working at all....
unable to compile classout folder...
getting this error while compiling...
Code:
classout\com\android\internal\app\PlatLogoActivity.smali[19,35] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[19,38] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[25,64] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[25,67] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[32,62] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[32,67] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[42,91] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[42,96] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[48,92] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[48,100] Error for input
'/': Invalid text
classout\com\android\internal\app\PlatLogoActivity.smali[19,27] no viable altern
ative at input 'Landroid'
classout\com\android\internal\app\PlatLogoActivity.smali[25,56] no viable altern
ative at input 'Landroid'
classout\com\android\internal\app\PlatLogoActivity.smali[32,57] no viable altern
ative at input 'Ljava'
classout\com\android\internal\app\PlatLogoActivity.smali[42,86] mismatched input
'Ljava' expecting CLOSE_PAREN
classout\com\android\internal\app\PlatLogoActivity.smali[46,0] mismatched input
'.line' expecting CLOSE_PAREN
classout\com\android\internal\app\PlatLogoActivity.smali[48,84] no viable altern
ative at input 'Landroid'
Click to expand...
Click to collapse
Just Wait:laugh:

@Droidbuster thanks bro ...
its working now...
but there is no flappy bird game...
and also fc error when long pressing lollipop......
plz fix this things....

veneetsingh said:
Just Wait:laugh:
Click to expand...
Click to collapse
wait for what..????

Droidbuster said:
sorry bro facing some problem in xda template
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, "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/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
try this
Click to expand...
Click to collapse
add this in Platalogo Activities
.class public Lcom/android/internal/app/PlatLogoActivity;
.super Landroid/app/Activity;
.source "PlatLogoActivity.java"
# direct methods
.method public constructor <init>()V
.locals 0
.prologue
.line 12
invoke-direct {p0}, Landroid/app/Activity;-><init>()V
return-void
.end method
# virtual methods
.method protected onCreate(Landroid/os/BundleV
.locals 5
.param p1, "savedInstanceState" # Landroid/os/Bundle;
.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/jumbo v3, "com.Droidbuster.droidbuster_LollipopEasterEgg"
const-string/jumbo 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_0
invoke-virtual {p0, v1}, Lcom/android/internal/app/PlatLogoActivity;->startActivity(Landroid/content/IntentV
:try_end_0
.catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
.line 39
:goto_0
invoke-virtual {p0}, Lcom/android/internal/app/PlatLogoActivity;->finish()V
.line 41
return-void
.line 31
:catch_0
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_0
.end method
---------- Post added at 05:49 AM ---------- Previous post was at 05:44 AM ----------
ekansh02 said:
wait for what..????
Click to expand...
Click to collapse
Add lines of Top in Pkatalogo Activities. smali

ekansh02 said:
@Droidbuster thanks bro ...
its working now...
but there is no flappy bird game...
and also fc error when long pressing lollipop......
plz fix this things....
Click to expand...
Click to collapse
bro sorry but lollipop flappy feature is only for ics+ phone but i know why fci their i will fix that

veneetsingh said:
add this in Platalogo Activities
.class public Lcom/android/internal/app/PlatLogoActivity;
.super Landroid/app/Activity;
.source "PlatLogoActivity.java"
# direct methods
.method public constructor <init>()V
.locals 0
.prologue
.line 12
invoke-direct {p0}, Landroid/app/Activity;-><init>()V
return-void
.end method
# virtual methods
.method protected onCreate(Landroid/os/BundleV
.locals 5
.param p1, "savedInstanceState" # Landroid/os/Bundle;
.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/jumbo v3, "com.Droidbuster.droidbuster_LollipopEasterEgg"
const-string/jumbo 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_0
invoke-virtual {p0, v1}, Lcom/android/internal/app/PlatLogoActivity;->startActivity(Landroid/content/IntentV
:try_end_0
.catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
.line 39
:goto_0
invoke-virtual {p0}, Lcom/android/internal/app/PlatLogoActivity;->finish()V
.line 41
return-void
.line 31
:catch_0
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_0
.end method
---------- Post added at 05:49 AM ---------- Previous post was at 05:44 AM ----------
Add lines of Top in Pkatalogo Activities. smali
Click to expand...
Click to collapse
bro just remember that
const-string/jumbo v3, "com.Droidbuster.droidbuster_LollipopEasterEgg"
const-string/jumbo v4, "com.Droidbuster.droidbuster_LollipopEasterEgg.MainActivity"
code
if i paste this in open
their automatically space come after Main
that make fc remember this point
hope you got what i mean

Droidbuster said:
bro sorry but lollipop flappy feature is only for ics+ phone but i know why fci their i will fix that
Click to expand...
Click to collapse
bro i am user of Jelly bean but i was download flappy bird game it is not in eggster please fix that....!:angel:

Flappybird
veneetsingh said:
bro i am user of Jelly bean but i was download flappy bird game it is not in eggster please fix that....!:angel:
Click to expand...
Click to collapse
bro if you are using real jellybean then just long hold on platlogo then dialog appear then it will redirect to Another Playstore the name of game is lollipop island download it and enjoy it

i am jelly bean user and the app dont want to be installed says
x app isnt installed

Droidbuster said:
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/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, "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/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
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:
V1.2 Announced for GB
Change Log
Force close fixed while holding long on Platlogo:fingers-crossed:
size decreased
Some layout problem fixed
Download For GingerBread Platform Device: Idpi , Mdpi , Hdpi , Xdpi​​Download For Ics+ Platform Device: Idpi , Mdpi , Hdpi , Xdpi
Download For GingerBread Platform Device V1.2: 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.2
Stable Release Date: 2015-01-25
update v1.2 Release Date: 2015-01-29
Created 2015-01-25
Last Updated 2015-01-25
Click to expand...
Click to collapse
bro its again not working just downloaded v1.2 platlogo and while installing it says invalid file or package damaged..????

Didn't work
1. Framework.jar decompiled > change .smali > recompile > push on system/framework (rw--r--r)
2. Droidbustereasteregg.apk installed
3. Nothing. NyanDroid ICS still there flying around
Let me know if I slipped one step. Thanks

bro, link of platlogo lollipop v1.2 for ldpi same with xdpi ... so, if i open link for ldpi , immediately open download for xdpi device .. any mirror link for ldpi bro??

Related

[MOD / How To][5/11/13] - Extended Reboot Menu - De-Odex - MDL

Reboot options as show :good:
Pre-requisites
De-Odex'ed devices only! Will not work on stock ROM!
Must have the the MDL De-Odex mod by Nottach to use this mod!
Installation
I used similar install method as Nottach to apply this mod.
Download the attachment. Unzip it to your desktop.
Simply copy the "Mods" folder to your internal storage
Run the "Mod Me.bat" file after copying
It will copy the mod to the correct location, clear cache, then reboot phone.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Feel free to use this in any mod or ROM you make.
Hit Thanks!​
To make this mod your self or further modify it do the following;
First decompile classes.dex in android.policy.jar. I wont get into that part as this mini tutorial assumes you know how to modify smali code.
Add the following BOLD ITALIC code to \com\android\internal\policy\impl\GlobalActions$SinglePressAction.smali
Modded Code:
Code:
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/GlobalActions;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x40a
name = "SinglePressAction"
.end annotation
[B][I]# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;
[/I][/B]
# instance fields
.field private final mIcon:Landroid/graphics/drawable/Drawable;
.field private final mIconResId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
# direct methods
[B][I].method static constructor <clinit>()V
.registers 3
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Reboot"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Restart Shell"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Download"
aput-object v2, v0, v1
const/4 v1, 0x3
const-string v2, "Recovery"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method[/I][/B]
.method protected constructor <init>(II)V[I][/I]
FYI: You can change the string names to what you like best. For example most people word the second string as "Hot reboot" but I think that sounds lame so I call it what it is and that is a shell restart. Another example would be to change "Download" to "Download Mode"
Then change \com\android\internal\policy\impl\GlobalActions.smali
right below .line 566
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$5;
to
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$99;
Then create three smali files as shown below and add them to: \com\android\internal\policy\impl\
GlobalActions$99.smali
Code:
.class Lcom/android/internal/policy/impl/GlobalActions$99;
.super Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.source "GlobalActions.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/android/internal/policy/impl/GlobalActions;->createDialog()Landroid/app/AlertDialog;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/android/internal/policy/impl/GlobalActions;
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
.registers 4
iput-object p1, p0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
invoke-direct {p0, p2, p3}, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;-><init>(II)V
return-void
.end method
# virtual methods
.method public onPress()V
.registers 7
const/4 v5, 0x4
new-instance v1, Landroid/app/AlertDialog$Builder;
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v2}, Lcom/android/internal/policy/impl/GlobalActions;->access$000(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v2
invoke-direct {v1, v2}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V
const-string v2, "Reboot Menu"
invoke-virtual {v1, v2}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;
move-result-object v1
sget-object v2, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
const/4 v3, 0x0
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$99$2;
invoke-direct {v4, p0}, Lcom/android/internal/policy/impl/GlobalActions$99$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions$99;)V
invoke-virtual {v1, v2, v3, v4}, Landroid/app/AlertDialog$Builder;->setSingleChoiceItems([Ljava/lang/CharSequence;ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
move-result-object v1
const v2, 0x104000a
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$99$1;
invoke-direct {v3, p0}, Lcom/android/internal/policy/impl/GlobalActions$99$1;-><init>(Lcom/android/internal/policy/impl/GlobalActions$99;)V
invoke-virtual {v1, v2, v3}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
move-result-object v1
const/high16 v2, 0x104
const/4 v3, 0x0
invoke-virtual {v1, v2, v3}, Landroid/app/AlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
move-result-object v1
invoke-virtual {v1}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;
move-result-object v0
invoke-virtual {v0}, Landroid/app/AlertDialog;->getWindow()Landroid/view/Window;
move-result-object v1
const/16 v2, 0x7d9
invoke-virtual {v1, v2}, Landroid/view/Window;->setType(I)V
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v1}, Lcom/android/internal/policy/impl/GlobalActions;->access$000(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v1
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x111000f
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getBoolean(I)Z
move-result v1
if-nez v1, :cond_58
invoke-virtual {v0}, Landroid/app/AlertDialog;->getWindow()Landroid/view/Window;
move-result-object v1
invoke-virtual {v1, v5, v5}, Landroid/view/Window;->setFlags(II)V
:cond_58
invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V
return-void
.end method
.method public showBeforeProvisioning()Z
.registers 2
.prologue
.line 307
const/4 v0, 0x1
return v0
.end method
.method public showConditional()Z
.registers 2
.prologue
.line 311
const/4 v0, 0x1
return v0
.end method
.method public showDuringKeyguard()Z
.registers 2
.prologue
.line 304
const/4 v0, 0x1
return v0
.end method
GlobalActions$99$1.smali
Code:
.class Lcom/android/internal/policy/impl/GlobalActions$99$1;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/android/internal/policy/impl/GlobalActions$99;->onPress()V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/GlobalActions$99;)V
.registers 2
.parameter
.prologue
.line 281
iput-object p1, p0, Lcom/android/internal/policy/impl/GlobalActions$99$1;->this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
.registers 7
.parameter "dialog"
.parameter "whichButton"
.prologue
const/4 v2, 0x1
const/4 v3, 0x0
.line 282
sget v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
const/4 v1, -0x1
if-le v0, v1, :cond_20
.line 291
sget v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
const/4 v1, 0x4
if-eq v0, v1, :cond_4d
.line 283
sget v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
if-eq v0, v2, :cond_2c
.line 284
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions$99$1;->this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
iget-object v0, v0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v0}, Lcom/android/internal/policy/impl/GlobalActions;->access$000(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v0
sget v1, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
if-nez v1, :cond_21
const/4 v1, 0x0
:goto_1d
invoke-static {v0, v1, v3}, Lcom/android/server/power/ShutdownThread;->reboot(Landroid/content/Context;Ljava/lang/String;Z)V
.line 291
:cond_20
:goto_20
return-void
.line 284
:cond_21
sget-object v1, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
sget v2, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
aget-object v1, v1, v2
invoke-virtual {v1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
move-result-object v1
goto :goto_1d
.line 288
:cond_2c
:try_start_2c
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
move-result-object v0
const/4 v1, 0x4
new-array v1, v1, [Ljava/lang/String;
const/4 v2, 0x0
const-string v3, "pkill"
aput-object v3, v1, v2
const/4 v2, 0x1
const-string v3, "-TERM"
aput-object v3, v1, v2
const/4 v2, 0x2
const-string v3, "-f"
aput-object v3, v1, v2
const/4 v2, 0x3
const-string v3, "system_server"
aput-object v3, v1, v2
invoke-virtual {v0, v1}, Ljava/lang/Runtime;->exec([Ljava/lang/String;)Ljava/lang/Process;
:try_end_4a
.catch Ljava/lang/Exception; {:try_start_2c .. :try_end_4a} :catch_4b
goto :goto_20
.line 290
:catch_4b
move-exception v0
goto :goto_20
:cond_4d
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions$99$1;->this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
iget-object v0, v0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v0}, Lcom/android/internal/policy/impl/GlobalActions;->access$000(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v0
const/4 v1, 0x0
invoke-static {v0, v1}, Lcom/android/server/power/ShutdownThread;->shutdown(Landroid/content/Context;Z)V
goto :goto_20
.end method
GlobalActions$99$2.smali
Code:
.class Lcom/android/internal/policy/impl/GlobalActions$99$2;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/android/internal/policy/impl/GlobalActions$99;->onPress()V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/GlobalActions$99;)V
.registers 2
iput-object p1, p0, Lcom/android/internal/policy/impl/GlobalActions$99$2;->this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
.registers 3
sput p2, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
return-void
.end method
Recompile and done!
You can also change the names of the reboot method to your liking!
Slowly but surely here comes the goodies. Cant wait for flashy time for AT&T.
ATT S4 Rooted. Beastin.
4.2.2
Scrosler you are the man! Hell ya dude thanks!! I envy your talent
"Tettering" ay, right. Slow down a little, I can't keep up. Very usefull reboot menu. Works for me.
sent from my SGH-i317
Dean1650 said:
"Tettering" ay, right. Slow down a little, I can't keep up. Very usefull reboot menu. Works for me.
sent from my SGH-i317
Click to expand...
Click to collapse
Hehehehe.... It was a tough choice my friend. Hardest phone choice I had to make but then after owning both I decided this was going to be a power house!
Me slow down? Never! :angel:
Did you see my launcher mod in themes and apps?
scrosler said:
Hehehehe.... It was a tough choice my friend. Hardest phone choice I had to make but then after owning both I decided this was going to be a power house!
Me slow down? Never! :angel:
Did you see my launcher mod in themes and apps?
Click to expand...
Click to collapse
No, but I'm headed over there now.
sent from my SGH-i317
scrosler said:
Hehehehe.... It was a tough choice my friend. Hardest phone choice I had to make but then after owning both I decided this was going to be a power house!
Me slow down? Never! :angel:
Did you see my launcher mod in themes and apps?
Click to expand...
Click to collapse
Thought you were going back to Verizon?
Sent from my HTC One using Tapatalk 2
powerwagon said:
Thought you were going back to Verizon?
Sent from my HTC One using Tapatalk 2
Click to expand...
Click to collapse
I did. The people on Verizon bought me a Note II (when it came out). But I wanted the SGS4 so I broke into my donation fund and bought (part of it anyways).
I now develop for 4 phones, SGS4, Note II (All carriers), SGS3, and HTC One X... and the Nexus 10 Tablet.
scrosler said:
I did. The people on Verizon bought me a Note II (when it came out). But I wanted the SGS4 so I broke into my donation fund and bought (part of it anyways).
I now develop for 4 phones, SGS4, Note II (All carriers), SGS3, and HTC One X... and the Nexus 10 Tablet.
Click to expand...
Click to collapse
Cant wait to be running cleanrom on this! Def one of the best devs in the game, glad you kept it
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Can't wait for mine to come in the mail... Thanks to you guys who able to do this awesome work. Hope I can help out or at least test some stuff out for you guys.
Sent from my SGS3 using xda premium
Deodexed System Installer ran from Noattach but i am still not able to get this mod to work i am updated to the lastest AMDL and deodexed verifiyed by checking build info Nottach.JDQ39.I337UCUAMDL anyone have any ideas ? as to what the problem is .
tokoam said:
Deodexed System Installer ran from Noattach but i am still not able to get this mod to work i am updated to the lastest AMDL and deodexed verifiyed by checking build info Nottach.JDQ39.I337UCUAMDL anyone have any ideas ? as to what the problem is .
Click to expand...
Click to collapse
And you used the installer with this mod?
Yes I did
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
tokoam said:
Yes I did
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Click to expand...
Click to collapse
Did you get an error messages?
scrosler said:
Did you get an error messages?
Click to expand...
Click to collapse
No error message in cmd batch file
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
i try right
It does not work for me either
Just says waiting for s4. The other installer works fine I even tried just pushing me jar file but that did not work either
Sent from my SAMSUNG-SGH-I337 using xda premium
And you have ADB installed and in the Windows path?
I have updated the instructions to be more specific and included an alternate installer with the ADB executables.

[TUTORIAL] [MOD] How to Add Colorey Platlogo

Note: Do at your own risk, I won't take responsibility
Required
Framework.jar
Deodex ROM
Colorey Platlogo
Apktool or other tool to decompile
Instructions:
1) Decompile Your framework.jar
2)Go in /smali/com/android/internal/app/PlatLogoActivity.smali
3)Remove All Lines
4) Add 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, "com.androidfire.colorey"
const-string v4, "com.androidfire.colorey.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
5)Recompile Push to /system/framework
6)Install ColoreyPlatlogo as Normal App
7)Reboot Your Phone
8)Go to Settings\About Section
9)Click 3.x Times on Android Version Shake Your Phone
Credits:
iamareebjamal
Reserved
Could you give some SS of your work ?
Nice share bro
wanna see first before decompile? try this
>adb shell
>am start -n com.androidfire.colorey/.PlatLogoActivity
Click to expand...
Click to collapse
SHA20 said:
Nice share bro
Click to expand...
Click to collapse
Don't need To Say Anything just press
AndroidFire said:
Don't need To Say Anything just press
Click to expand...
Click to collapse
Ok sir

[TUTORIAL] [MOD] Add Android L Preview Platlogo

Note: Do at your own risk, I won't take responsibility
Required
Framework.jar
Deodex ROM
AndroidLPlatlogo
AF-Apk Go Here Click Here
Instructions:
1) Decompile Your framework.jar
2)Go in /smali/com/android/internal/app/PlatLogoActivity.smali
3)Remove All Lines
4) Add 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, "com.androidfire.l"
const-string v4, "com.androidfire.l.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 AndroidFire 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
5)Recompile Push to /system/framework
6)Install AndoidLPlatlogo as Normal App
7)Reboot Your Phone
8)Go to Settings\About Section
9)Click 3.x Times on Android Version
Thanks To IamArrebAjamal for His Eggster Where I Have Get Android L Preview Platlogo
Eggster
Credits: @iamareebjamal @Giupy 99
Some correction, you no need to deodex your rom to apply tgis, I think
Thanks for credits bro :good: nice one
AndroidFire said:
Note: Do at your own risk, I won't take responsibility
Required
Framework.jar
Deodex ROM
AndroidLPlatlogo
AF-Apk Go Here Click Here
Instructions:
1) Decompile Your framework.jar
2)Go in /smali/com/android/internal/app/PlatLogoActivity.smali
3)Remove All Lines
4) Add 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, "com.androidfire.l"
const-string v4, "com.androidfire.l.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 AndroidFire 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
5)Recompile Push to /system/framework
6)Install AndoidLPlatlogo as Normal App
7)Reboot Your Phone
8)Go to Settings\About Section
9)Click 3.x Times on Android Version
Thanks To IamArrebAjamal for His Eggster Where I Have Get Android L Preview Platlogo
Eggster
Credits: @iamareebjamal @Giupy 99
Click to expand...
Click to collapse
is that easter egg ?
It means that if my Settings.apk is KitkatEasterEgg.apk supported, the framework.jar will overwrite the activity?

[TUTORIAL] [MOD] Add Android ICS Platlogo

Hello Today I again Here i have make ICS Platlogo for Our Phone
Required
Framework.jar
Deodex ROM
AndroidICSPlatlogo
AF-Apk Go Here Click Here
Instructions:
1) Decompile Your framework.jar
2)Go in /smali/com/android/internal/app/PlatLogoActivity.smali
3)Remove All Lines
4) Add 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, "com.androidfire.ics"
const-string v4, "com.androidfire.ics.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 AndroidFire 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
5)Recompile Push to /system/framework
6)Install AndoidICSPlatlogo as Normal App
7)Reboot Your Phone
8)Go to Settings About Section
9)Click 3.x Times on Android Version
Credits:-
Eggster
Credits: @iamareebjamal @Giupy 99
Specially to NineOldAndroid
Downoad
In Attachment
nyc guide
:good:great ..Keep it up
good

[Guide Dev][Smali DIY] How to Switch, Checkbox, Seekbar,ListPreferences Preferences

Today i would like to explain the tut on how these Switch,CheckBox,ListPreferences work
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Firstly i am not good in explanation
Hope you will surely understand it
Before Going to the main part you should know what switch checkbox and list preferences work
Look at this code
Code:
private boolean mBrightnessSliderEnabled;
private int isBrightnessSliderEnabled()
{
int i = Settings.System.getInt(this.mContext.getContentResolver(), "[COLOR="red"]brightness_slider_enabled[/COLOR]", 1); #key
int j = 0;
if (i != 0) {
j = 1;
}
this.mBrightnessSliderEnabled = j;
return j;
}
private boolean showBrightnessSlider()
{
int i = isBrightnessSliderEnabled();
ToggleSlider localToggleSlider = (ToggleSlider)findViewById(id.brightness_slider);
if ((i != 0) && (this.mBrightnessSliderEnabled))
{
this.mBrightnessView.setVisibility(0);
localToggleSlider.setVisibility(0);
}
for (;;)
{
updateResources();
return this.mBrightnessSliderEnabled;
this.mBrightnessView.setVisibility(8);
localToggleSlider.setVisibility(8);
}
}
public void setListening(boolean paramBoolean)
{
if (this.mListening == paramBoolean) {
return;
}
this.mListening = paramBoolean;
Iterator localIterator = this.mRecords.iterator();
while (localIterator.hasNext())
{
TileRecord localTileRecord = (TileRecord)localIterator.next();
try
{
localTileRecord.tile.setListening(this.mListening);
}
catch (IllegalArgumentException localIllegalArgumentException) {}
}
this.mFooter.setListening(this.mListening);
if (this.mListening) {
refreshAllTiles();
}
if ((paramBoolean) && (showBrightnessSlider()))
{
this.mBrightnessController.registerCallbacks();
return;
}
this.mBrightnessController.unregisterCallbacks();
}
In Smali Look here http://forum.xda-developers.com/cro...es-apps/guide-hide-brightness-slider-t3284141
See here in the above code
In code you will find 0 and 1 ( nothing but true or false / on/off)
and you can see a key in red line ( which receives the 1 or 0 from settings)
So The CheckBox and Switch preference created a boolean 1 or 0 ( nothing but on / off)
Hope you got what i meant
List preference in android persists string. That means that it writes object of string type into the shared preferences.
You need to create 2 string arrays for each list preference.
One for Entries - what is displayed in the dialog as single choice items for user.
and One is for entryValues (what is being written into the preferences). You can from your mod read them as integers or strings using content resolver.
f.e., if your values are 200, 300, 400, android will persist them as strings. But when you restrieve them from database in your systemui smali mod, f.e.,
you can call either getInt (to get them as integers) or getString to get them as strings. Of course strings array like bread, milk, cookies cannot be retrieved as integer.
But a string 200 can be either.
Now time to main part of explanation
So you know that switch and checkbox give same out of valued 1 or 0
How to make it ?
Here i will start with 2 types of codes
Post 2
Look at these 2 xml code which give same result with variation of view
Code:
<SwitchPreference android:title="Brightness Slider" android:key="[COLOR="red"]key_brightness_slider_show[/COLOR]" android:summaryOn="Brightness Slider Shown" android:summaryOff="Brightness Slider Hidden" />
or
Code:
<CheckBoxPreference android:title="Brightness Slider" android:key="[COLOR="red"]key_brightness_slider_show[/COLOR]" android:summaryOn="Brightness Slider Shown" android:summaryOff="Brightness Slider Hidden" />
You MUST provide defaultValue for ANY switch preference you create
It writes boolean (true or false) into the shared preferences
We copy it as integer (1 or 0) into the Settings.System database
It mush have a unique key, none of existent in databse.
It must be the same key as you use in your mod for that function. key_brightness_slider_show.
So thea Slider can be either visible or invisible.
Also will checkbox preference. In your mod when you retrieve and integer using ContentResolver you specify the default value (if the key is not found).
You have to specify the same default value here. If in smali it was 0x1,. then in the app it must be android:defaultValue = "true".
android:summaryOn="Brightness Slider Shown" android:summaryOff="Brightness Slider Hidden"
These will show the below summary when value is 1 you will get summaryOn else off
This is not much mandatory.. its your wish or you can leave it or you can just only define summary
You can also make Dependence of the switch example
Network mod- this contain turn on/off, color, auto hide and more
When you add the dependency code so that when you only get bool 1 you can control other next string
Look below code of strings
Code:
<ListPreference android:persistent="false" android:entries="@array/show_network_traffic_state_entries" android:title="@string/show_network_traffic_state" android:key="[COLOR="red"]network_traffic_state[/COLOR]" android:entryValues="@array/show_network_traffic_state_values" />
<net.margaritov.preference.colorpicker.ColorPickerPreference android:title="@string/network_traffic_color_style" android:key="network_traffic_color" [COLOR="Orange"]android:dependency="[COLOR="Red"]network_traffic_state[/COLOR]" [/COLOR]android:defaultValue="0xffffffff" />
in the above code you can see the dependency
mean, when you turn on the first string
only then next string works
Now its time to go for smali
First create your own xml code
Example look this empty code
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="New"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
</PreferenceScreen>
save this in any name of your xml (settings.apk/res/xml)
now i like to control Brightness slider
so i will add this to the xml and will look like
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="New"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<SwitchPreference android:title="Brightness Slider" android:key="key_brightness_slider_show" android:defaultValue="0" android:summaryOn="Brightness Slider Shown" android:summaryOff="Brightness Slider Hidden"
</PreferenceScreen>
Look here the main part is Key android:key="key_brightness_slider_show" (where i had defined brightness_slider_show in above code )
I think you are clear till now
So time to create a boolean
Lets start with new empty code
This is an Empty code Which or where you can create new Switch or Checkbox preference
The path of the file is Settings.apk/smali/com/android/settings/rz/
and File name was Statusmod.smali
Code:
.class public Lcom/android/settings/rz/Statusmod;
.super Lcom/android/settings/SettingsPreferenceFragment;
.source "Statusmod.java"
# instance fields
# direct methods
.method public constructor <init>()V
.locals 0
.prologue
.line 28
invoke-direct {p0}, Lcom/android/settings/SettingsPreferenceFragment;-><init>()V
return-void
.end method
# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
.locals 5
.param p1, "savedInstanceState" # Landroid/os/Bundle;
.prologue
const/4 v3, 0x0
const/4 v2, 0x1
.line 42
invoke-super {p0, p1}, Lcom/android/settings/SettingsPreferenceFragment;->onCreate(Landroid/os/Bundle;)V
.line 43
invoke-virtual {p0}, Lcom/android/settings/rz/Statusmod;->getActivity()Landroid/app/Activity;
move-result-object v1
invoke-virtual {v1}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
.line 44
.local v0, "resolver":Landroid/content/ContentResolver;
const v1, 0x7f060092 #Xml preference
invoke-virtual {p0, v1}, Lcom/android/settings/rz/Statusmod;->addPreferencesFromResource(I)V
.end method
.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
.locals 5
.param p1, "preferenceScreen" # Landroid/preference/PreferenceScreen;
.param p2, "preference" # Landroid/preference/Preference;
.prologue
const/4 v1, 0x0
const/4 v2, 0x1
.end method
Here i had added a part of Switch settings
Code:
.class public Lcom/android/settings/rz/Statusmod;
.super Lcom/android/settings/SettingsPreferenceFragment;
.source "Statusmod.java"
# instance fields
.field private mENABLE_SLIDER:Landroid/preference/[COLOR="SeaGreen"]SwitchPreference[/COLOR];
# direct methods
.method public constructor <init>()V
.locals 0
.prologue
.line 28
invoke-direct {p0}, Lcom/android/settings/SettingsPreferenceFragment;-><init>()V
return-void
.end method
# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
.locals 5
.param p1, "savedInstanceState" # Landroid/os/Bundle;
.prologue
const/4 v3, 0x0
const/4 v2, 0x1
.line 42
invoke-super {p0, p1}, Lcom/android/settings/SettingsPreferenceFragment;->onCreate(Landroid/os/Bundle;)V
.line 43
invoke-virtual {p0}, Lcom/android/settings/rz/Statusmod;->getActivity()Landroid/app/Activity;
move-result-object v1
invoke-virtual {v1}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
.line 44
.local v0, "resolver":Landroid/content/ContentResolver;
const v1, 0x7f060092 # xml public key
invoke-virtual {p0, v1}, Lcom/android/settings/rz/Statusmod;->addPreferencesFromResource(I)V
.line 46
const-string v1, "key_brightness_slider_show"
invoke-virtual {p0, v1}, Lcom/android/settings/rz/Statusmod;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v1
check-cast v1, Landroid/preference/[COLOR="seagreen"]SwitchPreference[/COLOR];
iput-object v1, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_SLIDER:Landroid/preference/[COLOR="seagreen"]SwitchPreference[/COLOR];
.line 47
iget-object v4, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_SLIDER:Landroid/preference/[COLOR="seagreen"]SwitchPreference[/COLOR];
const-string v1, "brightness_slider_show"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-ne v1, v2, :cond_0
move v1, v2
:goto_0
invoke-virtual {v4, v1}, Landroid/preference/[COLOR="seagreen"]SwitchPreference[/COLOR];->setChecked(Z)V
.line 57
return-void
:cond_0
move v1, v3
.line 47
goto :goto_0
.end method
.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
.locals 5
.param p1, "preferenceScreen" # Landroid/preference/PreferenceScreen;
.param p2, "preference" # Landroid/preference/Preference;
.prologue
const/4 v1, 0x0
const/4 v2, 0x1
.line 61
iget-object v3, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_SLIDER:Landroid/preference/[COLOR="seagreen"]SwitchPreference[/COLOR];
if-ne p2, v3, :cond_1
.line 62
iget-object v3, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_SLIDER:Landroid/preference/[COLOR="seagreen"]SwitchPreference[/COLOR];
invoke-virtual {v3}, Landroid/preference/[COLOR="seagreen"]SwitchPreference[/COLOR];->isChecked()Z
move-result v0
.line 63
.local v0, "value":Z
invoke-virtual {p0}, Lcom/android/settings/rz/Statusmod;->getActivity()Landroid/app/Activity;
move-result-object v3
invoke-virtual {v3}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "brightness_slider_show"
if-eqz v0, :cond_0
move v1, v2
:cond_0
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 78
.end local v0 # "value":Z
:goto_0
return v2
.line 65
:cond_1
invoke-super {p0, p1, p2}, Lcom/android/settings/SettingsPreferenceFragment;->onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
move-result v2
goto :goto_0
.end method
Now you had done with the code
in this you should look for public id
Where you need to match with xml you created above
This is Switch box preference
If you like to change it to Check Box preference then change all Switch to Checkbox ( also in Xml)
As like below Code ( Look for green part of changes)
Code:
.class public Lcom/android/settings/rz/Statusmod;
.super Lcom/android/settings/SettingsPreferenceFragment;
.source "Statusmod.java"
# instance fields
.field private mENABLE_SLIDER:Landroid/preference/CheckBoxPreference;
# direct methods
.method public constructor <init>()V
.locals 0
.prologue
.line 28
invoke-direct {p0}, Lcom/android/settings/SettingsPreferenceFragment;-><init>()V
return-void
.end method
# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
.locals 5
.param p1, "savedInstanceState" # Landroid/os/Bundle;
.prologue
const/4 v3, 0x0
const/4 v2, 0x1
.line 42
invoke-super {p0, p1}, Lcom/android/settings/SettingsPreferenceFragment;->onCreate(Landroid/os/Bundle;)V
.line 43
invoke-virtual {p0}, Lcom/android/settings/rz/Statusmod;->getActivity()Landroid/app/Activity;
move-result-object v1
invoke-virtual {v1}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
.line 44
.local v0, "resolver":Landroid/content/ContentResolver;
const v1, 0x7f060092
invoke-virtual {p0, v1}, Lcom/android/settings/rz/Statusmod;->addPreferencesFromResource(I)V
.line 46
const-string v1, "key_brightness_slider_show"
invoke-virtual {p0, v1}, Lcom/android/settings/rz/Statusmod;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v1
check-cast v1, Landroid/preference/CheckBoxPreference;
iput-object v1, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_SLIDER:Landroid/preference/CheckBoxPreference;
.line 47
iget-object v4, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_SLIDER:Landroid/preference/CheckBoxPreference;
const-string v1, "brightness_slider_show"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-ne v1, v2, :cond_0
move v1, v2
:goto_0
invoke-virtual {v4, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 57
return-void
:cond_0
move v1, v3
.line 47
goto :goto_0
.end method
.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
.locals 5
.param p1, "preferenceScreen" # Landroid/preference/PreferenceScreen;
.param p2, "preference" # Landroid/preference/Preference;
.prologue
const/4 v1, 0x0
const/4 v2, 0x1
.line 61
iget-object v3, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_SLIDER:Landroid/preference/CheckBoxPreference;
if-ne p2, v3, :cond_1
.line 62
iget-object v3, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_SLIDER:Landroid/preference/CheckBoxPreference;
invoke-virtual {v3}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 63
.local v0, "value":Z
invoke-virtual {p0}, Lcom/android/settings/rz/Statusmod;->getActivity()Landroid/app/Activity;
move-result-object v3
invoke-virtual {v3}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "brightness_slider_show"
if-eqz v0, :cond_0
move v1, v2
:cond_0
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 78
.end local v0 # "value":Z
:goto_0
return v2
.line 65
:cond_1
invoke-super {p0, p1, p2}, Lcom/android/settings/SettingsPreferenceFragment;->onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
move-result v2
goto :goto_0
.end method
If you like to add more in this
Example if you had added new Switch or checkbox
Code:
<PreferenceScreen android:title="New"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<SwitchPreference android:title="Brightness Slider" android:key="brightness_slider_show" android:defaultValue="0" android:summaryOn="Brightness Slider Shown" android:summaryOff="Brightness Slider Hidden"
<CheckBoxPreference android:title="Nothing Bomb" android:key="key_bomb_show" />
</PreferenceScreen>
first define in xml then i code
i will explain in simple
Look for the above code
Look at this boolean ( from above code)
Code:
.field private mENABLE_SLIDER:Landroid/preference/SwitchPreference;
above/Below Add this line
Code:
.field private mENABLE_BOMB:Landroid/preference/CheckBoxPreference; #define boolean
In this method
.method public onCreate(Landroid/os/BundleV
After :goto_0
You need to add this code
Code:
invoke-virtual {v4, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
const-string v1, "key_bomb_show"
invoke-virtual {p0, v1}, Lcom/android/settings/rz/Statusmod;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v1
check-cast v1, Landroid/preference/CheckBoxPreference;
iput-object v1, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_BOMB:Landroid/preference/CheckBoxPreference;
.line 50
iget-object v4, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_BOMB:Landroid/preference/CheckBoxPreference;
const-string v1, "bomb_show"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-ne v1, v2, :cond_1
move v1, v2
:goto_1
After goto :goto_0
Add this Code
Code:
:cond_1
move v1, v3
.line 50
goto :goto_1
In this code when you add more first look cond_? and goto_?
Now look for this method
.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/PreferenceZ
in that after
.line 65
:cond_1
Add this code
Code:
iget-object v3, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_BOMB:Landroid/preference/SwitchPreference;
if-ne p2, v3, :cond_2
.line 62
iget-object v3, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_BOMB:Landroid/preference/SwitchPreference;
invoke-virtual {v3}, Landroid/preference/SwitchPreference;->isChecked()Z
move-result v0
.line 63
.local v0, "value":Z
invoke-virtual {p0}, Lcom/android/settings/rz/Statusmod;->getActivity()Landroid/app/Activity;
move-result-object v3
invoke-virtual {v3}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "bomb_show"
if-eqz v0, :cond_1
move v1, v2
:cond_1
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 78
.end local v0 # "value":Z
:goto_1
return v2
.line 65
:cond_2
and save finally it looks like this
Code:
.class public Lcom/android/settings/rz/Statusmod;
.super Lcom/android/settings/SettingsPreferenceFragment;
.source "Statusmod.java"
# instance fields
.field private mENABLE_SLIDER:Landroid/preference/SwitchPreference;
.field private mENABLE_BOMB:Landroid/preference/CheckBoxPreference;
# direct methods
.method public constructor <init>()V
.locals 0
.prologue
.line 28
invoke-direct {p0}, Lcom/android/settings/SettingsPreferenceFragment;-><init>()V
return-void
.end method
# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
.locals 5
.param p1, "savedInstanceState" # Landroid/os/Bundle;
.prologue
const/4 v3, 0x0
const/4 v2, 0x1
.line 42
invoke-super {p0, p1}, Lcom/android/settings/SettingsPreferenceFragment;->onCreate(Landroid/os/Bundle;)V
.line 43
invoke-virtual {p0}, Lcom/android/settings/rz/Statusmod;->getActivity()Landroid/app/Activity;
move-result-object v1
invoke-virtual {v1}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
.line 44
.local v0, "resolver":Landroid/content/ContentResolver;
const v1, 0x7f060092
invoke-virtual {p0, v1}, Lcom/android/settings/rz/Statusmod;->addPreferencesFromResource(I)V
.line 46
const-string v1, "key_brightness_slider_show"
invoke-virtual {p0, v1}, Lcom/android/settings/rz/Statusmod;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v1
check-cast v1, Landroid/preference/SwitchPreference;
iput-object v1, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_SLIDER:Landroid/preference/SwitchPreference;
.line 47
iget-object v4, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_SLIDER:Landroid/preference/SwitchPreference;
const-string v1, "brightness_slider_show"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-ne v1, v2, :cond_0
move v1, v2
:goto_0
invoke-virtual {v4, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
const-string v1, "key_bomb_show"
invoke-virtual {p0, v1}, Lcom/android/settings/rz/Statusmod;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v1
check-cast v1, Landroid/preference/CheckBoxPreference;
iput-object v1, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_BOMB:Landroid/preference/CheckBoxPreference;
.line 50
iget-object v4, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_BOMB:Landroid/preference/CheckBoxPreference;
const-string v1, "bomb_show"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-ne v1, v2, :cond_1
move v1, v2
:goto_1
invoke-virtual {v4, v1}, Landroid/preference/SwitchPreference;->setChecked(Z)V
.line 57
return-void
:cond_0
move v1, v3
.line 47
goto :goto_0
:cond_1
move v1, v3
.line 50
goto :goto_1
.end method
.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
.locals 5
.param p1, "preferenceScreen" # Landroid/preference/PreferenceScreen;
.param p2, "preference" # Landroid/preference/Preference;
.prologue
const/4 v1, 0x0
const/4 v2, 0x1
.line 61
iget-object v3, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_SLIDER:Landroid/preference/SwitchPreference;
if-ne p2, v3, :cond_1
.line 62
iget-object v3, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_SLIDER:Landroid/preference/SwitchPreference;
invoke-virtual {v3}, Landroid/preference/SwitchPreference;->isChecked()Z
move-result v0
.line 63
.local v0, "value":Z
invoke-virtual {p0}, Lcom/android/settings/rz/Statusmod;->getActivity()Landroid/app/Activity;
move-result-object v3
invoke-virtual {v3}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "brightness_slider_show"
if-eqz v0, :cond_0
move v1, v2
:cond_0
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 78
.end local v0 # "value":Z
:goto_0
return v2
.line 65
:cond_1
iget-object v3, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_BOMB:Landroid/preference/SwitchPreference;
if-ne p2, v3, :cond_2
.line 62
iget-object v3, p0, Lcom/android/settings/rz/Statusmod;->mENABLE_BOMB:Landroid/preference/SwitchPreference;
invoke-virtual {v3}, Landroid/preference/SwitchPreference;->isChecked()Z
move-result v0
.line 63
.local v0, "value":Z
invoke-virtual {p0}, Lcom/android/settings/rz/Statusmod;->getActivity()Landroid/app/Activity;
move-result-object v3
invoke-virtual {v3}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "bomb_show"
if-eqz v0, :cond_1
move v1, v2
:cond_1
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 78
.end local v0 # "value":Z
:goto_1
return v2
.line 65
:cond_2
invoke-super {p0, p1, p2}, Lcom/android/settings/SettingsPreferenceFragment;->onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
move-result v2
goto :goto_0
.end method
and save it compile and done with your settings preferences
This is how to add preferences
If you add more with different smlai name then change the code path and definition
If you got confused look for my guides that will surely help you
post 3
Method 2
which is very simple
no need to work like in 2nd post (this works but not accurate as above )
Download this View attachment Cm_Settings.zip and merge to your settings
while you create a preference in xml define it as this way
Code:
<PreferenceScreen android:title="New"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<com.android.settings.cyanogenmod.SystemSettingSwitchPreference android:title="Brightness Slider" android:key="brightness_slider_show" android:defaultValue="0" android:summaryOn="Brightness Slider Shown" android:summaryOff="Brightness Slider Hidden"
<com.android.settings.cyanogenmod.SystemCheckBoxPreference android:title="Nothing Bomb" android:key="bomb_show" />
</PreferenceScreen>
Remember the key code is directly defined ( if you had doubt just start compare)
and done
This is expalantion of these things
It's seems I'm very noob in smali
Lol yeah best guide from @venkat kamesh
Thanks bro works well
learnt to decompile
will learn more bro
sorry bad english
translated
Thanks for your awesome work, bro! This makes it easy to give my ROM a custom feel. There is one bug, the switches always revert back to default every time the page/fragment/etc. is displayed. I have found a way around this and also figured out why it isn't working correctly...but I am not knowledgeable enough in smali to fix it. The issue is that the CM switches don't create a boolean one first instance. They will however control the boolean correctly if it exists.
How I solved:
I put my switches in settings because i'm running 4.4 and don't have rom control. So the path here will be different depending on where you put your switches. If they are in settings like mine you will navigate to /data/data/com.android.settings/shared_prefs/ and open the file com.android.settings_preferences.xml with a root file explorer. You will also need a text editor unless your file explorer has one built in.
Now you have to remember your keys that you used for your switches in your mod
mine are "aokpram_recent," "show_clock," and "stock_battery."
***Note that you have to type them in, I've tried copying and pasting and it will not work.***
Example:
boolean name="show_clock" value="true"
Do this for all of your mod keys and your switches will start working correctly. If I ever figure out a way to make the cmsettings switches generate their own boolean I will post it.

Categories

Resources