[Guide]how To port Ics Lockscreen To Gb Devices[Apply to SGY] - Galaxy Y GT-S5360 General

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

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.

[How To] SecMms mods

Replace code = BLUE
Remove code = RED
Add code = GREEN
Based on I337UCUAMDL
Here we go:
Add toggle to disable Screen ON when receiving a message:
Go here: \SecMms\smali\com\android\mms\ui\MessagingPreferenceActivity.smali
Change this:
Code:
.line 876
.local v2, NotiCategory:Landroid/preference/PreferenceCategory;
invoke-static {}, Lcom/android/mms/MmsConfig;->getEnableNotificationBacklight()Z
move-result v10
if-nez v10, :cond_7
.line 877
const-string v10, "pref_key_backlight"
invoke-virtual {p0, v10}, Lcom/android/mms/ui/MessagingPreferenceActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v10
[COLOR=red] invoke-direct {p0, v2, v10}, Lcom/android/mms/ui/MessagingPreferenceActivity;->removePreference(Landroid/preference/PreferenceGroup;Landroid/preference/Preference;)V[/COLOR]
.line 879
:cond_7
invoke-static {}, Lcom/android/mms/MmsConfig;->getEnableCmas()Z
move-result v10
if-eqz v10, :cond_8
invoke-static {}, Lcom/android/mms/MmsConfig;->getCMASProvider()I
move-result v10
To this:
Code:
.line 876
.local v2, NotiCategory:Landroid/preference/PreferenceCategory;
invoke-static {}, Lcom/android/mms/MmsConfig;->getEnableNotificationBacklight()Z
move-result v10
if-nez v10, :cond_7
.line 877
const-string v10, "pref_key_backlight"
invoke-virtual {p0, v10}, Lcom/android/mms/ui/MessagingPreferenceActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v10
.line 879
:cond_7
invoke-static {}, Lcom/android/mms/MmsConfig;->getEnableCmas()Z
move-result v10
if-eqz v10, :cond_8
invoke-static {}, Lcom/android/mms/MmsConfig;->getCMASProvider()I
move-result v10
Increase Limits, Image sending resolution, Message Save/Restore Function
Go here: \SecMms\smali\com\android\mms\MmsConfig.smali
MMS Max size to 1024000 bytes:
Change this:
Code:
.line 151
sput-boolean v2, Lcom/android/mms/MmsConfig;->mMmsWidgetEnabled:Z
.line 152
const v0, 0x4b000
sput v0, Lcom/android/mms/MmsConfig;->mMaxMessageSize:I
To this:
Code:
.line 151
sput-boolean v2, Lcom/android/mms/MmsConfig;->mMmsWidgetEnabled:Z
.line 152
const v0, [COLOR=blue]0xfa000[/COLOR]
sput v0, Lcom/android/mms/MmsConfig;->mMaxMessageSize:I
Increase MMS Image size (2048x1536 or 3.2MP):
Change this:
Code:
.line 158
sput-object v4, Lcom/android/mms/MmsConfig;->mEmailGateway:Ljava/lang/String;
.line 159
sget v0, Lcom/android/mms/MmsConfig;->MAX_IMAGE_HEIGHT:I
sput v0, Lcom/android/mms/MmsConfig;->mMaxImageHeight:I
.line 160
sget v0, Lcom/android/mms/MmsConfig;->MAX_IMAGE_WIDTH:I
sput v0, Lcom/android/mms/MmsConfig;->mMaxImageWidth:I
.line 161
const/16 v0, 0x1e0
To this:
Code:
.line 158
sput-object v4, Lcom/android/mms/MmsConfig;->mEmailGateway:Ljava/lang/String;
.line 159
[COLOR=blue]const/16 v0, 0x600[/COLOR]
sput v0, Lcom/android/mms/MmsConfig;->mMaxImageHeight:I
.line 160
[COLOR=blue]const/16 v0, 0x800[/COLOR]
sput v0, Lcom/android/mms/MmsConfig;->mMaxImageWidth:I
.line 161
const/16 v0, 0x1e0
Enable message Save/Restore function:
Change this:
Code:
.method public static getEnableSaveRestoreSDCardMessage()Z
.locals 1
.prologue
.line 907
const/4 v0, 0x0
return v0
.end method
To this:
Code:
.method public static getEnableSaveRestoreSDCardMessage()Z
.locals 1
.prologue
.line 907
[COLOR=blue]const/4 v0, 0x1[/COLOR]
return v0
.end method
Text message limit (1000):
Change this:
Code:
.method public static getMaxRecipientLength()I
.locals 1
.prologue
.line 2510
sget v0, Lcom/android/mms/MmsConfig;->mMaxRecipientLength:I
return v0
.end method
To this:
Code:
.method public static getMaxRecipientLength()I
.locals 1
.prologue
.line 2510
[COLOR=blue]const/16 v0, 0x3e8[/COLOR]
return v0
.end method
Max recipients (1000):
Change this:
Code:
.method public static getMmsMaxRecipient()I
.locals 1
.prologue
.line 2751
sget v0, Lcom/android/mms/MmsConfig;->mMmsRecipientLimit:I
return v0
.end method
To this:
Code:
.method public static getMmsMaxRecipient()I
.locals 1
.prologue
.line 2751
[COLOR=blue]const/16 v0, 0x3e8[/COLOR]
return v0
.end method
Change this:
Code:
.method public static getRecipientLimit()I
.locals 1
.prologue
.line 759
sget v0, Lcom/android/mms/MmsConfig;->mRecipientLimit:I
return v0
.end method
To this:
Code:
.method public static getRecipientLimit()I
.locals 1
.prologue
.line 759
[COLOR=blue]const/16 v0, 0x3e8[/COLOR]
return v0
.end method
Change this:
Code:
.line 1767
const-string v11, "CscFeature_Message_MaxRecipientLengthAs"
invoke-virtual {v1, v11}, Lcom/sec/android/app/CscFeature;->getInteger(Ljava/lang/String;)I
move-result v11
sput v11, Lcom/android/mms/MmsConfig;->mMaxRecipientLength:I
.line 1768
sget v11, Lcom/android/mms/MmsConfig;->mMinRecipientLength:I
To this:
Code:
.line 1767
const-string v11, "CscFeature_Message_MaxRecipientLengthAs"
invoke-virtual {v1, v11}, Lcom/sec/android/app/CscFeature;->getInteger(Ljava/lang/String;)I
move-result v11
[COLOR=green]const/16 v11, 0x3e8[/COLOR]
sput v11, Lcom/android/mms/MmsConfig;->mMaxRecipientLength:I
.line 1768
sget v11, Lcom/android/mms/MmsConfig;->mMinRecipientLength:I
Change this:
Code:
.line 2049
const-string v1, "pref_key_max_recipient"
invoke-interface {v0, v1, v4}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v1
sput v1, Lcom/android/mms/MmsConfig;->mRecipientLimit:I
To this:
Code:
.line 2049
const-string v1, "pref_key_max_recipient"
invoke-interface {v0, v1, v4}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v1
[COLOR=green]const/16 v1, 0x3e8[/COLOR]
sput v1, Lcom/android/mms/MmsConfig;->mRecipientLimit:I
.line 2050
const-string v1, "Mms/MmsConfig"
SMS to MMS Conversion (1000):
Change this:
Code:
.method public static getSmsToMmsTextThreshold()I
.locals 1
.prologue
.line 688
sget v0, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I
return v0
.end method
To this:
Code:
.method public static getSmsToMmsTextThreshold()I
.locals 1
.prologue
.line 688
[COLOR=blue]const/16 v0, 0x3e8[/COLOR]
return v0
.end method
Change this:
Code:
.line 2044
const-string v1, "pref_key_threshold"
const/4 v2, 0x4
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v1
sput v1, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I
.line 2045
const-string v1, "Mms/MmsConfig"
To this:
Code:
.line 2044
const-string v1, "pref_key_threshold"
const/4 v2, 0x4
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v1
[COLOR=green]const/16 v1, 0x3e8[/COLOR]
sput v1, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I
.line 2045
const-string v1, "Mms/MmsConfig"
Thanks:
Wanam for 1000 Recipients and SMS/MMS conversion
FEEL FREE TO USE THIS BUT PLEASE GIVE THANKS TO MYSELF AND WANAM
Saved just in case.
Awesome work!! Works perfectly... thanks a bunch for this. Hate the damn screen coming on for messages.
~If shoman doesnt mind, heres the finished product +no texts added to logs.
sulpher said:
Awesome work!! Works perfectly... thanks a bunch for this. Hate the damn screen coming on for messages.
I'll have to come back to click thanks, spent all mine
~If shoman doesnt mind, heres the finished product +no texts added to logs.
Click to expand...
Click to collapse
Just so you know, the no text to logs is not needed.... The log can be viewed without messages and set that way by default.
shoman94 said:
Just so you know, the no text to logs is not needed.... The log can be viewed without messages and set that way by default.
Click to expand...
Click to collapse
Hmm couldnt figure out how to set it to that default... if i backed out of the log instead of home key or rebooted it was reverting.
sulpher said:
Hmm couldnt figure out how to set it to that default... if i backed out of the log instead of home key or rebooted it was reverting.
Click to expand...
Click to collapse
I'm confused now....lol Mine always reverts to "ALL CALLS" when backing out or rebooting... Not sure of the reason for the differences. This may be something to look into. Are you running your own modded stock that you did yourself or did you use something posted here?
shoman94 said:
I'm confused now....lol Mine always reverts to "ALL CALLS" when backing out or rebooting... Not sure of the reason for the differences. This may be something to look into. Are you running your own modded stock that you did yourself or did you use something posted here?
Click to expand...
Click to collapse
I'm on the odin from here (http://forum.xda-developers.com/showthread.php?t=2261573) plus the OTA... honestly i cant remember if it was doing it when i first got the phone.. i bricked it pretty fast with the xposed framework. Only mod i did myself to it was jeboo's removing sms from call log mod. +stolen's systemui, dev threads framework & secsettings
Cool, I'm going to add a few of these to my Xposed mod, coming soon.
Nottach said:
Cool, I'm going to add a few of these to my Xposed mod, coming soon.
Click to expand...
Click to collapse
I would love too see this as an exposed mod. What u hiding under the sleeve?
How do you know all this stuff
Ok being VERY new to this... where are you finding the \SecMms\smali\com\android\mms\ui\MessagingPreferen ceActivity.smali ???
I'm trying to learn this a bit and some guidance would be appreciated. I want to contribute.
I appologize but I'm on Rogers with I337UCUAMDJ and the APK attached does not seem to work so I'll mod myself.
I only want to eliminate the pop up when screen off. Baby steps.
I always donate to XDA contributors so I'm hoping someone can show me this little tweak. Pay it forward.
Thanks
To fine that file you need a deodexed ROM and have to decompile secmms.apk
If your on a odexed ROM you will not find the smali files
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Ah THANK YOU for this!! I was patiently waiting for this mod.
ibike2much said:
Ok being VERY new to this... where are you finding the \SecMms\smali\com\android\mms\ui\MessagingPreferen ceActivity.smali ???
I'm trying to learn this a bit and some guidance would be appreciated. I want to contribute.
I appologize but I'm on Rogers with I337UCUAMDJ and the APK attached does not seem to work so I'll mod myself.
I only want to eliminate the pop up when screen off. Baby steps.
I always donate to XDA contributors so I'm hoping someone can show me this little tweak. Pay it forward.
Thanks
Click to expand...
Click to collapse
As said above... You must deodex and decompile to get to that file.
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
akira02rex said:
How do you know all this stuff
Click to expand...
Click to collapse
Practice practice practice
Nottach said:
Cool, I'm going to add a few of these to my Xposed mod, coming soon.
Click to expand...
Click to collapse
Cool beans
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
shoman94 said:
Practice practice practice
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Click to expand...
Click to collapse
And a lot of soft bricks/apk's crashing
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Learn how to read logs. Usually logcat will tell you exactly what the error is and where.
shoman94 said:
As said above... You must deodex and decompile to get to that file.
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Click to expand...
Click to collapse
Thanks all. For now I'll let the experts continue your fine work and gladly continue to generously donate.
After dl happens it sayz not installed so I guess we have to push to systems/apps folders
Sent from my SAMSUNG-SGH-I337 using xda app-developers app
azz72 said:
After dl happens it sayz not installed so I guess we have to push to systems/apps folders
Sent from my SAMSUNG-SGH-I337 using xda app-developers app
Click to expand...
Click to collapse
Or use your favorite root explorer to copy/paste/overwrite the apk.
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2

