(Guide)How to port Ics lockscreen to Gb for Micromax a57 / A54/ Samsung galaxy y - Micromax A57 Ninja

I am Suraj ​
again with New guide
How to port ICs lockscreen TO GB
{
"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"
}
Tested On micromax a57 a54 Both are qualcom so cant say about samsung and other Mediatech or mtk device
THis is full explained Guide dont bore
So let start
We have to Follow 5 step for gettings ics lockscreen
first step here start
download this zip firststep.zip
1.copy res folder to your framework-res folder
2. Open ids.xml under res/values foler and add these in last above
Code:
<item type="id" name="rl_multiWaveView">false</item>
<item type="id" name="digital_clock">false</item>
<item type="id" name="dateShow">false</item>
<item type="id" name="iv_drop">false</item>
<item type="id" name="ib_greenorange">false</item>
<item type="id" name="rl_click_after">false</item>
<item type="id" name="ib_photo">false</item>
<item type="id" name="ib_greenorange_gone">false</item>
<item type="id" name="ib_phone">false</item>
<item type="id" name="tv_phone_unread">false</item>
<item type="id" name="ib_sms">false</item>
<item type="id" name="tv_sms_unread">false</item>
<item type="id" name="ib_home">false</item>
<item type="id" name="tv_remind">false</item>
<item type="id" name="rl_multiWaveViewforsimulateics">false</item>
<item type="id" name="iv_wave">false</item>
<item type="id" name="iv_wave1">false</item>
<item type="id" name="iv_wave2">false</item>
<item type="id" name="iv_circle">false</item>
3.. compile the framework-res.apk
4.Now decompile your framework-res.apk
Now open your public.xml
Leave it alone Now first step complete
:fingers-crossed:
TIME TO DO SECOND SEC0ND STEP
HERE WE START
dOWNLAOD THIS zIP.(SECOND STEP.ZIP)
thats our smalli editing part
1.Now decompile your android.policy.jar ( I GIVEN TOOL INSIDE)
NOW copy all smalli to your decompiled android.policy .jar folder one by one
Now open all files related to com\android\internal\policy\impl mine files
Search " 0x10" Copy the whole id .
Open my provided public.xml
Search for that id in my public.xml
Copy the text of that id.
Like if my Public id is "0x101000e"
but in you pubilc.xml it start from "0x0101000e" means you have to add 0 before 1
its a boring part naa but its too much neccesarry too soo better you Do it carefully slow slow dont do fast other it will create reason for bootloop
NOW OUR 2ND PART IS COMPLETE nOW TIME TO START 3 PART
SO HERE WE START
DOWNLOAD THIS ZIP (THIRD PART.ZIP)
thats our Main and difficult part
in your android.policy.jar decompiled folder
search for LockPatternKeyguardView.smalli
open it ..
then search for
.field private mScreenOn:Z
Click to expand...
Click to collapse
then below it add
.field private mStartForIntent:Landroid/content/Intent;
Click to expand...
Click to collapse
then search for
.method createLockScreen()Landroid/view/View;
Click to expand...
Click to collapse
then after
.prologue
Click to expand...
Click to collapse
add this
.prologue
.line 660
const-string v3, "true"
const-string v2, "ro.origin.lockscreen"
.line 711
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v2, v3}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "false"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_24
.line 712
new-instance v0, Lcom/android/internal/policy/impl/GreenOrange_LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/GreenOrange_LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallbackV
.line 726
:goto_23
return-object v0
.line 718
:cond_24
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v2, v3}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "simulateICS"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_44
.line 719
new-instance v0, Lcom/android/internal/policy/impl/SimulateICS_LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/SimulateICS_LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallbackV
goto :goto_23
:cond_44
Click to expand...
Click to collapse
then search for
.method static synthetic access$100(Lcom/android/internal/policy/impl/LockPatternKeyguardViewZ
.registers 2
.parameter "x0"
.prologue
.line 65
iget-boolean v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mIsVerifyUnlockOnly:Z
return v0
.end method
Click to expand...
Click to collapse
then add this code under
.method static synthetic access$1000(Lcom/android/internal/policy/impl/LockPatternKeyguardViewLandroid/content/Intent;
.registers 2
.parameter "x0"
.prologue
.line 65
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mStartForIntent:Landroid/content/Intent;
return-object v0
.end method
.method static synthetic access$1002(Lcom/android/internal/policy/impl/LockPatternKeyguardView;Landroid/content/IntentLandroid/content/Intent;
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 65
iput-object p1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mStartForIntent:Landroid/content/Intent;
return-object p1
.end method
Click to expand...
Click to collapse
Now our third step is completed
---------------------------------------------------------------------------------
Now our forth step here start
1. go to com\android\internal\policy\impl ( your decompiled android.policy.jar)
search for LockPatternKeyguardView$1.smalli
Now open it
then search for
.method public goToUnlockScreen()V
Click to expand...
Click to collapse
then you will see this method
.method public goToUnlockScreen()V
.registers 3
to
#calls: Lcom/android/internal/policy/impl/LockPatternKeyguardView;->updateScreen(Lcom/android/internal/policy/impl/LockPatternKeyguardView$ModeV
invoke-static {v0, v1}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$200(Lcom/android/internal/policy/impl/LockPatternKeyguardView;Lcom/android/internal/policy/impl/LockPatternKeyguardView$ModeV
goto :goto_8
.end method
Click to expand...
Click to collapse
so delete this full method
and add this
.method public goToUnlockScreen()V
.registers 6
.prologue
const/4 v2, 0x1
const-string v4, "true"
const-string v3, "ro.origin.lockscreen"
.line 248
invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->isSecure()Z
move-result v0
if-nez v0, :cond_3d
.line 249
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v3, v4}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "false"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_1f
.line 250
invoke-virtual {p0, v2}, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->keyguardDone(Z)V
.line 259
:goto_1e
return-void
.line 251
:cond_1f
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v3, v4}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "simulateICS"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_33
.line 252
invoke-virtual {p0, v2}, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->keyguardDone(Z)V
goto :goto_1e
.line 254
:cond_33
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getCallback()Lcom/android/internal/policy/impl/KeyguardViewCallback;
move-result-object v0
invoke-interface {v0, v2}, Lcom/android/internal/policy/impl/KeyguardViewCallback;->keyguardDone(Z)V
goto :goto_1e
.line 257
:cond_3d
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
sget-object v1, Lcom/android/internal/policy/impl/LockPatternKeyguardView$Mode;->UnlockScreen:Lcom/android/internal/policy/impl/LockPatternKeyguardView$Mode;
#calls: Lcom/android/internal/policy/impl/LockPatternKeyguardView;->updateScreen(Lcom/android/internal/policy/impl/LockPatternKeyguardView$ModeV
invoke-static {v0, v1}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$200(Lcom/android/internal/policy/impl/LockPatternKeyguardView;Lcom/android/internal/policy/impl/LockPatternKeyguardView$ModeV
goto :goto_1e
.end method
Click to expand...
Click to collapse
Now search for
.method public isSecure()Z
Click to expand...
Click to collapse
then above it add this
.method public isGotoUnlockscreen(Landroid/content/IntentV
.registers 3
.parameter "intent"
.prologue
.line 398
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
#setter for: Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mStartForIntent:Landroid/content/Intent;
invoke-static {v0, p1}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$1002(Lcom/android/internal/policy/impl/LockPatternKeyguardView;Landroid/content/IntentLandroid/content/Intent;
.line 399
return-void
.end method
Click to expand...
Click to collapse
========================================================================================================
Now search for
.method public keyguardDone(Z)V
Click to expand...
Click to collapse
replace full method with
.method public keyguardDone(Z)V
.registers 6
.parameter "authenticated"
.prologue
const-string v3, "true"
const-string v2, "ro.origin.lockscreen"
.line 334
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v2, v3}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "false"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_3c
.line 335
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getCallback()Lcom/android/internal/policy/impl/KeyguardViewCallback;
move-result-object v0
invoke-interface {v0, p1}, Lcom/android/internal/policy/impl/KeyguardViewCallback;->keyguardDone(Z)V
.line 336
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
#getter for: Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mStartForIntent:Landroid/content/Intent;
invoke-static {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$1000(Lcom/android/internal/policy/impl/LockPatternKeyguardViewLandroid/content/Intent;
move-result-object v0
if-eqz v0, :cond_3b
.line 337
sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
const-string v1, "mStartForIntent"
invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/StringV
.line 338
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getContext()Landroid/content/Context;
move-result-object v0
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
#getter for: Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mStartForIntent:Landroid/content/Intent;
invoke-static {v1}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$1000(Lcom/android/internal/policy/impl/LockPatternKeyguardViewLandroid/content/Intent;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/content/Context;->startActivity(Landroid/content/IntentV
.line 349
:cond_3b
:goto_3b
return-void
.line 340
:cond_3c
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v2, v3}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "simulateICS"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_6d
.line 341
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getCallback()Lcom/android/internal/policy/impl/KeyguardViewCallback;
move-result-object v0
invoke-interface {v0, p1}, Lcom/android/internal/policy/impl/KeyguardViewCallback;->keyguardDone(Z)V
.line 342
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
#getter for: Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mStartForIntent:Landroid/content/Intent;
invoke-static {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$1000(Lcom/android/internal/policy/impl/LockPatternKeyguardViewLandroid/content/Intent;
move-result-object v0
if-eqz v0, :cond_3b
.line 343
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getContext()Landroid/content/Context;
move-result-object v0
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
#getter for: Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mStartForIntent:Landroid/content/Intent;
invoke-static {v1}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$1000(Lcom/android/internal/policy/impl/LockPatternKeyguardViewLandroid/content/Intent;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/content/Context;->startActivity(Landroid/content/IntentV
goto :goto_3b
.line 346
:cond_6d
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getCallback()Lcom/android/internal/policy/impl/KeyguardViewCallback;
move-result-object v0
invoke-interface {v0, p1}, Lcom/android/internal/policy/impl/KeyguardViewCallback;->keyguardDone(Z)V
goto :goto_3b
.end method
Click to expand...
Click to collapse
--------------------------------------------------------------------------------------------------------------------------------------
Now save this Smalli
Now search for this
KeyguardScreenCallback.smalli
then search for
.method public abstract goToUnlockScreen()V
.end method
Click to expand...
Click to collapse
then add this below this code
.method public abstract isGotoUnlockscreen(Landroid/content/IntentV
.end method
Click to expand...
Click to collapse
Here our fourth step is completed
Now here we start our 5th step
downlaod this Zip (5th step)
Now open zip copy this fonts to your system/fonts (necceassry step other wise you will face bootloop)
Now open you build.prop
then search for
# ADDITIONAL_BUILD_PROPERTIES
Click to expand...
Click to collapse
then above it add
#add wanglu 20120811 start
#do not greenorging lockscreen
ro.origin.lockscreen=simulateICS
#add wanglu 20120811 end
Click to expand...
Click to collapse
I provided this flashable zip you can use it for your Flashing lockscreen (FLASHABLE.ZIP)
Note:
1 .if you are using my work so plz give me credit . because i spend many night and days for getting success.
and
If you are porting this guide To another thread inform me first . then i will create a seprate guide for your device.
by giving you credit and tester
​

@SK(SurajKumar) will it can work in Galaxy Y without got bootloop ? Cause i follow your guide in other thread but i got Bootloop

galaxy y question
GSculerlor said:
@SK(SurajKumar) will it can work in Galaxy Y without got bootloop ? Cause i follow your guide in other thread but i got Bootloop
Click to expand...
Click to collapse
if your are facing bootloop.
that means lockscreen trying to work.
problem may be you place wrong ids . paste your logcat here i will help you.
i already to told you all to work carefully

Great
working with karbonn a9 but need hdpi icons...

Like a Charm
SK(SurajKumar) said:
I am Suraj ​
again with New guide
How to port ICs lockscreen TO GB
Tested On micromax a57 a54 Both are qualcom so cant say about samsung and other Mediatech or mtk device
THis is full explained Guide dont bore
So let start
We have to Follow 5 step for gettings ics lockscreen
first step here start
download this zip firststep.zip
1.copy res folder to your framework-res folder
2. Open ids.xml under res/values foler and add these in last above
Code:
<item type="id" name="rl_multiWaveView">false</item>
<item type="id" name="digital_clock">false</item>
<item type="id" name="dateShow">false</item>
<item type="id" name="iv_drop">false</item>
<item type="id" name="ib_greenorange">false</item>
<item type="id" name="rl_click_after">false</item>
<item type="id" name="ib_photo">false</item>
<item type="id" name="ib_greenorange_gone">false</item>
<item type="id" name="ib_phone">false</item>
<item type="id" name="tv_phone_unread">false</item>
<item type="id" name="ib_sms">false</item>
<item type="id" name="tv_sms_unread">false</item>
<item type="id" name="ib_home">false</item>
<item type="id" name="tv_remind">false</item>
<item type="id" name="rl_multiWaveViewforsimulateics">false</item>
<item type="id" name="iv_wave">false</item>
<item type="id" name="iv_wave1">false</item>
<item type="id" name="iv_wave2">false</item>
<item type="id" name="iv_circle">false</item>
3.. compile the framework-res.apk
4.Now decompile your framework-res.apk
Now open your public.xml
Leave it alone Now first step complete
:fingers-crossed:
TIME TO DO SECOND SEC0ND STEP
HERE WE START
dOWNLAOD THIS zIP.(SECOND STEP.ZIP)
thats our smalli editing part
1.Now decompile your android.policy.jar ( I GIVEN TOOL INSIDE)
NOW copy all smalli to your decompiled android.policy .jar folder one by one
Now open all files related to com\android\internal\policy\impl mine files
Search " 0x10" Copy the whole id .
Open my provided public.xml
Search for that id in my public.xml
Copy the text of that id.
Like if my Public id is "0x101000e"
but in you pubilc.xml it start from "0x0101000e" means you have to add 0 before 1
its a boring part naa but its too much neccesarry too soo better you Do it carefully slow slow dont do fast other it will create reason for bootloop
NOW OUR 2ND PART IS COMPLETE nOW TIME TO START 3 PART
SO HERE WE START
DOWNLOAD THIS ZIP (THIRD PART.ZIP)
thats our Main and difficult part
in your android.policy.jar decompiled folder
search for LockPatternKeyguardView.smalli
open it ..
then search for
then below it add
then search for
then after
add this
then search for
then add this code under
Now our third step is completed
---------------------------------------------------------------------------------
Now our forth step here start
1. go to com\android\internal\policy\impl ( your decompiled android.policy.jar)
search for LockPatternKeyguardView$1.smalli
Now open it
then search for
then you will see this method
so delete this full method
and add this
Now search for
then above it add this
========================================================================================================
Now search for
replace full method with
--------------------------------------------------------------------------------------------------------------------------------------
Now save this Smalli
Now search for this
KeyguardScreenCallback.smalli
then search for
then add this below this code
Here our fourth step is completed
Now here we start our 5th step
downlaod this Zip (5th step)
Now open zip copy this fonts to your system/fonts (necceassry step other wise you will face bootloop)
Now open you build.prop
then search for
then above it add
I provided this flashable zip you can use it for your Flashing lockscreen (FLASHABLE.ZIP)
Note:
1 .if you are using my work so plz give me credit . because i spend many night and days for getting success.
and
If you are porting this guide To another thread inform me first . then i will create a seprate guide for your device.
by giving you credit and tester
​
Click to expand...
Click to collapse
Works on galaxy pocket..
But from step 4,
It should be LockPatternKeyguardView$2.smali
-- Please include this on the Guide..
JUST PRESS THANKS !!

i got too much error tring tmrw again with fresh mind @SK Bro
i have galaxy pocket duos tdy tried but getting bootloop error and other error too much

Jom_o1 said:
[/HIDE]
Works on galaxy pocket..
But from step 4,
It should be LockPatternKeyguardView$2.smali
-- Please include this on the Guide..
JUST PRESS THANKS !!
Click to expand...
Click to collapse
thanks bro actually every device have different way to port lockscreen or lockscreen smalli so we have to find it our self . but thanks bro i will edit my thread

it can be port easily but need to do little bit more hard work
djraje said:
i got too much error tring tmrw again with fresh mind @SK Bro
i have galaxy pocket duos tdy tried but getting bootloop error and other error too much
Click to expand...
Click to collapse
it can be port easily but need to do little bit more hard work

ya bro i back

SK(SurajKumar) said:
it can be port easily but need to do little bit more hard work
Click to expand...
Click to collapse
tell bro

upload your logcat
djraje said:
tell bro
Click to expand...
Click to collapse
bro can you upload your logcat

SK(SurajKumar) said:
bro can you upload your logcat
Click to expand...
Click to collapse
cant bro coz i delete it after flash... when it not work ........

Re i am having compiling errors
Cyber Assassin said:
i am having compiling errors
View attachment 3111087
help me plz
my stock android.policy.jar
link: db.tt/wZKnMk1i
my modified classout
link: db.tt/9v2FMj0j
Sent from my mediatek gb device
Click to expand...
Click to collapse
Wait for some day i will uplaod for you

guys can u explain to me about this part???
1.Now decompile your android.policy.jar ( I GIVEN TOOL INSIDE)
NOW copy all smalli to your decompiled android.policy .jar folder one by one
Now open all files related to com\android\internal\policy\impl mine files
Search " 0x10" Copy the whole id .
Open my provided public.xml
Search for that id in my public.xml
Copy the text of that id.
Like if my Public id is "0x101000e"
but in you pubilc.xml it start from "0x0101000e" means you have to add 0 before 1
its a boring part naa but its too much neccesarry too soo better you Do it carefully slow slow dont do fast other it will create reason for bootloop
Click to expand...
Click to collapse
with SS pls ty

Related

[HOW TO] AOSP Lock + Toggle| 3 Way Ext. Power Menu| CRT-OFF| Long Menu Press to Kill

Hy Guys! in my request to isolate all the codes in Smali files to enable Extended Power Menu, CRT-OF, Long Menu Press To Kill and AOSP Lockscreen working separately to implement in my ROM (crDroid ROM) i manage to found how to do it!
Updated 19.01.2013 = Working in latest XXELLC
Requirements :
- You need to know how to work with apktool, smali and baksmali stuffs.
- Notepad++
- 7-zip
WE WILL USE FOLLOING STEPS IN ALL 4 MODS
1 - You need to extract from inside the stock framework/ a file called android.policy.jar;
2 - Open android.policy.jar with 7-zip;
3 - Extract classes.dex from it;
2 - Decompile using baksmail commands;
3 - Once it's done Recompile using smali commands:
Click to expand...
Click to collapse
== AOSP Lockscreen with Toggle ==
Decompile android.policy.jar
Go to: com\android\internal\policy\impl\LockPatternKeyguardView.smali
Click to expand...
Click to collapse
Find this method
Code:
.method createLockScreen()Landroid/view/View;
And switch completely with this (Same method with new codes inside)
Code:
[left][color="blue"].method createLockScreen()Landroid/view/View;
.registers 7
.prologue
.line 1254
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "aosp_lock"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-nez v0, :cond_1f
new-instance v0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/sec/CircleLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
goto :goto_2e
.line 1260
:cond_1f
new-instance v0, Lcom/android/internal/policy/impl/LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
.local v0, lockView:Landroid/view/View;
:goto_2e
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V
.line 1261
return-object v0
.end method[/color][/left]
It will create the AOSP lockscreen but with one issue. Adding only this "new" method will made the lockscreen unlockable using menu button;
So let's made some changes to fix this. There are 2 ways to fix it
1st way
Go to: com\android\internal\policy\impl\LockScreen.smali
Click to expand...
Click to collapse
Find and delete the red one
Code:
.field private mCreationOrientation:I
[color="red"]--- .field private mEnableMenuKeyInLockScreen:Z[/color]
.field private mEnableRingSilenceFallback:Z
Find and delete the red ones
Code:
[left].line 447
iput-object p5, p0, Lcom/android/internal/policy/impl/LockScreen;->mCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
.line 448
[color="red"]--- invoke-direct {p0}, Lcom/android/internal/policy/impl/LockScreen;->shouldEnableMenuKey()Z
--- move-result v0
--- iput-boolean v0, p0, Lcom/android/internal/policy/impl/LockScreen;->mEnableMenuKeyInLockScreen:Z[/color]
.line 449
iget v0, p2, Landroid/content/res/Configuration;->orientation:I[/left]
Find the method and delete completely
Code:
[left][color="red"].method public onKeyDown(ILandroid/view/KeyEvent;)Z
.registers 4
.parameter "keyCode"
.parameter "event"
.prologue
.line 541
const/16 v0, 0x52
if-ne p1, v0, :cond_d
iget-boolean v0, p0, Lcom/android/internal/policy/impl/LockScreen;->mEnableMenuKeyInLockScreen:Z
if-eqz v0, :cond_d
.line 542
iget-object v0, p0, Lcom/android/internal/policy/impl/LockScreen;->mCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-interface {v0}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->goToUnlockScreen()V
.line 544
:cond_d
const/4 v0, 0x0
return v0
.end method[/color][/left]
Recompile android.policy.jar and it's done!
AOSP Lockscreen Properly working
2nd way (Thanks to jimbo77)
Using this method we will need to decompile framework-res.apk
Go to: res/values/bools
Click to expand...
Click to collapse
Find and switch
Code:
[color="red"]--- <bool name="config_disableMenuKeyInLockScreen">false</bool>[/color]
[color="blue"]+++ <bool name="config_disableMenuKeyInLockScreen">true</bool>[/color]
Recompile framework-res.apk and it's done.
Lets put toggle in SecSettings.apk
decompile SecSettings.apk
Go to:res/values/strings
Click to expand...
Click to collapse
Add this at the end of the file, before close resources</resources>.
This 2 string bellow will be shown in settings, so feel free to change.
Code:
[left][color="blue"]+++ <string name="aosp">Jelly Bean (AOSP) Lockscreen</string>
+++ <string name="aosp_summary">Enable Original Jelly Bean Lockscreen</string>[/color]
[/left]
Go to: res/xml/Lockscreen_Settings.xml
Click to expand...
Click to collapse
Find and add
Code:
[left]<SwitchPreferenceScreen android:title="@string/lock_screen_shortcut_title" android:key="lock_screen_shortcut" android:summary="@string/lock_screen_shortcut_summary">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.lockscreenshortcut.LockScreenShortcutSettings" />
</SwitchPreferenceScreen>
[color="blue"]+++ <CheckBoxPreference android:title="@string/aosp" android:key="say_your_wakeup" android:summary="@string/aosp_summary" />[/color]
<SwitchPreferenceScreen android:title="@string/information_ticker" android:key="information_ticker" android:summary="@string/information_ticker_summary" android:fragment="com.android.settings.InformationTicker" />
[/left]
Go to: smali\com\android\settings\LockScreenSettings.smali
Click to expand...
Click to collapse
Find and add
Code:
[left].field private isWeatherEnabled:Z
[color="blue"]+++ .field private mAospLock:Landroid/preference/CheckBoxPreference;[/color]
.field private mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;[/left]
Find and Switch
Code:
[left]iput-object v0, p0, Lcom/android/settings/LockScreenSettings;->mMotionDialog:Landroid/app/AlertDialog;
[color="red"]--- const/16 v0, 0x8[/color]
[color="blue"]+++ const/16 v0, 0x11[/color]
new-array v0, v0, [I[/left]
Find and Switch
Code:
[left]invoke-virtual {v6, v3}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 294
:cond_3
[color="red"]--- iget-object v3, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++ iget-object v3, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
if-eqz v3, :cond_4
.line 295
[color="red"]--- iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++ iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
[color="red"]--- const-string v7, "wake_up_lock_screen"[/color]
[color="blue"]+++ const-string v7, "aosp_lock"[/color]
invoke-static {v3, v7, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I[/left]
Find and Switch
Code:
[left]const-string v8, "say_your_wakeup"
invoke-virtual {p0, v8}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v8
check-cast v8, Landroid/preference/CheckBoxPreference;
[color="red"]--- iput-object v8, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++ iput-object v8, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
.line 212
iget-object v8, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
if-eqz v8, :cond_8[/left]
Find and Switch
Code:
[left]goto :goto_4
:cond_9
[color="red"]--- iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++ iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
invoke-virtual {p2, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_0
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
[color="red"]--- const-string v5, "wake_up_lock_screen"[/color]
[color="blue"]+++ const-string v5, "aosp_lock"[/color]
[color="red"]---iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
invoke-virtual {v6}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v6
if-eqz v6, :cond_a[/left]
Find Switch and delete
Code:
[left]
invoke-interface {v1}, Ljava/util/List;->size()I
move-result v8
if-ge v8, v9, :cond_f
.line 240
[color="red"]--- iget-object v8, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++ iget-object v8, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
if-eqz v8, :cond_e
[color="red"]--- invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;[/color]
[color="red"]--- move-result-object v8[/color]
[color="red"]--- iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="red"]--- invoke-virtual {v8, v9}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z[/color]
:cond_e
if-eqz v6, :cond_f
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;[/left]
Recompile SecSettings.apk and it's done!
== 3 Way Extended Power Menu ==
Go to: com/android/internal/policy/impl/GlobalActions.smali
Click to expand...
Click to collapse
Find this
Code:
[LEFT].line 368
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$5;[/LEFT]
And switch with this
Code:
[LEFT][COLOR="Blue"].line 368
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$99;[/COLOR][/LEFT]
Find this
Code:
[LEFT]invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$5;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V[/LEFT]
And switch with this
Code:
[LEFT][COLOR="Blue"]invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$99;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V[/COLOR][/LEFT]
Now go to
com/android/internal/policy/impl/GlobalActions$SinglePressAction.smali
Click to expand...
Click to collapse
Find this
Code:
[LEFT].end annotation
# instance fields
.field private final mIconResId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
[/LEFT]
And between .end annotation and # instance fields, add this
Code:
[LEFT][COLOR="Blue"]# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;[/COLOR][/LEFT]
Find this
Code:
[LEFT]# direct methods
.method protected constructor <init>(II)V
.registers 4
.parameter "iconResId"
.parameter "messageResId"
[/LEFT]
And between # direct methods and .method protected constructor <init>(II)V, add this
Code:
[LEFT][COLOR="Blue"].method static constructor <clinit>()V
.registers 3
const/4 v0, 0x3
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, "Download"
aput-object v2, v0, v1
const/4 v1, 0x2
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[/COLOR][/LEFT]
To finalize Extended Power Menu you need to copy tree smali files (GlobalActions$99$1.smali, GlobalActions$99$2, and GlobalActions$1.smali) and paste then inside -> com/android/internal/policy/impl/
Recompile android.policy.jar using smali commands it's DONE!
== CRT OFF Animation ==
Follow the same procedure as android.policy.jar to decompile and extract classes.dex
Go to
Go to: com/android/internal/policy/impl/PhoneWindowManager.smali
Click to expand...
Click to collapse
find this
Code:
[LEFT]# interfaces
.implements Landroid/view/WindowManagerPolicy;
# annotations
[/LEFT]
Between .implements Landroid/view/WindowManagerPolicy and # annotations, add this
Code:
[LEFT][COLOR="Blue"].implements Ljava/lang/Runnable;[/COLOR][/LEFT]
find this
Code:
[LEFT].line 5938
.end local v9 #isAllowed:Z
.end local v16 #kioskMode:Landroid/app/enterprise/kioskmode/KioskMode;
:cond_66
:goto_66
return v19[/LEFT]
Between :goto_66 and return v19, add this
Code:
[LEFT][COLOR="Blue"]and-int/lit8 v0, v19, 0x4
if-eqz v0, :cond_71
and-int/lit8 v19, v19, -0x5
move-object/from16 v0, p0
invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sleepDelay()V
:cond_71[/COLOR][/LEFT]
Go to the Bottom of the file and add this hole code
Code:
[LEFT][COLOR="Blue"].method public sleepDelay()V
.locals 10
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
const-wide v2, 0x64
check-cast p0, Ljava/lang/Runnable;
invoke-virtual {v0, p0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
.end method
.method public run()V
.locals 10
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const-string v1, "power"
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v2
const-wide/16 v6, 0x3e8
add-long/2addr v2, v6
invoke-virtual {v0, v2, v3}, Landroid/os/PowerManager;->goToSleep(J)V
return-void
.end method[/COLOR][/LEFT]
Now you can recompile android.policy.jar using smali commands.
Now
Extract services.jar from inside framework folder and follow the same procedure extract classes.dex and decompile it.
Go to
Go to: com/android/server/PowerMangerService$ScreenBrightnessAnimator.smali
Click to expand...
Click to collapse
find this
Code:
[LEFT]#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7300(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object v7
const/16 v9, 0xa[/LEFT]
Between move-result-object v7 and const/16 v9, 0xa, add this
Code:
[LEFT][COLOR="Blue"]if-eqz p2, :cond_75
const/16 v9, 0xb
const/4 v10, 0x0
const v2, 0x10
invoke-virtual {v7, v9, v2, v10}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v9
invoke-virtual {v9}, Landroid/os/Message;->sendToTarget()V
:cond_75[/COLOR][/LEFT]
Now you can recompile services.jar using apktool and smali commands
== Long Menu Press to Kill App ==
Follow the same procedure as android.policy.jar and services.jar to decompile and extract classes.dex again from android.policy.jar
Go to: com/android/internal/policy/impl/PhoneWindowManager.smali
Click to expand...
Click to collapse
find this
Code:
.line 1455
[COLOR="Red"]new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$8;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$8;-><init (Lcom/android/internal/policy/impl/PhoneWindowManager;)V[/COLOR]
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mMenuLongPress:Ljava/lang/Runnable;
change the red ones for blues under
Code:
[COLOR="Blue"]+ new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$MenuLongPress;
+ invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$MenuLongPress;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V[/COLOR]
Extract the PhoneWindowManager-file.zip attached, extract the file int it and copy to com/android/internal/policy/impl/
Recompile android.policy.jar using smali commands and it's done!
With this we will be able to add or remove this 4 mods from inside any other
CREDITS
For CRT OFF Animation method all the credits goes to Sorg. I've just follow his tutorial.
For part Extended Power Menu i like to thanks mgn2o
For part of AOSP Lockscreen i like to thanks Didact74
Nice, an EPM whitout Hot Reboot (mgn2o) thanks for reference ....
Enviado de meu GT-I9300 usando o Tapatalk 2
Excellent guide! Would love one for lockscreen media skip !! I cant find the source/guide anywhere !
Great guide.
It will be great:
Can you add how to decompile .odex such that we obtain .smali for editing ??
Thanks in advance mate.
Post updated with Long Menu Press to Kill for XXELK4
Akshay (Aky) said:
Great guide.
It will be great:
Can you add how to decompile .odex such that we obtain .smali for editing ??
Thanks in advance mate.
Click to expand...
Click to collapse
You can try to deodex a file, made the changes and re-odex.
I never try with odex. I only use roms deodexed and my (crDroid) in development is surely deodexed.
Take a look in here: CLICK
how to Inkeffect tutorial
One more thing, how to add the function "Long press volume key to jump muisc" in lockscreen mode? Thanks.
I'll definitely use this to add crt animation to the 4.1.2 ROM I have for the Sprint S2. Thanks!
Sent from my SPH-D710 using xda premium
Great job, Hoping this will become a central hub for source code ! Bookmarked for future use.. looking forward to future sources!
Would you please also add the mod for "long press volume key to skip song"? Thanks.
dongfangri said:
Would you please also add the mod for "long press volume key to skip song"? Thanks.
Click to expand...
Click to collapse
I'm working on this. Trying some kind of "reverse engineering" to spot the codes.
Great tutorial, for my first attempt at these types of edits, it made life very easy. Although i have a small problem. Ive made the edits so i can have extended power menu, crt off and any app multi window in my rom. Everything went smoothly but it seems that crt off is erratic. Sometimes it works and sometimes it does not. Any ideas?
Sent from my GT-I9300 using Tapatalk 2
anaraxia said:
Great tutorial, for my first attempt at these types of edits, it made life very easy. Although i have a small problem. Ive made the edits so i can have extended power menu, crt off and any app multi window in my rom. Everything went smoothly but it seems that crt off is erratic. Sometimes it works and sometimes it does not. Any ideas?
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Well a never had this kind of problem.
Using Kernle Perseus, by the way? It seems to broke CRT.
Cristiano Matos said:
Well a never had this kind of problem.
Using Kernle Perseus, by the way? It seems to broke CRT.
Click to expand...
Click to collapse
No... Stock kernel. Keeping in simple
Sent from my GT-I9300 using Tapatalk 2
anaraxia said:
No... Stock kernel. Keeping in simple
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
There's a problem with the Stock kernel on the newest JB update (For both leak and official)
Try using Siyah's 1.8.3 and use the CRT Fix in the STweaks application.
---------- Post added at 11:15 AM ---------- Previous post was at 10:29 AM ----------
Thanks alot for this tutorial, very simple and straight to the point!
Lost.soul said:
There's a problem with the Stock kernel on the newest JB update (For both leak and official)
Try using Siyah's 1.8.3 and use the CRT Fix in the STweaks application.
Thanks for the help. Downloaded, flashed and tested. Works perfectly now. Will have to add it to my next release. Thanks again :thumbup:
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Loved your post, but i have a question: is it possible to do this with gingerbread rom? is it the same procedure?
Também sou brasileiro, hehehe. Tem como tu me ajudar com algumas coisas?
Click to expand...
Click to collapse
Note II InkEffect Lockscreen
It is not compatible with Note II InkEffect Lockscreen Mod.
When I flash this mod (extended menu) the ink effect lockscreen stop working
thank you
anaraxia said:
Great tutorial, for my first attempt at these types of edits, it made life very easy. Although i have a small problem. Ive made the edits so i can have extended power menu, crt off and any app multi window in my rom. Everything went smoothly but it seems that crt off is erratic. Sometimes it works and sometimes it does not. Any ideas?
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Can you confirm it works ONLY with Wifi On ? Seams like that on my try
in the service.jar...i have 2 times those codes...234, 264 something, so how do you choose where to insert your part ?
later edit:
Makes no diff where i add those it seams. Still CRT only works with WIFI on, its like a CRT SWICH haha...suppose "stuff" should be inserted differently on 4.1.2.

[MOD/GUIDE] Xperia Jelly Bean Style SystemUI | Customize Your Own Statusbar! [18/3]

Hi,
Well, I try to theme ICS systemui to Xperia JB style like Xperia Z.
But this so far the only I can do for now. I hope you guys like it.
More to come. Stay tuned.
Project Finished
Changelog
20/2: Initial release.
21/2: Fixed all statusbar background that cause FC on some user.
03/3: Style Z added. Change colour according to themes colour. (Special thanks to erorcun for the trick)
05/3: Style S added. Thanks to destroyy.
15/3: Special style added. Modified to look more like JB statusbar notification.
18/3: CM style added. Thanks to SpaceCaker.
Preview
{
"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"
}
Brand new statusbar background style.
Style 1
Style 2
Style 3 (Fullscreen)
Style 4
Style Z (Change Color According to Themes)
Style S (Change Color According to Themes)
Style ZN6 (Change Color According to Themes)
Style CM (Change Color According to Themes)
Note
1. Before installing this, please delete any quickpanel setting or systemuipreferences if you using tab systemui before. And delete systemui.odex if it present.
2. My systemui support smallapp.
3. Please PM me asking for permission first, if you want to incorporate it into your ROMs.
4. Style 1-4 is known to work for some user only. You need a luck for this
Instruction
1. Flash Universal_part_1.zip and reboot. Did the statusbar appear?
If it doesnt, probably there have problem with your rom. Flash stock rom via flashtool first.
2. If the statusbar appeared, continue to flash Style_x.zip via recovery.
3. Reboot you phone.
Credit
Niaboc79 for original xperia t systemui.
serajr for helping me in smali editing.
leloiboi for some tip and help.
Ticklefish for his tutorial.
erorcun for his trick to change colour according to theme.
destroyy for Sammy style.
SpaceCaker for CM style.
I'm do this for free. Damn... this take huge amount of time especially the smali editing.
Dont just know how to download and flash. Try appreciate my work by hit
.
[Guide/Tutorial] Customize Your Own Statusbar!
[Guide/Tutorial] Customize Your Own Statusbar!
Hi, again.
Some user keep PM'ing me how to change that, that and etc.
So I decide to do a simple guide to customize your own statusbar.
Make sure you have a basic knowledge to compile/decompile apk.
Change Statusbar Background Color
Decompile systemui.apk and navigate to SystemUI/res/values/drawables.xml and edit this line:
Code:
<item type="drawable" name="status_bar_background">#[COLOR="Red"]ff1a1a1a[/COLOR]</item>
Change red content to what ever you line. For more hex color reference, go here
For black color, change it to ff000000.
Save and compile back.
(This method only applicable for Style_Z and later version)
For style 1-4, change status_bar_background.png in drawable-hdpi folder.
Look for transparent statusbar? Go here.
Change Navigation Button Background Color
Decompile systemui.apk and navigate to SystemUI/res/layout/navigation_bar.xml and edit this line.
Code:
<com.android.systemui.statusbar.phone.NavigationBarView android:id="@id/nav_background" [COLOR="Red"]android:background="#ff000000"[/COLOR] android:layout_width="fill_parent" android:layout_height="fill_parent" android:directionality="none"
Change red content to what ever you line. For more hex color reference, go here
The original Xperia Z nav backgroud color is ff1a1a1a.
Save and compile back
Change Clock Colour on Statusbar
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
And change it to this
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="#[COLOR="Red"]ff09afed[/COLOR]" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Change the red content to what ever colour you like. For more hex color reference, go here
Remember! You can also change carrier label color, date, and etc. Just look respective line and xml.
Add Seconds To Statusbar Clock
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
[COLOR="Blue"]<com.android.systemui.statusbar.policy.Clock[/COLOR] android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
And replace blue line above with following red line:
Code:
<[COLOR="Red"]DigitalClock[/COLOR] android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Save change you have made and recompile back.
It easy, right?
Hide Clock,Battery Percentage and etc.
Hide clock.
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
and change to this:
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" [COLOR="Red"]android:visibility="gone"[/COLOR] android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Hide battery percentage
Find this line:
Code:
<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />
change to this:
Code:
<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" [COLOR="Red"]android:visibility="gone"[/COLOR] />
Remember! Just added red word at the end of line you want to hide if you want to hide content on statusbar.
Add Battery Percentage On Statusbar.
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
<ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
And add red line below:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
[COLOR="Red"]<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />[/COLOR]
<ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
Save change you have made. After that, look for this smali file:
PhoneStatusBar.smali
Code:
.line 358
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0028
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ImageView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V
and add red lines below:
Code:
.line 358
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0028
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ImageView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V
[COLOR="Red"].line 13
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0061
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/TextView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addLabelView(Landroid/widget/TextView;)V[/COLOR]
also change the const v9, 0x7f0e0061 to your own value, look for it inside public.xml
Recompile back and flash.
Temporary Hide Statusbar When We Pull SystemUI/Fullscreen (For Advanced User Only)
Find this smali file:
PhoneStatusBar.smali:
Here when the expanded view is about to become visible, we hide the main status bar view (red):
Code:
[B].method private makeExpandedVisible()V[/B]
.line 1194
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const/4 v1, 0x2
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/ExpandedView;->requestFocus(I)Z
.line 1195
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTrackingView:Lcom/android/systemui/statusbar/phone/TrackingView;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/TrackingView;->setVisibility(I)V
[COLOR="red"].line 1900
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const/4 v1, 0x4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->setVisibility(I)V[/COLOR]
goto :goto_0
.end method
Here when the expanded view is gone, we show the main status bar view again (red):
Code:
[B].method performCollapse()V[/B]
.line 1278
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedDialog:Landroid/app/Dialog;
invoke-virtual {v0}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;
move-result-object v0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedParams:Landroid/view/WindowManager$LayoutParams;
invoke-virtual {v0, v1}, Landroid/view/Window;->setAttributes(Landroid/view/WindowManager$LayoutParams;)V
.line 1279
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTrackingView:Lcom/android/systemui/statusbar/phone/TrackingView;
const/16 v1, 0x8
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/TrackingView;->setVisibility(I)V
[COLOR="Red"].line 1900
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->setVisibility(I)V[/COLOR]
.line 1281
iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDisabled:I
const/high16 v1, 0x2
and-int/2addr v0, v1
if-nez v0, :cond_2
.line 1282
const/4 v0, 0x1
const/high16 v1, 0x10a
invoke-virtual {p0, v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotificationIconVisibility(ZI)V
.line 1285
:cond_2
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpanded:Z
if-eqz v0, :cond_0
.line 1288
iput-boolean v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpanded:Z
.line 1289
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPostCollapseCleanup:Ljava/lang/Runnable;
if-eqz v0, :cond_0
.line 1290
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPostCollapseCleanup:Ljava/lang/Runnable;
invoke-interface {v0}, Ljava/lang/Runnable;->run()V
.line 1291
const/4 v0, 0x0
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPostCollapseCleanup:Ljava/lang/Runnable;
goto :goto_0
.end method
Now look for:
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getHeight()I
You´ll get 6 matches/lines with something like:
Code:
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getHeight()I
move-result v2
Insert red line (respect line spaces) only within following methods:
Code:
.method doAnimation()V
.method doRevealAnimation()V
.method getExpandedHeight(I)I
.method prepareTracking(IZ)V
.method updateExpandedViewPos(I)V
DON´T INSERT INSIDE THIS METHOD:
Code:
.method interceptTouchEvent(Landroid/view/MotionEvent;)Z
Code:
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getHeight()I
move-result v2
[COLOR="red"]const/4 v2, 0x0[/COLOR]
(remember to change v2 to the same as "move-result v?")
Save and Compile. If you still got an error or force close on statusbar, just compare with style 3.
Change Color According to ThemeAccent Color (For Expert User Only)
Download the ThemeUtils.zip in attachment and extract it to smali/com/blah.../blah... You can put ThemeUtils.smali in any directory in smali folder. But when we want to run this file, we need to specific the directory where we put the file. For example,
I put in smali/com/sonymobile/systemui/statusbar/tools/
You will know what I mean
Something have to run this file and provide context object. For example, the main file which contain context object in systemui.apk is SystemUIService.smali. So look for this line:
Code:
.line 91
iget-object v6, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
aget-object v6, v6, v4
iput-object p0, v6, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
And added following red line:
Code:
.line 91
iget-object v6, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
aget-object v6, v6, v4
iput-object p0, v6, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
[COLOR="Red"]invoke-static {p0}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->init(Landroid/content/Context;)V[/COLOR]
And save it.
If you want to change the clock color in expanded statusbar for example, find this line in com/android/systemui/statusbar/phone/PhoneStatusBar.smali
Code:
.field mExpanded:Z
.field mExpandedContents:Landroid/view/View;
.field mExpandedDialog:Landroid/app/Dialog;
And add red line:
Code:
.field mExpanded:Z
[COLOR="Red"].field mExpandedClock:Landroid/widget/TextView;[/COLOR]
.field mExpandedContents:Landroid/view/View;
.field mExpandedDialog:Landroid/app/Dialog;
Find this line:
Code:
.line 1227
const/16 v0, -0x2710
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateExpandedViewPos(I)V
And add red line below:
Code:
.line 1227
const/16 v0, -0x2710
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateExpandedViewPos(I)V
[COLOR="Red"]iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedClock:Landroid/widget/TextView;
invoke-static {}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->getAccentColor()I
move-result v1
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V
[/COLOR]
Find this line:
Code:
.line 343
const v9, 0x7f0e003e
invoke-virtual {v1, v9}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/policy/DateView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDateView:Lcom/android/systemui/statusbar/policy/DateView;
And add red line below:
Code:
.line 343
const v9, 0x7f0e003e
invoke-virtual {v1, v9}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/policy/DateView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDateView:Lcom/android/systemui/statusbar/policy/DateView;
[COLOR="Red"]const v9, 0x7f0e0095
invoke-virtual {v1, v9}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/TextView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedClock:Landroid/widget/TextView;[/COLOR]
Now look for this line:
Code:
.line 1083
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v1, 0x7f0e002b
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
And add red line below:
Code:
.line 1083
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v1, 0x7f0e002b
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
[COLOR="Red"]move-result-object v1
.line 1084
if-eqz v1, :cond_0
.line 1085
if-eqz p1, :cond_1
const/4 v0, 0x0
:goto_0
invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V
.line 1087
:cond_0
invoke-virtual {p0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showClockExp(Z)V
return-void
.line 1085
:cond_1
const/16 v0, 0x8
goto :goto_0
.end method
.method public showClockExp(Z)V
.locals 2
.parameter
.prologue
.line 1083
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const v1, 0x7f0e0095
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;[/COLOR]
And save change.
If you want to change the color for button toggle according to theme (colorizing button), look for ToolsButton.smali (com/sonymobile/systemui/statusbar/tools).
Fine this line:
Code:
.method private updateIcon()V
.locals 5
.prologue
.line 239
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mStateIcons:Ljava/util/HashMap;
iget v4, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mState:I
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/Integer;
And change to this:
Code:
.method private updateIcon()V
.locals [COLOR="Red"]6[/COLOR]
.prologue
[COLOR="Red"].line 239
const/4 v5, 0x0
.local v5, applyFilter:Z[/COLOR]
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mStateIcons:Ljava/util/HashMap;
iget v4, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mState:I
[COLOR="Red"]const/4 v1, 0x1
if-eq v4, v1, :cond_0
const/4 v5, 0x1
:cond_0[/COLOR]
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/Integer;
Now look for this line:
Code:
.line 241
.local v1, icon:Landroid/graphics/Bitmap;
if-eqz v2, :cond_0
And change the value to this
Code:
.line 241
.local v1, icon:Landroid/graphics/Bitmap;
if-eqz v2, :[COLOR="Red"]cond_1[/COLOR]
Look for following line:
Code:
.line 249
:cond_0
:goto_0
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mIcon:Lcom/sonymobile/systemui/uicomponents/Image;
invoke-virtual {v3, v1}, Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;)V
And change to following red content:
Code:
.line 249
:[COLOR="Red"]cond_1[/COLOR]
:goto_0
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mIcon:Lcom/sonymobile/systemui/uicomponents/Image;
[COLOR="Red"]invoke-virtual {v3, v1, v5}[/COLOR], Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;[COLOR="Red"]Z[/COLOR])V
Look for following line and delete red line:
Code:
.line 250
[COLOR="Red"]iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mIcon:Lcom/sonymobile/systemui/uicomponents/Image;[/COLOR]
invoke-virtual {v3}, Lcom/sonymobile/systemui/uicomponents/Image;->invalidate()V
Find this line:
Code:
.line 251
return-void
And add red line below:
Code:
.line 251
[COLOR="Red"].end local v5 #applyFilter:Z[/COLOR]
return-void
Look for following line:
Code:
.line 244
:catch_0
move-exception v0
And like usual, add following line:
Code:
.line 244
[COLOR="Red"].restart local v5 #applyFilter:Z[/COLOR]
:catch_0
move-exception v0
And save change you have made.
Now the last part is change the image.smali (com/sonymobile/systemui/uicomponents/)
Look for following line and add red line:
Code:
# instance fields
[COLOR="Red"].field protected mApplyFilter:Z[/COLOR]
.field protected mBitmap:Landroid/graphics/Bitmap;
.field protected final mMatrix:Landroid/graphics/Matrix;
.field protected mScalingX:F
.field protected mScalingY:F
Look for following line:
Code:
.method public constructor <init>(Ljava/lang/String;Landroid/graphics/Bitmap;)V
.locals 1
.parameter "id"
.parameter "image"
.prologue
const/high16 v0, 0x3f80
And change to this:
Code:
.method public constructor <init>(Ljava/lang/String;Landroid/graphics/Bitmap;)V
[COLOR="Red"].locals 2[/COLOR]
.parameter "id"
.parameter "image"
.prologue
const/high16 v0, 0x3f80
[COLOR="Red"]const/4 v1, 0x0[/COLOR]
Look for this line:
Code:
.line 54
invoke-virtual {p0, p2}, Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;)V
Change the entire line to this:
Code:
.line 54
[COLOR="red"]invoke-virtual {p0, p2, v1}, Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;Z)V[/COLOR]
Find this line:
Code:
.method public onDraw(Landroid/graphics/Canvas;FF)V
.locals 3
.parameter "canvas"
.parameter "x"
.parameter "y"
.prologue
const/high16 v1, 0x3f80
And change to this:
Code:
.method public onDraw(Landroid/graphics/Canvas;FF)V
[COLOR="red"].locals 5[/COLOR]
.parameter "canvas"
.parameter "x"
.parameter "y"
.prologue
const/high16 v1, 0x3f80
Look for this line:
Code:
.line 181
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
if-eqz v0, :cond_1
...
Code:
.line 181
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
if-eqz v0, [COLOR="red"]:cond_2[/COLOR]
Look for this code:
Code:
.line 182
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingX:F
cmpl-float v0, v0, v1
if-nez v0, :cond_0
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingY:F
cmpl-float v0, v0, v1
if-eqz v0, :cond_2
Change to this:
Code:
.line 182
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingX:F
cmpl-float v0, v0, v1
if-nez v0, :cond_0
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingY:F
cmpl-float v0, v0, v1
if-eqz v0, [COLOR="Red"]:cond_3[/COLOR]
Look this line:
Code:
.line 185
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mMatrix:Landroid/graphics/Matrix;
iget-object v2, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;
Add red line below:
Code:
.line 185
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mMatrix:Landroid/graphics/Matrix;
iget-object v2, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;
[COLOR="red"]iget-boolean v4, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mApplyFilter:Z
const/4 v3, 0x0
if-eqz v4, :cond_1
invoke-static {}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->getAccentColorFilter()Landroid/graphics/ColorFilter;
move-result-object v3
:cond_1
invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;[/COLOR]
invoke-virtual {p1, v0, v1, v2}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Matrix;Landroid/graphics/Paint;)V
Now look for this line:
Code:
.line 190
:cond_1
:goto_0
return-void
And change to this value:
Code:
.line 190
[COLOR="Red"]:cond_2[/COLOR]
:goto_0
return-void
Look for following line:
Code:
.line 187
:cond_2
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;
invoke-virtual {p1, v0, p2, p3, v1}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
And change to this value/add red line:
Code:
.line 187
[COLOR="red"]:cond_3[/COLOR]
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;
[COLOR="red"]iget-boolean v4, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mApplyFilter:Z
const/4 v3, 0x0
if-eqz v4, :cond_4
invoke-static {}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->getAccentColorFilter()Landroid/graphics/ColorFilter;
move-result-object v3
:cond_4
invoke-virtual {v1, v3}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;[/COLOR]
invoke-virtual {p1, v0, p2, p3, v1}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
Look this line:
Code:
.method public setBitmap(Landroid/graphics/Bitmap;Z)V
.locals 2
.parameter "bitmap"
.prologue
const/4 v1, 0x0
And ...
Code:
.method public setBitmap(Landroid/graphics/Bitmap;Z)V
.locals 2
.parameter "bitmap"
[COLOR="red"].parameter "filter"[/COLOR]
.prologue
const/4 v1, 0x0
And LAST one
Code:
.line 73
:cond_0
:goto_0
iput-object p1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
And... you know what I mean, right?
Code:
.line 73
:cond_0
:goto_0
iput-object p1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
[COLOR="red"]iput-boolean p2, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mApplyFilter:Z[/COLOR]
erorcun is here said:
You are missing 2 thing. In older versions statusbar clock and expanded clocks' ids are same, so it will not work on normal systemui and you should add 0 to setbitmap's last parameters in ninepatchimage.smali.
Click to expand...
Click to collapse
Remember!
The png you want to colorize must be in white color.
This may take more than two hour. So, patient is require for this.
Good luck
End for now. Will post again if I find something useful.
very very very nice :good::good::good:
Sv: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
Are you skilled in porting apps also?
Sent from my LT26i using xda app-developers app
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
DenmarkRootN00b said:
Are you skilled in porting apps also?
Sent from my LT26i using xda app-developers app
Click to expand...
Click to collapse
What app you want to port?
Ask erorcun becoz he have more experience in porting app than me.
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
I'm using stock ics 2.55 rooted
Notification bar is disappeared (
Sent from my LT26i using xda premium
Style_1 not working with Home Launcher Xperia Z V2 port by Thilina C:crying:
http://forum.xda-developers.com/showthread.php?t=2102397
xperia ion
ZN6 said:
There's a big chance to not working if you use tab systemui with preferences.
Here try this.
Delete systemui.apk and systemuipreferences.apk. After that reboot your phone. You will lost statusbar. Reboot you phone again and flash my systemui. If still doesnt work...flash on clean stock rom.
Click to expand...
Click to collapse
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
boncaunhaquynhanh said:
Style_1 not working with Home Launcher Xperia Z V2 port by Thilina C:crying:
http://forum.xda-developers.com/showthread.php?t=2102397
xperia ion
Click to expand...
Click to collapse
This mod has nothing to do with home launcher
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
Thread update. Please follow instruction on the first post. I have fix the systemui didnt appeared by some of people here.
Give your feedback guy.
Sv: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
Can I use it with rooted stock 45 or only with 55? Thanks in advance
Sent from my LT26i using Tapatalk2
Works perfectly on my ION 6.1.E.3.7! Possibility of adding quickpanel settings?
farvin said:
Can I use it with rooted stock 45 or only with 55? Thanks in advance
Sent from my LT26i using Tapatalk2
Click to expand...
Click to collapse
Work on any stock ics based.
Sv: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
THX do I need to have a Rom with small app function or would your mod give that function?
Sendt fra min LT26i med Tapatalk2
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
farvin said:
THX do I need to have a Rom with small app function or would your mod give that function?
Sendt fra min LT26i med Tapatalk2
Click to expand...
Click to collapse
Just search on xda about smallapp mod.
And no, my mod doesnt include smallapp.
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
Awesome
This SystemUI is awesome!!
Hope you can creat quickpanel or tab setting
sorry for my bad english
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
Great work
Sent from my LT26ii using xda app-developers app
Excellent work. Exactly what i wanted
like your wOOOOOrk dude ... if possible to install with small apps , it's full ok... thnaks bro
Sv: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
ZN6 said:
What app you want to port?
Ask erorcun becoz he have more experience in porting app than me.
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
Click to expand...
Click to collapse
Well we are still looking for phonebook and conversations to be ported... If it is possible
Edit : ported to CM based roms
Sent from my LT26i using xda app-developers app

[help with a mod]DigitalClock statusbar

This problem is solved see post #5
gerryS2 said:
I have found the file of DigitalClock with second for statusbar (<DigitalClock android...)in framework2.jar in smali/android/widget/DigitalClock.
I have ported this file in smali folder of SystemUI and I have insert this line in tw_status_bar:
<com.android.systemui.statusbar.policy.DigitalClock android:textSize="@dimen/status_bar_clock_text_size"...
I would like to enter a checkbox in the SecSettings to show or hide the clock, the problem is in SystemUI because I can not put a code to hide, I have use a id for hide and insert the android:visibility="gone", but doesn't work. It is possible help me with this mod in SystemUI?
P.S.I am able with SecSettings but I haven't able with SystemUI
Click to expand...
Click to collapse
I have wanted seconds on my statusbar clock. Have you a link to a tutorial? Or, where did you put the smali file into the systemui?
Wish I could help with your request but maybe I can find out on the S Advance forum... if I do I'll be back LOL...
bobfrantic said:
I have wanted seconds on my statusbar clock. Have you a link to a tutorial? Or, where did you put the smali file into the systemui?
Wish I could help with your request but maybe I can find out on the S Advance forum... if I do I'll be back LOL...
Click to expand...
Click to collapse
I have extract the file of framework2.jar in systemUI. I have create for you a zip that contains this file smali, this file must be inserted in:
smali/com/android/systemui/statubar/policy/
You have replace this line of clock in tw_status_bar.xml:
<com.android.systemui.statusbar.policy.Clock
with this:
<com.android.systemui.statusbar.policy.DigitalClock
gerryS2 said:
I have extract the file of framework2.jar in systemUI. I have create for you a zip that contains this file smali, this file must be inserted in:
smali/com/android/systemui/statubar/policy/
You have replace this line of clock in tw_status_bar.xml:
<com.android.systemui.statusbar.policy.Clock
with this:
<com.android.systemui.statusbar.policy.DigitalClock
Click to expand...
Click to collapse
Thank you for this, it worked. Will see what I can find out about a switch for turning on and off the clock in settings. Appreciated much!
bobfrantic said:
Thank you for this, it worked. Will see what I can find out about a switch for turning on and off the clock in settings. Appreciated much!
Click to expand...
Click to collapse
I solved it with the guide of @Goldie, I have created a method in PhoneStatusbar and I have insert a custom id in the line of Digital Clock like this:
Code:
<com.android.systemui.statusbar.policy.DigitalClock android:textSize="@dimen/status_bar_clock_text_size" android:textColor="#ff959595" android:ellipsize="none" android:gravity="left|center" android:id="@id/digitalclock_view" android:visibility="gone" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" />
Insert this line in ids.xml:
Code:
<item type="id" name="digitalclock_view">false</item>
In PhoneStatusbar insert this method at the end of the file:
Code:
.method digitalclock_view()V
.locals 6
iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "enable_digitalclock"
const/4 v3, 0x1
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-nez v3, :cond_0
const v3, 0x8
:cond_0
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const p0, 0x7f0d01e0
invoke-virtual {v5, p0}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v4
invoke-virtual {v4, v3}, Lcom/android/systemui/statusbar/policy/DigitalClock;->setVisibility(I)V
return-void
.end method
0x7f0d01e0 is the public id of "digitalclock_view"
"enable_digitalclock" is the key for checkbox (android:key="enable_digitalclock")
After I have insert this line in a part of method makestatusbarview:
Code:
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->digitalclock_view()V
Code:
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mClearButton:Landroid/view/View;
const/4 v10, 0x0
invoke-virtual {v9, v10}, Landroid/view/View;->setAlpha(F)V
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mClearButton:Landroid/view/View;
const/4 v10, 0x4
invoke-virtual {v9, v10}, Landroid/view/View;->setVisibility(I)V
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->digitalclock_view()V
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mClearButton:Landroid/view/View;
const/4 v10, 0x0
invoke-virtual {v9, v10}, Landroid/view/View;->setEnabled(Z)V
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d004f
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/policy/DateView;
If you have this on-fly you must have PhoneStatusBar$SettingsObserver.smali and add this line in two method:
Code:
.method observe()V
.locals 3
const/4 v2, 0x0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
iget-object v1, v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "enable_digitalclock"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
invoke-virtual {v0, v1, v2, p0}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
Code:
.method public onChange(Z)V
.locals 1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;->digitalclock_view()V
Thanks @Goldie for his guide of smali code
Nice to see it helping
Sent from my GT-I9305 using Tapatalk
Glad you found out how. Maybe when I have time I'll give a try. If you can, show me with a screen shot what you accomplished please. May help me when I attempt this.
Sent from my Advanced SII lite

[Guide]how To port Ics Lockscreen To Gb Devices[Apply to SGY]

http://forum.xda-developers.com/showthread.php?t=2721453
DOWNLOAD THIS ZIP View attachment step_1.zip
1.copy res folder to your framework-res folder
2. Open ids.xml under res/values foler and add these in last above
<item type="id" name="rl_multiWaveView">false</item>
<item type="id" name="digital_clock">false</item>
<item type="id" name="dateShow">false</item>
<item type="id" name="iv_drop">false</item>
<item type="id" name="ib_greenorange">false</item>
<item type="id" name="rl_click_after">false</item>
<item type="id" name="ib_photo">false</item>
<item type="id" name="ib_greenorange_gone">false</item>
<item type="id" name="ib_phone">false</item>
<item type="id" name="tv_phone_unread">false</item>
<item type="id" name="ib_sms">false</item>
<item type="id" name="tv_sms_unread">false</item>
<item type="id" name="ib_home">false</item>
<item type="id" name="tv_remind">false</item>
<item type="id" name="rl_multiWaveViewforsimulateics">false</item>
<item type="id" name="iv_wave">false</item>
<item type="id" name="iv_wave1">false</item>
<item type="id" name="iv_wave2">false</item>
<item type="id" name="iv_circle">false</item>
Click to expand...
Click to collapse
3. compile the framework-res.apk
4.Now decompile your framework-res.apk
Now open your public.xml
5.DOWNLOAD THIS ZIP View attachment step_2.zip and decompression it!
open pre_public.xml
6.notepad++ file search "0x10" before the unzip the folder
7.You can find there are 0x10xxxxx, search for 0x10xxxxx in pre_public.xml, copy the ID NAME, search for ID NAME in public.xml, copy the ID(0x010yyyyy), now it looks like this 0x10yyyyy.You need to put 0x10xxxxx Change to 0x010yyyyy.Save.
This is a complex work, please seriously.
8.DOWNLOAD THIS ZIPView attachment step_3.7z
thats our Main and difficult part
in your android.policy.jar decompiled folder
search for LockPatternKeyguardView.smalli
open it ..
then search for
.field private mScreenOn:Z
Click to expand...
Click to collapse
then below it add
.field private mStartForIntent:Landroid/content/Intent;
Click to expand...
Click to collapse
then search for
.method createLockScreen()Landroid/view/View;
Click to expand...
Click to collapse
then after
.prologue
Click to expand...
Click to collapse
add this
.line 660
const-string v3, "true"
const-string v2, "ro.origin.lockscreen"
.line 711
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v2, v3}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "false"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_24
.line 712
new-instance v0, Lcom/android/internal/policy/impl/GreenOrange_LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/GreenOrange_LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallbackV
.line 726
:goto_23
return-object v0
.line 718
:cond_24
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v2, v3}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "simulateICS"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_44
.line 719
new-instance v0, Lcom/android/internal/policy/impl/SimulateICS_LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/SimulateICS_LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallbackV
goto :goto_23
:cond_44
Click to expand...
Click to collapse
then search for
.method static synthetic access$100
Click to expand...
Click to collapse
Then add the code below .end method
.method static synthetic access$1000(Lcom/android/internal/policy/impl/LockPatternKeyguardViewLandroid/content/Intent;
.registers 2
.parameter "x0"
.prologue
.line 65
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mStartForIntent:Landroid/content/Intent;
return-object v0
.end method
.method static synthetic access$1002(Lcom/android/internal/policy/impl/LockPatternKeyguardView;Landroid/content/IntentLandroid/content/Intent;
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 65
iput-object p1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mStartForIntent:Landroid/content/Intent;
return-object p1
.end method
Click to expand...
Click to collapse
Now save this Smalli
9.go to com\android\internal\policy\impl ( your decompiled android.policy.jar)
search for LockPatternKeyguardView$2.smalli
Now open it
then search for
.method public goToUnlockScreen()V
Click to expand...
Click to collapse
Delete this full method!and add this
.method public goToUnlockScreen()V
.registers 6
.prologue
const/4 v2, 0x1
const-string v4, "true"
const-string v3, "ro.origin.lockscreen"
.line 248
invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView$2;->isSecure()Z
move-result v0
if-nez v0, :cond_3d
.line 249
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v3, v4}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "false"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_1f
.line 250
invoke-virtual {p0, v2}, Lcom/android/internal/policy/impl/LockPatternKeyguardView$2;->keyguardDone(Z)V
.line 259
:goto_1e
return-void
.line 251
:cond_1f
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v3, v4}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "simulateICS"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_33
.line 252
invoke-virtual {p0, v2}, Lcom/android/internal/policy/impl/LockPatternKeyguardView$2;->keyguardDone(Z)V
goto :goto_1e
.line 254
:cond_33
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$2;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getCallback()Lcom/android/internal/policy/impl/KeyguardViewCallback;
move-result-object v0
invoke-interface {v0, v2}, Lcom/android/internal/policy/impl/KeyguardViewCallback;->keyguardDone(Z)V
goto :goto_1e
.line 257
:cond_3d
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$2;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
sget-object v1, Lcom/android/internal/policy/impl/LockPatternKeyguardView$Mode;->UnlockScreen:Lcom/android/internal/policy/impl/LockPatternKeyguardView$Mode;
invoke-static {v0, v1}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$200(Lcom/android/internal/policy/impl/LockPatternKeyguardView;Lcom/android/internal/policy/impl/LockPatternKeyguardView$ModeV
goto :goto_1e
.end method
Click to expand...
Click to collapse
Now search for
.method public isSecure()Z
Click to expand...
Click to collapse
then above it add this
.method public isGotoUnlockscreen(Landroid/content/IntentV
.registers 3
.parameter "intent"
.prologue
.line 398
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$2;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-static {v0, p1}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$1002(Lcom/android/internal/policy/impl/LockPatternKeyguardView;Landroid/content/IntentLandroid/content/Intent;
.line 399
return-void
.end method
Click to expand...
Click to collapse
Now search for
.method public keyguardDone(Z)V
Click to expand...
Click to collapse
replace full method with
.method public keyguardDone(Z)V
.registers 6
.parameter "authenticated"
.prologue
const-string v3, "true"
const-string v2, "ro.origin.lockscreen"
.line 334
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v2, v3}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "false"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_3c
.line 335
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$2;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getCallback()Lcom/android/internal/policy/impl/KeyguardViewCallback;
move-result-object v0
invoke-interface {v0, p1}, Lcom/android/internal/policy/impl/KeyguardViewCallback;->keyguardDone(Z)V
.line 336
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$2;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-static {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$1000(Lcom/android/internal/policy/impl/LockPatternKeyguardViewLandroid/content/Intent;
move-result-object v0
if-eqz v0, :cond_3b
.line 337
sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
const-string v1, "mStartForIntent"
invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/StringV
.line 338
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$2;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getContext()Landroid/content/Context;
move-result-object v0
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$2;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-static {v1}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$1000(Lcom/android/internal/policy/impl/LockPatternKeyguardViewLandroid/content/Intent;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/content/Context;->startActivity(Landroid/content/IntentV
.line 349
:cond_3b
:goto_3b
return-void
.line 340
:cond_3c
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v2, v3}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "simulateICS"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_6d
.line 341
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$2;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getCallback()Lcom/android/internal/policy/impl/KeyguardViewCallback;
move-result-object v0
invoke-interface {v0, p1}, Lcom/android/internal/policy/impl/KeyguardViewCallback;->keyguardDone(Z)V
.line 342
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$2;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-static {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$1000(Lcom/android/internal/policy/impl/LockPatternKeyguardViewLandroid/content/Intent;
move-result-object v0
if-eqz v0, :cond_3b
.line 343
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$2;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getContext()Landroid/content/Context;
move-result-object v0
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$2;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-static {v1}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$1000(Lcom/android/internal/policy/impl/LockPatternKeyguardViewLandroid/content/Intent;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/content/Context;->startActivity(Landroid/content/IntentV
goto :goto_3b
.line 346
:cond_6d
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$2;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getCallback()Lcom/android/internal/policy/impl/KeyguardViewCallback;
move-result-object v0
invoke-interface {v0, p1}, Lcom/android/internal/policy/impl/KeyguardViewCallback;->keyguardDone(Z)V
goto :goto_3b
.end method
Click to expand...
Click to collapse
Now save this Smalli
10.Now search for this
KeyguardScreenCallback.smalli
then search for
.method public abstract goToUnlockScreen()V
.end method
Click to expand...
Click to collapse
then add this below this code
.method public abstract isGotoUnlockscreen(Landroid/content/IntentV
.end method
Click to expand...
Click to collapse
Now save this Smalli
Now You can decompile android.policy.jar
11.downlaod this Zip View attachment step_4.zip
Now open zip copy this fonts to your system/fonts (necceassry step other wise you will face bootloop)
Now open you build.prop
then search for
# ADDITIONAL_BUILD_PROPERTIES
Click to expand...
Click to collapse
then above it add
ro.origin.lockscreen=simulateICS
Click to expand...
Click to collapse
Sorry my English is not good....
Thanks to @SK(SurajKumar)
{
"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"
}
This is my custom ROM-MYROM4.4.3, because it is the Chinese version, so I do not provide ROM at XDA.:cyclops:
Now I offer View attachment framework-res.apk and View attachment android.policy.jar for your reference.
You have to provide not 3 or 4 step you have full instructions as user can follow
shadman0 said:
You have to provide not 3 or 4 step you have full instructions as user can follow
Click to expand...
Click to collapse
Thank you for reminding me, I'll rearrange the tutorial, suitable for SGY. Please give me the time..:cyclops:
Nice...m waiting eagerly for this.... ..
hi sir how did you recompile back your android.policy.jar? i got this error while recompiling android.policy.jar
and did you remove 0 in your ids like 0x10... because in our id its like 0x010... thanks in advance
92mey said:
Thank you for reminding me, I'll rearrange the tutorial, suitable for SGY. Please give me the time..:cyclops:
Click to expand...
Click to collapse
Sent from my GT-S5360 using xda app-developers app
Don't forget to say thanks
Sent from my GT-S5360 using xda app-developers app
---------- Post added at 09:34 AM ---------- Previous post was at 09:30 AM ----------
markmellarpes said:
hi sir how did you recompile back your android.policy.jar? i got this error while recompiling android.policy.jar
and did you remove 0 in your ids like 0x10... because in our id its like 0x010... thanks in advance
Click to expand...
Click to collapse
Hi Sir Why u have this problem do u have install correct framework-res.apk
Sent from my GT-S5360 using xda app-developers app
Mate your rom looks great. What are the chances of getting an english version of it??
Sent from my GT-S5360 using Tapatalk 2
markmellarpes said:
hi sir how did you recompile back your android.policy.jar? i got this error while recompiling android.policy.jar
and did you remove 0 in your ids like 0x10... because in our id its like 0x010... thanks in advance
Click to expand...
Click to collapse
yes i remove 0 from my public.xml because it make easy for you getting id related to smalli:victory:
but it you public.xml it will with 0x010.
so when you put id to smalli you have to remove zero
---------- Post added at 01:39 PM ---------- Previous post was at 01:30 PM ----------
92mey said:
http://forum.xda-developers.com/showthread.php?t=2721453
DOWNLOAD THIS ZIP View attachment 2695130
1.copy res folder to your framework-res folder
2. Open ids.xml under res/values foler and add these in last above
3. compile the framework-res.apk
4.Now decompile your framework-res.apk
Now open your public.xml
5.DOWNLOAD THIS ZIP View attachment 2695131 and decompression it!
open pre_public.xml
6.notepad++ file search "0x10" before the unzip the folder
7.You can find there are 0x10xxxxx, search for 0x10xxxxx in pre_public.xml, copy the ID NAME, search for ID NAME in public.xml, copy the ID(0x010yyyyy), now it looks like this 0x10yyyyy.You need to put 0x10xxxxx Change to 0x010yyyyy.Save.
This is a complex work, please seriously.
8.DOWNLOAD THIS ZIPView attachment 2695132
thats our Main and difficult part
in your android.policy.jar decompiled folder
search for LockPatternKeyguardView.smalli
open it ..
then search for
then below it add
then search for
then after
add this
then search for
Then add the code below .end method
Now save this Smalli
9.go to com\android\internal\policy\impl ( your decompiled android.policy.jar)
search for LockPatternKeyguardView$2.smalli
Now open it
then search for
Delete this full method!and add this
Now search for
then above it add this
Now search for
replace full method with
Now save this Smalli
10.Now search for this
KeyguardScreenCallback.smalli
then search for
then add this below this code
Now save this Smalli
Now You can decompile android.policy.jar
11.downlaod this Zip View attachment 2695133
Now open zip copy this fonts to your system/fonts (necceassry step other wise you will face bootloop)
Now open you build.prop
then search for
then above it add
Sorry my English is not good....
Thanks to @SK(SurajKumar)
Click to expand...
Click to collapse
mate at least you have to inform me.
that you are using this porting this guide to another thread. because i spend many night for porting lockscreen and creating tut.
so better you should create a tut that will suitable for your device give it too me . i will add you in Credit for test
Sir, i;m sorry but i do not completely understand the steps:
6.notepad++ file search "0x10" before the unzip the folder
7.You can find there are 0x10xxxxx, search for 0x10xxxxx in pre_public.xml, copy the ID NAME, search for ID NAME in public.xml, copy the ID(0x010yyyyy), now it looks like this 0x10yyyyy.You need to put 0x10xxxxx Change to 0x010yyyyy.Save.
it says in the zip folder step2:
thats our smalli editing part
1.Now decompile your android.policy.jar
2.copy this smallis to your
3.decompiled android.policy.jar folder
copy this smallis to your folder 1 one by one
Now open the every smalli and find the ids then after finding search that specific in mine public.xml
then after you got then search that id in your public.xml after finding copy those id to your smalli!!
but remember in smalli id start from 0x1 and in you public start with 0x01
..
its a long borring work ok
plz do not do in hurry plz do slowly slowly.
other wise you will face boot loop
Now step 3 bye
please help me sir, i don't know what to do, please guide me sir ..
---------- Post added at 07:18 PM ---------- Previous post was at 07:06 PM ----------
what ids will i find in the smalis i copied ? i can't find any ids there, and what will i find in the pre_public.xml sir ?
[EDIT]
sir i kinda understand it, sorry for the mess xD
but i have another question, not all the smalis have the "0x10"
like for example:
i search "0x10" in DigitalClock$TimeChangedReceiver$1 but it doesn't have any "0x10"
is it ok ? or not ?
KenEmerenciana said:
Sir, i;m sorry but i do not completely understand the steps:
6.notepad++ file search "0x10" before the unzip the folder
7.You can find there are 0x10xxxxx, search for 0x10xxxxx in pre_public.xml, copy the ID NAME, search for ID NAME in public.xml, copy the ID(0x010yyyyy), now it looks like this 0x10yyyyy.You need to put 0x10xxxxx Change to 0x010yyyyy.Save.
it says in the zip folder step2:
thats our smalli editing part
1.Now decompile your android.policy.jar
2.copy this smallis to your
3.decompiled android.policy.jar folder
copy this smallis to your folder 1 one by one
Now open the every smalli and find the ids then after finding search that specific in mine public.xml
then after you got then search that id in your public.xml after finding copy those id to your smalli!!
but remember in smalli id start from 0x1 and in you public start with 0x01
..
its a long borring work ok
plz do not do in hurry plz do slowly slowly.
other wise you will face boot loop
Now step 3 bye
please help me sir, i don't know what to do, please guide me sir ..
---------- Post added at 07:18 PM ---------- Previous post was at 07:06 PM ----------
what ids will i find in the smalis i copied ? i can't find any ids there, and what will i find in the pre_public.xml sir ?
[EDIT]
sir i kinda understand it, sorry for the mess xD
but i have another question, not all the smalis have the "0x10"
like for example:
i search "0x10" in DigitalClock$TimeChangedReceiver$1 but it doesn't have any "0x10"
is it ok ? or not ?
Click to expand...
Click to collapse
Yup skip smali with no 0x10 found
OP and the original guide maker thanks for this guide it worked! :good:
Its only downside is lidroid lockscreen can't be used though we can delete its line in build.prop to disable this lockscreen
Sent from my GT-S5360 using Tapatalk 2
Sir, i still dont know what your mean at step 6 and 7. Is we change id on my public.xml with yours id or what ?
Thanks for understanding me
EDIT : OK, now i understand what is step 6 and 7 did
Need more brain for understand it
But i stuck at searching
Code:
.method static synthetic access$100(Lcom/android/internal/policy/impl/LockPatternKeyguardView;)Z
.registers 2
.parameter "x0"
.prologue
.line 65
iget-boolean v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mIsVerifyUnlockOnly:Z
return v0
.end method
I just found this ?
Code:
.method static synthetic access$400(Lcom/android/internal/policy/impl/LockPatternKeyguardView;)Z
.locals 1
.parameter "x0"
.prologue
.line 92
iget-boolean v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mIsVerifyUnlockOnly:Z
return v0
.end method
@SK(SurajKumar) or @92mey Would you help me ?
So what is the Emoutins in codes ;@
---------- Post added at 04:03 PM ---------- Previous post was at 03:43 PM ----------
BarJei said:
Yup skip smali with no 0x10 found
OP and the original guide maker thanks for this guide it worked! :good:
Its only downside is lidroid lockscreen can't be used though we can delete its line in build.prop to disable this lockscreen
Sent from my GT-S5360 using Tapatalk 2
Click to expand...
Click to collapse
Can u Share Me ur Framework-res and policy.jar
---------- Post added at 04:36 PM ---------- Previous post was at 04:03 PM ----------
Hahaha
Waste of time and soft broken:sly:
---------- Post added at 05:00 PM ---------- Previous post was at 04:36 PM ----------
Broken cm7 rc4 bieltv3
1st of apl theirs a problem with your smali codes. *emotions*
created in ur some smali lines.
plss give a text file contain all smali codes.
Nup its well
Cant compile ur resorces missing pngs also ur done frameworks soft breaks
BarJei said:
Yup skip smali with no 0x10 found
OP and the original guide maker thanks for this guide it worked! :good:
Its only downside is lidroid lockscreen can't be used though we can delete its line in build.prop to disable this lockscreen
Sent from my GT-S5360 using Tapatalk 2
Click to expand...
Click to collapse
Can you provide your modded android.policy.jar ? Please
Sent from my GT-S5360 using xda app-developers app
GSculerlor said:
Can you provide your modded android.policy.jar ? Please
Sent from my GT-S5360 using xda app-developers app
Click to expand...
Click to collapse
OP already provided his framework files at 2nd post
BarJei said:
OP already provided his framework files at 2nd post
Click to expand...
Click to collapse
Yup, but i need more modded android.policy.jar. Cause OP's android.policy.jar is different with what he post it on first post
Sent from my GT-S5360 using xda app-developers app
GSculerlor said:
this guide isn't made well and missing resources
He copied it from outher site and don't know about it
Click to expand...
Click to collapse
After booting , everything force closes

[Guide][Smali][CM11] How to add toast animations

Hallo All
I want to share how to add animation toast .. with settings..
What can be done with this MOD ?
Click to expand...
Click to collapse
This mod will allow you to have Toast with various types of animations , and can change it without need reboot
Here is a video of what I mean..
okey lets go to Guide:
first of all need some requirement for this MOD-GUIDE
REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk and JAR file
- Tool for decompiling, : apktool/apkmultitools/ or else (I am currently using apktool 1.5.2)
- notepad++
Settings.apk
Decompile your settings.apk
- Download attached file and merge it to your decompiled Settings.apk
- Settings.apk\res\values\arrays.xml
add this lines to end of it before </resources>
Code:
<string-array name="toast_animation_entries">
<item>@string/toast_none_animation</item>
<item>@string/toast_default_animation</item>
<item>@string/toast_fade_animation</item>
<item>@string/toast_SlideLeftRight_animation</item>
<item>@string/toast_SlideRightLeft_animation</item>
<item>@string/toast_SlideRight_animation</item>
<item>@string/toast_SlideLeft_animation</item>
<item>@string/toast_Xylon_animation</item>
<item>@string/toast_Toko_animation</item>
<item>@string/toast_Tn_animation</item>
<item>@string/toast_Honami_animation</item>
<item>@string/toast_FastFade_animation</item>
<item>@string/toast_GrowFade_animation</item>
<item>@string/toast_GrowFadeCenter_animation</item>
<item>@string/toast_GrowFadeBottom_animation</item>
<item>@string/toast_Translucent_animation</item>
</string-array>
<string-array name="toast_animation_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
<item>14</item>
<item>15</item>
</string-array>
- Settings.apk\res\values\strings.xml
add this lines to end of it before </resources>
Code:
<string name="toast_animation_title">Toast animations</string>
<string name="toast_none_animation">None</string>
<string name="toast_default_animation">Default</string>
<string name="toast_fade_animation">Fade Animation</string>
<string name="toast_SlideRight_animation">SlideRight Animation</string>
<string name="toast_SlideLeft_animation">SlideLeft Animation</string>
<string name="toast_Xylon_animation">Xylon Animation</string>
<string name="toast_Toko_animation">Toko Animation</string>
<string name="toast_Tn_animation">Tn Animation</string>
<string name="toast_Honami_animation">Honami Animation</string>
<string name="toast_FastFade_animation">FastFade Animation</string>
<string name="toast_GrowFade_animation">GrowFade Animation</string>
<string name="toast_GrowFadeCenter_animation">GrowFadeCenter Animation</string>
<string name="toast_GrowFadeBottom_animation">GrowFadeBottom Animation</string>
<string name="toast_Translucent_animation">Translucent Animation</string>
<string name="toast_SlideLeftRight_animation">Slide Left To Right Animation</string>
<string name="toast_SlideRightLeft_animation">Slide Right To Left Animation</string>
- Settings.apk\res\xml\display_settings.xml
put this line
Code:
[COLOR="Red"]<PreferenceScreen android:title="@string/toast_animation_title" android:key="toast_animation" android:fragment="com.android.settings.cyanogenmod.ToastSettings" />[/COLOR]
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/display_settings"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<com.android.settings.BrightnessPreference android:persistent="false" android:title="@string/brightness" />
[COLOR="Red"]<PreferenceScreen android:title="@string/toast_animation_title" android:key="toast_animation" android:fragment="com.android.settings.cyanogenmod.ToastSettings" />[/COLOR]
<PreferenceCategory android:title="@string/display_settings_title" android:key="display_prefs">
<PreferenceScreen android:title="@string/display_rotation_title" android:key="display_rotation" android:fragment="com.android.settings.cyanogenmod.DisplayRotation" />
<ListPreference android:persistent="false" android:entries="@array/screen_timeout_entries" android:title="@string/screen_timeout" android:key="screen_timeout" android:summary="@string/screen_timeout_summary" android:entryValues="@array/screen_timeout_values" />
<com.android.settings.FontDialogPreference android:title="@string/title_font_size" android:key="font_size" android:summary="@string/summary_font_size" android:dialogTitle="@string/dialog_title_font_size" />
<PreferenceScreen android:title="@string/screensaver_settings_title" android:key="screensaver" android:fragment="com.android.settings.DreamSettings" />
<PreferenceScreen android:title="@string/wifi_display_settings_title" android:key="wifi_display" android:fragment="com.android.settings.wfd.WifiDisplaySettings" />
</PreferenceCategory>
but you can put the line whereever you like,.. Can be placed in other xml
- Recompile your Settings.apk
- Decompile the newly recompiled APK again
go to your secondly decompiled Settings.apk\res\values\public.xml
and let it stay open .
Pay attention to this 0x7f?????? !!!
- Now go to Settings.apk\smali\com\android\settings\cyanogenmod\ToastSettings.smali
search this -> const v21, 0x7f05007a
change this -> 0x7f05007a , according to the value you got in your own public.xml
Code:
<public type="xml" name="toast_settings" id="0x7f?????? />
- Done and save
- Recompile it
- Next, go to framework-res.apk...
framework-res.apk
Decompile your framework-res.apk
- Download attached file and merge it to your decompiled framework-res.apk
- framework-res.apk\res\values\styles.xml
add this lines to end of it before </resources>
Code:
<style name="Animation.Toast.Fade" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/fade_in</item>
<item name="windowExitAnimation">@anim/fade_out</item>
</style>
<style name="Animation.Toast.SlideRight" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/slide_in_right</item>
<item name="windowExitAnimation">@anim/slide_out_right</item>
</style>
<style name="Animation.Toast.SlideLeft" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/slide_in_left</item>
<item name="windowExitAnimation">@anim/slide_out_left</item>
</style>
<style name="Animation.Toast.SlideRightLeft" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/slide_in_right</item>
<item name="windowExitAnimation">@anim/slide_out_left</item>
</style>
<style name="Animation.Toast.SlideLeftRight" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/slide_in_left</item>
<item name="windowExitAnimation">@anim/slide_out_right</item>
</style>
<style name="Animation.Toast.Xylon" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/xylon_toast_enter</item>
<item name="windowExitAnimation">@anim/xylon_toast_exit</item>
</style>
<style name="Animation.Toast.Toko" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/toko_toast_enter</item>
<item name="windowExitAnimation">@anim/toko_toast_exit</item>
</style>
<style name="Animation.Toast.Tn" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/tn_toast_enter</item>
<item name="windowExitAnimation">@anim/tn_toast_exit</item>
</style>
<style name="Animation.Toast.Honami" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/honami_toast_enter</item>
<item name="windowExitAnimation">@anim/honami_toast_exit</item>
</style>
<style name="Animation.Toast.FastFade" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/fast_fade_in</item>
<item name="windowExitAnimation">@anim/fast_fade_out</item>
</style>
<style name="Animation.Toast.GrowFade" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/grow_fade_in</item>
<item name="windowExitAnimation">@anim/fast_fade_out</item>
</style>
<style name="Animation.Toast.GrowFadeCenter" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/grow_fade_in_center</item>
<item name="windowExitAnimation">@anim/fast_fade_out</item>
</style>
<style name="Animation.Toast.GrowFadeBottom" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/grow_fade_in_from_bottom</item>
<item name="windowExitAnimation">@anim/fast_fade_out</item>
</style>
<style name="Animation.Toast.Translucent" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/translucent_enter</item>
<item name="windowExitAnimation">@anim/translucent_exit</item>
</style>
- save and Recompile it
- Decompile the newly recompiled APK again
go to your secondly decompiled framework-res.apk\res\values\public.xml
and let it stay open ...
- Now go to framework.jar...
framework.jar
- Decompile/baksmali your framework.jar
- Navigate to framework.jar.out/smali/android/widget/Toast$TN.smali
- search .method public handleShow()V
Code:
.method public handleShow()V
.locals 6
.prologue
const/high16 v5, 0x3f80
.line 376
iget-object v3, p0, Landroid/widget/Toast$TN;->mView:Landroid/view/View;
iget-object v4, p0, Landroid/widget/Toast$TN;->mNextView:Landroid/view/View;
if-eq v3, v4, :cond_4
.line 378
invoke-virtual {p0}, Landroid/widget/Toast$TN;->handleHide()V
.line 379
iget-object v3, p0, Landroid/widget/Toast$TN;->mNextView:Landroid/view/View;
iput-object v3, p0, Landroid/widget/Toast$TN;->mView:Landroid/view/View;
.line 380
iget-object v3, p0, Landroid/widget/Toast$TN;->mView:Landroid/view/View;
invoke-virtual {v3}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v3
invoke-virtual {v3}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object v1
.line 381
.local v1, context:Landroid/content/Context;
if-nez v1, :cond_0
.line 382
iget-object v3, p0, Landroid/widget/Toast$TN;->mView:Landroid/view/View;
invoke-virtual {v3}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v1
.line 384
:cond_0
const-string/jumbo v3, "window"
invoke-virtual {v1, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v3
check-cast v3, Landroid/view/WindowManager;
iput-object v3, p0, Landroid/widget/Toast$TN;->mWM:Landroid/view/WindowManager;
.line 387
iget-object v3, p0, Landroid/widget/Toast$TN;->mView:Landroid/view/View;
invoke-virtual {v3}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v3
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
invoke-virtual {v3}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
move-result-object v0
.line 388
.local v0, config:Landroid/content/res/Configuration;
iget v3, p0, Landroid/widget/Toast$TN;->mGravity:I
invoke-virtual {v0}, Landroid/content/res/Configuration;->getLayoutDirection()I
move-result v4
invoke-static {v3, v4}, Landroid/view/Gravity;->getAbsoluteGravity(II)I
move-result v2
.line 389
.local v2, gravity:I
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
iput v2, v3, Landroid/view/WindowManager$LayoutParams;->gravity:I
.line 390
and-int/lit8 v3, v2, 0x7
const/4 v4, 0x7
if-ne v3, v4, :cond_1
.line 391
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
iput v5, v3, Landroid/view/WindowManager$LayoutParams;->horizontalWeight:F
.line 393
:cond_1
and-int/lit8 v3, v2, 0x70
const/16 v4, 0x70
if-ne v3, v4, :cond_2
.line 394
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
iput v5, v3, Landroid/view/WindowManager$LayoutParams;->verticalWeight:F
.line 396
:cond_2
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
iget v4, p0, Landroid/widget/Toast$TN;->mX:I
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->x:I
.line 397
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
iget v4, p0, Landroid/widget/Toast$TN;->mY:I
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->y:I
.line 398
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
iget v4, p0, Landroid/widget/Toast$TN;->mVerticalMargin:F
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->verticalMargin:F
.line 399
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
iget v4, p0, Landroid/widget/Toast$TN;->mHorizontalMargin:F
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->horizontalMargin:F
.line 400
iget-object v3, p0, Landroid/widget/Toast$TN;->mView:Landroid/view/View;
invoke-virtual {v3}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
move-result-object v3
if-eqz v3, :cond_3
.line 402
iget-object v3, p0, Landroid/widget/Toast$TN;->mWM:Landroid/view/WindowManager;
iget-object v4, p0, Landroid/widget/Toast$TN;->mView:Landroid/view/View;
invoke-interface {v3, v4}, Landroid/view/WindowManager;->removeView(Landroid/view/View;)V
.line 405
:cond_3
iget-object v3, p0, Landroid/widget/Toast$TN;->mWM:Landroid/view/WindowManager;
iget-object v4, p0, Landroid/widget/Toast$TN;->mView:Landroid/view/View;
iget-object v5, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
invoke-interface {v3, v4, v5}, Landroid/view/WindowManager;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
.line 406
invoke-direct {p0}, Landroid/widget/Toast$TN;->trySendAccessibilityEvent()V
.line 408
.end local v0 #config:Landroid/content/res/Configuration;
.end local v1 #context:Landroid/content/Context;
.end local v2 #gravity:I
:cond_4
return-void
.end method
- Replace all with this :
Code:
[COLOR="Red"].method public handleShow()V
.locals 7
.prologue
const/high16 v6, 0x3f80
.line 377
iget-object v3, p0, Landroid/widget/Toast$TN;->mView:Landroid/view/View;
iget-object v4, p0, Landroid/widget/Toast$TN;->mNextView:Landroid/view/View;
if-eq v3, v4, :cond_4
.line 379
invoke-virtual {p0}, Landroid/widget/Toast$TN;->handleHide()V
.line 380
iget-object v3, p0, Landroid/widget/Toast$TN;->mNextView:Landroid/view/View;
iput-object v3, p0, Landroid/widget/Toast$TN;->mView:Landroid/view/View;
.line 381
iget-object v3, p0, Landroid/widget/Toast$TN;->mView:Landroid/view/View;
invoke-virtual {v3}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v3
invoke-virtual {v3}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object v1
.line 382
.local v1, context:Landroid/content/Context;
if-nez v1, :cond_0
.line 383
iget-object v3, p0, Landroid/widget/Toast$TN;->mView:Landroid/view/View;
invoke-virtual {v3}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v1
.line 385
:cond_0
const-string/jumbo v3, "window"
invoke-virtual {v1, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v3
check-cast v3, Landroid/view/WindowManager;
iput-object v3, p0, Landroid/widget/Toast$TN;->mWM:Landroid/view/WindowManager;
.line 388
iget-object v3, p0, Landroid/widget/Toast$TN;->mView:Landroid/view/View;
invoke-virtual {v3}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v3
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
invoke-virtual {v3}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
move-result-object v0
.line 389
.local v0, config:Landroid/content/res/Configuration;
iget v3, p0, Landroid/widget/Toast$TN;->mGravity:I
invoke-virtual {v0}, Landroid/content/res/Configuration;->getLayoutDirection()I
move-result v4
invoke-static {v3, v4}, Landroid/view/Gravity;->getAbsoluteGravity(II)I
move-result v2
.line 390
.local v2, gravity:I
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string/jumbo v4, "toast_animation"
const/4 v5, 0x1
invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
packed-switch v3, :pswitch_data_0
.line 440
:goto_0
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
iput v2, v3, Landroid/view/WindowManager$LayoutParams;->gravity:I
.line 441
and-int/lit8 v3, v2, 0x7
const/4 v4, 0x7
if-ne v3, v4, :cond_1
.line 442
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
iput v6, v3, Landroid/view/WindowManager$LayoutParams;->horizontalWeight:F
.line 444
:cond_1
and-int/lit8 v3, v2, 0x70
const/16 v4, 0x70
if-ne v3, v4, :cond_2
.line 445
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
iput v6, v3, Landroid/view/WindowManager$LayoutParams;->verticalWeight:F
.line 447
:cond_2
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
iget v4, p0, Landroid/widget/Toast$TN;->mX:I
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->x:I
.line 448
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
iget v4, p0, Landroid/widget/Toast$TN;->mY:I
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->y:I
.line 449
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
iget v4, p0, Landroid/widget/Toast$TN;->mVerticalMargin:F
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->verticalMargin:F
.line 450
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
iget v4, p0, Landroid/widget/Toast$TN;->mHorizontalMargin:F
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->horizontalMargin:F
.line 451
iget-object v3, p0, Landroid/widget/Toast$TN;->mView:Landroid/view/View;
invoke-virtual {v3}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
move-result-object v3
if-eqz v3, :cond_3
.line 453
iget-object v3, p0, Landroid/widget/Toast$TN;->mWM:Landroid/view/WindowManager;
iget-object v4, p0, Landroid/widget/Toast$TN;->mView:Landroid/view/View;
invoke-interface {v3, v4}, Landroid/view/WindowManager;->removeView(Landroid/view/View;)V
.line 456
:cond_3
iget-object v3, p0, Landroid/widget/Toast$TN;->mWM:Landroid/view/WindowManager;
iget-object v4, p0, Landroid/widget/Toast$TN;->mView:Landroid/view/View;
iget-object v5, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
invoke-interface {v3, v4, v5}, Landroid/view/WindowManager;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
.line 457
invoke-direct {p0}, Landroid/widget/Toast$TN;->trySendAccessibilityEvent()V
.line 459
.end local v0 #config:Landroid/content/res/Configuration;
.end local v1 #context:Landroid/content/Context;
.end local v2 #gravity:I
:cond_4
return-void
.line 392
.restart local v0 #config:Landroid/content/res/Configuration;
.restart local v1 #context:Landroid/content/Context;
.restart local v2 #gravity:I
:pswitch_0
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
const/4 v4, -0x1
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
goto :goto_0
.line 395
:pswitch_1
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
const v4, 0x1030004
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
goto :goto_0
.line 398
:pswitch_2
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
const v4, 0x1030324
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
goto :goto_0
.line 401
:pswitch_3
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
const v4, 0x1030328
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
goto :goto_0
.line 404
:pswitch_4
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
const v4, 0x1030327
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
goto :goto_0
.line 407
:pswitch_5
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
const v4, 0x1030325
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
goto :goto_0
.line 410
:pswitch_6
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
const v4, 0x1030326
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
goto :goto_0
.line 413
:pswitch_7
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
const v4, 0x1030329
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
goto/16 :goto_0
.line 416
:pswitch_8
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
const v4, 0x103032a
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
goto/16 :goto_0
.line 419
:pswitch_9
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
const v4, 0x103032b
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
goto/16 :goto_0
.line 422
:pswitch_a
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
const v4, 0x103032c
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
goto/16 :goto_0
.line 425
:pswitch_b
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
const v4, 0x103032d
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
goto/16 :goto_0
.line 428
:pswitch_c
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
const v4, 0x103032e
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
goto/16 :goto_0
.line 431
:pswitch_d
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
const v4, 0x103032f
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
goto/16 :goto_0
.line 434
:pswitch_e
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
const v4, 0x1030330
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
goto/16 :goto_0
.line 437
:pswitch_f
iget-object v3, p0, Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
const v4, 0x1030331
iput v4, v3, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
goto/16 :goto_0
.line 390
nop
:pswitch_data_0
.packed-switch 0x0
:pswitch_0
:pswitch_1
:pswitch_2
:pswitch_3
:pswitch_4
:pswitch_5
:pswitch_6
:pswitch_7
:pswitch_8
:pswitch_9
:pswitch_a
:pswitch_b
:pswitch_c
:pswitch_d
:pswitch_e
:pswitch_f
.end packed-switch
.end method[/COLOR]
- Then search const v4, 0x1030004
ATTENTION! id public for framework.jar
just TAKE the BLUE CODE
and SKIP the RED CODE
1. change this -> 0x1030004 , according to the value you got in your own public.xml of framework-res.apk
Code:
<public type="style" name="Animation.Toast" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
do it too to all lines below, in the smali
2. const v4, 0x1030324
Code:
<public type="style" name="Animation.Toast.Fade" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
3. const v4, 0x1030328
Code:
<public type="style" name="Animation.Toast.SlideLeftRight" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
4. const v4, 0x1030327
Code:
<public type="style" name="Animation.Toast.SlideRightLeft" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
5. const v4, 0x1030325
Code:
<public type="style" name="Animation.Toast.SlideRight" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
6. const v4, 0x1030326
Code:
<public type="style" name="Animation.Toast.SlideLeft" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
7. const v4, 0x1030329
Code:
<public type="style" name="Animation.Toast.Xylon" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
8. const v4, 0x103032a
Code:
<public type="style" name="Animation.Toast.Toko" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
9. const v4, 0x103032b
Code:
<public type="style" name="Animation.Toast.Tn" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
10. const v4, 0x103032c
Code:
<public type="style" name="Animation.Toast.Honami" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
11. const v4, 0x103032d
Code:
<public type="style" name="Animation.Toast.FastFade" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
12. const v4, 0x103032e
Code:
<public type="style" name="Animation.Toast.GrowFade" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
13. const v4, 0x103032f
Code:
<public type="style" name="Animation.Toast.GrowFadeCenter" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
14. const v4, 0x1030330
Code:
<public type="style" name="Animation.Toast.GrowFadeBottom" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
15. const v4, 0x1030331
Code:
<public type="style" name="Animation.Toast.Translucent" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
- save and Recompile it
if all thats finished .. then input all to system .. , can be manual , and can also use flashable.zip ,,
make sure you BACKUP first ,
make sure you BACKUP first ,
make sure you BACKUP first ,
Have Nice Moding..
Good Luck
reserved..
reserved...
I love this tutorials! Thank you very much!
It's working on Note3 N9005MIUIv6 (4.4.2 TouchWiz based), with some lines slighty retouched. All it's working fine (menu, animations), but produces FC when I select one of the anims, before "preview toast" show up. Logcat indicates the app stops at tag .line 659, (ToastSettings.smali)
move-result-object v8
aget-object v8, v8, v2
invoke-virtual {v5, v8}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequenceV
.line 659
iget-object v5, p0, Lcom/android/settings/cyanogenmod/ToastSettings;->mContext:Landroid/content/Context;
const-string v8, "Test toast animation"
invoke-static {v5, v8, v7}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v5
invoke-virtual {v5}, Landroid/widget/Toast;->show()V
goto :goto_1
I don't know how fix this small part. Thanks in advance.
PD: I´m using framework2.jar instead of framework.jar
Atrankas said:
I love this tutorials! Thank you very much!
It's working on Note3 N9005MIUIv6 (4.4.2 TouchWiz based), with some lines slighty retouched. All it's working fine (menu, animations), but produces FC when I select one of the anims, before "preview toast" show up. Logcat indicates the app stops at tag .line 659, (ToastSettings.smali)
move-result-object v8
aget-object v8, v8, v2
invoke-virtual {v5, v8}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequenceV
.line 659
iget-object v5, p0, Lcom/android/settings/cyanogenmod/ToastSettings;->mContext:Landroid/content/Context;
const-string v8, "Test toast animation"
invoke-static {v5, v8, v7}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v5
invoke-virtual {v5}, Landroid/widget/Toast;->show()V
goto :goto_1
I don't know how fix this small part. Thanks in advance.
PD: I´m using framework2.jar instead of framework.jar
Click to expand...
Click to collapse
use smali on attachments
- add on strings.xml
Code:
<string name="toast_test_animation">Test toast animation</string>
- decompile-recompile
- change ids
Code:
const v1, 0x7f050077 ---------- <public type="xml" name="toast_settings" id=
const v5, 0x7f080ca1 ---------- <public type="string" name="toast_test_animation" id=
- recompile
Thanks for your reply, @qoejohn. I have the same error with this new code (FC when I touch one of the element from the list, but the animation is applied correctly).
Logcat
java.lang.NoSuchFieldError:
com.android.settings.cyanogenmod.ToastSettings.mContext
at
com.android.settings.cyanogenmod.ToastSettings.onPreferenceChange(ToastSettings.java:659)
at
android.preference.Preference.callChangeListener(Preference.java)
at
android.preference.ListPreference.onDialogClosed(ListPreference.java)
at
android.preference.DialogPreference.onDismiss(DialogPreference.java)
at
android.app.Dialog$ListenersHandler.handleMessage(Dialog.java)
at android.os.Handler.dispatchMessage(Handler.java)
at android.os.Looper.loop(Looper.java)
at android.app.ActivityThread.main(ActivityThread.java)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
at dalvik.system.NativeStart.main(Native Method)
On the other hand, if I replace the line in xml
<PreferenceScreen android:title="@string/toast_animation_title" android:key="toast_animation" android:fragment="com.android.settings.cyanogenmod.ToastSettings" />
with
<PreferenceScreen android:title="@string/toast_animation_title" android:key="toast_animation" android:fragment="com.android.settings.cyanogenmod.animations.ToastAnimationInterfaceSettings" /> ,the FC is gone, but no effect is applied.
I'll keep on trying, thanks for your time
Atrankas said:
Thanks for your reply, @qoejohn. I have the same error with this new code (FC when I touch one of the element from the list, but the animation is applied correctly).
Logcat
java.lang.NoSuchFieldError:
com.android.settings.cyanogenmod.ToastSettings.mContext
at
com.android.settings.cyanogenmod.ToastSettings.onPreferenceChange(ToastSettings.java:659)
at
android.preference.Preference.callChangeListener(Preference.java)
at
android.preference.ListPreference.onDialogClosed(ListPreference.java)
at
android.preference.DialogPreference.onDismiss(DialogPreference.java)
at
android.app.Dialog$ListenersHandler.handleMessage(Dialog.java)
at android.os.Handler.dispatchMessage(Handler.java)
at android.os.Looper.loop(Looper.java)
at android.app.ActivityThread.main(ActivityThread.java)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
at dalvik.system.NativeStart.main(Native Method)
On the other hand, if I replace the line in xml
<PreferenceScreen android:title="@string/toast_animation_title" android:key="toast_animation" android:fragment="com.android.settings.cyanogenmod.ToastSettings" />
with
<PreferenceScreen android:title="@string/toast_animation_title" android:key="toast_animation" android:fragment="com.android.settings.cyanogenmod.animations.ToastAnimationInterfaceSettings" /> ,the FC is gone, but no effect is applied.
I'll keep on trying, thanks for your time
Click to expand...
Click to collapse
change smali on .jar,, with this
and change id's
on const-string v8, "Test toast animation" change to const-string v8, "test_toast_animation" save and recompile

Categories

Resources