[TUTORIAL] [MOD] How to Add Colorey Platlogo - Galaxy Y GT-S5360 General

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

Related

[INQUIRY][DEV] Does SE have Rotation Animation inside stock ROM? Please give info

Hi there, since i'm on Xperia Ray but the devs is not many there, i think i'll post this on Arc's.
My Suspicion is that SE already had embed the Rotation Animation, but apparently turned off now. Why can i say that?
1. In android.policy\com\android\internal\policy\impl\PhoneWindowManager.smali there is a flag called fancy_rotation_anim. The code is like this:
Code:
.line 631
const-string v12, "fancy_rotation_anim"
const/4 v13, 0x0
invoke-static {v8, v12, v13}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_f0
const/16 v12, 0x80
:goto_29
iput v12, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mFancyRotationAnimation:I
2. in android.policy\com\android\internal\policy\impl\PhoneWindowManager$MyOrientationListener.smali there's a code like this:
Code:
# virtual methods
.method public onOrientationChanged(I)V
.registers 5
.parameter "rotation"
.prologue
.line 365
:try_start_0
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mWindowManager:Landroid/view/IWindowManager;
const/4 v1, 0x0
iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
[B] iget v2, v2, Lcom/android/internal/policy/impl/PhoneWindowManager;->mFancyRotationAnimation:I[/B]
invoke-interface {v0, p1, v1, v2}, Landroid/view/IWindowManager;->setRotation(IZI)V
:try_end_c
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_c} :catch_d
.line 371
:goto_c
return-void
.line 367
:catch_d
move-exception v0
goto :goto_c
.end method
Now i had a modified Settings.apk to insert Setting$System config named "fancy_rotation_anim" when the Animation is updated. But unfortunately it doesn't do anything. Can any devs that's more experienced than me can investigate this? Thanks
And sorry if this thread has existed before. If yes, please mod close this thread thanks.
cm7 latest version has this fancy rotation animation like ics,i already search all over internet for this thing but they said its not available for gb,just for ics,and i dont know how cm7 has this(really shock me),maybe you can ask cm's dev for an answer,or maybe you can look inside cm7 for little clue on how they do it..
Sent from my LT18i
try this
hey mate try this
change this part
Code:
.line 631
const-string v12, "fancy_rotation_anim"
const/4 v13, 0x0
invoke-static {v8, v12, v13}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
[B]if-eqz v12, :cond_f0[/B]
const/16 v12, 0x80
:goto_29
to read this
(remove the part i bolded above)
Code:
.line 631
const-string v12, "fancy_rotation_anim"
const/4 v13, 0x0
invoke-static {v8, v12, v13}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
const/16 v12, 0x80
:goto_29
that bypasses the check and (i think) enables the animation (if it is there)
it could cause a crash if the rest of the animation is not there.
if it does crash grab the log output and post it here.
i'll take a look.
rashid.fairus said:
cm7 latest version has this fancy rotation animation like ics,i already search all over internet for this thing but they said its not available for gb,just for ics,and i dont know how cm7 has this(really shock me),maybe you can ask cm's dev for an answer,or maybe you can look inside cm7 for little clue on how they do it..
Sent from my LT18i
Click to expand...
Click to collapse
It uses another libsurfinger and libsurfinger-client which support that type of animation. In SS phone, just copy those libs and it works.
The new Motoblur has it, Sense 3 has it, Samsung has it and CM7 has it. There must be a way to get it. =)
pvyParts said:
hey mate try this
change this part
Code:
.line 631
const-string v12, "fancy_rotation_anim"
const/4 v13, 0x0
invoke-static {v8, v12, v13}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
[B]if-eqz v12, :cond_f0[/B]
const/16 v12, 0x80
:goto_29
to read this
(remove the part i bolded above)
Code:
.line 631
const-string v12, "fancy_rotation_anim"
const/4 v13, 0x0
invoke-static {v8, v12, v13}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
const/16 v12, 0x80
:goto_29
that bypasses the check and (i think) enables the animation (if it is there)
it could cause a crash if the rest of the animation is not there.
if it does crash grab the log output and post it here.
i'll take a look.
Click to expand...
Click to collapse
Hi, thanks for that. Actually I already tried to alter settings.apk so it store fancy_rotate_anim when animation setting is set. In the logcat the window manager does report that animflags is set to 128 (0x80) like the one set above. But nothing happens.
Sent from my ST18i using XDA App
silveraero said:
It uses another libsurfinger and libsurfinger-client which support that type of animation. In SS phone, just copy those libs and it works.
Click to expand...
Click to collapse
One question, what is SS? Samsung? :-/
Sent from my ST18i using XDA App
Interesting thing I found here regarding Orientation
I grabbed PhoneWindowManager$MyOrientationListener.smali file from HTC android.policy.jar on 2.3.4 and Compared it with Sony SE.. They are mostly Identical but some Lines missing and slightly changed numbers in HTC's file..
In SE its Like This
(Check the BOLD RED Lines..they are missing or changed in HTC's file)
Code:
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/PhoneWindowManager;Landroid/content/Context;)V
.locals 0
.parameter
.parameter "context"
.prologue
.line [B][COLOR="Red"]468[/COLOR][/B]
iput-object p1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
.line [B][COLOR="Red"]469[/COLOR][/B]
invoke-direct {p0, p2}, Landroid/view/WindowOrientationListener;-><init>(Landroid/content/Context;)V
.line [B][COLOR="Red"]470[/COLOR][/B]
return-void
.end method
# virtual methods
.method public onOrientationChanged(I)V
.locals 3
.parameter "rotation"
.prologue
[COLOR="Red"][B].line 477
const-string v0, "WindowManager"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "onOrientationChanged, rotation changed to "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
.line 480[/B][/COLOR]
:try_start_0
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mWindowManager:Landroid/view/IWindowManager;
const/4 v1, 0x0
iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
iget v2, v2, Lcom/android/internal/policy/impl/PhoneWindowManager;->mFancyRotationAnimation:I
invoke-interface {v0, p1, v1, v2}, Landroid/view/IWindowManager;->setRotation(IZI)V
:try_end_0
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
.line [B][COLOR="Red"]486[/COLOR][/B]
:goto_0
return-void
.line [B][COLOR="Red"]482[/COLOR][/B]
:catch_0
move-exception v0
goto :goto_0
.end method
NOW CHECK IN HTC's file
Code:
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/PhoneWindowManager;Landroid/content/Context;)V
.locals 0
.parameter
.parameter "context"
.prologue
.line 438
iput-object p1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
.line 439
invoke-direct {p0, p2}, Landroid/view/WindowOrientationListener;-><init>(Landroid/content/Context;)V
.line 440
return-void
.end method
# virtual methods
.method public onOrientationChanged(I)V
.locals 3
.parameter "rotation"
.prologue
.line 447
:try_start_0
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mWindowManager:Landroid/view/IWindowManager;
const/4 v1, 0x0
iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
iget v2, v2, Lcom/android/internal/policy/impl/PhoneWindowManager;->mFancyRotationAnimation:I
invoke-interface {v0, p1, v1, v2}, Landroid/view/IWindowManager;->setRotation(IZI)V
:try_end_0
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
.line 453
:goto_0
return-void
.line 449
:catch_0
move-exception v0
goto :goto_0
.end method
I modded the HTC one to fit the SE lines, named it HTCModdedforSE.zip and attached it for testing.. ont have my SE now...
But just incase I attached the whole android.policy.jar file from HTC Sensation.. You can fully replace SE with HTC one without modding.. maybe that works out...
Give it a go..
hansip87 said:
One question, what is SS? Samsung? :-/
Sent from my ST18i using XDA App
Click to expand...
Click to collapse
Yes, a guy there copied from Galaxy Note and it works perfect without problem. Maybe different with SE.
Sent from my X10i using XDA Premium App
@jjdoctor
will try your modded zip and give feedback,maybe SE will get angry with you mate
from my ARC
jjdoctor said:
Interesting thing I found here regarding Orientation
I grabbed PhoneWindowManager$MyOrientationListener.smali file from HTC android.policy.jar on 2.3.4 and Compared it with Sony SE.. They are mostly Identical but some Lines missing and slightly changed numbers in HTC's file..
In SE its Like This
(Check the BOLD RED Lines..they are missing or changed in HTC's file)
Code:
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/PhoneWindowManager;Landroid/content/Context;)V
.locals 0
.parameter
.parameter "context"
.prologue
.line [B][COLOR="Red"]468[/COLOR][/B]
iput-object p1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
.line [B][COLOR="Red"]469[/COLOR][/B]
invoke-direct {p0, p2}, Landroid/view/WindowOrientationListener;-><init>(Landroid/content/Context;)V
.line [B][COLOR="Red"]470[/COLOR][/B]
return-void
.end method
# virtual methods
.method public onOrientationChanged(I)V
.locals 3
.parameter "rotation"
.prologue
[COLOR="Red"][B].line 477
const-string v0, "WindowManager"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "onOrientationChanged, rotation changed to "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
.line 480[/B][/COLOR]
:try_start_0
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mWindowManager:Landroid/view/IWindowManager;
const/4 v1, 0x0
iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
iget v2, v2, Lcom/android/internal/policy/impl/PhoneWindowManager;->mFancyRotationAnimation:I
invoke-interface {v0, p1, v1, v2}, Landroid/view/IWindowManager;->setRotation(IZI)V
:try_end_0
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
.line [B][COLOR="Red"]486[/COLOR][/B]
:goto_0
return-void
.line [B][COLOR="Red"]482[/COLOR][/B]
:catch_0
move-exception v0
goto :goto_0
.end method
NOW CHECK IN HTC's file
Code:
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/PhoneWindowManager;Landroid/content/Context;)V
.locals 0
.parameter
.parameter "context"
.prologue
.line 438
iput-object p1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
.line 439
invoke-direct {p0, p2}, Landroid/view/WindowOrientationListener;-><init>(Landroid/content/Context;)V
.line 440
return-void
.end method
# virtual methods
.method public onOrientationChanged(I)V
.locals 3
.parameter "rotation"
.prologue
.line 447
:try_start_0
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mWindowManager:Landroid/view/IWindowManager;
const/4 v1, 0x0
iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
iget v2, v2, Lcom/android/internal/policy/impl/PhoneWindowManager;->mFancyRotationAnimation:I
invoke-interface {v0, p1, v1, v2}, Landroid/view/IWindowManager;->setRotation(IZI)V
:try_end_0
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
.line 453
:goto_0
return-void
.line 449
:catch_0
move-exception v0
goto :goto_0
.end method
I modded the HTC one to fit the SE lines, named it HTCModdedforSE.zip and attached it for testing.. ont have my SE now...
But just incase I attached the whole android.policy.jar file from HTC Sensation.. You can fully replace SE with HTC one without modding.. maybe that works out...
Give it a go..
Click to expand...
Click to collapse
the line code that SE have is just for logging purpose, nothing essential mate.
hansip87 said:
the line code that SE have is just for logging purpose, nothing essential mate.
Click to expand...
Click to collapse
As i scan all the code, it is actually depends on native function which resides on libsurfaceflinger.so. So no mod can be done about that unless somebody can crack the .so file. Case closed, thanks for the input.

