Related
I found this:
http://forum.xda-developers.com/showthread.php?t=1483193
Can someone do this pls
???????
Sent from my Dell Streak using XDA App
DISCLAIMER:This is not my work,. i am just reposting
Requirement:
1. decompiled Framework.jar with Baksmali manager
2. decompiled SystemUI.apk with APK Multi Tool
3. Some Basic understanding about editing xml file and smali code.
4. WinMerge or other comparison tool (to better editing and comparing with my sample file)
5. Backup the framework.jar and SystemUI.apk first!
Files to be edited:
in SystemUI.apk
res/anim/
res/layout/status_bar_latest_event.xml
res/values/public.xml
smali/com/android/systemui/statusbar/LatestItemContainer$1.smali
smali/com/android/systemui/statusbar/LatestItemContainer.smali
smali/com/android/systemui/statusbar/StatusBarService$7.smali (or depends on your numbering, could be $8 or larger)
smali/com/android/systemui/statusbar/StatusBarService.smali
in framework.jar:
smali/com/android/internal/statusbar/IStatusBarService$Stub$Proxy.smali
smali/com/android/internal/statusbar/IStatusBarService$Stub.smali
smali/com/android/internal/statusbar/IStatusBarService.smali
UPDATE: This is the additional guide for other device when editing StatusBarService.smali. See here:
1. HTC based
2. Samsung based
Alright, let's mod one by one
1. Editing SystemUI.apk
1.1 Editing res/anim
We are registering anim object here, so swipe animation can be done.
Create folder anim (if not exists yet) inside /res folder
Create 2 file named slide_out_left_basic.xml and slide_out_right_basic.xml inside res/anim folder
for slide_out_left_basic.xml, edit the file and fill with this
Code:
<?xml version="1.0" encoding="utf-8"?>
<translate android:duration="@android:integer/config_mediumAnimTime" android:fromXDelta="0.0" android:toXDelta="-100.0%p"
xmlns:android="http://schemas.android.com/apk/res/android" />
for slide_out_right_basic.xml, edit the file and fill with this
Code:
<?xml version="1.0" encoding="utf-8"?>
<translate android:duration="@android:integer/config_mediumAnimTime" android:fromXDelta="0.0" android:toXDelta="100.0%p"
xmlns:android="http://schemas.android.com/apk/res/android" />
Save both
1.2 Editing res/layout/status_bar_latest_event.xml
We are replacing LinearLayout object used in StatusBar with LatestItemContainer here, so notification can be removed. We handle the Styling first by editing this .xml first. Here are the steps:
Change the code from Original code to this (change the bold one)
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.LatestItemContainer androidrientation="vertical" android:layout_width="fill_parent" android:layout_height="65.0sp"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.systemui.statusbar.LatestItemView android:id="@id/content" android:background="@android:drawable/status_bar_item_background" androidaddingRight="6.0sp" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="64.0sp" android:shadowColor="#ff000000" android:shadowDx="0.0" android:shadowDy="1.0" android:shadowRadius="2.0" />
<View android:background="@drawable/divider_horizontal_light_opaque" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</com.android.systemui.statusbar.LatestItemContainer>
Save
1.3 Editing res/values/public.xml
This one is for registering anim file that we made on step 1.1 to be available publicly and to be recognized in .smali program. Here are the steps:
Add this code to the file like this before XML main body ends:
Code:
<resources>
.
.
.
<public type="anim" name="slide_out_left_basic" id="0x7f0c0000" />
<public type="anim" name="slide_out_right_basic" id="0x7f0c0001" />
</resources>
Please note that id should be unique for every line item so adjust the anim id accordingly. If you don't know how, just leave it, do a compile and decompile again and the id will be added automatically. Thanks to LeoMar for the tip!
Remember the Anim ID, save it for editing LatestItemContainer$1.smali
Save
1.4 Adding smali/com/android/systemui/statusbar/LatestItemContainer$1.smali and smali/com/android/systemui/statusbar/LatestItemContainer.smali
This is the class of LatestItemContainer that will be used to handle the notification list instead of LatestItemView. Here are the steps:
Please download from the attachment
insert the files inside to mentioned folder above
Inside LatestItemContainer$1.smali, there's an id that references the anim from step1.2. please edit it if you have different id for anim left or anim from previous step.
Code:
.line 53
:cond_0
const/high16 v1, 0x7f0c
and
Code:
.line 51
const v1, 0x7f0c0001
1.5 Add smali/com/android/systemui/statusbar/StatusBarService$7.smali (or depends on your existing framework numbering, could be $8 or larger)
This is additional function for StatusBarService to handle onClearNotification function. Here are the steps:
Extract the StatusBarService$7.smali from attachment
If StatusBarService$7.smali does not exist before, just place it inside, if not, skip this step.
If StatusBarService$7.smali exists, Please rename the file to StatusBarService$8.smali (or whatever higher number that is unused) and rename all the line inside the file from
Code:
StatusBarService$7
to
Code:
StatusBarService$8
1.6 Edit smali/com/android/systemui/statusbar/StatusBarService.smali
UPDATE: This is the additional guide for other device when editing StatusBarService.smali. See here:
1. Generic java readout
2. HTC based
3. Samsung based
This is the file that generate NotificationView. Please take care of the changes here more carefully because there might be some differences between vendors in this file. Here are the steps:
Open StatusBarService.smali and find this function
Code:
.method makeNotificationView(Lcom/android/internal/statusbar/StatusBarNotification;Landroid/view/ViewGroup[Landroid/view/View;
Find this code in the makeNotificationView function body:
Code:
invoke-virtual {v0, v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object v18
const v4, 0x7f0b0014
move-object/from16 v0, v18
move v1, v4
invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v10
Insert the bold code below between the existing code:
Code:
invoke-virtual {v0, v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object v18
check-cast v18, Lcom/android/systemui/statusbar/LatestItemContainer;
.line 516
.local v18, row:Lcom/android/systemui/statusbar/LatestItemContainer;
move-object/from16 v0, v16
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x2
if-nez v4, :cond_swno
move-object/from16 v0, v16
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x20
if-nez v4, :cond_swno
new-instance v4, Lcom/android/systemui/statusbar/StatusBarService$7;
move-object v0, v4
move-object/from16 v1, p0
move-object/from16 v2, p1
invoke-direct {v0, v1, v2}, Lcom/android/systemui/statusbar/StatusBarService$7;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotificationV
move-object/from16 v0, v18
move-object v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->setOnSwipeCallback(Ljava/lang/RunnableV
.line 735
:cond_swno
const v4, 0x7f0b0014
move-object/from16 v0, v18
move v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->findViewById(I)Landroid/view/View;
move-result-object v10
Once again, change
Code:
StatusBarService$7
to
Code:
StatusBarService$8
line if you happened to have StatusBarService$8.smali as the result of renaming on the previous step.
IMPORTANT LOGIC TO BE UNDERSTOOD: This step tells the function to:
1. cast the already made View Object to LatestItemContainer instead of using LatestView class.
2. Filter if the Notification is removable or not
3. the LatestItemContainer object (v18) is assigned with onSwipeCallback(new StatusBarService$7)
Change the following (still on the same function body):
Code:
move v1, v4
invoke-virtual {v0, v1}, Landroid/view/View;->setDrawingCacheEnabled(Z)V
.line 542
const/4 v4, 0x3
to
Code:
move v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->setDrawingCacheEnabled(Z)V
.line 542
const/4 v4, 0x3
Please note:
StatusBarService.smali might be different between vendor, so please adapt with your .smali to implement the above coding.
2. Editing framework.jar
2.1 editing smali/com/android/internal/statusbar/IStatusBarService$Stub.smali
Here are the steps:
Add this code on variable declaration part inside the file
Code:
.field static final TRANSACTION_onClearAllNotifications:I = 0xb
.field static final TRANSACTION_onNotificationClear:I = 0xc
.field static final TRANSACTION_onNotificationClick:I = 0x9
.field static final TRANSACTION_onNotificationError:I = 0xa
If the 0xc is already used on another static value, you must change it so it remains unique.
Find this code:
Code:
.method public onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z
.registers 14
.parameter "code"
.parameter "data"
.parameter "reply"
.parameter "flags"
.annotation system Ldalvik/annotation/Throws;
value = {
Landroid/os/RemoteException;
}
.end annotation
.prologue
.line 39
sparse-switch p1, :sswitch_data_124
change to
Code:
.method public onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z
.registers 14
.parameter "code"
.parameter "data"
.parameter "reply"
.parameter "flags"
.annotation system Ldalvik/annotation/Throws;
value = {
Landroid/os/RemoteException;
}
.end annotation
.prologue
.line 39
sparse-switch p1, :sswitch_data_13e
Insert/replace this code (it is at the end of the file):
Code:
.line 176
const/4 v0, 0x1
goto/16 :goto_7
.line 39
:sswitch_data_124
.sparse-switch
0x1 -> :sswitch_f
0x2 -> :sswitch_1c
0x3 -> :sswitch_29
0x4 -> :sswitch_42
0x5 -> :sswitch_5f
0x6 -> :sswitch_7b
0x7 -> :sswitch_8d
0x8 -> :sswitch_c7
0x9 -> :sswitch_d5
0xa -> :sswitch_ef
0xb -> :sswitch_116
0x5f4e5446 -> :sswitch_8
.end sparse-switch
to
Code:
.line 176
const/4 v0, 0x1
goto/16 :goto_7
.end local v1 #_arg0:Ljava/lang/String;
.end local v2 #_arg1:Ljava/lang/String;
.end local v3 #_arg2:I
:sswitch_124
const-string v0, "com.android.internal.statusbar.IStatusBarService"
invoke-virtual {p2, v0}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/StringV
.line 177
invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;
move-result-object v1
.line 178
.restart local v1 #_arg0:Ljava/lang/String;
invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;
move-result-object v2
.line 179
.restart local v2 #_arg1:Ljava/lang/String;
invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I
move-result v3
.line 180
.restart local v3 #_arg2:I
invoke-virtual {p0, v1, v2, v3}, Lcom/android/internal/statusbar/IStatusBarService$Stub;->onNotificationClear(Ljava/lang/String;Ljava/lang/String;I)V
.line 181
invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V
.line 182
const/4 v0, 0x1
goto/16 :goto_7
.line 39
:sswitch_data_13e
.sparse-switch
0x1 -> :sswitch_f
0x2 -> :sswitch_1c
0x3 -> :sswitch_29
0x4 -> :sswitch_42
0x5 -> :sswitch_5f
0x6 -> :sswitch_7b
0x7 -> :sswitch_8d
0x8 -> :sswitch_c7
0x9 -> :sswitch_d5
0xa -> :sswitch_ef
0xb -> :sswitch_116
0xc -> :sswitch_124
0x5f4e5446 -> :sswitch_8
.end sparse-switch
it's important to note this
Code:
0xc -> :sswitch_124
If you rename the static at the previous steps, please change the 0xc accordingly.
2.2 Editing smali/com/android/internal/statusbar/IStatusBarService$Stub$Proxy.smali
Here are the steps:
Insert these function code to the file:
Code:
.method public onNotificationClear(Ljava/lang/String;Ljava/lang/String;I)V
.registers 9
.parameter "pkg"
.parameter "tag"
.parameter "id"
.annotation system Ldalvik/annotation/Throws;
value = {
Landroid/os/RemoteException;
}
.end annotation
.prologue
.line 359
invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;
move-result-object v0
.line 360
.local v0, _data:Landroid/os/Parcel;
invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;
move-result-object v1
.line 362
.local v1, _reply:Landroid/os/Parcel;
:try_start_8
const-string v2, "com.android.internal.statusbar.IStatusBarService"
invoke-virtual {v0, v2}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/StringV
.line 363
invoke-virtual {v0, p1}, Landroid/os/Parcel;->writeString(Ljava/lang/StringV
.line 364
invoke-virtual {v0, p2}, Landroid/os/Parcel;->writeString(Ljava/lang/StringV
.line 365
invoke-virtual {v0, p3}, Landroid/os/Parcel;->writeInt(I)V
.line 366
iget-object v2, p0, Lcom/android/internal/statusbar/IStatusBarService$Stub$Proxy;->mRemote:Landroid/os/IBinder;
const/16 v3, 0xa
const/4 v4, 0x0
invoke-interface {v2, v3, v0, v1, v4}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z
.line 367
invoke-virtual {v1}, Landroid/os/Parcel;->readException()V
:try_end_21
.catchall {:try_start_8 .. :try_end_21} :catchall_28
.line 370
invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V
.line 371
invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V
.line 373
return-void
.line 370
:catchall_28
move-exception v2
invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V
.line 371
invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V
throw v2
.end method
Please inspect the code for this part:
Code:
const/16 v3, 0xa
const/4 v4, 0x0
invoke-interface {v2, v3, v0, v1, v4}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z
The bold one must match on one of the switch case value at the end of IStatusBarService$Stub.smali,
in my phone actually the valid one is the TRANSACTION_onNotificationError (0xa) so if your NotificationError is not 0xa but 0xb for example, please change the bold one to 0xb
Save
2.3 editing smali/com/android/internal/statusbar/IStatusBarService.smali
Insert this function code to the file. Here are the steps:
Insert these function code to the file:
Code:
.method public abstract onNotificationClear(Ljava/lang/String;Ljava/lang/String;I)V
.annotation system Ldalvik/annotation/Throws;
value = {
Landroid/os/RemoteException;
}
.end annotation
.end method
Save
There you have it AFAIK, the files that you need to take care more than others are:
1. smali/com/android/systemui/statusbar/StatusBarService.smali
2. res/values/public.xml
The rest can be applied from the attachment below directly. Ok that's all, after you are done, compile both SystemUI.apk and Framework.jar.
How to Compile the right way?
1. SystemUI.apk ->
Compile with APK Multi Tool, press y and y twice with all the requested input,
delete modified file from keep folder, and after that continue compiling.
Copy from original APK the META-INF and AndroidManifest.xml to the unsignedSystemUI.apk
rename unsignedSystemUI.apk to signedSystemUI.apk
select Zipalign from APK Multi Tool to optimize apk.
Rename to SystemUI.apk (move the original one just in case)
2. framework.jar ->
Smali inside Baksmali Manager
Replace classes.dex inside framework.jar with the generated one.
and apply on your phone
mother of god... one hell of a reply!
crashDebug said:
mother of god... one hell of a reply!
Click to expand...
Click to collapse
?
Sent from my Dell Streak using XDA App
I think it would be great if someone could do this for those of us who don't understand coding.
It's much better in sony Ericsson forum as Xperia mini pro is my second phone
devs There are willing to help but here nobody wills to help.
I already tried this but compiling back was error
Sent from my Dell Streak using XDA App
Mo one ???
Sent from my SK17i using XDA App
FEATURED ON XDA NEWS
{
"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"
}
http://www.xda-developers.com/android/add-your-favorite-mods-on-the-sony-xperia-arc/
SKIP TRACK VIA VOL LONG PRESS
Requirements
1) android.policy.jar
2) APKTOOL
3) Notepad++
4)winrar or 7zip
5) and some patience.
1-STEP
open the android.policy.jar with winrar or 7zip archive and pull classes.dex file to ur apktool folder.
2-STEP
decompile the classes.dex using apktool
for this press shift and right mouse click to open cmd prompt..
then add the cmd in cmd prompt to decompile ..
Code:
java -jar baksmali.jar -o classout/ classes.dex
after that u will get a classout folder in apktool folder.
3-STEP
inside the classout folder navigate to com\android\internal\policy\impl\PhoneWindowManager.smali
once u open PhoneWindowManager.smali add the following lines.
Find:
Code:
.field static final LONG_PRESS_POWER_SHUT_OFF:I = 0x2
.field static final NAVIGATION_BAR_LAYER:I = 0x12
.field static final PHONE_LAYER:I = 0x3
Add the RED color highlighted lines between them
Code:
.field static final LONG_PRESS_POWER_SHUT_OFF:I = 0x2
[COLOR="Red"].field private static final LONG_PRESS_TIMEOUT:I = 0x3e8[/COLOR]
.field static final NAVIGATION_BAR_LAYER:I = 0x12
.field static final PHONE_LAYER:I = 0x3
Find:
Code:
.field mIncallPowerBehavior:I
.field mKeyboardTapVibePattern:[J
.field mKeyguard:Landroid/view/WindowManagerPolicy$WindowState;
Add the RED color highlighted lines between them
Code:
.field mIncallPowerBehavior:I
[COLOR="red"].field mIsLongPress:Z
[/COLOR]
.field mKeyboardTapVibePattern:[J
.field mKeyguard:Landroid/view/WindowManagerPolicy$WindowState;
Find:
Code:
.field private mVolumeDownKeyTriggered:Z
.field private mVolumeUpKeyTriggered:Z
.field mWindowManager:Landroid/view/IWindowManager;
.field mWindowManagerFuncs:Landroid/view/WindowManagerPolicy$WindowManagerFuncs;
Add the RED color highlighted lines between them
Code:
.field private mVolumeDownKeyTriggered:Z
[COLOR="red"].field private final mVolumeDownLongPress:Ljava/lang/Runnable;[/COLOR]
.field private mVolumeUpKeyTriggered:Z
[COLOR="red"].field private final mVolumeUpLongPress:Ljava/lang/Runnable;[/COLOR]
.field mWindowManager:Landroid/view/IWindowManager;
.field mWindowManagerFuncs:Landroid/view/WindowManagerPolicy$WindowManagerFuncs;
Find:
Code:
.line 3586
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$21;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$21;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenLockTimeout:Ljava/lang/Runnable;
return-void
.end method
Add the RED color highlighted lines between them
Code:
.line 3586
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$21;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$21;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenLockTimeout:Ljava/lang/Runnable;
[COLOR="red"]
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$23;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$23;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$24;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$24;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;[/COLOR]
return-void
.end method
Find:
Code:
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v3}, Landroid/os/PowerManager$WakeLock;->release()V
throw v2
.end method
.method public hasNavigationBar()Z
.registers 2
Add the RED color highlighted lines between them
Code:
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v3}, Landroid/os/PowerManager$WakeLock;->release()V
throw v2
.end method
[COLOR="red"].method handleVolumeLongPress(I)V
.registers 6
.parameter "keycode"
.prologue
const/16 v1, 0x18
if-eq p1, v1, :cond_7
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
goto :goto_9
:cond_7
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
:goto_9
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
sget v2, Lcom/android/internal/policy/impl/PhoneWindowManager;->LONG_PRESS_TIMEOUT:I
int-to-long v2, v2
invoke-virtual {v1, v0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
.end method
.method handleVolumeLongPressAbort()V
.registers 3
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
return-void
.end method[/COLOR]
.method public hasNavigationBar()Z
.registers 2
Find:
Code:
.line 2841
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
goto :goto_c2
.line 2843
Add the RED color highlighted lines between them
Code:
.line 2841
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
[COLOR="red"]invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPressAbort()V
invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z
move-result v12
if-eqz v12, :cond_c2
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
move v12, v0
if-nez v12, :cond_c2
and-int/lit8 v12, v10, 0x1
if-nez v12, :cond_c2
const/4 v12, 0x3
move-object/from16 v0, p0
invoke-virtual {v0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
[/COLOR]
goto :goto_c2
.line 2843
Find:
Code:
.line 2853
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
goto/16 :goto_c2
.line 2879
Add the RED color highlighted lines between them
Code:
.line 2853
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
[COLOR="Red"] invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPressAbort()V
invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z
move-result v12
if-eqz v12, :cond_c2
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
move v12, v0
if-nez v12, :cond_c2
and-int/lit8 v12, v10, 0x1
if-nez v12, :cond_c2
const/4 v12, 0x3
move-object/from16 v0, p0
invoke-virtual {v0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V[/COLOR]
goto/16 :goto_c2
.line 2879
Find:
Code:
if-nez v12, :cond_23
.line 2894
const/4 v12, 0x3
invoke-virtual {p0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
goto/16 :goto_23
.line 2902
Add the RED color highlighted lines between them
Code:
if-nez v12, :cond_23
.line 2894
const/4 v12, 0x3
[COLOR="red"]const/4 v7, 0x0[/COLOR]
invoke-virtual {p0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
[COLOR="red"]move v0, v7
move-object/from16 v1, p0
iput-boolean v0, v1, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
move-object/from16 v0, p0
invoke-virtual {v0, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPress(I)V
[/COLOR]
goto/16 :goto_23
.line 2902
Find:
Code:
.method sendCloseSystemWindows(Ljava/lang/String;)V
.registers 3
.parameter "reason"
.prologue
.line 3246
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-static {v0, p1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sendCloseSystemWindows(Landroid/content/Context;Ljava/lang/String;)V
.line 3247
return-void
.end method
.method setAttachedWindowFrames(Landroid/view/WindowManagerPolicy$WindowState;IILandroid/view/WindowManagerPolicy$WindowState;ZLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
.registers 12
.parameter "win"
Add the RED color highlighted lines between them
Code:
.method sendCloseSystemWindows(Ljava/lang/String;)V
.registers 3
.parameter "reason"
.prologue
.line 3246
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-static {v0, p1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sendCloseSystemWindows(Landroid/content/Context;Ljava/lang/String;)V
.line 3247
return-void
.end method
[COLOR="red"].method protected sendFMBroadcast(Landroid/content/Intent;)V
.registers 3
.parameter "intent"
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v0, p1}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
return-void
.end method
.method protected sendMediaButtonEvent(I)V
.registers 15
.parameter "code"
.prologue
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v1
.local v1, eventtime:J
new-instance v11, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v11, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
.local v11, downIntent:Landroid/content/Intent;
new-instance v0, Landroid/view/KeyEvent;
const/4 v5, 0x0
const/4 v7, 0x0
move-wide v3, v1
move v6, p1
invoke-direct/range {v0 .. v7}, Landroid/view/KeyEvent;-><init>(JJIII)V
.local v0, downEvent:Landroid/view/KeyEvent;
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v11, v4, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v11, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
new-instance v12, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v12, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
.local v12, upIntent:Landroid/content/Intent;
new-instance v3, Landroid/view/KeyEvent;
const/4 v8, 0x1
const/4 v10, 0x0
move-wide v4, v1
move-wide v6, v1
move v9, p1
invoke-direct/range {v3 .. v10}, Landroid/view/KeyEvent;-><init>(JJIII)V
.local v3, upEvent:Landroid/view/KeyEvent;
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v12, v4, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v12, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
return-void
.end method[/COLOR]
.method setAttachedWindowFrames(Landroid/view/WindowManagerPolicy$WindowState;IILandroid/view/WindowManagerPolicy$WindowState;ZLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
.registers 12
.parameter "win"
4-STEP
add the following smali files in classoutcom\android\internal\policy\impl
PhoneWindowManager$23.smali
PhoneWindowManager$24.smali
(i have provided these two files in resources.zip attached below this post)
5-STEP
recompiling
come back to apktool main folder.and in the cmd prompt type this cmd to recompile..
Code:
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
and once its recompiled rename the new-classes.dex to classes.dex
and open the android.policy.jar with winrar archive drag the newly recompiled classes.dex into the archive and select compression level to store.
and ur done..
6-STEP
push the android.policy.jar into system/framework..
flash it via cwm using a flashable zip (i have also provided a flashable zip formate see attachment)
and u have a working skip to track in ur rom
Camera Button to play/pause music
1-STEP
decompile android.policy.jar
and open com\android\internal\policy\impl\PhoneWindowManager.smali
2-STEP
in phonewindowmanager.smalli find this line
.method public interceptKeyBeforeQueueing
now at the end of this method find this and add the red marked code
Code:
.line 2794
nop
nop
nop
nop
nop
:sswitch_data_28a
.sparse-switch
0x5 -> :sswitch_61
0x6 -> :sswitch_16c
0x18 -> :sswitch_9a
0x19 -> :sswitch_9a
0x1a -> :sswitch_1ae
[COLOR="Red"]0x1b -> :sswitch_195[/COLOR]
0x4f -> :sswitch_236
0x55 -> :sswitch_228
0x56 -> :sswitch_236
0x57 -> :sswitch_236
0x58 -> :sswitch_236
0x59 -> :sswitch_236
0x5a -> :sswitch_236
0x5b -> :sswitch_236
0x7e -> :sswitch_228
0x7f -> :sswitch_228
0x82 -> :sswitch_236
0xa4 -> :sswitch_9a
0x400 -> :sswitch_265
.end sparse-switch
(1b is the KEYCODE_CAMERA hex code, see docs:KEYCODE_CAMERA
so after adding that code it should look like this....
now scroll few lines up to find this line...
Code:
.line 3000
.end local v3 #ex:Landroid/os/RemoteException;
.end local v11 #telephonyService:Lcom/android/internal/telephony/ITelephony;
[COLOR="Blue"]:sswitch_265[/COLOR]
if-eqz v2, :cond_27f
if-nez v9, :cond_27f
.line 3001
iget-object v12, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v12}, Landroid/os/PowerManager$WakeLock;->acquire()V
.line 3002
iget-object v12, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
new-instance v13, Lcom/android/internal/policy/impl/PhoneWindowManager$PassVendorKey;
new-instance v14, Landroid/view/KeyEvent;
now see the above code where marked in blue from there leave some space like this...
next add these lines between the spaces
Code:
[COLOR="Red"]:sswitch_195
if-eqz v2, :cond_195
invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isScreenOnEarly()Z
move-result v12
if-nez v12, :cond_195
const/16 v12, 0x55
invoke-virtual {p0, v12}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sendMediaButtonEvent(I)V
.line 901
const/4 v12, 0x0
iput-boolean v12, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeAction:Z
:cond_195
goto/16 :goto_23
.line 4000[/COLOR]
so from now its very simple remove all the spaces so it will end up look like this...
once u done it save the file
3-STEP
recompile it
and flash it and enjoy the new mod..
SMALL APPS FOR CM BASED ROM
1-STEP
decompile framework-res.apk
goto res/values/strings.xml and add these lines a the end
Code:
<string name="permlab_externalTaskSwitcher">Start as an external task switcher</string>
<string name="permdesc_externalTaskSwitcher">Allows the application to be an external task switcher replacing the native task switcher</string>
<string name="permlab_smallapp">Small application overlay</string>
<string name="permdesc_smallapp">Allows running movable small applications on top of other applications.</string>
open AndroidManifest.xml
and add the following lines
Code:
<permission android:name="android.permission.SYSTEM_ALERT_WINDOW" android:label="@string/permlab_systemAlertWindow" android:description="@string/permdesc_systemAlertWindow" android:protectionLevel="dangerous" android:permissionGroup="android.permission-group.SYSTEM_TOOLS" />
and
Code:
<permission android:name="com.sony.smallapp.permission.SMALLAPP" android:label="@string/permlab_smallapp" android:description="@string/permdesc_smallapp" android:protectionLevel="dangerous" />
like this shown in the pic..
done recompile the framework-res.apk
2-STEP
decompile android.policy.jar
and open com\android\internal\policy\impl\PhoneWindowManager.smal
and add the red marked lines
Code:
.field static final SEARCH_BAR_LAYER:I = 0x4
.field static final SECURE_SYSTEM_OVERLAY_LAYER:I = 0x17
.field static final SEPARATE_TIMEOUT_FOR_SCREEN_SAVER:Z = false
.field static final SHOW_PROCESSES_ON_ALT_MENU:Z = false
[COLOR="red"].field static final SHOW_STARTING_ANIMATIONS:Z = true
.field static final SMALLAPP_LAYER:I = 0x3[/COLOR]
.field static final STATUS_BAR_LAYER:I = 0xf
.field static final STATUS_BAR_PANEL_LAYER:I = 0x10
.field static final STATUS_BAR_SUB_PANEL_LAYER:I = 0xe
and find these lines in the same file.
Code:
[COLOR="Blue"].method public checkAddPermission(Landroid/view/WindowManager$LayoutParams;)I
.locals 4
.parameter "attrs"
.prologue
const/4 v2, 0x0
.line 1609
iget v1, p1, Landroid/view/WindowManager$LayoutParams;->type:I
.line 1611
.local v1, type:I
const/16 v3, 0x7d0
if-lt v1, v3, :cond_0
const/16 v3, 0xbb7
if-le v1, v3, :cond_1
.line 1643
:cond_0
:goto_0
return v2
.line 1615
:cond_1
const/4 v0, 0x0
.line 1616
.local v0, permission:Ljava/lang/String;
sparse-switch v1, :sswitch_data_0
.line 1635
const-string v0, "android.permission.INTERNAL_SYSTEM_WINDOW"
.line 1637
:goto_1
:sswitch_0
if-eqz v0, :cond_0
.line 1638
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v3, v0}, Landroid/content/Context;->checkCallingOrSelfPermission(Ljava/lang/String;)I
move-result v3
if-eqz v3, :cond_0
.line 1640
const/4 v2, -0x8
goto :goto_0
.line 1632
:sswitch_1
const-string v0, "android.permission.SYSTEM_ALERT_WINDOW"
.line 1633
goto :goto_1
.line 1616
nop
:sswitch_data_0
.sparse-switch
0x7d2 -> :sswitch_1
0x7d3 -> :sswitch_1
0x7d5 -> :sswitch_0
0x7d6 -> :sswitch_1
0x7d7 -> :sswitch_1
0x7da -> :sswitch_1
0x7db -> :sswitch_0
0x7dd -> :sswitch_0
0x7e7 -> :sswitch_0
.end sparse-switch
.end method[/COLOR]
no is the funny part replace all the above blue marked lines with the below red marked lines
Code:
[COLOR="red"].method public checkAddPermission(Landroid/view/WindowManager$LayoutParams;)I
.locals 4
.parameter "attrs"
.prologue
const/4 v2, 0x0
.line 1115
iget v1, p1, Landroid/view/WindowManager$LayoutParams;->type:I
.line 1117
.local v1, type:I
const/16 v3, 0x7d0
if-lt v1, v3, :cond_0
const/16 v3, 0xbb7
if-le v1, v3, :cond_1
.line 1152
:cond_0
:goto_0
return v2
.line 1121
:cond_1
const/4 v0, 0x0
.line 1122
.local v0, permission:Ljava/lang/String;
sparse-switch v1, :sswitch_data_0
.line 1144
const-string v0, "android.permission.INTERNAL_SYSTEM_WINDOW"
.line 1146
:goto_1
:sswitch_0
if-eqz v0, :cond_0
.line 1147
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v3, v0}, Landroid/content/Context;->checkCallingOrSelfPermission(Ljava/lang/String;)I
move-result v3
if-eqz v3, :cond_0
.line 1149
const/4 v2, -0x8
goto :goto_0
.line 1137
:sswitch_1
const-string v0, "android.permission.SYSTEM_ALERT_WINDOW"
.line 1138
goto :goto_1
.line 1141
:sswitch_2
const-string v0, "com.sony.smallapp.permission.SMALLAPP"
.line 1142
goto :goto_1
.line 1122
:sswitch_data_0
.sparse-switch
0x7d2 -> :sswitch_1
0x7d3 -> :sswitch_1
0x7d5 -> :sswitch_0
0x7d6 -> :sswitch_1
0x7d7 -> :sswitch_1
0x7da -> :sswitch_1
0x7db -> :sswitch_0
0x7dd -> :sswitch_0
0xbb5 -> :sswitch_2
0xbb6 -> :sswitch_2
.end sparse-switch
.end method[/COLOR]
save it..done now recompile the android.policy.jar
3-STEP
decompile framework.jar
add the whole sony folder (provided in the resources.zip attached below ) in classout/com
and recompile framework.jar
4-STEP
now u need to add some files in system/app
system/etc
system/framework
all the files are provided in resources.zip so just take them and add those files in ur flashable zip
5-STEP
once u flash the mod .u need an Slauncher app to launch the small apps...download it from google play
so its done enjoy the smalls on cm based roms..
Hope it helps u guys
if u guys are having trouble making it ...make a req to me ill make one for u when iam free..
ps-when it comes to making a thread iam really bad at it plz co-operate
if u like my tut plz press thanks
IF u like my work donate me and ATM my device is screwed have to repair it will cost more plz help me to get my device repaired by donating me
HOW TO DONATE ME
Due to some rules paypal donate button is disabled in INDIA. So any one willing to donate me please follow this :
* Login to ur paypal account
* Option "Personal payment" doesn't work for India, please set "Online purchases". and check Goods or Service (preferably service)
* Send desired payment
* Input my paypal email there : [email protected]
* Thank you!
Click to expand...
Click to collapse
How to add xperia S/T lockscreen ,small apps ,magnification glass
Xperia S/T Lockscreen TUT
requirements.
framework-res.apk
android.policy.jar
notpad++
winrar
knowledge of how to decompile and recompile
If u guys want a good tut for de/recompiling here is good guide by my good friend Stanlin salu
http://forum.xda-developers.com/showthread.php?t=2011254
1-STEP
decompile framework-res.apk
navigate to res/values
and open strings.xml
here add these two at the end (see pic for reference.) and save it
Code:
<string name="permlab_external_lockscreen">xperia lockscreen</string>
<string name="permdesc_external_lockscreen">xperia loxkscreen</string>
2-STEP
in the same values folder
open public.xml
and these strings just below the line show in the below pic and save it
Code:
<public type="string" name="permlab_external_lockscreen" id="0x01040525" />
<public type="string" name="permdesc_external_lockscreen" id="0x01040526" />
IMPORTANT
0x01040525 ,0x01040526 these are called hex codes and should in a proper order
for ex from the above codes the last 4 hex codes should in this way
0x01040524
0x01040525
0x01040526
0x01040527
public.xml sample hexadecimal codes
0x70000000
0x70000001
0x70000002
0x70000003
0x70000004
0x70000005
0x70000006
0x70000007
0x70000008
0x70000009
0x7000000a
0x7000000b
0x7000000c
0x7000000d
0x7000000e
0x7000000f
0x70000010
Click to expand...
Click to collapse
a little info about hex codes
hex codes starts from 0-9 and a-f and so one
so they must in the order according to it.
Click to expand...
Click to collapse
3-STEP
come back to main framework-res folder
and open AndroidManifest.xml
and add these line just below line shown in the pic and save it
Code:
<permission android:label="@string/permlab_external_lockscreen" android:name="com.sonyericsson.permission.EXTERNAL_LOCKSCREEN" android:protectionLevel="signatureOrSystem" android:description="@string/permdesc_external_lockscreen" />
4-STEP
recompile the framework-res.apk
5-STEP
decompile android.policy.jar
navigate to com\android\internal\policy\impl\
and add this ExternalLockScreen.smali and LockPatternKeyguardView.smali file there (smali file is provided by in the resources zip attached in this post)
and recompile it back
6-STEP
i have attached a flashable zip for format in this post below
put the following files it
uxpnxtlockscreen.apk (provided in resorces zip by me)
settings.apk (which supports XS LS , which can be found easily in this forum) (or may be later ill tell how to add them in ur settings)
android.policy.jar
framework-res.apk
zip and flash it..and ur done ...
HOW TO ADD SMALL APPS
1-STEP
Decompile framework-res.apk
and navigate to res/values/strings.xml
and add these 4 lines at the end as shown in the pic. and save it
Code:
<string name="permlab_smallapp">Small application overlay</string>
<string name="permdesc_smallapp">Allows running movable small applications on top of other applications.</string>
<string name="permlab_externalTaskSwitcher">Start as an external task switcher</string>
<string name="permdesc_externalTaskSwitcher">Allows the application to be an external task switcher replacing the native task switcher</string>
2-STEP
in the same values folder open public.xml
and add these 4 lines below the line shown in the pic and save it
Code:
<public type="string" name="permlab_smallapp" id="0x01040550" />
<public type="string" name="permdesc_smallapp" id="0x01040551" />
<public type="string" name="permlab_externalTaskSwitcher" id="0x01040552" />
<public type="string" name="permdesc_externalTaskSwitcher" id="0x01040553" />
3-STEP
come back to main framework-res folder
and open AndroidManifest.xml
now add this line as shown in the pic
Code:
<permission android:label="@string/permlab_externalTaskSwitcher" android:name="com.sonymobile.permission.EXTERNAL_TASK_SWITCHER" android:protectionLevel="signatureOrSystem" android:description="@string/permdesc_externalTaskSwitcher" />
and this line as shown in pic .and save it
Code:
<permission android:label="@string/permlab_smallapp" android:name="com.sony.smallapp.permission.SMALLAPP" android:protectionLevel="dangerous" android:description="@string/permdesc_smallapp" />
Now recompile the framework-res.apk
4-STEP
decompile framework.jar
and the whole sony folder which consists of small apps samli (i have provided in small apps resources.zip )
recompile it
done
5-STEP
u need some framework files and some permissions files ( provided in resources.zip)
1-etc/permissions
2- small app framework jar file
3-small apps supported services.
4-the small apps
6-STEP
now all mods are ready only thing need is small apps (which i have provided in small apps resources.zip)
and also make u use the small apps supported susyemUI.apk (which can be found in this forum)
put all these files in the flashable zip formate i have provided below..
and enjoy ur small apps
HOW TO ADD THE FAMOUS MAGNIFICATION GLASS TO UR FRAMEWORK..
(a big thanks to AEON WORLD)
1-STEP
decompile ur framework-res.apk
2-STEP
navigate to res/values and edit the following xml's
Dimens.xml add these lines at the end..as shown in the pic
Code:
<dimen name="magnifier_selection_handle_offset_y">44.0dip</dimen>
<dimen name="roundMagnificationRadius">55.0dip</dimen>
<dimen name="rectangularMagnificationWidth">179.0dip</dimen>
<dimen name="rectangularMagnificationHeight">74.0dip</dimen>
<dimen name="selection_handle_offset_y">42.0dip</dimen>
<dimen name="selection_handle_right_offset_x">15.0dip</dimen>
<dimen name="selection_handle_left_offset_x">7.0dip</dimen>
Public.xml add the following lines as shown in pic
under public type demin
Code:
<public type="dimen" name="magnifier_selection_handle_offset_y" id="0x01050078" />
<public type="dimen" name="roundMagnificationRadius" id="0x01050079" />
<public type="dimen" name="rectangularMagnificationWidth" id="0x0105007a" />
<public type="dimen" name="rectangularMagnificationHeight" id="0x0105007b" />
<public type="dimen" name="selection_handle_offset_y" id="0x0105007c" />
<public type="dimen" name="selection_handle_right_offset_x" id="0x0105007d" />
<public type="dimen" name="selection_handle_left_offset_x" id="0x0105007e" />
note ur hex codes should be order..
under public type drawables
<public type="drawable" name="textfield_search_right_holo" id="0x010807fb" />
<public type="drawable" name="semc_magnifier_arrow_above" id="0x010807fc" />
<public type="drawable" name="semc_magnifier_arrow_left" id="0x010807fd" />
<public type="drawable" name="semc_magnifier_arrow_right" id="0x010807fe" />
<public type="drawable" name="semc_magnifier_rectangle" id="0x010807ff" />
<public type="drawable" name="semc_magnifier_round" id="0x01080800" />
again the hex codes should in order
3-STEP
put the pngs which i have provided in magni_resoures.rar to drawables-hpdi folder
4-STEP
now recompile the framework-res.apk..
5-STEP
now decompile ur framewok.jar
add the following files provided in magni_resoreces.rar
copy all the files in webkit folder and paste it in classout/android/webkit folder
and copy all the files widget folder and paste it in classout/android/widget folder
wait dont recomplie yet (see next step )
6-STEP
now we have to compare some id's from ur public.xml and MagnifierView.smali to assign the same id's for drawables and dimes present in public.xml
Open ur both Public.xml and MagnifierView.smali at the same time and do the following
in magnifierView.smali
1- Find this line and assign <public type="drawable" name="semc_magnifier_round" id="0x010807f9" /> id here
Code:
.line 413
move-object/from16 v0, p0
iget-object v3, v0, Landroid/widget/MagnifierView;->mFrames:[Landroid/graphics/drawable/Drawable;
const/4 v4, 0x0
const v5, 0x10[COLOR="Red"]807f9[/COLOR]
2- Find this line and assign <public type="drawable" name="semc_magnifier_rectangle" id="0x010807f8" /> id here
Code:
.line 414
move-object/from16 v0, p0
iget-object v3, v0, Landroid/widget/MagnifierView;->mFrames:[Landroid/graphics/drawable/Drawable;
const/4 v4, 0x1
const v5, 0x10[COLOR="red"]807f8[/COLOR]
3-Find this line and assign <public type="dimen" name="roundMagnificationRadius" id="0x01050073" /> id here
Code:
.line 422
const v3, 0x10[COLOR="red"]50073[/COLOR]
invoke-virtual {v12, v3}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
move-result v13
4-Find this line and assign <public type="dimen" name="rectangularMagnificationWidth" id="0x01050074" /> id here
Code:
.line 426
move-object/from16 v0, p0
iget-object v3, v0, Landroid/widget/MagnifierView;->mMagnificationWidth:[I
const/4 v4, 0x1
const v5, 0x10[COLOR="red"]50074[/COLOR]
5-Find this line and assign <public type="dimen" name="rectangularMagnificationHeight" id="0x01050075" /> id here
Code:
.line 428
move-object/from16 v0, p0
iget-object v3, v0, Landroid/widget/MagnifierView;->mMagnificationHeight:[I
const/4 v4, 0x1
const v5, 0x10[COLOR="red"]50075[/COLOR]
6-Find this line and assign <public type="dimen" name="selection_handle_offset_y" id="0x01050076" /> id here
Code:
.line 452
move-object/from16 v0, p0
iget-object v3, v0, Landroid/widget/MagnifierView;->mArrowDrawables:[Landroid/graphics/drawable/Drawable;
const/4 v4, 0x0
const v5, 0x10[COLOR="red"]50076[/COLOR]
7-Find this line and assign <public type="dimen" name="selection_handle_right_offset_x" id="0x01050077" /> id here
Code:
.line 454
move-object/from16 v0, p0
iget-object v3, v0, Landroid/widget/MagnifierView;->mArrowDrawables:[Landroid/graphics/drawable/Drawable;
const/4 v4, 0x1
const v5, 0x10[COLOR="red"]50077[/COLOR]
8-Find this line and assign <public type="dimen" name="selection_handle_left_offset_x" id="0x01050078" /> id here
Code:
.line 456
move-object/from16 v0, p0
iget-object v3, v0, Landroid/widget/MagnifierView;->mArrowDrawables:[Landroid/graphics/drawable/Drawable;
const/4 v4, 0x2
const v5, 0x10[COLOR="red"]50078[/COLOR]
once u done it..
recompile ur framework.jar
STEP-7
now use the flashable zip i have provided to flash this mod..
PS- my way for presentation of this TUT is bad...hope u guys understand.
CREDITS:
AOEN WORLD -for resources.and initial tut
More TUTS here
Adding options in settings.apk
well friends today iam going to show u have to add options like CPU control, panel settings , navigation bar in ur settings.apk
SO lets start
1-STEP
install the frameworks from the rom from where u are taking the settings.apk
2-STEP
hope u guys know how to decompile iam not going to explain it
so decompile the settings.apk (make sure u set the compression level 128mb)
3-STEP
once decompiled
goto res\values
1)strings.xml
add the lines at the end
creating a header name
add this line at the end
Code:
[B]<string name="header_category_advanced">[COLOR="Red"]Sandy's mod[/COLOR]</string>[/B]
note:u can change the red colored highlighted name to any thing..
for CPU control
Code:
[B]<string name="overclocktool_title">CPU control</string>[/B]
for quickpanel
Code:
[B]<string name="quickpanel_location">Quick panel</string>[/B]
for navigation bar
Code:
[B]<string name="nav_title">Navigation button</string>[/B]
for sim card option
Code:
<string name="sim_title">SIM card</string>
For sms counter
Code:
<string name="sms_title">SMS counter</string>
for lockscreen changer
Code:
<string name="lockscreen_title">Lock screen</string>
for audio effect
Code:
<string name="audio_title">Audio</string>
for LED control app
Code:
<string name="led_title">LED control</string>
so one u add all these lines in strings.xml it should look like this
2)Public.xml
now add these lines at the end of <public type="string" line
for CPU control
Code:
[B]<public type="string" name="overclocktool_title" id="0x7f0b0658" />[/B]
for quickpanel
Code:
[B]<public type="string" name="quickpanel_location" id="0x7f0b065b" />[/B]
for navigation bar
Code:
[B]<public type="string" name="nav_title" id="0x7f0b065c" />[/B]
for sim card option
Code:
<public type="string" name="sim_title" id="0x7f0b062d" />
For sms counter
Code:
<public type="string" name="sms_title" id="0x7f0b062e" />
for lockscreen changer
Code:
<public type="string" name="lockscreen_title" id="0x7f0b0633" />
for audio effect
Code:
<public type="string" name="audio_title" id="0x7f0b062b" />
for LED control app
Code:
<public type="string" name="led_title" id="0x7f0b062f" />
IMP:- make sure the hex codes are in order
so one u add all these lines in public.xml it should look like this
4-STEP
goto res/xml/settings_headers.xml
and add the following lines.
For add the header that u created.
Code:
[B]<header android:title="@string/header_category_advanced" />[/B]
now placing the option that u have created
for CPU control
Code:
[B]<header android:icon="@drawable/ic_overclocktool" android:title="@string/overclocktool_title">
<intent android:targetPackage="it.sineo.android.noFrillsCPUClassic" android:action="android.intent.action.MAIN" android:targetClass="it.sineo.android.noFrillsCPUClassic.activity.MainActivity" />
</header>[/B]
for quickpanel
Code:
[B]<header android:icon="@drawable/ic_settings_quickpanel" android:id="@id/quickpanel_location_settings" android:title="@string/quickpanel_location">
<intent android:targetPackage="com.lidroid.quickpanel" android:targetClass="com.lidroid.quickpanel.MainActivity" />
</header>[/B]
for navigation bar
Code:
[B]<header android:icon="@drawable/ic_nav" android:title="@string/nav_title">
<intent android:targetPackage="cn.kyle.gn.NavBar" android:action="android.intent.action.MAIN" android:targetClass="cn.kyle.gn.NavBar.GnNavBarActivity" />
</header>[/B]
for sim card option
Code:
<header android:icon="@drawable/ic_sim" android:title="@string/sim_title">
<intent android:targetPackage="com.gsmdev.simcard" android:action="android.intent.action.MAIN" android:targetClass="com.gsmdev.simcard.MainActivity" />
</header>
For sms counter
Code:
<header android:icon="@drawable/ic_sms" android:title="@string/sms_title">
<intent android:targetPackage="org.kknd.android.smscounter" android:action="android.intent.action.MAIN" android:targetClass="org.kknd.android.smscounter.SmsCounterActivity" />
</header>
for lockscreen changer
Code:
<header android:icon="@drawable/ic_settings_lockstyle" android:title="@string/lockscreen_title">
<intent android:targetPackage="com.gagan.style" android:targetClass="com.gagan.style.LockscreenStyleActivity" />
</header>
for audio effect
Code:
<header android:icon="@drawable/ic_audio" android:title="@string/audio_title">
<intent android:targetPackage="org.nocrew.tomas.headsetnotifierfree" android:action="android.intent.action.MAIN" android:targetClass="org.nocrew.tomas.headsetnotifierfree.HeadsetNotifierActivity" />
</header>
for LED control app
Code:
<header android:icon="@drawable/ic_led" android:title="@string/led_title">
<intent android:targetPackage="com.koo.lightmanager" android:action="android.intent.action.MAIN" android:targetClass="com.koo.lightmanager.MainActivity" />
</header>
so one u add all these lines in settings_headers.xml it should look like this
5-STEP
now we have to add some png's for these options in settings..
i have provided the pngs in 'settings_resources.rar' attached below
add the png's in this place like this
MDPI- res\drawables-mdpi
HDPI- res\drawables-hdpi
6-STEP
recompile it new its done
7-STEP
new u need th push the settings with options apk's (like cpu OC ,panel settings ' nav bar)
i have provided the apk's in settings_resources.rar
8-STEP
now push these settings.apk and other apks using a flashable zip formate i have attached below
HOW TO ADD PER APP DPI IN DISPLAY SETTINGS
1-STEP
decompile settings.apk
open res/values/strings.xml
and add these lines at the end
Code:
<string name="dpi_enable">per app dpi</string>
<string name="dpi_enable_summary">Tablet UI</string>
<string name="dpi_settings">dpi settings</string>
<string name="dpi_settings_summary">change dpi of each app</string>
2-STEP
open res/xml/display_settings.xml
and add the red marked lines..
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/display_settings"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<CheckBoxPreference android:title="@string/swiqi_strings_swiqi_txt" android:key="swiqi_strings_swiqi_txt" android:summary="@string/swiqi_strings_swiqi_desc_txt" />
<com.android.settings.BrightnessPreference android:title="@string/brightness" android:key="brightness" android:dialogTitle="@string/brightness" />
<PreferenceScreen android:title="@string/wallpaper_settings_title" android:key="wallpaper" android:fragment="com.android.settings.WallpaperTypeSettings" />
<CheckBoxPreference android:title="@string/accelerometer_title" android:key="accelerometer" />
<ListPreference android:persistent="false" android:entries="@array/screen_timeout_entries" android:title="@string/screen_timeout" android:key="screen_timeout" android:summary="@string/screen_timeout_summary" android:entryValues="@array/screen_timeout_values" />
<ListPreference android:entries="@array/font_size_entries" android:title="@string/title_font_size" android:key="font_size" android:summary="@string/summary_font_size" android:dialogTitle="@string/dialog_title_font_size" android:entryValues="@array/font_size_values" />
<CheckBoxPreference android:persistent="false" android:title="@string/notification_pulse_title" android:key="notification_pulse" />
<PreferenceCategory android:title="@string/display_category_personalisation_title" android:key="personalisation_category">
<PreferenceScreen android:title="@string/theme_label" android:key="theme" android:summary="@string/theme_summary" />
<PreferenceScreen android:title="@string/lockscreen_label" android:key="lockscreen" android:summary="@string/lockscreen_summary" />
[COLOR="red"]<PreferenceScreen android:title="@string/dpi_enable" android:key="dpi" android:summary="@string/dpi_enable_summary">
<intent android:targetPackage="de.robv.android.xposed.installer" android:action="android.intent.action.MAIN" android:targetClass="de.robv.android.xposed.installer.XposedInstallerActivity" />
</PreferenceScreen>
<PreferenceScreen android:title="@string/dpi_settings" android:key="dpi" android:summary="@string/dpi_settings_summary">
<intent android:targetPackage="de.robv.android.xposed.mods.appsettings" android:action="android.intent.action.MAIN" android:targetClass="de.robv.android.xposed.mods.appsettings.XposedModActivity" />
</PreferenceScreen>[/COLOR]
</PreferenceCategory>
</PreferenceScreen>
3-STEP
push the xposed apps provided in settings_resoures_new.rar to system/app
so thats it..
CREDITS
Serajr
Till-Kurpse
gagan
so thats it..hope its understandable
if u like my contributions hit the thanks button or buy me a beer (make me drunk )
[ Guide for using .13 with .587 Mods ]
Hi,
In this guide I'll show you how to use mods from the old .587 with the new. 13 ics software found here:
4.1.B.1.13 Port by Jader13254
(xperia-arc-development)
.13 has some new java code inside framework & libs, so we need to port .587 mods...
This is nooby-easy and doesn't requiere ANY coding experience...
BUT you need to know how to use apktool & java..
You need:
Apktool
Notepad++
7zip
PC
1. Download any Mod you want...
2. Get "framework.jar" out of the mod using 7zip & copy to C:\
3. open a cmd window & type "apktool d C:\framework.jar C:\framework
4. open C:\framework
5. download this and paste inside /framework (put the files from /smali inside the /smali from the C:\framework)
6. now open a cmd window
7. type "apktool b C:\framework"
8. put C:\framework\dist\framework.jar (after built complete) back inside the .zip of your mod..
9. flash it via cwm
10. done, enjoy
btw, feel free to press thanks
correction crt off animation have to change from true to false
AW: [TUTORIAL] How to add various framework mods
I dont read all but is there a description how to go with headphones?
sorry for my little english
sinoboss said:
I dont read all but is there a description how to go with headphones?
sorry for my little english
Click to expand...
Click to collapse
what?
added xperia s lockscreen and small apps TUT
thanks for tuts. If you know the important thing is long press back button to kill apps. I belive lots of people need that..
SKIP TRACK VIA VOL LONG PRESS not Work Error ???
Send Me ur Apktool ...
problem Solved Wrong Code
Code:
.line 2841
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPressAbort()V
invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z
move-result v12
if-eqz v12, :cond_c2
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
move v12, v0
if-nez v12, :cond_c2
and-int/lit8 v12, v10, 0x1
if-nez v12, :cond_c2
const/4 v12, 0x3
move-object/from16 v0, p0
invoke-virtual {v0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
goto :goto_c2
.line 2843
to
Code:
.line 2841
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPressAbort()V
invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z
move-result v12
if-eqz v12, :cond_c0
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
move v12, v0
if-nez v12, :cond_c0
and-int/lit8 v12, v10, 0x1
if-nez v12, :cond_c0
const/4 v12, 0x3
move-object/from16 v0, p0
invoke-virtual {v0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
goto :goto_c0
.line 2843
thanks for letting me know the code...... appreciate it..
sry out of 8 thanks
@sandy7, Great work bro! :good:
Hi, Sandy, I have some question here. What if the id at public.xml that is used for the following line to add small app are like these:
<public type="string" name="permlab_smallapp" id="0x01040552" />
<public type="string" name="permdesc_smallapp" id="0x01040553" />
<public type="string" name="permlab_external_lockscreen" id="0x01040554" />
<public type="string" name="permdesc_external_lockscreen" id="0x01040555" />
<public type="string" name="permlab_externalTaskSwitcher" id="0x01040556" />
<public type="string" name="permdesc_externalTaskSwitcher" id="0x01040557" />
should I edit those smali at the small app apk and framework.jar? which line should be changed? I'm from Optimax, the framework of that ROM last string id ends at 0x01040551, so I cant use the lines provided by you or else fail recompile as the co-exist of the id.
mind to teach me how to do it?
xange said:
Hi, Sandy, I have some question here. What if the id at public.xml that is used for the following line to add small app are like these:
<public type="string" name="permlab_smallapp" id="0x01040552" />
<public type="string" name="permdesc_smallapp" id="0x01040553" />
<public type="string" name="permlab_external_lockscreen" id="0x01040554" />
<public type="string" name="permdesc_external_lockscreen" id="0x01040555" />
<public type="string" name="permlab_externalTaskSwitcher" id="0x01040556" />
<public type="string" name="permdesc_externalTaskSwitcher" id="0x01040557" />
should I edit those smali at the small app apk and framework.jar? which line should be changed? I'm from Optimax, the framework of that ROM last string id ends at 0x01040551, so I cant use the lines provided by you or else fail recompile as the co-exist of the id.
mind to teach me how to do it?
Click to expand...
Click to collapse
well no need edit any smali's just add the smali's i have provided in resources.zip in framework.jar..
well about public.xml
u are telling that the last id ends at 0x01040551 so the next id's will be like this
0x01040552
0x01040553
0x01040554
0x01040555
0x01040556
0x01040557
0x01040558
0x01040559
0x0104055a
0x0104055b
and so on
and if ur adding only small apps u dont need these lines..
<public type="string" name="permlab_external_lockscreen" id="0x01040554" />
<public type="string" name="permdesc_external_lockscreen" id="0x01040555" />
these are for lockscreen
Sandy, you are no less than a God to me, I have always wanted to learn and know,
the volume key hack/mod. Could you tell me it's possible on any version of Android, (from Donut to JB) also would it work on OEM's. Like am on stock Galaxy Note 2 would it work?
OR if i go back to X10i stock would it work? Or are there other formalities?
Re: [TUTORIAL] How to add various framework mods
Sandy :thumbup::thumbup: bro you made my day!
Hope I can learn some things from this tut!
Hope you find time to add some more mod guides!
Sent from my MT11i using xda premium
Re: [TUTORIAL] How to add various framework mods
pathaniya said:
Sandy, you are no less than a God to me, I have always wanted to learn and know,
the volume key hack/mod. Could you tell me it's possible on any version of Android, (from Donut to JB) also would it work on OEM's. Like am on stock Galaxy Note 2 would it work?
OR if i go back to X10i stock would it work? Or are there other formalities?
Click to expand...
Click to collapse
Should be the same..any how upload ur android.policy.jar ill go through it...and see if it has any changes..
Sent from my SK17i using XDA Premium HD app
Re: [TUTORIAL] How to add various framework mods
Ghostfreak NB said:
Sandy :thumbup::thumbup: bro you made my day!
Hope I can learn some things from this tut!
Hope you find time to add some more mod guides!
Sent from my MT11i using xda premium
Click to expand...
Click to collapse
Hope u like it..
Yes back to kill all apps tut is in process..will add soon.
Sent from my SK17i using XDA Premium HD app
Re: [TUTORIAL] How to add various framework mods
sandy7 said:
Hope u like it..
Yes back to kill all apps tut is in process..will add soon.
Sent from my SK17i using XDA Premium HD app
Click to expand...
Click to collapse
No doubting that + you kept your word bro!
You'd told I'd be making a guide when we'd talked over pm!
Will require your help! Hope you'd
Help me and not get offended! (final exams are near so not much chance before that,but once its over! I'd be the 1st one to trouble you, just kiddin ')
Sent from my MT11i using xda premium
Sandy would it be too much to ask if you can incorporate download links in your original posts. Since google so so much to offer, too many links to go through.
SKIP TRACK VIA VOL LONG PRESS
Requirements
1) android.policy.jar
2) APKTOOL
3) Notepad++
4)winrar or 7zip
5) and some patience.
1-STEP
open the android.policy.jar with winrar or 7zip archive and pull classes.dex file to ur apktool folder.
2-STEP
decompile the classes.dex using apktool
for this press shift and right mouse click to open cmd prompt..
then add the cmd in cmd prompt to decompile ..
Code:
java -jar baksmali.jar -o classout/ classes.dex
after that u will get a classout folder in apktool folder.
3-STEP
inside the classout folder navigate to com\android\internal\policy\impl\PhoneWindowManager.smali
once u open PhoneWindowManager.smali add the following lines.
Find:
Code:
.field static final LONG_PRESS_POWER_SHUT_OFF:I = 0x2
.field static final NAVIGATION_BAR_LAYER:I = 0x12
.field static final PHONE_LAYER:I = 0x3
Add the RED color highlighted lines between them
Code:
.field static final LONG_PRESS_POWER_SHUT_OFF:I = 0x2
[COLOR="Red"].field private static final LONG_PRESS_TIMEOUT:I = 0x3e8[/COLOR]
.field static final NAVIGATION_BAR_LAYER:I = 0x12
.field static final PHONE_LAYER:I = 0x3
Find:
Code:
.field mIncallPowerBehavior:I
.field mKeyboardTapVibePattern:[J
.field mKeyguard:Landroid/view/WindowManagerPolicy$WindowState;
Add the RED color highlighted lines between them
Code:
.field mIncallPowerBehavior:I
[COLOR="red"].field mIsLongPress:Z
[/COLOR]
.field mKeyboardTapVibePattern:[J
.field mKeyguard:Landroid/view/WindowManagerPolicy$WindowState;
Find:
Code:
.field private mVolumeDownKeyTriggered:Z
.field private mVolumeUpKeyTriggered:Z
.field mWindowManager:Landroid/view/IWindowManager;
.field mWindowManagerFuncs:Landroid/view/WindowManagerPolicy$WindowManagerFuncs;
Add the RED color highlighted lines between them
Code:
.field private mVolumeDownKeyTriggered:Z
[COLOR="red"].field private final mVolumeDownLongPress:Ljava/lang/Runnable;[/COLOR]
.field private mVolumeUpKeyTriggered:Z
[COLOR="red"].field private final mVolumeUpLongPress:Ljava/lang/Runnable;[/COLOR]
.field mWindowManager:Landroid/view/IWindowManager;
.field mWindowManagerFuncs:Landroid/view/WindowManagerPolicy$WindowManagerFuncs;
Find:
Code:
.line 3586
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$21;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$21;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenLockTimeout:Ljava/lang/Runnable;
return-void
.end method
Add the RED color highlighted lines between them
Code:
.line 3586
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$21;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$21;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenLockTimeout:Ljava/lang/Runnable;
[COLOR="red"]
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$23;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$23;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$24;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$24;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;[/COLOR]
return-void
.end method
Find:
Code:
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v3}, Landroid/os/PowerManager$WakeLock;->release()V
throw v2
.end method
.method public hasNavigationBar()Z
.registers 2
Add the RED color highlighted lines between them
Code:
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v3}, Landroid/os/PowerManager$WakeLock;->release()V
throw v2
.end method
[COLOR="red"].method handleVolumeLongPress(I)V
.registers 6
.parameter "keycode"
.prologue
const/16 v1, 0x18
if-eq p1, v1, :cond_7
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
goto :goto_9
:cond_7
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
:goto_9
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
sget v2, Lcom/android/internal/policy/impl/PhoneWindowManager;->LONG_PRESS_TIMEOUT:I
int-to-long v2, v2
invoke-virtual {v1, v0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
.end method
.method handleVolumeLongPressAbort()V
.registers 3
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
return-void
.end method[/COLOR]
.method public hasNavigationBar()Z
.registers 2
Find:
Code:
.line 2841
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
goto :goto_c2
.line 2843
Add the RED color highlighted lines between them
Code:
.line 2841
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
[COLOR="red"]invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPressAbort()V
invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z
move-result v12
if-eqz v12, :cond_c2
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
move v12, v0
if-nez v12, :cond_c2
and-int/lit8 v12, v10, 0x1
if-nez v12, :cond_c2
const/4 v12, 0x3
move-object/from16 v0, p0
invoke-virtual {v0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
[/COLOR]
goto :goto_c2
.line 2843
Find:
Code:
.line 2853
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
goto/16 :goto_c2
.line 2879
Add the RED color highlighted lines between them
Code:
.line 2853
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
[COLOR="Red"] invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPressAbort()V
invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z
move-result v12
if-eqz v12, :cond_c2
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
move v12, v0
if-nez v12, :cond_c2
and-int/lit8 v12, v10, 0x1
if-nez v12, :cond_c2
const/4 v12, 0x3
move-object/from16 v0, p0
invoke-virtual {v0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V[/COLOR]
goto/16 :goto_c2
.line 2879
Find:
Code:
if-nez v12, :cond_23
.line 2894
const/4 v12, 0x3
invoke-virtual {p0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
goto/16 :goto_23
.line 2902
Add the RED color highlighted lines between them
Code:
if-nez v12, :cond_23
.line 2894
const/4 v12, 0x3
[COLOR="red"]const/4 v7, 0x0[/COLOR]
invoke-virtual {p0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
[COLOR="red"]move v0, v7
move-object/from16 v1, p0
iput-boolean v0, v1, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
move-object/from16 v0, p0
invoke-virtual {v0, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPress(I)V
[/COLOR]
goto/16 :goto_23
.line 2902
Find:
Code:
.method sendCloseSystemWindows(Ljava/lang/String;)V
.registers 3
.parameter "reason"
.prologue
.line 3246
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-static {v0, p1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sendCloseSystemWindows(Landroid/content/Context;Ljava/lang/String;)V
.line 3247
return-void
.end method
.method setAttachedWindowFrames(Landroid/view/WindowManagerPolicy$WindowState;IILandroid/view/WindowManagerPolicy$WindowState;ZLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
.registers 12
.parameter "win"
Add the RED color highlighted lines between them
Code:
.method sendCloseSystemWindows(Ljava/lang/String;)V
.registers 3
.parameter "reason"
.prologue
.line 3246
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-static {v0, p1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sendCloseSystemWindows(Landroid/content/Context;Ljava/lang/String;)V
.line 3247
return-void
.end method
[COLOR="red"].method protected sendFMBroadcast(Landroid/content/Intent;)V
.registers 3
.parameter "intent"
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v0, p1}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
return-void
.end method
.method protected sendMediaButtonEvent(I)V
.registers 15
.parameter "code"
.prologue
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v1
.local v1, eventtime:J
new-instance v11, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v11, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
.local v11, downIntent:Landroid/content/Intent;
new-instance v0, Landroid/view/KeyEvent;
const/4 v5, 0x0
const/4 v7, 0x0
move-wide v3, v1
move v6, p1
invoke-direct/range {v0 .. v7}, Landroid/view/KeyEvent;-><init>(JJIII)V
.local v0, downEvent:Landroid/view/KeyEvent;
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v11, v4, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v11, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
new-instance v12, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v12, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
.local v12, upIntent:Landroid/content/Intent;
new-instance v3, Landroid/view/KeyEvent;
const/4 v8, 0x1
const/4 v10, 0x0
move-wide v4, v1
move-wide v6, v1
move v9, p1
invoke-direct/range {v3 .. v10}, Landroid/view/KeyEvent;-><init>(JJIII)V
.local v3, upEvent:Landroid/view/KeyEvent;
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v12, v4, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v12, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
return-void
.end method[/COLOR]
.method setAttachedWindowFrames(Landroid/view/WindowManagerPolicy$WindowState;IILandroid/view/WindowManagerPolicy$WindowState;ZLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
.registers 12
.parameter "win"
4-STEP
add the following smali files in classoutcom\android\internal\policy\impl
PhoneWindowManager$23.smali
PhoneWindowManager$24.smali
(i have provided these two files in resources.zip attached below this post)
5-STEP
recompiling
come back to apktool main folder.and in the cmd prompt type this cmd to recompile..
Code:
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
and once its recompiled rename the new-classes.dex to classes.dex
and open the android.policy.jar with winrar archive drag the newly recompiled classes.dex into the archive and select compression level to store.
and ur done..
6-STEP
push the android.policy.jar into system/framework..
flash it via cwm using a flashable zip (i have also provided a flashable zip formate see attachment)
and u have a working skip to track in ur rom
Hope it helps u guys
if u guys are having trouble making it ...make a req to me ill make one for u when iam free..
ps-when it comes to making a thread iam really bad at it plz co-operate
How to add xperia S/T lockscreen and small apps
Xperia S/T Lockscreen TUT
requirements.
framework-res.apk
android.policy.jar
notpad++
winrar
knowledge of how to decompile and recompile
If u guys want a good tut for de/recompiling here is good guide by my good friend Stanlin salu
http://forum.xda-developers.com/showthread.php?t=2011254
1-STEP
decompile framework-res.apk
navigate to res/values
and open strings.xml
here add these two at the end (see pic for reference.) and save it
Code:
<string name="permlab_external_lockscreen">xperia lockscreen</string>
<string name="permdesc_external_lockscreen">xperia loxkscreen</string>
{
"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"
}
2-STEP
in the same values folder
open public.xml
and these strings just below the line show in the below pic and save it
Code:
<public type="string" name="permlab_external_lockscreen" id="0x01040525" />
<public type="string" name="permdesc_external_lockscreen" id="0x01040526" />
IMPORTANT
0x01040525 ,0x01040526 these are called hex codes and should in a proper order
for ex from the above codes the last 4 hex codes should in this way
0x01040524
0x01040525
0x01040526
0x01040527
a little info about hex codes
hex codes starts from 0-9 and a-f and so one
so they must in the order according to it.
Click to expand...
Click to collapse
3-STEP
come back to main framework-res folder
and open AndroidManifest.xml
and add these line just below line shown in the pic and save it
Code:
<permission android:label="@string/permlab_external_lockscreen" android:name="com.sonyericsson.permission.EXTERNAL_LOCKSCREEN" android:protectionLevel="signatureOrSystem" android:description="@string/permdesc_external_lockscreen" />
4-STEP
recompile the framework-res.apk
5-STEP
decompile android.policy.jar
navigate to com\android\internal\policy\impl\
and add this ExternalLockScreen.smali file there (smali file is provided by in the resources zip attached in this post)
and recompile it back
6-STEP
i have attached a flashable zip for format in this post below
put the following files it
uxpnxtlockscreen.apk (provided in resorces zip by me)
settings.apk (which supports XS LS , which can be found easily in this forum) (or may be later ill tell how to add them in ur settings)
android.policy.jar
framework-res.apk
zip and flash it..and ur done ...
HOW TO ADD SMALL APPS
1-STEP
Decompile framework-res.apk
and navigate to res/values/strings.xml
and add these 4 lines at the end as shown in the pic. and save it
Code:
<string name="permlab_smallapp">Small application overlay</string>
<string name="permdesc_smallapp">Allows running movable small applications on top of other applications.</string>
<string name="permlab_externalTaskSwitcher">Start as an external task switcher</string>
<string name="permdesc_externalTaskSwitcher">Allows the application to be an external task switcher replacing the native task switcher</string>
2-STEP
in the same values folder open public.xml
and add these 4 lines below the line shown in the pic and save it
Code:
<public type="string" name="permlab_smallapp" id="0x01040550" />
<public type="string" name="permdesc_smallapp" id="0x01040551" />
<public type="string" name="permlab_externalTaskSwitcher" id="0x01040552" />
<public type="string" name="permdesc_externalTaskSwitcher" id="0x01040553" />
3-STEP
come back to main framework-res folder
and open AndroidManifest.xml
now add this line as shown in the pic
Code:
<permission android:label="@string/permlab_externalTaskSwitcher" android:name="com.sonymobile.permission.EXTERNAL_TASK_SWITCHER" android:protectionLevel="signatureOrSystem" android:description="@string/permdesc_externalTaskSwitcher" />
and this line as shown in pic .and save it
Code:
<permission android:label="@string/permlab_smallapp" android:name="com.sony.smallapp.permission.SMALLAPP" android:protectionLevel="dangerous" android:description="@string/permdesc_smallapp" />
Now recompile the framework-res.apk
4-STEP
decompile framework.jar
and the whole sony folder which consists of small apps samli (i have provided in small apps resources.zip )
recompile it
done
5-STEP
u need some framework files and some permissions files ( provided in resources.zip)
1-etc/permissions
2- small app framework jar file
3-small apps supported services.
4-the small apps
6-STEP
now all mods are ready only thing need is small apps (which i have provided in small apps resources.zip)
and also make u use the small apps supported susyemUI.apk (which can be found in this forum)
put all these files in the flashable zip formate i have provided below..
and enjoy ur small apps
CREDITS:
AOEN WORLD -for resources.
me want this post
Nice tutorial mate good work :good:
added xperis S lockscreen and small apps TUT
Thread closed as it's cross-posted in Arc section. Please use the other thread: http://forum.xda-developers.com/showthread.php?t=2122258
Hi guys,
I would like to share a Mod/Animations that I ported from PAC man ROM.. This will enable a IME(Keyboard) Animations and you will be able to test them and change them on the fly!!
What exatcly does this mod do?
Click to expand...
Click to collapse
This mod will enable your keyboard to have all different types of Enter and Exit Animations, along with different animations for the Interpolator and speed of the animation..
Here is a video of what I mean..
I started looking into this bc I thought it was a pretty cool feature. I want to remind you that this is NOT my work. I DID NOT create these animations..All I did was port them over to TW 4.3 to make them work:laugh:
Anyone is able to use this mod, just please give proper credit to Devs of PAC Man ROM & Xylon ROM, @zst123 for open source XUI MOD Xposed Module and me if you want
ALSO I want to give a BIG THANKS to:
@dwitherell - for always being there to help and for a sounding bored (LOLLL)
@Deckoz2302 - you already know
@Stryke_the_Orc - logcat thread and a 2nd eye
And too everyone else whos guides I've used to teach me and all the things I know now and am planning to learn along the way
WARNING!!! THIS IS GUIDE IS NOT FOR NOVICE USERS/MODDERS/THEMERS ETC...THERE ARE A LOT OF EDITS IN RES FOLDERS AND SMALI!! IF YOU GET STOCK PLEASE PLEASE POST A LOG OR THE ERROR! I WILL TRY TO BE AS NOOB FRIENDLY AS POSSIBLE BUT THIS IS NOT A NOOB GUIDE/MOD!
PS:This guide may not be PERFECT.. There maybe somethings that I added that this mod may not need..or use.. But i added them for the sake of not missing anything..So if you see something and are like "Why did he add those ids, strings, layouts etc" WHATEVER..Just ignore it or don't use them.. I will try to be as accurate as possible.
So let's begin..
What you'll need:
Note Pad++
Apktool and knowledge on how to read errors
framework-res.apk
SecSettings.apk
framework.jar
PATIENCE
Let's start with SecSettings, decompile it goto res/values..
strings.xml add these:
Code:
<string name="listview_off">Off</string>
<string name="listview_wave_left">Wave (Left)</string>
<string name="listview_wave_right">Wave (Right)</string>
<string name="listview_alpha">Alpha</string>
<string name="listview_scale">Scale</string>
<string name="listview_stack_top">Stack (Top)</string>
<string name="listview_stack_bottom">Stack (Bottom)</string>
<string name="listview_unfold">Unfold</string>
<string name="listview_fold">Fold</string>
<string name="listview_translate_left">Translate (Left)</string>
<string name="listview_translate_right">Translate (Right)</string>
<string name="listview_accelerate_interpolator">Accelerate</string>
<string name="listview_decelerate_interpolator">Decelerate</string>
<string name="listview_accelerate_decelerate_interpolator">Accelerate/Decelerate</string>
<string name="listview_anticipate_interpolator">Anticipate</string>
<string name="listview_overshoot_interpolator">Overshoot</string>
<string name="listview_anticipate_overshoot_interpolator">Anticipate/Overshoot</string>
<string name="listview_bounce_interpolator">Bounce</string>
<string name="listview_cycle_interpolator">Cycle</string>
<string name="listview_linear_interpolator">Linear</string>
<string name="animation_default">Default</string>
<string name="animation_fade">Fade</string>
<string name="animation_slide_right">Slide in right</string>
<string name="animation_slide_left">Slide in left</string>
<string name="animation_slide_right_no_fade">Slide in right (No fade)</string>
<string name="animation_slide_left_no_fade">Slide in left (No fade)</string>
<string name="animation_slide_up">Slide in bottom</string>
<string name="animation_slide_down">Slide in top</string>
<string name="animation_translucent">Translucent</string>
<string name="animation_grow_shrink">Grow in (Top)</string>
<string name="animation_grow_shrink_center">Grow in (Center)</string>
<string name="animation_grow_shrink_bottom">Grow in (Bottom)</string>
<string name="animation_grow_shrink_left">Grow in (Left)</string>
<string name="animation_grow_shrink_right">Grow in (Right)</string>
<string name="ime_animation_title">IME animations</string>
<string name="ime_animation_summary">Set keyboard animations</string>
<string name="ime_animation_test_title">Test IME Animation Here</string>
<string name="ime_enter_animation_title">Enter Animation</string>
<string name="ime_exit_animation_title">Exit Animation</string>
<string name="ime_interpolator_title">Interpolator</string>
<string name="ime_duration_title">IME Duration</string>
<string name="animation_duration_title">Animation duration</string>
<string name="animation_duration_summary">Set duration</string>
<string name="animation_settings_reset_message">Reset all animation settings to default?</string>
Save..
ids.xml add these:
Code:
<item type="id" name="seekBarPrefUnitsRight">false</item>
<item type="id" name="seekBarPrefValue">false</item>
<item type="id" name="seekBarPrefUnitsLeft">false</item>
<item type="id" name="seekBarPrefBarContainer">false</item>
Save..
arrays.xml add these:
Code:
<string-array name="listview_animation_entries">
<item [user=251364]@Str[/user]ing/listview_off</item>
<item [user=251364]@Str[/user]ing/listview_wave_left</item>
<item [user=251364]@Str[/user]ing/listview_wave_right</item>
<item [user=251364]@Str[/user]ing/listview_scale</item>
<item [user=251364]@Str[/user]ing/listview_alpha</item>
<item [user=251364]@Str[/user]ing/listview_stack_top</item>
<item [user=251364]@Str[/user]ing/listview_stack_bottom</item>
<item [user=251364]@Str[/user]ing/listview_unfold</item>
<item [user=251364]@Str[/user]ing/listview_fold</item>
<item [user=251364]@Str[/user]ing/listview_translate_left</item>
<item [user=251364]@Str[/user]ing/listview_translate_right</item>
</string-array>
<string-array name="listview_animation_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
</string-array>
<string-array name="listview_interpolator_entries">
<item [user=251364]@Str[/user]ing/listview_off</item>
<item [user=251364]@Str[/user]ing/listview_accelerate_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_decelerate_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_accelerate_decelerate_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_anticipate_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_overshoot_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_anticipate_overshoot_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_bounce_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_cycle_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_linear_interpolator</item>
</string-array>
<string-array name="listview_interpolator_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
</string-array>
<string-array name="anim_controls_entries">
<item [user=251364]@Str[/user]ing/animation_default</item>
<item [user=251364]@Str[/user]ing/animation_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_right</item>
<item [user=251364]@Str[/user]ing/animation_slide_left</item>
<item [user=251364]@Str[/user]ing/animation_slide_right_no_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_left_no_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_up</item>
<item [user=251364]@Str[/user]ing/animation_slide_down</item>
<item [user=251364]@Str[/user]ing/animation_translucent</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_center</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_bottom</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_left</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_right</item>
</string-array>
<string-array name="anim_controls_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
</string-array>
Save..
attrs.xml add these:
Code:
<attr name="interval" format="integer" />
<attr name="unitsLeft" format="reference|string" />
<attr name="unitsRight" format="reference|string" />
<attr name="maximum" format="integer" />
<attr name="minimum" format="integer" />
Save..
Now go to res/xml/ and where ever you want to add the preference screen to change the animations.. I added it to a xml that we (N3bula) have specifically for keyboard mods..Add this line
Code:
<PreferenceScreen android:title= [user=251364]@Str[/user]ing/ime_animation_title" android:key="interface_animation_scroll" android:summary= [user=251364]@Str[/user]ing/ime_animation_summary" android:fragment="com.android.settings.pac.KeyboardAnimationInterfaceSettings" />
Goto android/settings/SubSettings.smali
Search
Code:
.method public constructor
add this below .end method
Code:
.method private popFragment()Z
.locals 2
.prologue
.line 46
invoke-virtual {p0}, Lcom/android/settings/SubSettings;->getFragmentManager()Landroid/app/FragmentManager;
move-result-object v0
.line 47
.local v0, "fm":Landroid/app/FragmentManager;
invoke-virtual {v0}, Landroid/app/FragmentManager;->getBackStackEntryCount()I
move-result v1
if-lez v1, :cond_0
.line 48
invoke-virtual {v0}, Landroid/app/FragmentManager;->popBackStack()V
.line 49
const/4 v1, 0x1
.line 51
:goto_0
return v1
:cond_0
const/4 v1, 0x0
goto :goto_0
.end method
Then search
Code:
# virtual methods
Add this below it:
Code:
.method protected isValidFragment(Ljava/lang/String;)Z
.locals 3
.param p1, "fragmentName" # Ljava/lang/String;
.prologue
.line 41
const-string v0, "SubSettings"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Launching fragment "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 42
const/4 v0, 0x1
return v0
.end method
Find
Code:
.method public onNavigateUp()Z
Add blue:
Code:
.method public onNavigateUp()Z
.locals 1
.prologue
.line 27
[COLOR="Blue"]invoke-direct {p0}, Lcom/android/settings/SubSettings;->popFragment()Z
move-result v0
if-nez v0, :cond_0
[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/SubSettings;->finish()V
.line 28
[COLOR="blue"]:cond_0[/COLOR]
const/4 v0, 0x1
return v0
.end method
Now extract the zip below and add all the contents to their respected folders..
SecSettings.zip
Once you have them in place compile the apk, then decompile it so you can pull your new public id's in res/values/public.xml
Here is my public.xml please go through all the smali you added and search for all the 0x7******* (public ids) When you find one search my public.xml for it, find the name, then search your NEW public.xml for that name and id. Then change the id to YOUR NEW ONE. (Please if you don't understand how to do this, then this mod is NOT for you..either that or you need to search and find out what I am talking about. I will not post every id with the name bc there are A LOT)
Now moving on, framework-res.apk, decompile it...go to res/arrays add these..
Code:
<string-array name="anim_controls_entries">
<item [user=251364]@Str[/user]ing/animation_default</item>
<item [user=251364]@Str[/user]ing/animation_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_right</item>
<item [user=251364]@Str[/user]ing/animation_slide_left</item>
<item [user=251364]@Str[/user]ing/animation_slide_right_no_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_left_no_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_up</item>
<item [user=251364]@Str[/user]ing/animation_slide_down</item>
<item [user=251364]@Str[/user]ing/animation_translucent</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_center</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_bottom</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_left</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_right</item>
</string-array>
<string-array name="anim_controls_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
</string-array>
Save..
Then go to res/strings.xml add these:
Code:
<string name="animation_fade">Fade</string>
<string name="animation_slide_right">Slide in right</string>
<string name="animation_slide_left">Slide in left</string>
<string name="animation_slide_right_no_fade">Slide in right (No fade)</string>
<string name="animation_slide_left_no_fade">Slide in left (No fade)</string>
<string name="animation_slide_up">Slide in bottom</string>
<string name="animation_slide_down">Slide in top</string>
<string name="animation_default">Default</string>
<string name="animation_translucent">Translucent</string>
<string name="animation_grow_shrink">Grow in (Top)</string>
<string name="animation_grow_shrink_center">Grow in (Center)</string>
<string name="animation_grow_shrink_bottom">Grow in (Bottom)</string>
<string name="animation_grow_shrink_left">Grow in (Left)</string>
<string name="animation_grow_shrink_right">Grow in (Right)</string>
<string name="action_null">Blank</string>
Save..
Now extract the zip below and add them in their respected folder(s)..
framework-res.zip
Compile it and then decompile it, you will need to generate a new public.xml for framework.jar which is the next step..
Goto POST#5
Neat. Gonna try this when I have time to match all those ids (I see why you didn't list them all, thats gonna be alot lol)
Sent from my Galaxy Note II
icedventimocha said:
Neat. Gonna try this when I have time to match all those ids (I see why you didn't list them all, thats gonna be alot lol)
Sent from my Galaxy Note II
Click to expand...
Click to collapse
Yep.. I guess I could have planned it better and wrote them all down.. But wasn't sure I could get it all working
lacoursiere18 said:
Yep.. I guess I could have planned it better and wrote them all down.. But wasn't sure I could get it all working
Click to expand...
Click to collapse
Eff that dude. Doing tedious **** like that is how you learn. Let people work for it lol
Sent from my Galaxy Note II
Now framework.jar..goto android\inputservices\InputMethodSevices.smali..
Now search
Code:
# annotations
add blue:
Code:
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroid/inputmethodservice/InputMethodService$Insets;,
Landroid/inputmethodservice/InputMethodService$InputMethodSessionImpl;,
Landroid/inputmethodservice/InputMethodService$InputMethodImpl;,
[COLOR="Blue"] Landroid/inputmethodservice/InputMethodService$SettingsObserver;[/COLOR]
}
.end annotation
Search
Code:
# instance fields
add these below
Code:
.field private mAnimationDuration:I
.field private mAnimationEnterIndex:I
.field private mAnimationExitIndex:I
.field mHandler:Landroid/os/Handler;
.field private mInterpolatorIndex:I
.field private mSettingsObserver:Landroid/inputmethodservice/InputMethodService$SettingsObserver;
.field private mWindowIme:Landroid/view/Window;
Now search
Code:
.method static synthetic
add this whole .method
Code:
.method static synthetic access$123(Landroid/inputmethodservice/InputMethodService;)V
.locals 0
.param p0, "x0" # Landroid/inputmethodservice/InputMethodService;
.prologue
.line 232
invoke-direct {p0}, Landroid/inputmethodservice/InputMethodService;->updateSettings()V
return-void
.end method
Now search
Code:
.method private sendInputViewShownState()V
Add this above it:
Code:
.method private retrieveAnimation(Z)Landroid/view/animation/Animation;
.locals 6
.param p1, "enter" # Z
.prologue
.line 1709
if-eqz p1, :cond_1
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationEnterIndex:I
:goto_0
invoke-static {v4}, Lcom/android/internal/util/aokp/AwesomeAnimationHelper;->getAnimations(I)[I
move-result-object v1
.line 1710
.local v1, "animArray":[I
if-eqz p1, :cond_2
const/4 v4, 0x1
aget v2, v1, v4
.line 1711
.local v2, "animInt":I
:goto_1
if-nez v2, :cond_3
const/4 v0, 0x0
.line 1718
:cond_0
:goto_2
return-object v0
.line 1709
.end local v1 # "animArray":[I
.end local v2 # "animInt":I
:cond_1
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationExitIndex:I
goto :goto_0
.line 1710
.restart local v1 # "animArray":[I
:cond_2
const/4 v4, 0x0
aget v2, v1, v4
goto :goto_1
.line 1712
.restart local v2 # "animInt":I
:cond_3
invoke-static {p0, v2}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;
move-result-object v0
.line 1713
.local v0, "anim":Landroid/view/animation/Animation;
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mInterpolatorIndex:I
invoke-static {p0, v4}, Lcom/android/internal/util/aokp/AwesomeAnimationHelper;->getInterpolator(Landroid/content/Context;I)Landroid/view/animation/Interpolator;
move-result-object v3
.line 1714
.local v3, "intplr":Landroid/view/animation/Interpolator;
if-eqz v3, :cond_4
invoke-virtual {v0, v3}, Landroid/view/animation/Animation;->setInterpolator(Landroid/view/animation/Interpolator;)V
.line 1715
:cond_4
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
if-lez v4, :cond_0
.line 1716
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
int-to-long v4, v4
invoke-virtual {v0, v4, v5}, Landroid/view/animation/Animation;->setDuration(J)V
goto :goto_2
.end method
Next search:
Code:
# virtual methods
.method doFinishInput()V
Add this above it:
Code:
.method private updateSettings()V
.locals 4
.prologue
const/4 v3, 0x0
.line 413
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "animation_ime_enter"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
iput v1, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationEnterIndex:I
.line 415
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "animation_ime_exit"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
iput v1, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationExitIndex:I
.line 417
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "animation_ime_interpolator"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
iput v1, p0, Landroid/inputmethodservice/InputMethodService;->mInterpolatorIndex:I
.line 419
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "animation_ime_duration"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
.line 421
.local v0, "temp":I
mul-int/lit8 v1, v0, 0xf
iput v1, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
.line 422
return-void
.end method
Now search
Code:
.method initViews()V
Add whats is in blue:
Code:
sget-object v0, Landroid/R$styleable;->InputMethodService:[I
invoke-virtual {p0, v0}, Landroid/inputmethodservice/InputMethodService;->obtainStyledAttributes([I)Landroid/content/res/TypedArray;
move-result-object v0
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mThemeAttrs:Landroid/content/res/TypedArray;
.line 1082
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mInflater:Landroid/view/LayoutInflater;
const v1, 0x1090063
invoke-virtual {v0, v1, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v0
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
.line 776
[COLOR="Blue"]iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
const/16 v1, 0x300
invoke-virtual {v0, v1}, Landroid/view/View;->setSystemUiVisibility(I)V[/COLOR]
.line 778
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
iget-object v1, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
invoke-virtual {v0, v1}, Landroid/inputmethodservice/SoftInputWindow;->setContentView(Landroid/view/View;)V
.line 1085
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->getViewTreeObserver()Landroid/view/ViewTreeObserver;
Next search:
Code:
const-string v1, "fancy_ime_animations"
should be just a few lines down
Add blue
Code:
const-string v1, "fancy_ime_animations"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$Global;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_0
.line 782
[COLOR="blue"]iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v0}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v0
const v1, 0x1030201
invoke-virtual {v0, v1}, Landroid/view/Window;->setWindowAnimations(I)V
[/COLOR]
.line 785
:cond_0
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
const v1, 0x1020351
invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/view/ViewGroup;
Search
Code:
const-string v0, "KOR"
Add blue above like this:
Code:
invoke-virtual {v0, v4}, Landroid/widget/FrameLayout;->setVisibility(I)V
[COLOR="blue"]new-instance v0, Landroid/os/Handler;
invoke-direct {v0}, Landroid/os/Handler;-><init>()V
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mHandler:Landroid/os/Handler;[/COLOR]
.line 1113
const-string v0, "KOR"
const-string v1, "USA"
NOW search
Code:
.method public onCreate()V
Add blue:
Code:
invoke-virtual {v1}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v1
const/high16 v2, 0x1000000
invoke-virtual {v1, v2}, Landroid/view/Window;->addFlags(I)V
.line 1003
:cond_0
[COLOR="blue"] new-instance v0, Landroid/os/Handler;
invoke-direct {v0}, Landroid/os/Handler;-><init>()V
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mHandler:Landroid/os/Handler;
.line 742
new-instance v0, Landroid/inputmethodservice/InputMethodService$SettingsObserver;
iget-object v1, p0, Landroid/inputmethodservice/InputMethodService;->mHandler:Landroid/os/Handler;
invoke-direct {v0, p0, v1}, Landroid/inputmethodservice/InputMethodService$SettingsObserver;-><init>(Landroid/inputmethodservice/InputMethodService;Landroid/os/Handler;)V
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mSettingsObserver:Landroid/inputmethodservice/InputMethodService$SettingsObserver;
.line 743
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mSettingsObserver:Landroid/inputmethodservice/InputMethodService$SettingsObserver;
invoke-virtual {v0}, Landroid/inputmethodservice/InputMethodService$SettingsObserver;->observe()V[/COLOR]
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->initViews()V
.line 1004
iget-object v1, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v1}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v1
const/4 v2, -0x1
const/4 v3, -0x2
invoke-virtual {v1, v2, v3}, Landroid/view/Window;->setLayout(II)V
.line 1016
[COLOR="blue"] iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v0}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v0
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
.line 747
invoke-direct {p0}, Landroid/inputmethodservice/InputMethodService;->updateSettings()V[/COLOR]
new-instance v0, Landroid/content/IntentFilter;
invoke-direct {v0}, Landroid/content/IntentFilter;-><init>()V
.line 1017
.local v0, "filter":Landroid/content/IntentFilter;
const-string v1, "RequestAxT9Info"
invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 1018
const-string v1, "com.samsung.axt9info.close"
invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 1023
iget-object v1, p0, Landroid/inputmethodservice/InputMethodService;->mBR:Landroid/content/BroadcastReceiver;
invoke-virtual {p0, v1, v0}, Landroid/inputmethodservice/InputMethodService;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 1024
const-string v1, "InputMethodService"
const-string v2, "mBR.registerReceiver()"
invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 1054
return-void
.end method
Search
Code:
.method public onWindowHidden()V
Replace whole method with this:
Code:
.method public onWindowHidden()V
.locals 6
.prologue
.line 1669
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationExitIndex:I
if-nez v4, :cond_1
.line 1670
iget-object v4, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v4}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v4
const v5, 0x1030056
invoke-virtual {v4, v5}, Landroid/view/Window;->setWindowAnimations(I)V
.line 1706
:cond_0
:goto_0
return-void
.line 1673
:cond_1
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getWindow()Landroid/app/Dialog;
move-result-object v1
.line 1674
.local v1, "dialog":Landroid/app/Dialog;
invoke-virtual {v1}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;
move-result-object v4
iput-object v4, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
.line 1675
iget-object v4, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
const/4 v5, -0x1
invoke-virtual {v4, v5}, Landroid/view/Window;->setWindowAnimations(I)V
.line 1677
new-instance v2, Landroid/os/Handler;
invoke-direct {v2}, Landroid/os/Handler;-><init>()V
.line 1678
.local v2, "handler":Landroid/os/Handler;
new-instance v3, Landroid/inputmethodservice/InputMethodService$4;
invoke-direct {v3, p0, v1}, Landroid/inputmethodservice/InputMethodService$4;-><init>(Landroid/inputmethodservice/InputMethodService;Landroid/app/Dialog;)V
.line 1685
.local v3, "runnable":Ljava/lang/Runnable;
const/4 v4, 0x0
invoke-direct {p0, v4}, Landroid/inputmethodservice/InputMethodService;->retrieveAnimation(Z)Landroid/view/animation/Animation;
move-result-object v0
.line 1686
.local v0, "anim":Landroid/view/animation/Animation;
if-eqz v0, :cond_0
.line 1687
new-instance v4, Landroid/inputmethodservice/InputMethodService$5;
invoke-direct {v4, p0, v2, v3, v1}, Landroid/inputmethodservice/InputMethodService$5;-><init>(Landroid/inputmethodservice/InputMethodService;Landroid/os/Handler;Ljava/lang/Runnable;Landroid/app/Dialog;)V
invoke-virtual {v0, v4}, Landroid/view/animation/Animation;->setAnimationListener(Landroid/view/animation/Animation$AnimationListener;)V
.line 1698
invoke-virtual {v1}, Landroid/app/Dialog;->show()V
.line 1699
iget-object v4, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
invoke-virtual {v4, v0}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V
.line 1700
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
if-lez v4, :cond_2
.line 1701
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
mul-int/lit8 v4, v4, 0x2
int-to-long v4, v4
invoke-virtual {v2, v3, v4, v5}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_0
.line 1703
:cond_2
const-wide/16 v4, 0x3e8
invoke-virtual {v2, v3, v4, v5}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_0
.end method
Next search
Code:
.method public onWindowShown()V
Replace whole method with this:
Code:
.method public onWindowShown()V
.locals 4
.prologue
.line 1651
iget v2, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationEnterIndex:I
if-nez v2, :cond_1
.line 1652
iget-object v2, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v2}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v2
const v3, 0x1030056
invoke-virtual {v2, v3}, Landroid/view/Window;->setWindowAnimations(I)V
.line 1662
:cond_0
:goto_0
return-void
.line 1655
:cond_1
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getWindow()Landroid/app/Dialog;
move-result-object v1
.line 1656
.local v1, "dialog":Landroid/app/Dialog;
invoke-virtual {v1}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;
move-result-object v2
iput-object v2, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
.line 1657
iget-object v2, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
const/4 v3, -0x1
invoke-virtual {v2, v3}, Landroid/view/Window;->setWindowAnimations(I)V
.line 1658
invoke-virtual {v1}, Landroid/app/Dialog;->show()V
.line 1659
const/4 v2, 0x1
invoke-direct {p0, v2}, Landroid/inputmethodservice/InputMethodService;->retrieveAnimation(Z)Landroid/view/animation/Animation;
move-result-object v0
.line 1660
.local v0, "anim":Landroid/view/animation/Animation;
if-eqz v0, :cond_0
.line 1661
iget-object v2, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
invoke-virtual {v2, v0}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V
goto :goto_0
.end method
Extract the zip and add them to their respected folder(s):
framework.jar.zip
After that YOUR DONE!!!
Make sure you have compiled everything with YOUR NEW public ids.. Then go head and transfer/flash the files..
REMINDER!! Please post a log/error if you are having problems. I will try to help as much as possible...:good:
Reserve..
Can you help me with my framework.jar?
the_vanya1 said:
Can you help me with my framework.jar?
Click to expand...
Click to collapse
What is it that you need help with.. I will try
Pls check my framework.jar and pls provide me video for this
https://www.dropbox.com/s/wwpcprwzkfamw30/framework.rar?dl=0
the_vanya1 said:
Pls check my framework.jar and pls provide me video for this
https://www.dropbox.com/s/wwpcprwzkfamw30/framework.rar?dl=0
Click to expand...
Click to collapse
Lol a video for this would be quite lengthy.. I don't really do "here is my files do them for me".. What is it that you are having trouble with or don't understand
ok, sorry, but its only part for framework.jar
I dont have this .method private sendInputViewShownState()V and const-string v0, "KOR" (LG P713, 4.1.2) Pls check it for me, only this part
the_vanya1 said:
ok, sorry, but its only part for framework.jar
I dont have this .method private sendInputViewShownState()V and const-string v0, "KOR" (LG P713, 4.1.2) Pls check it for me, only this part
Click to expand...
Click to collapse
Ok.. well it says to add a method above that (sendInputViewShownState) but you can add it anywhere.. When you compile it will automatically put in alphabetical order..
Not sure what you are referring to with "const-string v0 "KOR"
1. I dont have this line
const-string v0, "KOR"
const-string v1, "USA"
2. My .method public onCreate()V not like yours
3. I dont have inputmethod folder in com\android\internal\
the_vanya1 said:
1. I dont have this line
const-string v0, "KOR"
const-string v1, "USA"
2. My .method public onCreate()V not like yours
3. I dont have inputmethod folder in com\android\internal\
Click to expand...
Click to collapse
Ok.. let me take a look.. The const-string's maybe different but that should not matter.. You need look and see the placement of the code.. a string name should not matter..
Pls check my framework and tell me how to
the_vanya1 said:
1. I dont have this line
const-string v0, "KOR"
const-string v1, "USA"
2. My .method public onCreate()V not like yours
3. I dont have inputmethod folder in com\android\internal\
Click to expand...
Click to collapse
View attachment framework.zipHere is the InputMethodService with whats needed.. You can compare yours and see my edits..
Inputmethod folder might be in your framework2.jar.. framework and framework2 are essentially the same but they had to split them bc of the size..
thx, but I dont have the inputmethod folder in com\android\internal\ and in framework2
the_vanya1 said:
thx, but I dont have the inputmethod folder in com\android\internal\ and in framework2
Click to expand...
Click to collapse
Send it to me please.. You may need to check and see if LG has any specific frameworks, except "res" of course
What send? I already check it
the_vanya1 said:
What send? I already check it
Click to expand...
Click to collapse
Did you see if in your framework folder do you have any LG related frameworks.. except "res" ones.. It has to be somewhere.. pretty big part of the system
Hi xda!
This is not mine tutorial ,credits go to darkera13 (SAMSUNG Developer) from Samsungviet
Link to orginal thread here
I decided to translate it made some changes in code to work with G900F
This works only with deodex system files!
So lets start modding:
Decompile android.policy.jar and go to /com/android/internal/policy/impl/GlobalActions.smali
Search for:
Code:
[COLOR="SeaGreen"].field private mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
Add something like the following:
Code:
[COLOR="SeaGreen"].field private mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
[COLOR="Red"].field private mFlashlight:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
.field private mFlashlightState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
.field private mScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
Search for:
Code:
[COLOR="SeaGreen"]iput-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
sget-object v3, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->Off:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;[/COLOR]
Add something like the following:
Code:
[COLOR="SeaGreen"]iput-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
sget-object v3, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->Off:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;[/COLOR]
[COLOR="Red"]iput-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlightState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
sget-object v3, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->Off:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;[/COLOR]
Search for:
Code:
[COLOR="SeaGreen"].method static synthetic access$4700()Ljava/lang/String;[/COLOR]
Add to the below like this:
Code:
[COLOR="SeaGreen"].method static synthetic access$4700()Ljava/lang/String;
.registers 1
.prologue
.line 158
sget-object v0, Lcom/android/internal/policy/impl/GlobalActions;->mScafe:Ljava/lang/String;
return-object v0
.end method[/COLOR]
[COLOR="Red"]
.method static synthetic access$500(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
.registers 2
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
return-object v0
.end method
.method static synthetic access$5000(Lcom/android/internal/policy/impl/GlobalActions;)Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
.registers 2
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlight:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
return-object v0
.end method
.method static synthetic access$5001(Lcom/android/internal/policy/impl/GlobalActions;)Z
.registers 2
invoke-direct {p0}, Lcom/android/internal/policy/impl/GlobalActions;->getTorchStatus()Z
move-result v0
return v0
.end method[/COLOR]
Search for:
Code:
[COLOR="SeaGreen"] iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
Add something like the following (* Note this paragraph have the id, id have to create the corresponding public.xml then replaced in right here, guiding the bottom):
Code:
[COLOR="SeaGreen"] iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
[COLOR="Red"]new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$Flashlight;
const v4, 0x1080b74
const v5, 0x1080b75
const v6, 0x1040ba4
const v7, 0x1040ba6
const v8, 0x1040ba7
move-object/from16 v3, p0
invoke-direct/range {v2 .. v8}, Lcom/android/internal/policy/impl/GlobalActions$Flashlight;-><init>(Lcom/android/internal/policy/impl/GlobalActions;IIIII)V
move-object/from16 v0, p0
iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlight:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$Screenshot;
const v3, 0x1080b76
const v4, 0x1040ba3
move-object/from16 v0, p0
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$Screenshot;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
Search for:
Code:
[COLOR="SeaGreen"] const/16 v2, 0x100[/COLOR]
Add the following:
Code:
[COLOR="SeaGreen"]
const/16 v2, 0x100
invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/impl/GlobalActions;->getBugReportAction()Lcom/android/internal/policy/impl/GlobalActions$Action;
move-result-object v3
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
const/4 v5, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v2, v3, v4, v5}, Lcom/android/internal/policy/impl/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/internal/policy/impl/GlobalActions$Action;Ljava/util/ArrayList;Z)Z[/COLOR]
[COLOR="Red"]const/16 v2, 0x200
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlight:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
const/4 v5, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v2, v3, v4, v5}, Lcom/android/internal/policy/impl/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/internal/policy/impl/GlobalActions$Action;Ljava/util/ArrayList;Z)Z
const/16 v2, 0x400
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
const/4 v5, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v2, v3, v4, v5}, Lcom/android/internal/policy/impl/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/internal/policy/impl/GlobalActions$Action;Ljava/util/ArrayList;Z)Z[/COLOR]
Search for:
Code:
[COLOR="SeaGreen"]const-string v2, "emergencymode"[/COLOR]
change this value like this:
Code:
[COLOR="Red"] if-eqz v2, :cond_315[/COLOR]
Add to the above as follows::
Code:
[COLOR="SeaGreen"] const-string v2, "emergencymode"
invoke-virtual {v2, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
[COLOR="Red"] if-eqz v2, :cond_315[/COLOR]
.line 1255
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mEmergency:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_24b
[COLOR="Red"] .line 1255
:cond_315
const-string v2, "flashlight"
invoke-virtual {v2, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_32a
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlight:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_24b
:cond_32a
const-string v2, "screenshot"
invoke-virtual {v2, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_2ca
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
invoke-virtual {v2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_24b[/COLOR]
[/COLOR]
Search for:
Code:
[COLOR="SeaGreen"].method private prepareDialog()V
.registers 8[/COLOR]
Add to the below as follows:
Code:
[COLOR="SeaGreen"].method private prepareDialog()V
.registers 8[/COLOR]
[COLOR="Red"] .prologue
.line 1820
invoke-direct {p0}, Lcom/android/internal/policy/impl/GlobalActions;->getTorchStatus()Z
move-result v1
if-eqz v1, :cond_b
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->On:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlightState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
goto :goto_10
:cond_b
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->Off:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlightState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
goto :goto_10[/COLOR]
search for:
Code:
[COLOR="SeaGreen"].method private handleShow()V
.registers 5[/COLOR]
Add to the above as follows:
Code:
[COLOR="Red"].method private getTorchStatus()Z
.registers 5
.prologue
const/4 v0, 0x0
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, "torch_light"
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-eqz v1, :cond_11
const/4 v0, 0x1
:cond_11
return v0
.end method[/COLOR]
[COLOR="SeaGreen"].method private handleShow()V
.registers 5[/COLOR]
Search for:
Code:
[COLOR="SeaGreen"] const-string v4, "content://com.sec.knox.provider2/KnoxCustomManagerService1"[/COLOR]
Add to the above like this:
Code:
[COLOR="Red"] .line 1840
iget-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlight:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
iget-object v5, p0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlightState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
invoke-virtual {v4, v5}, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;->updateState(Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;)V[/COLOR]
[COLOR="SeaGreen"] .line 1842
const-string v4, "content://com.sec.knox.provider2/KnoxCustomManagerService1"[/COLOR]
Save and unzip attachments GlobalMenu_darkera13_samsungviet.vn.zip copy the entire file in andorid.policy in / com / android / internal / policy / impl /
Decompile framework-res.apk and go to /res/values/arrays.xml
Search for:
Code:
[COLOR="SeaGreen"] <string-array name="config_globalActionsList">[/COLOR]
Add the following:
Code:
[COLOR="SeaGreen"]<string-array name="config_globalActionsList">
<item>power</item>
<item>datamode</item>
<item>airplane</item>
<item>restart</item>
<item>lockdown</item>
<item>bugreport</item>
<item>users</item>
<item>emergencymode</item>[/COLOR]
[COLOR="Red"]<item>flashlight</item>
<item>screenshot</item>[/COLOR]
[COLOR="SeaGreen"]</string-array>[/COLOR]
Save and open files /res/values/strings.xml
Add to the end of the file is as follows:
Code:
[COLOR="Red"] <string name="global_action_screenshot">Take Screenshot</string>
<string name="global_action_flashlight">Flashlight</string>
<string name="global_actions_flashlight_on_status">On</string>
<string name="global_actions_flashlight_off_status">Off</string>[/COLOR]
[COLOR="SeaGreen"] </resources>[/COLOR]
Save and open files /res/values/public.xml
Add to the end of the file is as follows:
Code:
[COLOR="Red"] <public type="string" name="global_action_screenshot" id="0x01040ba3" />
<public type="string" name="global_action_flashlight" id="0x01040ba4" />
<public type="string" name="global_actions_flashlight_on_status" id="0x01040ba5" />
<public type="string" name="global_actions_flashlight_off_status" id="0x01040ba6" />
<public type="drawable" name="tw_ic_lock_flashlight_on" id="0x01080b74" />
<public type="drawable" name="tw_ic_lock_flashlight_off" id="0x01080b75" />
<public type="drawable" name="tw_ic_lock_screenshot" id="0x01080b76" />[/COLOR]
The id of public.xml may vary depending on the change of the file before public.xml so id have to figure out the right to revise section above id.
The principle of the id is constantly and have the right type, each type will have its own code (eg look at the section on the string is found 0x0104, 0x0108 will be drawable)
So to know the correct id id must be the biggest find in each type, try before going straight string,
here we see this guy 0x0104xxxx code is wrong we try to thousands and hundreds, tens and units ie instead of to find us every turn from 0x01040 -> 0x01049 guy, the guy does not have before it the biggest guy,
for example 0x01045 guy does not have the biggest guy thousands of it is 0x01044, so look down to the hundreds, tens and units. Note small as it used id hexadecimal should turn from small to large 0 -> 9, a, b, c, d, e, f
After finding the largest id translational then 1 unit and instead turn to the id in public.xml similar.
Afterward, they must determine the correct id id in the code Smail (noted above) with the correct id (Note that in the smali code id dropping 1 to 0 on, eg 0x01040ba3 going into 0x1040ba3)
something like this:
Code:
<public type="drawable" name="tw_ic_lock_flashlight_off" id="0x01080b84" /> -> 0x1080b84 -> const v5
<public type="drawable" name="tw_ic_lock_flashlight_on" id="0x01080b85" /> -> 0x1080b85 -> const v4
<public type="drawable" name="tw_ic_lock_screenshot" id="0x01080b86" /> -> 0x1080b86 -> const v3
<public type="string" name="global_action_screenshot" id="0x01040b85" /> -> 0x1040b85 -> const v4
<public type="string" name="global_actions_flashlight_on_status" id="0x01040b87" /> -> 0x1040b87 -> const v7
<public type="string" name="global_actions_flashlight_off_status" id="0x01040b88" /> -> 0x1040b88 -> const v8
<public type="string" name="global_action_flashlight" id="0x01040b86" /> -> 0x1040b86 -> const v6
Next copy the image file in framework-res attachments / *. Png into the framework-res / res / drawable-xhdpi
Recompile and done!
Download smali and framework-res files from here
Power Menu Mod with screenshot and flashlight button + 5 way reboot menu (G900FXXU1BNL9)
download
Credits:
@darkera13
AWESOME GUIDE!!! Thank you so much!!!
Sent from my SM-G900F using Tapatalk
i didn't test it yet , if someone make it for deodex android.policy.jar and framework-res.apk (only clean not earlier modded) please share with us here and wrote phone model, thank you
Any way to add flashlight to notification bar toogles?
Thanks!
aguarello said:
Any way to add flashlight to notification bar toogles?
Thanks!
Click to expand...
Click to collapse
Yes you can by Sqlite Editor from Google playstore
Excellent guide. Keep it up!
you need to change some line to correct with your Global.Action.smali (do not copy/paste all code it not work becouse this tutorial is for Note 3!)
ambasadii said:
Yes you can by Sqlite Editor from Google playstore
Click to expand...
Click to collapse
Can you please share how?
Thanx in advance
seky0405 said:
Can you please share how?
Thanx in advance
Click to expand...
Click to collapse
1) download from playstore SQLite Editor
2) install and run, we grant root permissions
3) find the APPS tab and go to "this" and open it
4) press the "settings.db" and then select "system"
5) locate the "notification_panel_active_app_list" and press it to be is highlighted in gray after which choose the pencil icon to enter the settings, see here
6) complement entry with missing buttons below:
Wifi;MobileData;Bluetooth;Location;AutoRotate;SilentMode;Location;NetworkBooster;Toolbox;SFinder;QuickConnect;MultiWindow;WiFiHotspot;Nfc;SBeam;AllShareCast;SmartStay;SmartPause;Sync;AirView;AirGesture;AirplaneMode;CarMode;PersonalMode;Ebook;UltraPowerSaving;PowerSaving;TouchSensitivity;DormantMode;SideKey;FloatingMessage;Flashlight;
7) press "save" and restart the phone
ambasadii said:
1) download from playstore SQLite Editor
2) install and run, we grant root permissions
3) find the APPS tab "Pamięć ustawień" and open it
4) press the "settings.db" and then select "system"
5) locate the "notification_panel_active_app_list" and press it to be is highlighted in gray after which choose the pencil icon to enter the settings, see tutaj
6) complement entry with missing buttons below:
Wifi;MobileData;Bluetooth;Location;AutoRotate;SilentMode;Location;NetworkBooster;Toolbox;SFinder;QuickConnect;MultiWindow;WiFiHotspot;Nfc;SBeam;AllShareCast;SmartStay;SmartPause;Sync;AirView;AirGesture;AirplaneMode;CarMode;PersonalMode;Ebook;UltraPowerSaving;PowerSaving;TouchSensitivity;DormantMode;SideKey;Flashlight
7) press "save" and restart the phone
Click to expand...
Click to collapse
WoW! Thanx :good: :good: :good:
Thanks for the input, but opened a way to simplify mod type for which we are newbies
thank you very much
Any one have android.policy.jar for BOA3 with this mod ?
Is it only for deodexed roms? I have odexed rom and android.policy.jar file is empty.
ok i make the power menu here
the screenshoot buton works good but when i push flashlight the phone reboots
when i do a mistake ?
logcat attacet!
meaby something here:
.line 2810
.restart local v0 # "airplaneModeOn":Z
:cond_25
sget-object v1, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->Off:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
goto :goto_19
.end method
.method private getTorchStatus()Z
.locals 4
.prologue
const/4 v0, 0x0
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, "torch_light"
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-eqz v1, :cond_0
const/4 v0, 0x1
:cond_0
return v0
.end method
.method private prepareDialog()V
.registers 8
invoke-direct {p0}, Lcom/android/internal/policy/impl/GlobalActions;->getTorchStatus()Z
move-result v1
if-eqz v1, :cond_20
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->On:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlightState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
goto :cond_21
:cond_20
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->Off:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlightState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
goto :cond_21
:cond_21
.prologue
.line 1820
iget-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->cm:Landroid/net/ConnectivityManager;
Hi, I know this thread is for Galaxy S5, but can similar be implemented on any phone running Android Lollipop AOSP? I have a Xperia S, which has Android Lollipop AOSP, and I found somewhat similar code in the android.policy.jar of My ROM too. I just want to implement the Screenshot shortcut, not the flashlight one.
Mirhawk said:
Hi, I know this thread is for Galaxy S5, but can similar be implemented on any phone running Android Lollipop AOSP? I have a Xperia S, which has Android Lollipop AOSP, and I found somewhat similar code in the android.policy.jar of My ROM too. I just want to implement the Screenshot shortcut, not the flashlight one.
Click to expand...
Click to collapse
yes i think you can try it, good look mate!
ambasadii said:
ok i make the power menu here
the screenshoot buton works good but when i push flashlight the phone reboots
when i do a mistake ?
meaby something here:
.line 2810
.restart local v0 # "airplaneModeOn":Z
:cond_25
sget-object v1, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->Off:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
goto :goto_19
.end method
.method private getTorchStatus()Z
.locals 4
.prologue
const/4 v0, 0x0
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, "torch_light"
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-eqz v1, :cond_0
const/4 v0, 0x1
:cond_0
return v0
.end method
.method private prepareDialog()V
.registers 8
invoke-direct {p0}, Lcom/android/internal/policy/impl/GlobalActions;->getTorchStatus()Z
move-result v1
if-eqz v1, :cond_20
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->On:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlightState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
goto :cond_21
:cond_20
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->Off:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlightState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
goto :cond_21
:cond_21
.prologue
.line 1820
iget-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->cm:Landroid/net/ConnectivityManager;
Click to expand...
Click to collapse
Did you check whether those IDs created in framework are matched in andoid.policy?
kmokhtar79 said:
Did you check whether those IDs created in framework are matched in andoid.policy?
Click to expand...
Click to collapse
yes mate i check it:
<public type="drawable" name="tw_ic_lock_flashlight_off" id="0x01080b84" /> 0x1080b84 const v5
<public type="drawable" name="tw_ic_lock_flashlight_on" id="0x01080b85" /> 0x1080b85 const v4
<public type="drawable" name="tw_ic_lock_screenshot" id="0x01080b86" /> 0x1080b86 const v3
<public type="string" name="global_action_screenshot" id="0x01040b85" /> 0x1040b85 const v4
<public type="string" name="global_actions_flashlight_on_status" id="0x01040b87" /> 0x1040b87 const v7
<public type="string" name="global_actions_flashlight_off_status" id="0x01040b88" /> 0x1040b88 const v8
<public type="string" name="global_action_flashlight" id="0x01040b86" /> 0x1040b86 const v6
ambasadii said:
yes mate i check it:
<public type="drawable" name="tw_ic_lock_flashlight_off" id="0x01080b84" /> 0x1080b84 const v5
<public type="drawable" name="tw_ic_lock_flashlight_on" id="0x01080b85" /> 0x1080b85 const v4
<public type="drawable" name="tw_ic_lock_screenshot" id="0x01080b86" /> 0x1080b86 const v3
<public type="string" name="global_action_screenshot" id="0x01040b85" /> 0x1040b85 const v4
<public type="string" name="global_actions_flashlight_on_status" id="0x01040b87" /> 0x1040b87 const v7
<public type="string" name="global_actions_flashlight_off_status" id="0x01040b88" /> 0x1040b88 const v8
<public type="string" name="global_action_flashlight" id="0x01040b86" /> 0x1040b86 const v6
Click to expand...
Click to collapse
I am seeing you are linking same ID for string and drawable.
Code:
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$Flashlight;
const v4, 0x1080b74 <public type="[COLOR="Red"]drawable[/COLOR]" name="tw_ic_lock_flashlight_on" id="
const v5, 0x1080b75 <public type="[COLOR="red"]drawable[/COLOR]" name="tw_ic_lock_flashlight_off" id="
const v6, 0x1040ba4 <public type="[COLOR="red"]string[/COLOR]" name="global_action_flashlight" id="
const v7, 0x1040ba6 <public type="[COLOR="red"]string[/COLOR]" name="global_actions_flashlight_off_status" id="
const v8, 0x1040ba7 <public type="[COLOR="red"]string[/COLOR]" name="global_actions_flashlight_on_status" id="
move-object/from16 v3, p0
invoke-direct/range {v2 .. v8}, Lcom/android/internal/policy/impl/GlobalActions$Flashlight;-><init>(Lcom/android/internal/policy/impl/GlobalActions;IIIII)V
move-object/from16 v0, p0
iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlight:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$Screenshot;
const v3, 0x1080b76 <public type="[COLOR="red"]drawable[/COLOR]" name="tw_ic_lock_screenshot" id="
const v4, 0x1040ba3 <public type="[COLOR="red"]string[/COLOR]" name="global_action_screenshot" id="
move-object/from16 v0, p0
Check your IDs again. Just to double check did you recompile after modifying framework and again decompile? IDs in public has to be created you cannot leave a random id there sorry I have to be precise to narrow down problems.
kmokhtar79 said:
I am seeing you are linking same ID for string and drawable.
Code:
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$Flashlight;
const v4, 0x1080b74 <public type="[COLOR="Red"]drawable[/COLOR]" name="tw_ic_lock_flashlight_on" id="
const v5, 0x1080b75 <public type="[COLOR="red"]drawable[/COLOR]" name="tw_ic_lock_flashlight_off" id="
const v6, 0x1040ba4 <public type="[COLOR="red"]string[/COLOR]" name="global_action_flashlight" id="
const v7, 0x1040ba6 <public type="[COLOR="red"]string[/COLOR]" name="global_actions_flashlight_off_status" id="
const v8, 0x1040ba7 <public type="[COLOR="red"]string[/COLOR]" name="global_actions_flashlight_on_status" id="
move-object/from16 v3, p0
invoke-direct/range {v2 .. v8}, Lcom/android/internal/policy/impl/GlobalActions$Flashlight;-><init>(Lcom/android/internal/policy/impl/GlobalActions;IIIII)V
move-object/from16 v0, p0
iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlight:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$Screenshot;
const v3, 0x1080b76 <public type="[COLOR="red"]drawable[/COLOR]" name="tw_ic_lock_screenshot" id="
const v4, 0x1040ba3 <public type="[COLOR="red"]string[/COLOR]" name="global_action_screenshot" id="
move-object/from16 v0, p0
Check your IDs again. Just to double check did you recompile after modifying framework and again decompile? IDs in public has to be created you cannot leave a random id there sorry I have to be precise to narrow down problems.
Click to expand...
Click to collapse
yest i add strings to framework-res and recompile again new framework-res to check random id in public, ok i check it again,thx