[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 for Micromax a57 / A54/ Samsung galaxy y

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

[Guide/Tut]Adding 5 way reboot menu lollipop

Hello guys Here is a small tut on how to add 5 way advanced reboot menu
This is only for Deodexed files
The Files which need work are
Framework-res.apk
android.policy.jar
framework.jar
services.jar
Things You need are Baksmali version of 1.5
Here you can get it Click here
Apktool
signer tool
Thinking Brain and Patience
First We start with Framework-res.apk
Decompile it
Add these lines here in file /res/values/strings.xml
Code:
<string name="apm_reboot">Reboot</string>
<string name="apm_hotreboot">Hot reboot</string>
<string name="apm_recovery">Recovery</string>
<string name="apm_bootloader">Bootloader</string>
<string name="apm_safemode">Safe mode</string>
Then add these files to images to framework-res.apk View attachment drawable-hdpi.zip
Then Compile and Decompile again ( for public ids )
Ok Now Decompile android.policy.jar ( using Baksmali )
After Decompile Place the files to ( com/android/internal/policy/impl ) path View attachment android.policy.jar.zip
Now After Placing These 7 files open them in NotePad++ ( all 7 files )
Look For the .method private constructor <init> now Replace the Public Ids as per framework-res.apk created ( dont confuse everything was written )
Now Look For GlobalActions.smali and open it on notepad++
Look for
Code:
Lcom/android/internal/policy/impl/GlobalActions$PowerAction;
Then add these lines Above that
Code:
Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsReceiver;,
Lcom/android/internal/policy/impl/GlobalActions$PowerActionBootloader;,
Lcom/android/internal/policy/impl/GlobalActions$PowerActionHotReboot;,
Lcom/android/internal/policy/impl/GlobalActions$PowerActionReboot;,
Lcom/android/internal/policy/impl/GlobalActions$PowerActionRecovery;,
Lcom/android/internal/policy/impl/GlobalActions$PowerActionSafemode;,
Look For
Code:
.field private mHandler:Landroid/os/Handler;
Add Below
Code:
.field private mGlobalActionsReceiver:Landroid/content/BroadcastReceiver;
Look For
Code:
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$7;
invoke-direct {v4, p0}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;)V
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
Add After That These lines
Code:
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsReceiver;
invoke-direct {v4, p0}, Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsReceiver;-><init>(Lcom/android/internal/policy/impl/GlobalActions;)V
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mGlobalActionsReceiver:Landroid/content/BroadcastReceiver;
Look for
Code:
iget-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {p1, v4, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
Add after that code These lines
Code:
new-instance v1, Landroid/content/IntentFilter;
invoke-direct {v1}, Landroid/content/IntentFilter;-><init>()V
const-string v4, "android.intent.action.GLOBAL_ACTION_DIALOG"
invoke-virtual {v1, v4}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
iget-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mGlobalActionsReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {p1, v4, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
Look For
Code:
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$PowerAction;
const/4 v2, 0x0
invoke-direct {v1, p0, v2}, Lcom/android/internal/policy/impl/GlobalActions$PowerAction;-><init>(Lcom/android/internal/policy/impl/GlobalActions;Lcom/android/internal/policy/impl/GlobalActions$1;)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
Add After that
Code:
invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/GlobalActions;->getSysAPMTweak()Z
move-result v2
if-eqz v2, :cond_skip
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialogAdv;
const/4 v2, 0x0
invoke-direct {v1, p0, v2}, Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialogAdv;-><init>(Lcom/android/internal/policy/impl/GlobalActions;Lcom/android/internal/policy/impl/GlobalActions$1;)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
:cond_skip
Find this Method
Code:
.method private createDialog()Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialog;
After that Add this method ( meant after .end method )
Code:
.method private createDialogAdv()Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialog;
.locals 13
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$1;
const v2, 0x1080377 #drawable ic_lock_airplane_mode
const v3, 0x1080379 #drawable ic_lock_airplane_mode_off
const v4, 0x10400fe #string global_actions_toggle_airplane_mode
const v5, 0x10400ff #string global_actions_airplane_mode_on_status
const v6, 0x1040100 #string global_actions_airplane_mode_off_status
move-object v1, p0
invoke-direct/range {v0 .. v6}, Lcom/android/internal/policy/impl/GlobalActions$1;-><init>(Lcom/android/internal/policy/impl/GlobalActions;IIIII)V
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$PowerActionReboot;
const/4 v2, 0x0
invoke-direct {v1, p0, v2}, Lcom/android/internal/policy/impl/GlobalActions$PowerActionReboot;-><init>(Lcom/android/internal/policy/impl/GlobalActions;Lcom/android/internal/policy/impl/GlobalActions$1;)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$PowerActionHotReboot;
const/4 v2, 0x0
invoke-direct {v1, p0, v2}, Lcom/android/internal/policy/impl/GlobalActions$PowerActionHotReboot;-><init>(Lcom/android/internal/policy/impl/GlobalActions;Lcom/android/internal/policy/impl/GlobalActions$1;)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$PowerActionBootloader;
const/4 v2, 0x0
invoke-direct {v1, p0, v2}, Lcom/android/internal/policy/impl/GlobalActions$PowerActionBootloader;-><init>(Lcom/android/internal/policy/impl/GlobalActions;Lcom/android/internal/policy/impl/GlobalActions$1;)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$PowerActionRecovery;
const/4 v2, 0x0
invoke-direct {v1, p0, v2}, Lcom/android/internal/policy/impl/GlobalActions$PowerActionRecovery;-><init>(Lcom/android/internal/policy/impl/GlobalActions;Lcom/android/internal/policy/impl/GlobalActions$1;)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$PowerActionSafemode;
const/4 v2, 0x0
invoke-direct {v1, p0, v2}, Lcom/android/internal/policy/impl/GlobalActions$PowerActionSafemode;-><init>(Lcom/android/internal/policy/impl/GlobalActions;Lcom/android/internal/policy/impl/GlobalActions$1;)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$MyAdapter;
const/4 v1, 0x0
invoke-direct {v0, p0, v1}, Lcom/android/internal/policy/impl/GlobalActions$MyAdapter;-><init>(Lcom/android/internal/policy/impl/GlobalActions;Lcom/android/internal/policy/impl/GlobalActions$1;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAdapter:Lcom/android/internal/policy/impl/GlobalActions$MyAdapter;
new-instance v12, Lcom/android/internal/app/AlertController$AlertParams;
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-direct {v12, v0}, Lcom/android/internal/app/AlertController$AlertParams;-><init>(Landroid/content/Context;)V
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAdapter:Lcom/android/internal/policy/impl/GlobalActions$MyAdapter;
iput-object v0, v12, Lcom/android/internal/app/AlertController$AlertParams;->mAdapter:Landroid/widget/ListAdapter;
iput-object p0, v12, Lcom/android/internal/app/AlertController$AlertParams;->mOnClickListener:Landroid/content/DialogInterface$OnClickListener;
const/4 v0, 0x1
iput-boolean v0, v12, Lcom/android/internal/app/AlertController$AlertParams;->mForceInverseBackground:Z
new-instance v10, Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialog;
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-direct {v10, v0, v12}, Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialog;-><init>(Landroid/content/Context;Lcom/android/internal/app/AlertController$AlertParams;)V
const/4 v0, 0x0
invoke-virtual {v10, v0}, Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialog;->setCanceledOnTouchOutside(Z)V
invoke-virtual {v10}, Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialog;->getListView()Landroid/widget/ListView;
move-result-object v0
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/widget/ListView;->setItemsCanFocus(Z)V
invoke-virtual {v10}, Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialog;->getListView()Landroid/widget/ListView;
move-result-object v0
invoke-virtual {v10}, Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialog;->getWindow()Landroid/view/Window;
move-result-object v0
const/16 v1, 0x7d9
invoke-virtual {v0, v1}, Landroid/view/Window;->setType(I)V
invoke-virtual {v10, p0}, Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialog;->setOnDismissListener(Landroid/content/DialogInterface$OnDismissListener;)V
return-object v10
.end method
Now find
Code:
# virtual methods
Add after this below code
Code:
.method public getSysAPMTweak()Z
.locals 4
const/4 v0, -0x1
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "tweaks_apm"
const/4 v3, -0x2
invoke-static {v1, v2, v0, v3}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
move-result v1
if-nez v1, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_0
const/4 v0, 0x1
goto :goto_0
.end method
Now Find this method
Code:
.method public showDialog(ZZ)V
After that Add this method (after .end method )
Code:
.method public showDialogAdv()V
.locals 2
invoke-direct {p0}, Lcom/android/internal/policy/impl/GlobalActions;->createDialogAdv()Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialog;
move-result-object v0
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mDialog:Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialog;
invoke-direct {p0}, Lcom/android/internal/policy/impl/GlobalActions;->prepareDialog()V
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mDialog:Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialog;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialog;->show()V
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mDialog:Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialog;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialog;->getWindow()Landroid/view/Window;
move-result-object v0
invoke-virtual {v0}, Landroid/view/Window;->getDecorView()Landroid/view/View;
move-result-object v0
const/high16 v1, 0x10000
invoke-virtual {v0, v1}, Landroid/view/View;->setSystemUiVisibility(I)V
return-void
.end method
Now recompile Classes and replace the classes.dex with android.policy.jar and sign it
Here it was end with the Android.policy.jar ( be sure with Public ids )
If you have any doubts or conflict as not found just compare my file to fix this ( compile file View attachment compare.zip )
Next step will be in second post (below )
Continue 2 Framwework.jar
Decompile framwork.jar
Find and open WindowManagerPolicy$WindowManagerFuncs.smali
Look for
Code:
.method public abstract rebootSafeMode(Z)V
.end method
Add method before that this method
Code:
.method public abstract reboot(Ljava/lang/String;Z)V
.end method
now recompile and sign the file
Now go for third method in next post ( final )
Final part Service.jar
First Decompile the service.jar
and then disable the signature verification
Tut is here
then look for services\smali\com\android\server\wm\WindowManagerService.smali
open it in notepad++ and find this method
Code:
.method public rebootSafeMode(Z)V
Before that method Add this method
Code:
.method public reboot(Ljava/lang/String;Z)V
.locals 3
iget-object v0, p0, Lcom/android/server/wm/WindowManagerService;->mContext:Landroid/content/Context;
invoke-static {v0, p1, p2}, Lcom/android/server/power/ShutdownThread;->reboot(Landroid/content/Context;Ljava/lang/String;Z)V
return-void
.end method
Now recompile the service.jar
So the compiled files are Framework-re.apk, framework.jar, service.jar, android.policy.jar
Now replace then and reboot and you are done guys
Have fun
Credits:- lyapota and S0bes
Great work bro. Keep up the good work
Awesome Tut RXS bro ^^
Very usefull
Verstuurd vanaf mijn D6603 met Tapatalk
Awesome tutorial bro!!
Was waiting for it
Very cool, thanks!
Is there anyway to stop the reboot menu from showing if the device is locked? It'd be handy if somebody couldn't steal my phone and get into recovery..
Just tested, Aaaaaand it's working
Thanks bro!
venkat kamesh said:
Decompile framwork.jar
Find and open WindowManagerPolicy$WindowManagerFuncs.smali
Look for
Code:
.method public abstract rebootSafeMode(Z)V
.end method
Add method before that this method
Code:
.method public abstract reboot(Ljava/lang/String;Z)V
.end method
now recompile and sign the file
Now go for third method in next post ( final )
Click to expand...
Click to collapse
@venkat kamesh First of all, thank you for sharing this tut! Please mention where this file is so that newbies can find it instead of searching in whole directory.. smali_classes2/android/view/WindowManagerPolicy$WindowManagerFuncs.smali
the images you have given are little blurry so I have created new set of images if you want to share..Please find it in attachments..
Now about my experience, I tried this guide on CM12.1 but ran into some issues like all the buttons were performing only soft reboot (Hot reboot) instead of carrying out their functionality..Don't know the cause though! Will figure it out soon..
venkat kamesh said:
Decompile framwork.jar
Find and open WindowManagerPolicy$WindowManagerFuncs.smali
Look for
Code:
.method public abstract rebootSafeMode(Z)V
.end method
Add method before that this method
Code:
.method public abstract reboot(Ljava/lang/String;Z)V
.end method
now recompile and sign the file
Now go for third method in next post ( final )
Click to expand...
Click to collapse
WindowManagerPolicy$WindowManagerFuncs.smali not found
Hi @venkat kamesh first thanks for this tutorial. I ve follow this but i dont get any result. I tried with the files for the z1 firmware .236. could you please have a look? if there is something wrong? I attach the zip i ve made. cheers
advance_power.zip 27.6 MB
https://mega.nz/#!fxB3WLDZ!K46Adp8rvyG3EjUaIYgCk1ePSorO-FgL7Lxs1Obehtg
Someone knows how to change the "Smokkie Reboot Options" string?
http://i.imgur.com/reu88bh.png
BlackMesa123 said:
Someone knows how to change the "Smokkie Reboot Options" string?
http://i.imgur.com/reu88bh.png
Click to expand...
Click to collapse
In framework-res.apk >decompile>res>values>strings>search for "Smokkie Reboot Options", replace to whatever you want.
jitz975 said:
In framework-res.apk >decompile>res>values>strings>search for "Smokkie Reboot Options", replace to whatever you want.
Click to expand...
Click to collapse
Notepad++ says that it hasnt finded it
juanpirulo said:
Hi @venkat kamesh first thanks for this tutorial. I ve follow this but i dont get any result. I tried with the files for the z1 firmware .236. could you please have a look? if there is something wrong? I attach the zip i ve made. cheers
advance_power.zip27.6 MB
https://mega.nz/#!fxB3WLDZ!K46Adp8rvyG3EjUaIYgCk1ePSorO-FgL7Lxs1Obehtg
Click to expand...
Click to collapse
New apktool don't give result of adding codes
Best thing is
Try using baksmali bro
It works
BlackMesa123 said:
Someone knows how to change the "Smokkie Reboot Options" string?
http://i.imgur.com/reu88bh.png
Click to expand...
Click to collapse
Hmm you need to define the header code in smali
:good::good::good:
If i press recovery,bootloader,reboot and etc. buttons,phone hot rebooting. It can't start on recovery ,bootloader mode. Any solution?
Hi @venkat kamesh bro I don't have the code
Code:
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$7;
invoke-direct {v4, p0}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;)V
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
in my GlobalActions.smali and the GlobalActions.smali file you provide for comparison
Can you look at it?
venkat kamesh said:
New apktool don't give result of adding codes
Best thing is
Try using baksmali bro
It works
Hmm you need to define the header code in smali
Click to expand...
Click to collapse
Any response to my latest post?
lordriguez said:
Any response to my latest post?
Click to expand...
Click to collapse
hmm that line was not much mandatory bro ( i meant which haven't found )
in this code
Code:
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="Red"]7[/COLOR];
the red value may be varied
you can look for 10 or 12 or what ever there ( this line is example of persists to add new instance )
in my smali i had 7 and other
i had aaded after that line
hope you got what i mean
good luck bro

Categories

Resources