[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][tut] Enable/Disable Navigation Bar Swipe to sleep/Lock

Hello guys
i had got you a new tut
Which is Swipe on nav bar to sleep/lock
Lets start work
All you need is Deodexed Systemui.apk, settings.apk and Good patience ( if you dont have any of these then just dont try this )
Ok
1. Decompile SystemUI.apk
2. Now download this View attachment SystemUI.zip and merge to your systemui.apk
3. Open com/android/systemui/statusbar/phone/NavigationBarView.smali
Look for this annotation
Code:
Lcom/android/systemui/statusbar/phone/NavigationBarView$OnVerticalChangedListener;,
Below that add this annotation
Code:
Lcom/android/systemui/statusbar/phone/NavigationBarView$SettingsObserver;,
Now look for
Code:
.field final mDisplay:Landroid/view/Display;
Below that add these definitions
Code:
.field private mDownTime:J
.field private mDownX:F
.field private mDownY:F
.field private mIsDown:Z
.field private mPowerManager:Landroid/os/PowerManager;
.field mSwipe2SleepActive:Z
Now look for this method ( this #1 post will have completely on this method only dont confuse )
Code:
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
in that method first Change .locals 4 to .locals 6
after this
Code:
const/4 v3, 0x0
add this
Code:
const/4 v4, 0x1
look for this line
Code:
iput-object v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mImeSwitcherClickListener:Landroid/view/View$OnClickListener;
Below that add this
Code:
iput-boolean v2, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mIsDown:Z
Look for this line
Code:
iput-object v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mDisplay:Landroid/view/Display;
Below that add this
Code:
const-string v1, "power"
invoke-virtual {p1, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroid/os/PowerManager;
iput-object v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mPowerManager:Landroid/os/PowerManager;
Now look for this line
Code:
iput-object v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mTaskSwitchHelper:Lcom/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper;
Below that add this
Code:
invoke-direct {p0, v0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getIcons(Landroid/content/res/Resources;)V
Now look for this line
Code:
invoke-direct {p0, v0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getIcons(Landroid/content/res/Resources;)V
Replace the above line with this code
Code:
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v3, "navbar_swipe_to_sleep"
invoke-static {v1, v3, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-ne v1, v4, :cond_0
:goto_0
iput-boolean v4, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mSwipe2SleepActive:Z
.line 207
new-instance p1, Lcom/android/systemui/statusbar/phone/NavigationBarView$SettingsObserver;
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mHandler:Lcom/android/systemui/statusbar/phone/NavigationBarView$H;
invoke-direct {p1, p0, v1}, Lcom/android/systemui/statusbar/phone/NavigationBarView$SettingsObserver;-><init>(Lcom/android/systemui/statusbar/phone/NavigationBarView;Landroid/os/Handler;)V
.line 208
.local p1, "settingsObserver":Lcom/android/systemui/statusbar/phone/NavigationBarView$SettingsObserver;
invoke-virtual {p1}, Lcom/android/systemui/statusbar/phone/NavigationBarView$SettingsObserver;->observe()V
Now in the same method you will find this return-void
Below that add this code
Code:
.end local p1 # "settingsObserver":Lcom/android/systemui/statusbar/phone/NavigationBarView$SettingsObserver;
:cond_0
move v4, v2
.line 205
goto :goto_0
save and Continued in 2nd and 3rd post
part 2
In the same file
4. continue
Look for this method
Code:
.method private adjustExtraKeyGravity(Landroid/view/View;Z)V
Above that method
add these methods
Code:
.method static synthetic access$200(Lcom/android/systemui/statusbar/phone/NavigationBarView;)Landroid/content/Context;
.locals 1
.param p0, "x0" # Lcom/android/systemui/statusbar/phone/NavigationBarView;
.prologue
.line 64
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mContext:Landroid/content/Context;
return-object v0
.end method
.method static synthetic access$300(Lcom/android/systemui/statusbar/phone/NavigationBarView;)Landroid/content/Context;
.locals 1
.param p0, "x0" # Lcom/android/systemui/statusbar/phone/NavigationBarView;
.prologue
.line 64
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mContext:Landroid/content/Context;
return-object v0
.end method
5. Look for this method
Code:
.method private notifyVerticalChangedListener(Z)V
Above that method add these code
Code:
.method private mySwipeDetector(FFJFFJ)V
.locals 11
.param p1, "e1X" # F
.param p2, "e1Y" # F
.param p3, "e1Time" # J
.param p5, "e2X" # F
.param p6, "e2Y" # F
.param p7, "e2Time" # J
.prologue
.line 276
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mContext:Landroid/content/Context;
invoke-virtual {v6}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v6
invoke-virtual {v6}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
move-result-object v6
iget v6, v6, Landroid/content/res/Configuration;->orientation:I
const/4 v7, 0x1
if-ne v6, v7, :cond_1
const/4 v2, 0x1
.line 277
.local v2, "isPortrait":Z
:goto_0
sub-float v0, p5, p1
.line 278
.local v0, "distanceX":F
sub-float v1, p6, p2
.line 279
.local v1, "distanceY":F
sub-long v6, p7, p3
long-to-float v6, v6
div-float v6, v0, v6
const/high16 v7, 0x447a0000 # 1000.0f
mul-float v4, v6, v7
.line 280
.local v4, "velocityX":F
sub-long v6, p7, p3
long-to-float v6, v6
div-float v6, v1, v6
const/high16 v7, 0x447a0000 # 1000.0f
mul-float v5, v6, v7
.line 281
.local v5, "velocityY":F
const-string v3, ""
.line 282
.local v3, "summary":Ljava/lang/String;
if-eqz v2, :cond_2
.line 283
invoke-static {v0}, Ljava/lang/Math;->abs(F)F
move-result v6
invoke-static {v1}, Ljava/lang/Math;->abs(F)F
move-result v7
cmpl-float v6, v6, v7
if-lez v6, :cond_0
invoke-static {v0}, Ljava/lang/Math;->abs(F)F
move-result v6
const/high16 v7, 0x43960000 # 300.0f
cmpl-float v6, v6, v7
if-lez v6, :cond_0
const/high16 v6, -0x3db80000 # -50.0f
cmpl-float v6, p6, v6
if-lez v6, :cond_0
invoke-static {v4}, Ljava/lang/Math;->abs(F)F
move-result v6
const/high16 v7, 0x447a0000 # 1000.0f
cmpl-float v6, v6, v7
if-lez v6, :cond_0
.line 285
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mPowerManager:Landroid/os/PowerManager;
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v8
invoke-virtual {v6, v8, v9}, Landroid/os/PowerManager;->goToSleep(J)V
.line 303
:cond_0
:goto_1
return-void
.line 276
.end local v0 # "distanceX":F
.end local v1 # "distanceY":F
.end local v2 # "isPortrait":Z
.end local v3 # "summary":Ljava/lang/String;
.end local v4 # "velocityX":F
.end local v5 # "velocityY":F
:cond_1
const/4 v2, 0x0
goto :goto_0
.line 298
.restart local v0 # "distanceX":F
.restart local v1 # "distanceY":F
.restart local v2 # "isPortrait":Z
.restart local v3 # "summary":Ljava/lang/String;
.restart local v4 # "velocityX":F
.restart local v5 # "velocityY":F
:cond_2
invoke-static {v1}, Ljava/lang/Math;->abs(F)F
move-result v6
invoke-static {v0}, Ljava/lang/Math;->abs(F)F
move-result v7
cmpl-float v6, v6, v7
if-lez v6, :cond_0
invoke-static {v1}, Ljava/lang/Math;->abs(F)F
move-result v6
const/high16 v7, 0x43960000 # 300.0f
cmpl-float v6, v6, v7
if-lez v6, :cond_0
const/high16 v6, -0x3db80000 # -50.0f
cmpl-float v6, p5, v6
if-lez v6, :cond_0
invoke-static {v5}, Ljava/lang/Math;->abs(F)F
move-result v6
const/high16 v7, 0x447a0000 # 1000.0f
cmpl-float v6, v6, v7
if-lez v6, :cond_0
.line 300
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mPowerManager:Landroid/os/PowerManager;
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v8
invoke-virtual {v6, v8, v9}, Landroid/os/PowerManager;->goToSleep(J)V
goto :goto_1
.end method
6. Now Find this
Code:
# virtual methods
Below that add this code
Code:
.method public dp2Px(F)I
.locals 3
.param p1, "dp" # F
.prologue
.line 544
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object v1
iget v0, v1, Landroid/util/DisplayMetrics;->density:F
.line 545
.local v0, "scale":F
mul-float v1, p1, v0
const/high16 v2, 0x3f000000 # 0.5f
add-float/2addr v1, v2
float-to-int v1, v1
return v1
.end method
7. Look for this method
Code:
.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
In this code Change .locals 3 to .locals 4
Look for this
Code:
.local v1, "intercept":Z
if-nez v1, :cond_[COLOR="Red"]0[/COLOR]
Change to
Code:
.local v1, "intercept":Z
if-nez v1, :cond_[COLOR="red"]1[/COLOR]
Look for this line
Code:
iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mDelegateIntercepted:Z
Below that add this code
Code:
iget-boolean v2, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mSwipe2SleepActive:Z
if-eqz v2, :cond_0
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
move-result v2
if-nez v2, :cond_0
.line 318
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v2
iput-wide v2, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mDownTime:J
.line 319
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v2
iput v2, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mDownX:F
.line 320
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
move-result v2
iput v2, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mDownY:F
.line 321
const/4 v2, 0x1
iput-boolean v2, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mIsDown:Z
.line 329
:cond_0
After adding this, just below 2 lines you will find this
After return v1 you will find this
:cond_0 to :cond_1
8. Now look for this method
Code:
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
Replace complete method from the below method
Code:
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
.locals 11
.param p1, "event" # Landroid/view/MotionEvent;
.prologue
const/4 v10, 0x1
.line 248
iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mSwipe2SleepActive:Z
if-eqz v1, :cond_0
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
move-result v1
if-ne v1, v10, :cond_0
iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mIsDown:Z
if-eqz v1, :cond_0
.line 249
const/4 v1, 0x0
iput-boolean v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mIsDown:Z
.line 250
iget v2, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mDownX:F
iget v3, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mDownY:F
iget-wide v4, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mDownTime:J
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v6
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
move-result v7
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v8
move-object v1, p0
invoke-direct/range {v1 .. v9}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mySwipeDetector(FFJFFJ)V
.line 252
:cond_0
invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->initDownStates(Landroid/view/MotionEvent;)V
.line 217
iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mDelegateIntercepted:Z
if-nez v1, :cond_1
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mTaskSwitchHelper:Lcom/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper;
invoke-virtual {v1, p1}, Lcom/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper;->onTouchEvent(Landroid/view/MotionEvent;)Z
move-result v1
if-eqz v1, :cond_1
move v1, v10
.line 227
:goto_0
return v1
.line 220
:cond_1
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mDeadZone:Lcom/android/systemui/statusbar/policy/DeadZone;
if-eqz v1, :cond_2
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
move-result v1
const/4 v2, 0x4
if-ne v1, v2, :cond_2
.line 221
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mDeadZone:Lcom/android/systemui/statusbar/policy/DeadZone;
invoke-virtual {v1, p1}, Lcom/android/systemui/statusbar/policy/DeadZone;->poke(Landroid/view/MotionEvent;)V
.line 223
:cond_2
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mDelegateHelper:Lcom/android/systemui/statusbar/DelegateViewHelper;
if-eqz v1, :cond_3
iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mDelegateIntercepted:Z
if-eqz v1, :cond_3
.line 224
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mDelegateHelper:Lcom/android/systemui/statusbar/DelegateViewHelper;
invoke-virtual {v1, p1}, Lcom/android/systemui/statusbar/DelegateViewHelper;->onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
.line 225
.local v0, "ret":Z
if-eqz v0, :cond_3
move v1, v10
goto :goto_0
.line 227
.end local v0 # "ret":Z
:cond_3
invoke-super {p0, p1}, Landroid/widget/LinearLayout;->onTouchEvent(Landroid/view/MotionEvent;)Z
move-result v1
goto :goto_0
.end method
9. Finally save and compile/sign and replace the systemui.apk
10. Now time to add switch from setting
Look for the below 3rd post
settings
Welcome to easy part on adding the option to hide/show in settings
1. Decompile the settings.apk
2. Download this View attachment Settings.zip and merge to your settings
3. Add the below code to your settings ( i had added to my own settings ) and your wish
Code:
<PreferenceScreen android:title="Navigation" android:key="navigation" android:fragment="com.android.settings.rz.Navigation" />
4. Compile it and Decompile and open
Settings.apk/smali/com/android/settings/rz/Navigation.smali
5. Compare the Public ID and replace it and recompile
6. God you did man,,, now replace and have fun
Thanks to atl4ntis for his Awesome rom Cataclysm and Cyanogenmod
I gonna try now ?
Working. ? ?
Works fine bro thanks a lot
woww.good job,thank bro
venkat kamesh said:
Welcome to easy part on adding the option to hide/show in settings
1. Decompile the settings.apk
2. Download this View attachment 3617852 and merge to your settings
3. Add the below code to your settings ( i had added to my own settings ) and your wish
Code:
<PreferenceScreen android:title="Navigation" android:key="navigation" android:fragment="com.android.settings.rz.Navigation" />
4. Compile it and Decompile and open
Settings.apk/smali/com/android/settings/rz/Navigation.smali
5. Compare the Public ID and replace it and recompile
6. God you did man,,, now replace and have fun
Thanks to atl4ntis for his Awesome rom Cataclysm and Cyanogenmod
Click to expand...
Click to collapse
when i recompile,,i have bug with @string/lockscreen_display_category
dark90
brother, give your SystemUI with the mod Enable/Disable Navigation Bar Swipe to sleep/Lock, pliz
Quoclam851995 said:
when i recompile,,i have bug with @string/lockscreen_display_category
Click to expand...
Click to collapse
haha its a dump string
not a deal bro
rename the @string/lockscreen_display_category to any thing like "display"
or remove the line and leave it or add string
nothing is a problem
dark90 said:
Working.
Click to expand...
Click to collapse
can you give me your systemui
Thanks bro.. Works like a charm.. Great tutorial. Expecting more from you..
Rajeev said:
Thanks bro.. Works like a charm.. Great tutorial. Expecting more from you..
Click to expand...
Click to collapse
Can you share with me your system ui
Quoclam851995 said:
Can you share with me your system ui
Click to expand...
Click to collapse
Why?
Rajeev said:
Why?
Click to expand...
Click to collapse
Maybe don't know how to make the tut i think .-.
Rajeev said:
Why?
Click to expand...
Click to collapse
I want compare some code to complete my system ui.
Quoclam851995 said:
I want compare some code to complete my system ui.
Click to expand...
Click to collapse
I am sorry my Friend. I am using 2g and very low signal. With my Samsung Galaxy Y
@Rajeev @venkat kamesh
why is there nobody to explain me how to "merge" a file to another.
in this case (and all other tuts as well from venkat) i don´t unterstand how to merge my public.xml with the downloaded from the OP.
this drives me crazy. i did all steps before but always failed at this point in each tutorial
all other things are clear and replacing the ID after re- and decompiling is no problem, but if nobody explain to me how to merge both public.xml, i
can´t re- and decompile the settings.apk without a failure.
Each dev started like me with little little steps, so come on guys, plz teach me this simple thing
There are tousand of tuts here from hundreds of devs, but nobody explain this thing - very very frustrating....
moonryder said:
@Rajeev @venkat kamesh
why is there nobody to explain me how to "merge" a file to another.
in this case (and all other tuts as well from venkat) i don´t unterstand how to merge my public.xml with the downloaded from the OP.
this drives me crazy. i did all steps before but always failed at this point in each tutorial
all other things are clear and replacing the ID after re- and decompiling is no problem, but if nobody explain to me how to merge both public.xml, i
can´t re- and decompile the settings.apk without a failure.
Each dev started like me with little little steps, so come on guys, plz teach me this simple thing
There are tousand of tuts here from hundreds of devs, but nobody explain this thing - very very frustrating....
Click to expand...
Click to collapse
Bro u don't need to merge the public.xml u only need to search the lines that the files u added to xml, layout etc and then compile and recompile and replace the public id and recompile ,sing and replace bro
moonryder said:
@Rajeev @venkat kamesh
why is there nobody to explain me how to "merge" a file to another.
in this case (and all other tuts as well from venkat) i don´t unterstand how to merge my public.xml with the downloaded from the OP.
this drives me crazy. i did all steps before but always failed at this point in each tutorial
all other things are clear and replacing the ID after re- and decompiling is no problem, but if nobody explain to me how to merge both public.xml, i
can´t re- and decompile the settings.apk without a failure.
Each dev started like me with little little steps, so come on guys, plz teach me this simple thing
There are tousand of tuts here from hundreds of devs, but nobody explain this thing - very very frustrating....
Click to expand...
Click to collapse
You need check the smali file and find 0x7fxxxx code, then search That code in the public(compare).xml and you get a specific líne now search That líne into your public.xml and copy your code 0x7fxxxx from the líne into your public.xml to the smali code.
You can use this to make it easy http://forum.xda-developers.com/showthread.php?p=64160375

[Guide][tut] [Enable/Disable] Navigation bar Tint ( depends on app material )

Hello guys here i am presenting you new guide
a small mod from my Krypton rom
this is for both MM and LP
For MM look for post#2
So i will discuss from LP
First you need
android.policy.jar (deodexed)
settings.apk (deodexed)
1. Decompile android.policy.jar
2. open com/android/internal/policy/impl/PhoneWindow.smali
find this method
Code:
.method private getOptionsPanelGravity()I
before that add these methods
Code:
.method private getNavBarColorMod(I)I
.locals 4
const/high16 v2, -0x1000000
move/from16 v1, p1
iget v3, p0, Lcom/android/internal/policy/impl/PhoneWindow;->mStatusBarColor:I
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindow;->getNavBarTweak()Z
move-result v0
if-eqz v0, :cond_0
or-int v1, v2, v3
:cond_0
return v1
.end method
.method private getNavBarTweak()Z
.locals 3
const/4 v0, -0x1
invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindow;->getContext()Landroid/content/Context;
move-result-object v1
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "navbar_color_mod"
invoke-static {v1, v2, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-nez v1, :cond_0
const/4 v0, 0x0
:goto_0
return v0
:cond_0
const/4 v0, 0x1
goto :goto_0
.end method
3. now from this method
Code:
.method protected generateLayout(Lcom/android/internal/policy/impl/PhoneWindow$DecorView;)Landroid/view/ViewGroup;
look for this code
Code:
invoke-static {}, Landroid/app/ActivityManager;->isHighEndGfx()Z
move-result v25
if-eqz v25, :cond_1a
.line 3479
if-nez v22, :cond_1a
const/16 v25, 0x22
const/16 v26, 0x0
move/from16 v0, v25
move/from16 v1, v26
invoke-virtual {v4, v0, v1}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
move-result v25
if-eqz v25, :cond_1a
Note this :cond_1a (1a may vary with device may not be same )
in that before
Code:
if-eqz v25, :cond_1a
add this code
Code:
invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindow;->getNavBarTweak()Z
move-result v0
if-nez v0, :cond_ta
after the same line of
Code:
if-eqz v25, :cond_1a
add this
Code:
:cond_ta
Finally it look like this
Code:
invoke-static {}, Landroid/app/ActivityManager;->isHighEndGfx()Z
move-result v25
if-eqz v25, :cond_1a
.line 3479
if-nez v22, :cond_1a
const/16 v25, 0x22
const/16 v26, 0x0
move/from16 v0, v25
move/from16 v1, v26
invoke-virtual {v4, v0, v1}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
move-result v25
[COLOR="red"] invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindow;->getNavBarTweak()Z
move-result v0
if-nez v0, :cond_ta[/COLOR]
if-eqz v25, :cond_1a
[COLOR="Red"] :cond_ta[/COLOR]
4. Now look for this line in same method
Code:
iput v0, v1, Lcom/android/internal/policy/impl/PhoneWindow;->mNavigationBarColor:I
Before that add this code
Code:
invoke-direct {v1, v0}, Lcom/android/internal/policy/impl/PhoneWindow;->getNavBarColorMod(I)I
move-result v0
5. Done.....! save and compile and replace
For settings Go to post #3
Have fun
For MM
First you need
framework.jar (deodexed)
settings.apk (deodexed)
1. Decompile framework.jar
2. open framework.jar/smali/com/android/internal/policy/PhoneWindow.smali
find this method
Code:
.method private getOptionsPanelGravity()I
before that add these methods
Code:
.method private getNavBarColorMod(I)I
.locals 4
const/high16 v2, -0x1000000
move/from16 v1, p1
iget v3, p0, Lcom/android/internal/policy/PhoneWindow;->mStatusBarColor:I
invoke-direct {p0}, Lcom/android/internal/policy/PhoneWindow;->getNavBarTweak()Z
move-result v0
if-eqz v0, :cond_0
or-int v1, v2, v3
:cond_0
return v1
.end method
.method private getNavBarTweak()Z
.locals 3
const/4 v0, -0x1
invoke-virtual {p0}, Lcom/android/internal/policy/PhoneWindow;->getContext()Landroid/content/Context;
move-result-object v1
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "navbar_color_mod"
invoke-static {v1, v2, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-nez v1, :cond_0
const/4 v0, 0x0
:goto_0
return v0
:cond_0
const/4 v0, 0x1
goto :goto_0
.end method
3. now from this method
Code:
.method protected generateLayout(Lcom/android/internal/policy/PhoneWindow$DecorView;)Landroid/view/ViewGroup;
look for this code
Code:
invoke-static {}, Landroid/app/ActivityManager;->isHighEndGfx()Z
move-result v21
if-eqz v21, :cond_15
.line 4035
if-nez v19, :cond_15
.line 4036
const/16 v21, 0x22
.line 4037
const/16 v22, 0x0
.line 4035
move/from16 v0, v21
move/from16 v1, v22
invoke-virtual {v3, v0, v1}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
move-result v21
if-eqz v21, :cond_15
Note this :cond_15 (15 may vary with device may not be same )
in that before
Code:
if-eqz v21, :cond_15
add this code
Code:
invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/PhoneWindow;->getNavBarTweak()Z
move-result v0
if-nez v0, :cond_ta
after the same line of
Code:
if-eqz v21, :cond_15
add this
Code:
:cond_ta
Finally it look like this
Code:
invoke-static {}, Landroid/app/ActivityManager;->isHighEndGfx()Z
move-result v21
if-eqz v21, :cond_15
.line 4035
if-nez v19, :cond_15
.line 4036
const/16 v21, 0x22
.line 4037
const/16 v22, 0x0
.line 4035
move/from16 v0, v21
move/from16 v1, v22
invoke-virtual {v3, v0, v1}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
move-result v21
[COLOR="red"] invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/PhoneWindow;->getNavBarTweak()Z
move-result v0
if-nez v0, :cond_ta[/COLOR]
if-eqz v21, :cond_15
[COLOR="Red"] :cond_ta[/COLOR]
4. Now look for this line in same method
Code:
iput v0, v1, Lcom/android/internal/policy/PhoneWindow;->mNavigationBarColor:I
Before that add this code
Code:
invoke-direct {v1, v0}, Lcom/android/internal/policy/PhoneWindow;->getNavBarColorMod(I)I
move-result v0
5. Done.....! save and compile and replace
For settings Go to post #3
Have fun
Settings for MM and LP
hmm
its time for settings part
i had no time to write a new code..
so try to follow guide from here ( click here )
in that you need to replace
Code:
android:key="[COLOR="Red"]navbar_color_mod[/COLOR]"
or Download this Zip (Click here)
merge to settings
in any part of your xml ( example :- settings.apk/res/xml/display_settings.xml )
add this line
Code:
<com.android.settings.cyanogenmod.SystemSettingSwitchPreference android:title="NavBar Tint" android:key="navbar_color_mod" android:defaultValue="0" android:summaryOn="Enabled" android:summaryOff="Disabled"
Save it and compile and have fun
Credits
xpirt for basic mod
Me for MM and LP krypton rom
Dont forget to Mention me if you use my work
Good luck
Not working on stock rom?-
Black Nav on Homescreen 6.0.1
karrouma said:
Not working on stock rom?-
Click to expand...
Click to collapse
this is for both stock and other roms bro
ReadReadz said:
Black Nav on Homescreen 6.0.1
Click to expand...
Click to collapse
new home doesn't support material
so its black bro
venkat kamesh said:
hmm
its time for settings part
i had no time to write a new code..
so try to follow guide from here ( click here )
in that you need to replace
Code:
android:key="[COLOR="Red"]navbar_color_mod[/COLOR]"
or Download this Zip (Click here)
merge to settings
in any part of your xml ( example :- settings.apk/res/xml/display_settings.xml )
add this line
Code:
<com.android.settings.cyanogenmod.SystemSettingSwitchPreference android:title="NavBar Tint" android:key="navbar_color_mod" android:defaultValue="0" android:summaryOn="Enabled" android:summaryOff="Disabled"
Save it and compile and have fun
Credits
xpirt for basic mod
Me for MM and LP krypton rom
Dont forget to Mention me if you use my work
Good luck
Click to expand...
Click to collapse
Can't glash via recovery. Meta file is missing
how to set defaut tinted without edit settings just edit on android.policy.jar?lolipop 5.1.1
Hey bro,
I'm trying to use this with your SwitchPreferences guide. The toggle switch works, but the nav bar is always tinted, it doesn't change. I've changed all the keys and made sure that my XML is good, but nothing happens.
My XML is like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/wireless_networks_settings_title"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<PreferenceCategory android:title="@string/rm_ui_navbar_resize_category" />
<com.android.settings.rz.MySeekBarPreference android:title="@string/rm_ui_navbar_resize_portrait" android:key="navigation_bar_height" settings:type="15" />
<com.android.settings.rz.MySeekBarPreference android:title="@string/rm_ui_navbar_resize_landscape" android:key="navigation_bar_width" settings:type="16" />
<PreferenceCategory android:title="@string/rm_ui_navbar_tweak_category" />
<SwitchPreference android:title="@string/rm_ui_navbar_tint_toggle" android:key="key_navbar_color_mod" android:defaultValue="false" android:summaryOn="@string/rm_ui_navbar_tint_toggle_on" android:summaryOff="@string/rm_ui_navbar_tint_toggle_off" />
</PreferenceScreen>
And my smali like so:
Code:
.class public Lcom/android/settings/rz/EnableNavBarTint;
.super Lcom/android/settings/SettingsPreferenceFragment;
.source "EnableNavBarTint.java"
# instance fields
.field private mENABLE_NAV_BAR_TINT:Landroid/preference/SwitchPreference;
# 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/EnableNavBarTint;->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, 0x7f08008a # xml public key
invoke-virtual {p0, v1}, Lcom/android/settings/rz/EnableNavBarTint;->addPreferencesFromResource(I)V
.line 46
const-string v1, "key_navbar_color_mod"
invoke-virtual {p0, v1}, Lcom/android/settings/rz/EnableNavBarTint;->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/EnableNavBarTint;->mENABLE_NAV_BAR_TINT:Landroid/preference/SwitchPreference;
.line 47
iget-object v4, p0, Lcom/android/settings/rz/EnableNavBarTint;->mENABLE_NAV_BAR_TINT:Landroid/preference/SwitchPreference;
const-string v1, "navbar_color_mod"
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/SwitchPreference;->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/EnableNavBarTint;->mENABLE_NAV_BAR_TINT:Landroid/preference/SwitchPreference;
if-ne p2, v3, :cond_1
.line 62
iget-object v3, p0, Lcom/android/settings/rz/EnableNavBarTint;->mENABLE_NAV_BAR_TINT: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/EnableNavBarTint;->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, "navbar_color_mod"
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
Any ideas bro?
Screenshot please. Thanks

Categories

Resources