Related
++++++++++++++++++++++++++++++++++
UPDATED July 10, 2013: This GUIDE was written back for ICS firmware, although it might still work for JB - I couldn't confirm that due to the fact I had stopped developing/modding. Keep in mind you need to use the latest APKtool - From Here - for JB system. Also don't forget to copy from original apk "AndroidManifest.xml" file and "META-INF" folder for the New "modded" SystemUI.apk to work.
++++++++++++++++++++++++++++++++++
I was helping a member learn how to add the brightness bar slider to his/her status bar. Since I spend a good amount of time typing it up. So I might as well post it here for everyone
General Knowledge
LEARN how to decompile/Compile APK
APK Tool I used APK 1.5.0
Click to expand...
Click to collapse
PART I: Download resource file here: SystemX.zip
Decompile your SystemUI
Copy from the file/folder in SystemX to same location on your SystemUI:
icon: /res/drawable-hdpi/quickpanel_brightness_icon.png
(could be different folder based on your device, where ever your toggle icons put it there)
file: res/layout/quickpanel_brightness_settings.xml
folder: /smali/com/android/systemui/statusbar/quickpanel folder
PART II: Now you need to declare all added variants:
Ids - Open /res/values/ids.xml - Add these three lines at the end. Close & save.
Code:
<item type="id" name="title">false</item>
<item type="id" name="brightness_slider">false</item>
<item type="id" name="automatic">false</item>
Strings - Open /res/values/strings.xml - Add these two lines at the end. Close & save.
Code:
<string name="brightness_settings_title">Brightness</string>
<string name="brightness_settings_automatic">Fixed</string>
Public - Open /res/values/public.xml - Add to end of each section - Continue with the last id called out.
Code:
....
<public type="drawable" name="quickpanel_brightness_icon" id=[color=red]"0x7f020166"[/color] />
....
<public type="layout" name="quickpanel_brightness_settings" id=[color=red]"0x7f03001e"[/color] />
...
<public type="string" name="brightness_settings_title" id=[color=red]"0x7f08009e"[/color] />
<public type="string" name="brightness_settings_automatic" id=[color=red]"0x7f08009f"[/color] />
...
<public type="id" name="title" id=[color=red]"0x7f0e009d"[/color] />
<public type="id" name="brightness_slider" id=[color=red]"0x7f0e009e"[/color] />
<public type="id" name="automatic" id=[color=red]"0x7f0e009f"[/color] />
*Change those in red per your ids - best open public.xml in Excel, sort by id - you will see the last number was used in each section.
PART III: Now we need to edit the Smali associated with your Public.xml Id's:
Open /smali/com/android/systemui/statusbar/quickpanel/BrightnessSettingsView.smali in Notepad++ (or similar) - Change if needed:
@ line 201
Code:
const v1, [color=red]0x7f08009e[/color]
ID associated with public.xml string section name="brightness_setting_title"
@ line 207
Code:
const v1, [color=red]0x7f08009f[/color]
ID associated with public.xml string section name="brightness_settings_automatic"
@ line 257
Code:
const v1, [color=red]0x7f0e009d[/color]
ID associated with public.xml id section name="title"
@ line 267
Code:
const v1, [color=red]0x7f0e009e[/color]
ID associated with public.xml id section name="brightness_slider"
@ line 308
Code:
const v1, [color=red]0x7f0e009f[/color]
ID associated with public.xml id section name="automatic"
Save & Close.
Open /smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali in Notepad++ (or similar)
Find this Section:
Code:
....
.method protected makeStatusBarView()Landroid/view/View;
.locals 13
.prologue
const/16 v12, 0x8
.....
[i](very long find the last line in this section)[/i]
.....
[color=blue].line 382
return-object v4[/color]
.line 311
.end local v2 #filter:Landroid/content/IntentFilter;
.end local v6 #signalCluster:Lcom/android/systemui/statusbar/SignalClusterView;
.end local v7 #statSysNoSim:Landroid/widget/ImageView;
.end local v8 #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
:catch_0
move-exception v9
goto/16 :goto_0
.end method
.method onBarViewAttached()V
......
In between .line 382 (this line number is not important - ignore whatever it is, only make sure it's the last line in this section) and return-object v4 - Add:
Code:
[color=indigo][color=blue].line 382[/color]
const v6, [color=red]0x7f03001e[/color]
invoke-static {v0, v6, v11}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v5
check-cast v5, Lcom/android/systemui/statusbar/quickpanel/BrightnessSettingsView;
invoke-virtual {v5}, Lcom/android/systemui/statusbar/quickpanel/BrightnessSettingsView;->init()V
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const/4 p0, 0x1
invoke-virtual {v6, v5, p0}, Lcom/android/systemui/statusbar/phone/ExpandedView;->addView(Landroid/view/View;I)V
[color=blue]return-object v4[/color][/color]
ID associated with public.xml layout section name="quickpanel_brightness_settings"
Note: If you already had Toggle Mod - It should look like this:
Code:
[color=blue].line 382[/color]
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v0, v9, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
const v6, 0x7f03001c
invoke-static {v0, v6, v11}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v5
check-cast v5, Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v5}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
invoke-virtual {v6, v5, v11}, Lcom/android/systemui/statusbar/phone/ExpandedView;->addView(Landroid/view/View;I)V
[color=indigo]const v6, [color=red]0x7f03001e[/color]
invoke-static {v0, v6, v11}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v5
check-cast v5, Lcom/android/systemui/statusbar/quickpanel/BrightnessSettingsView;
invoke-virtual {v5}, Lcom/android/systemui/statusbar/quickpanel/BrightnessSettingsView;->init()V
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const/4 p0, 0x1
invoke-virtual {v6, v5, p0}, Lcom/android/systemui/statusbar/phone/ExpandedView;->addView(Landroid/view/View;I)V
[color=blue]return-object v4[/color][/color]
Save & Close
PART IV: Compile & push to your system, don't forget to set your permission to rw-r--r-- ! DONE.
The End: That's all - Wasn't that hard, wasn't it ? :silly: .... Good Luck !!! :highfive:
Disclaimer:
I didn't write up the code for quickpanel brightness settings, it has been pass on from forum to forum - I do not know the original author. If it's your please let me know so we all can give proper thanks.
Click to expand...
Click to collapse
+1
+thanks for you.
Yeeeah, I think we need more people like you
thanks for the tutorial.
How would you go about removing the brightness bar (manually)?
fcb13 said:
How would you go about removing the brightness bar (manually)?
Click to expand...
Click to collapse
The quickest way is take out the Added code in the PhoneStatusBar.smali. You can ignore the rest. But it would be more clean if you reverse the guide.
is it working on other phone such samsung or only xperia??
d3cka said:
is it working on other phone such samsung or only xperia??
Click to expand...
Click to collapse
NO, this guide is for Xperia - Samsung had a different layout in SystemUI
Ohh thanks for the answer
Sent from my GT-S5360 using xda premium
can someuone upload the edited SystemUI? I dont have a pc right now only phone
Awesome work.
Worked for me. Can't say anything changes in touchscreen sensitivity, it was fine before. But the capacitive buttons were always kind of a pain in the .ss, now they respond much better. Thanks a lot for this mod. Xperia Ion.
My phone doesn't have phonestatusbar.smali
Sent from my XT530 using xda app-developers app
I don' t know if this work.
I have a problem, decompile e recompile SystemUI.apk without an error, but when use SystemUI recompileted it's don't work.
Can Someone help me?
Where I should add line from part III? In file extracted from systemX.zip I have no one "line" with needed id.
Oh, it was my mistake - i searched for ".line"
Thank you for this guide!
great tutorial:good:
+1 thanks
Sent from my LT26i using xda app-developers app
I wanna add the slider in 2.3 but i could not find phonestatubar.smali
what can I do?
i think you can code a patch to help every body
Great tutorial! thanks!
on other manufacturers phones, it is /smali/com/android/systemui/statusbar/StatusBarService.smali
Hello guys
here go a new tut on
System animations from AOKP
{
"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"
}
First pray for god to give you best part of patience
For this you need
Deodexed:- Service.jar, Framework-res.apk, framework.jar, Settings.apk
First let me start from Framework-res.apk
1. Decompile the Framework-res,apk
2. Download this View attachment framework-res-merge.zip
3. Merge this part of attachment and public.xml is to compare
4.Now open framework-res.apk/res/values/string.xml
in that at the bottom part add these strings
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>
5.Now compile the framework-res.apk and then decompile ( for public ids )
Now lets move to Second part in post #2
framework.jar
Here you need god blessings for patience
1. Decompile framework.jar
2. Download this View attachment framework.jar-merge.zip ( this included file to compare )
3. After you merge the file open
smali/com/android/internal/util/aicp/AwesomeAnimationHelper.smali
Compare all public ids and replace from your framework-res.apk public codes ( if you dont know please dont ask me )
compare file of mine was available in above framewor-res.apk public
4. Now Open smali_classes2/android/provider/Settings$System.smali
in that look for this code
Code:
.field public static final ACCELEROMETER_ROTATION:Ljava/lang/String; = "accelerometer_rotation"
Below that Add this line
Code:
.field public static final ACTIVITY_ANIMATION_CONTROLS:[Ljava/lang/String;
Now look for this
Code:
.field public static final ANIMATOR_DURATION_SCALE:Ljava/lang/String; = "animator_duration_scale"
Above it add these lines
Code:
.field public static final ANIMATION_CONTROLS_DURATION:Ljava/lang/String; = "animation_controls_duration"
.field public static final ANIMATION_CONTROLS_EXIT_ONLY:Ljava/lang/String; = "animation_controls_exit_only"
.field public static final ANIMATION_CONTROLS_NO_OVERRIDE:Ljava/lang/String; = "animation_controls_no_override"
.field public static final ANIMATION_CONTROLS_REVERSE_EXIT:Ljava/lang/String; = "animation_controls_reverse_exit"
now look for this code
Code:
sput-object v0, Landroid/provider/Settings$System;->CLONE_TO_MANAGED_PROFILE:[Ljava/lang/String;
add these lines after that line
Code:
.line 4604
const/16 v0, 0xb
new-array v0, v0, [Ljava/lang/String;
const-string v1, "activity_open"
aput-object v1, v0, v5
const-string v1, "activity_close"
aput-object v1, v0, v6
const-string/jumbo v1, "task_open"
aput-object v1, v0, v7
const-string/jumbo v1, "task_close"
aput-object v1, v0, v8
const-string/jumbo v1, "task_to_front"
aput-object v1, v0, v9
const/4 v1, 0x5
const-string/jumbo v2, "task_to_back"
aput-object v2, v0, v1
const/4 v1, 0x6
const-string/jumbo v2, "wallpaper_open"
aput-object v2, v0, v1
const/4 v1, 0x7
const-string/jumbo v2, "wallpaper_close"
aput-object v2, v0, v1
const/16 v1, 0x8
const-string/jumbo v2, "wallpaper_intra_open"
aput-object v2, v0, v1
const/16 v1, 0x9
const-string/jumbo v2, "wallpaper_intra_close"
aput-object v2, v0, v1
const/16 v1, 0xa
const-string/jumbo v2, "task_open_behind"
aput-object v2, v0, v1
sput-object v0, Landroid/provider/Settings$System;->ACTIVITY_ANIMATION_CONTROLS:[Ljava/lang/String;
5. Now compile ( remember dont forgot about the changing public ids )
now
framework-res.apk and framework.jar was done
now next part Service.jar in post #3
Service.jar
This is not a heavy part
1. Decompile Service.jar ( make sure you already had superusermod)
2. Download this View attachment service.jar-merge.zip merge it
3. now from the public replace the ids ( from the first post )
compare them and replace ( besure while replacing )
now compile
Finally heavy part of
Framework-res.apk
framework.jar and
service.jar was done
Finally Settings
look for next post #4 to finish
settings.apk final part
Easy part
1. Decompile Settings.apk
2. Download this View attachment Settings.apk-merge.zip merge it (public.xml to compare ids )
3. Now open settings.apk/res/values/string.xml
add these strings
Code:
<string name="aokp_animation_title">System animations</string>
<string name="aokp_animation_summary">AOKP custom animation</string>
<string name="title_animation_no_override">Prevent App Overrides</string>
<string name="summary_animation_no_override">Prevent apps from overriding transitions.</string>
<string name="animation_exit_only_title">Enter only animation</string>
<string name="animation_reverse_exit_title">Reverse exit animation</string>
<string name="activity_open_title">Activity open animation</string>
<string name="activity_close_title">Activity close animation</string>
<string name="task_open_title">Task open animation</string>
<string name="task_close_title">Task close animation</string>
<string name="task_move_to_front_title">Move to front animation</string>
<string name="task_move_to_back_title">Move to back animation</string>
<string name="wallpaper_open_title">Wallpaper open animation</string>
<string name="wallpaper_close_title">Wallpaper close animation</string>
<string name="wallpaper_intra_open_title">Wallpaper intra open animation</string>
<string name="wallpaper_intra_close_title">Wallpaper intra close animation</string>
<string name="task_open_behind_title">Task open behind animation</string>
<string name="animation_duration_title">Animation duration</string>
<string name="animation_duration_default">Default</string>
4. Now open Settings.apk\smali\com\android\settings\SettingsPreferenceFragment.smali
Look for this
Code:
# instance fields
Add these
Code:
.field protected mContentRes:Landroid/content/ContentResolver;
.field protected mContext:Landroid/content/Context;
Find this method
Code:
.method public onCreate(Landroid/os/Bundle;)V
in that method look for this line
Code:
invoke-super {p0, p1}, Lcom/sonymobile/settings/preference/util/SomcSettingsPreferenceFragment;->onCreate(Landroid/os/Bundle;)V
After that line add these lines
Code:
invoke-virtual {p0}, Lcom/android/settings/SettingsPreferenceFragment;->getActivity()Landroid/app/Activity;
move-result-object v1
invoke-virtual {v1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;
move-result-object v1
iput-object v1, p0, Lcom/android/settings/SettingsPreferenceFragment;->mContext:Landroid/content/Context;
.line 95
invoke-virtual {p0}, Lcom/android/settings/SettingsPreferenceFragment;->getActivity()Landroid/app/Activity;
move-result-object v1
invoke-virtual {v1}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
iput-object v1, p0, Lcom/android/settings/SettingsPreferenceFragment;->mContentRes:Landroid/content/ContentResolver;
Now look for this method
Code:
.method protected showDialog(I)V
Before that method add this method
Code:
.method public setTitle(I)V
.locals 1
.param p1, "resId" # I
.prologue
.line 526
invoke-virtual {p0}, Lcom/android/settings/SettingsPreferenceFragment;->getActivity()Landroid/app/Activity;
move-result-object v0
invoke-virtual {v0, p1}, Landroid/app/Activity;->setTitle(I)V
.line 527
return-void
.end method
save it and close
5. In any part of settings ( example Display_settings.xml ) add this line
Code:
<PreferenceScreen android:title="@string/aokp_animation_title" android:key="aokp_animation" android:summary="@string/aokp_animation_summary" android:fragment="com.android.settings.aicp.AnimationControls" />
6. Now compile and decompile and replace public ids
then recompile and sign it
Finally
Replace all these files
framework-res.apk
framework.jar
service.jar and
settings.apk
Credits
CyanogenMod
AOKP
Aicp
maaadr group
Dont forgot to mention me in your thread if you use my work
Good Luck
Great job bro @venkat kamesh ^^
“Sent From MWE V9.5.0 On My Z3”
robertlindz said:
This is not your work...i see this guide in forum maaad facebook
Click to expand...
Click to collapse
+1
venkat kamesh said:
cool
yes i do found that
since i had my changes for xperia
have you read what i wrote ( Xperia )
compare the smali codes of mine ( oops my complete tut )
( remember i had modified from maaadon )
and i had already gave credits for the developers ... read before you waste your post here in my thread
Edit :-
next tut was about lockscreen weather
not from last time bull****
from rr source ( most of my tuts are from source )
i think you need to read my hot topics lol
Click to expand...
Click to collapse
Looking forward for that one, lockscreen weather tut ?
I got bootloop after replace service.jar and framework.jar I make the tut twice and replace last long the id from framework.jar xD how can i fix the bootloop bro? I make backup xD
Hi bro
Got bootloop.. Tried 3 times so far..
First replaced framework-res.apk and reboot. No bootloop
Second replaced framework.jar and reboot. Boom.. Its bootlooping...
Can u pls check the framework.jar_merge.zip? In that zip in class2 folder i can see only one smali file. Its named something blah(compare).smali. Do i need to rename it or what?
Rajeev said:
Hi bro
Got bootloop.. Tried 3 times so far..
First replaced framework-res.apk and reboot. No bootloop
Second replaced framework.jar and reboot. Boom.. Its bootlooping...
Can u pls check the framework.jar_merge.zip? In that zip in class2 folder i can see only one smali file. Its named something blah(compare).smali. Do i need to rename it or what?
Click to expand...
Click to collapse
compare file is to compare with your stock one bro
so you can know what i added
that makes you easy
Great Job again master venkat:good:
venkat kamesh said:
compare file is to compare with your stock one bro
so you can know what i added
that makes you easy
Click to expand...
Click to collapse
I think thats the mistake i done. What i did i just renamed that.. Heeeee.. Let me try once again
Finally..
All working.. Awsom tutorial bro.. First i can't see any difference. But after setting my window animation to 0.5 or 1 its start to work... Great great and great... Thanks alot bro..
So without enabling window animation its won't work. Right?
Nice tut.
I was wondering, if it's possible to add "random" mode for animations like in xposed xuimod here: https://github.com/zst123/XuiMod/blob/master/res/values/arrays_anim_control.xml and here: https://github.com/zst123/XuiMod/bl...od/mods/animation/AwesomeAnimationHelper.java
I did it!!! Thank very much bro my mistake it's the form to decompile the jar I did ur method to replace classes n.n thanks very much bro
raziel zarafan said:
I did it!!! Thank very much bro my mistake it's the form to decompile the jar I did ur method to replace classes n.n thanks very much bro
Click to expand...
Click to collapse
Congratulations bro. And i am really sorry to reply u lately in PM. I was sleeping.. Now only wakeup..
Rajeev said:
Congratulations bro. And i am really sorry to reply u lately in PM. I was sleeping.. Now only wakeup..
Click to expand...
Click to collapse
Don't worry bro and thanks any way u always try to solve my questions
@raziel zarafan
maybe you know but which ids we need to replace in settings and from where ?
Pandemic said:
@raziel zarafan
maybe you know but which ids we need to replace in settings and from where ?
Click to expand...
Click to collapse
For settings
AnimationsControl.smali
Line 263: "string" name="aokp_animation_title"
Line 268: "xml" name="aicp_aokp_animation_controls"
AnimBarPreference.smali
Line 80: "layout" name="slider_preference"
Line 90: "id" name="monitor_box"
Line 101:"id" name="seek_bar"
Line 223:"string" name="animation_duration_default"
raziel zarafan said:
For settings
AnimationsControl.smali
Line 263: "string" name="aokp_animation_title"
Line 268: "xml" name="aicp_aokp_animation_controls"
AnimBarPreference.smali
Line 80: "layout" name="slider_preference"
Line 90: "id" name="monitor_box"
Line 101:"id" name="seek_bar"
Line 223:"string" name="animation_duration_default"
Click to expand...
Click to collapse
Thanks alot bro ^^
I have sometimes struggles with the annoying public ids lol
“Sent From MWE V9.5.0 On My Z3”
Hello guys
today i would like to post a small tut battery styles
as per users request
first i would like to thank
aliv Rom, Basar and Vanya Melnechenko from MAAADR group
from their source i had ported for LP/MM with small changes
This is specially for sony ( if for any other roms Please compare system_icon.xml )
Features:
Hide/Show Stock battery
Battery Styles
Icon
Percentage
Icon with Percentage
Icon with percentage (JB style)
Circle
Circle with percentage
Dotted Circle
Dotted circle with percentage
No battery
Battery color
Circle animation speed
Percent text color
precent text charging color
apply mods
For this all you required :-
Deodexed SystemUI.apk and patience
look for post #2
Systemui ( First part )
1. Decompile SystemUI.apk
2. Download this Attchment View attachment SystemUI.zip and merge
open systemui.apk/res/arrays.xml
before </resources> add this
Code:
<integer-array name="batterymeter_color_levels_1">
<item>4</item>
<item>15</item>
<item>100</item>
</integer-array>
<array name="batterymeter_color_values_1">
<item>#ffff3300</item>
<item>#ffff3300</item>
<item>#ffffffff</item>
</array>
<integer-array name="batterymeter_inverted_bolt_points">
<item>743</item>
<item>73</item>
<item>743</item>
<item>292</item>
<item>442</item>
<item>201</item>
<item>442</item>
<item>400</item>
<item>0</item>
<item>20</item>
<item>369</item>
<item>157</item>
<item>369</item>
<item>0</item>
</integer-array>
open systemui.apk/res/attrs.xml
before </resources> add this
Code:
<attr name="batteryView" format="string" />
open systemui.apk/res/colors.xml
before </resources> add this
Code:
<color name="batterymeter_critical">#ffff3300</color>
<color name="batterymeter_low">#ffff3300</color>
<color name="batterymeter_full">#ffffffff</color>
<color name="battery_text_color">#ffffffff</color>
<color name="statusbar_clock_color">#ffffffff</color>
open systemui.apk/res/styles.xmlbefore </resources> add this
Code:
<style name="TextAppearance.StatusBar.Battery" parent="@android:style/TextAppearance.StatusBar.Icon">
<item name="android:textSize">13.0dip</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">@color/status_bar_clock_color</item>
</style>
now compile and decompile for public ids
Now open com/android/systemui/statusbar/phone/phonestatusbar.smali
find this
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$H;
before that add this line
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatterySettingsObserver;,
now look for this
Code:
.field private mBackdropInterpolator:Landroid/view/animation/Interpolator;
below that add these lines
Code:
.field private mBattery:Lcom/android/systemui/BatteryMeterViewMod;
.field private mCircleBattery:Lcom/android/systemui/BatteryCircleMeterView;
find this access code
Code:
.method static synthetic access$7800(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Landroid/widget/ImageView;
access$7800 may differ so dont worry
above that add this
Code:
.method static synthetic access$77000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
.locals 0
.param p0, "x0" # Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
.prologue
.line 155
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateBatteryIcons()V
return-void
.end method
now look for this method
Code:
.method private updateClearAll()V
above that add this method
Code:
.method private updateBatteryIcons()V
.locals 2
.prologue
const/4 v1, 0x0
.line 723
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBattery:Lcom/android/systemui/BatteryMeterViewMod;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCircleBattery:Lcom/android/systemui/BatteryCircleMeterView;
if-eqz v0, :cond_0
.line 724
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBattery:Lcom/android/systemui/BatteryMeterViewMod;
invoke-virtual {v0, v1}, Lcom/android/systemui/BatteryMeterViewMod;->updateSettings(Z)V
.line 725
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCircleBattery:Lcom/android/systemui/BatteryCircleMeterView;
invoke-virtual {v0, v1}, Lcom/android/systemui/BatteryCircleMeterView;->updateSettings(Z)V
.line 727
:cond_0
return-void
.end method
now look for this method
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
in that method
look for this line
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
below that line add this code
Code:
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f10021d
invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Lcom/android/systemui/BatteryMeterViewMod;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBattery:Lcom/android/systemui/BatteryMeterViewMod;
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f10021c
invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Lcom/android/systemui/BatteryCircleMeterView;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCircleBattery:Lcom/android/systemui/BatteryCircleMeterView;
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateBatteryIcons()V
change the ids compare with mine and replace with yours
now look for this method
Code:
.method public start()V
in that find this line
Code:
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
above that line add this
Code:
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatterySettingsObserver;
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;
invoke-direct {v0, p0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatterySettingsObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/os/Handler;)V
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatterySettingsObserver;->observe()V
save it and close
3. Now open com/android/systemui/R$styleable.smali
look for this
Code:
.field public static final AnalogClock:[I
below that add this
Code:
.field public static final BatteryIcon:[I
now look for this
Code:
sput-object v0, Lcom/android/systemui/R$styleable;->AnalogClock:[I
below add this
Code:
new-array v0, v3, [I
const v1, 0x7f01003c
aput v1, v0, v2
sput-object v0, Lcom/android/systemui/R$styleable;->BatteryIcon:[I
compare id from mine and replace
save it and close
compare my public ids and replace with your ids
from these files
com/android/systemui/BatteryCircleMeterView
com/android/systemui/BatteryMeterView
com/android/systemui/BatteryMeterView$BatteryTracker
and you are finally done
save it all and compile and replace
settings.apk final part editing
1. Download this app View attachment app-release.apk
2. Install the app
3. Have fun with this mod
no time to make settings
but one fine day i will add tut to add in settings app
Have fun
Dont forget to mention me if you used my work
Mod edit:
OP quote removed
wait for add to settings sir :fingers-crossed:
Work for systemui xperia X mod?
InitialL_Dee said:
wait for add to settings sir :fingers-crossed:
Click to expand...
Click to collapse
yhu dnt need to quote tha whole post just to post please.... edit please!
InitialL_Dee said:
wait for add to settings sir :fingers-crossed:
Click to expand...
Click to collapse
Hmm sure I will add but when I am free haha
Delete the quote bro
Make thread clean
vandiaz_sairavinz said:
Work for systemui xperia X mod?
Click to expand...
Click to collapse
Yes will work bro tested
@venkat kamesh thanks for the guide. I am going to have a busy weekend. ?
Sent from my SM-G935F using Tapatalk
Nice guide sir..
And By the way, did you ever try to port battery style from bliss pop 5.1..?
Screenshot please. thanks
venkat kamesh said:
vandiaz_sairavinz said:
Work for systemui xperia X mod?
Click to expand...
Click to collapse
Yes will work bro tested
Click to expand...
Click to collapse
I'm using Xperia X SystemUI, but my .smali doesn't have these lines:
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
Code:
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
Is there something else I should be looking for?
@venkat kamesh
Hi bro
I can't find this line
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
I am using Xperia X SystemUI. U told its working with X SystemUI too.
@Bloodlvst bro same here.
Awsm mod bro ?
Any guide(mod or theming) of xperia x systemui for cm12.1 ☺
Thx bro
Bloodlvst said:
I'm using Xperia X SystemUI, but my .smali doesn't have these lines:
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
Code:
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
Is there something else I should be looking for?
Click to expand...
Click to collapse
Rajeev said:
@venkat kamesh
Hi bro
I can't find this line
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
I am using Xperia X SystemUI. U told its working with X SystemUI too.
@Bloodlvst bro same here.
Click to expand...
Click to collapse
Instead of this
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
Search for this
Code:
invoke-virtual/range {v4 .. v9}, Landroid/content/Context;->registerReceiverAsUser(Landroid/content/BroadcastReceiver;Landroid/os/UserHandle;Landroid/content/IntentFilter;Ljava/lang/String;Landroid/os/Handler;)Landroid/content/Intent;
Instead of this
Code:
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
Search for this
Code:
:cond_0
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->addNavigationBar()V
Just search these lines instead of those two and do all stuff as said by op.
jitz975 said:
Just search these lines instead of those two and do all stuff as said by op.
Click to expand...
Click to collapse
Gave this a shot, but I'm getting force close in SystemUI.
Couple of notes - the 2 files at the end:
BatteryMeterView
BatteryMeterView$BatteryTracker
Am I editing those or am I editing:
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker
I ask because the puiblic ID's in BatteryMeterView don't match at all with the public(compare).xml, but the "mod" ones do. Is there a step missing?
Hopefully it's just a small issue! :fingers-crossed:
Bloodlvst said:
Gave this a shot, but I'm getting force close in SystemUI.
Couple of notes - the 2 files at the end:
BatteryMeterView
BatteryMeterView$BatteryTracker
Am I editing those or am I editing:
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker
I ask because the puiblic ID's in BatteryMeterView don't match at all with the public(compare).xml, but the "mod" ones do. Is there a step missing?
Hopefully it's just a small issue! :fingers-crossed:
Click to expand...
Click to collapse
Bro i did this mod, only using this guide and it worked at first go.
jitz975 said:
Bro i did this mod, only using this guide and it worked at first go.
Click to expand...
Click to collapse
Did you change the ID's in:
BatteryMeterView
BatteryMeterView$BatteryTracker
Or the ones in:
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker
I'll give it another go!
Bloodlvst said:
Did you change the ID's in:
BatteryMeterView
BatteryMeterView$BatteryTracker
Or the ones in:
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker
I'll give it another go!
Click to expand...
Click to collapse
Yes, id's are in these two
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker, op missed that mod part
If using Xperia X UI, you will need to replace your system_icons.xml with the following code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:id="@id/system_icons" android:layout_width="wrap_content" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<com.android.keyguard.AlphaOptimizedLinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="0.0dip" layout="@layout/signal_cluster_view" />
<com.android.systemui.BatteryMeterViewMod android:id="@+id/battery_stock" android:visibility="gone" android:layout_width="10.5dip" android:layout_height="16.0dip" android:layout_marginBottom="1.0px" android:layout_marginStart="0.0dip" systemui:batteryView="statusbar" />
<com.android.systemui.BatteryCircleMeterView android:textAppearance="@style/TextAppearance.StatusBar.Battery" android:gravity="bottom" android:id="@+id/circle_battery" android:paddingLeft="0.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" systemui:batteryView="statusbar" />
<com.android.systemui.rz.LeftLayout android:layout_width="wrap_content" android:layout_height="wrap_content" key="battery_hide">
<LinearLayout android:gravity="center_vertical" android:id="@id/battery_group" android:layout_width="wrap_content" android:layout_height="wrap_content">
<com.sonymobile.systemui.BatteryLevelView android:textSize="@dimen/battery_level_text_size" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/battery_level" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:importantForAccessibility="noHideDescendants" />
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="9.5dip" android:layout_height="14.5dip" android:layout_marginBottom="@dimen/battery_margin_bottom" android:layout_marginStart="@dimen/battery_margin_start" />
</LinearLayout>
</com.android.systemui.rz.LeftLayout>
</LinearLayout>
@venkat kamesh - Bro, is there any plans to make it so you don't need to restart systemUI to make changes? Or is this a limitation of Marshmallow?
Hello guys
After very long time here is a new TUT for MM
Requirements (deodexed):-
Framework.jar
Settings.apk
SystemUI.apk
NotePad++
Makesure you had Superuser mod
Patience.. if you dont have try to get it :silly:
First part
1. Download this View attachment framework.jar.zip
2. Decompile framework.jar
3. Merge the Code in your Framework.jar
4. Recompile and replace
Continued in next post
Systemui ( second part )
Decompile SystemUI.apk
1. Download this View attachment SystemUI.apk.zip and merge to your SystemUI.apk
Now open systemui.apk/res/values/colors.xml
Add this
Code:
<color name="gesture_overlay_background_fill_color">#80000000</color>
<color name="gesture_color">@android:color/holo_blue_light</color>
2. Compile and decompile
3. Open Systemui.apk/smali/com/android/systemui/statusbar/BaseStatusBar.smali
find this
Code:
.field private mFontScale:F
after that add this
Code:
.field protected mGestureAnywhereView:Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;
.annotation runtime Landroid/annotation/ChaosLab;
classification = .enum Landroid/annotation/ChaosLab$Classification;->NEW_FIELD:Landroid/annotation/ChaosLab$Classification;
name = "GestureAnywhere"
.end annotation
.end field
find this
Code:
# virtual methods
After that add this
Code:
.method protected addGestureAnywhereView()V
.locals 3
.annotation runtime Landroid/annotation/ChaosLab;
classification = .enum Landroid/annotation/ChaosLab$Classification;->NEW_METHOD:Landroid/annotation/ChaosLab$Classification;
name = "GestureAnywhere"
.end annotation
.prologue
.line 2413
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mContext:Landroid/content/Context;
const v1, 0x7f040059
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;
iput-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mGestureAnywhereView:Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;
.line 2415
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mWindowManager:Landroid/view/WindowManager;
iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mGestureAnywhereView:Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;
const/4 v2, 0x3
invoke-virtual {p0, v2}, Lcom/android/systemui/statusbar/BaseStatusBar;->getGestureAnywhereViewLayoutParams(I)Landroid/view/WindowManager$LayoutParams;
move-result-object v2
invoke-interface {v0, v1, v2}, Landroid/view/WindowManager;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
.line 2416
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mGestureAnywhereView:Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;
invoke-virtual {v0, p0}, Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;->setStatusBar(Lcom/android/systemui/statusbar/BaseStatusBar;)V
.line 2417
return-void
.end method
Replace ids (compare from public that i gave in zip
Now look for this method
Code:
.method protected abstract getMaxKeyguardNotifications()I
After that method
Add this method
Code:
.method protected getGestureAnywhereViewLayoutParams(I)Landroid/view/WindowManager$LayoutParams;
.locals 6
.param p1, "gravity" # I
.annotation runtime Landroid/annotation/ChaosLab;
classification = .enum Landroid/annotation/ChaosLab$Classification;->NEW_METHOD:Landroid/annotation/ChaosLab$Classification;
name = "GestureAnywhere"
.end annotation
.prologue
.line 2427
new-instance v0, Landroid/view/WindowManager$LayoutParams;
const/4 v1, -0x2
const/4 v2, -0x1
const/16 v3, 0x7e1
const v4, 0x840068
const/4 v5, -0x3
invoke-direct/range {v0 .. v5}, Landroid/view/WindowManager$LayoutParams;-><init>(IIIII)V
.line 2438
.local v0, "lp":Landroid/view/WindowManager$LayoutParams;
iget v1, v0, Landroid/view/WindowManager$LayoutParams;->privateFlags:I
or-int/lit8 v1, v1, 0x40
iput v1, v0, Landroid/view/WindowManager$LayoutParams;->privateFlags:I
.line 2439
or-int/lit8 v1, p1, 0x30
iput v1, v0, Landroid/view/WindowManager$LayoutParams;->gravity:I
.line 2440
const-string v1, "GestureAnywhereView"
invoke-virtual {v0, v1}, Landroid/view/WindowManager$LayoutParams;->setTitle(Ljava/lang/CharSequence;)V
.line 2442
return-object v0
.end method
.method public getHandler()Landroid/os/Handler;
.locals 1
.prologue
.line 344
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;
:goto_0
return-object v0
:cond_0
invoke-virtual {p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->createHandler()Lcom/android/systemui/statusbar/BaseStatusBar$H;
move-result-object v0
goto :goto_0
.end method
save and close
4. Open SystemUI.apk/smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
Find this method
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
after .local xx
add this
Code:
.annotation runtime Landroid/annotation/ChaosLab;
classification = .enum Landroid/annotation/ChaosLab$Classification;->CHANGE_CODE:Landroid/annotation/ChaosLab$Classification;
name = "GestureAnywhere"
.end annotation
Now find this line
Code:
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateEmptyShadeView()V
after that add this line
Code:
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->addGestureAnywhereView()V
Save and Compile
Replace the Ids by comparing with mine that i gave in zip
and replace
For final part of Settings continued in next post #3
Settings (Final part)
Decompile your settings.apk
1. Download this View attachment Settings.apk.zip
Merge them to your settings
2. open settings.apk/res/values/arrays.xml
add this
Code:
<string-array name="gesture_anywhere_position_entries">
<item>@string/gesture_anywhere_position_left</item>
<item>@string/gesture_anywhere_position_right</item>
</string-array>
<string-array name="gesture_anywhere_position_values">
<item>3</item>
<item>5</item>
</string-array>
open settings.apk/res/values/colors.xml
add this
Code:
<color name="ga_gesture_color">#ff07998b</color>
<color name="icon_tint_color">@android:color/material_deep_teal_500</color>
open settings.apk/res/values/dimens.xml
add this
Code:
<dimen name="ga_gesture_thumbnail_inset">8.0dip</dimen>
<dimen name="ga_gesture_thumbnail_size">64.0dip</dimen>
<dimen name="shortcut_picker_left_padding">40.0dip</dimen>
open settings.apk/res/values/strings.xml
add this
Code:
<string name="gesture_anywhere_title">Gesture anywhere</string>
<string name="gesture_anywhere_enabled_title">Gesture anywhere</string>
<string name="gesture_anywhere_enabled_summary">Enable the Gesture anywhere feature</string>
<string name="gesture_anywhere_position_title">Location</string>
<string name="gesture_anywhere_position_left">Left edge</string>
<string name="gesture_anywhere_position_right">Right edge</string>
<string name="gesture_anywhere_gestures_title">Gestures</string>
<string name="gesture_anywhere_gestures_summary">Add, remove and edit gestures</string>
<string name="ga_button_add">Add gesture</string>
<string name="ga_button_reload">Reload</string>
<string name="ga_button_discard">Discard</string>
<string name="ga_button_done">Done</string>
<string name="ga_prompt_gesture_name">Name</string>
<string name="ga_error_missing_name">You must enter a name</string>
<string name="ga_save_success">Gesture saved in %s</string>
<string name="ga_rename_action">OK</string>
<string name="ga_cancel_action">Cancel</string>
<string name="ga_gestures_loading">Loading gestures...</string>
<string name="ga_gestures_empty">No gestures</string>
<string name="ga_gestures_activity">Gestures</string>
<string name="ga_gestures_edit">Edit</string>
<string name="ga_gestures_delete">Delete</string>
<string name="ga_gestures_delete_success">Gesture deleted</string>
<string name="ga_gestures_rename_title">Rename gesture</string>
<string name="ga_gestures_rename_label">Gesture name</string>
<string name="ga_gestures_error_loading">Could not load %s. Make sure you have storage available.</string>
<string name="trigger_category">Trigger region</string>
<string name="trigger_width_title">Trigger width</string>
<string name="trigger_width_summary">Adjust the width of the trigger area</string>
<string name="trigger_top_title">Trigger position</string>
<string name="trigger_top_summary">Adjust the vertical postion of the trigger area</string>
<string name="trigger_bottom_title">Trigger height</string>
<string name="trigger_bottom_summary">Adjust the height of the trigger area</string>
<string name="seekbar_default">Default</string>
<string name="profile_applist_title">Applications</string>
<string name="picker_activities">Activities</string>
<string name="select_custom_app_title">Select custom app</string>
<string name="select_custom_activity_title">Select custom activity</string>
open Settings.apk/AndroidManifest.xml
at the end before </applications>
add this
Code:
<activity android:name=".kryp.gestureanywhere.GestureAnywhereBuilderActivity"/>
<activity android:name=".kryp.gestureanywhere.GestureAnywhereCreateGestureActivity"/>
in any of your setting add this ( example in mine added to ...., settings.apk/res/xml/kryp_gesture.xml)
you can add to display_settings.xml or your wish
Code:
<PreferenceScreen android:layout="@layout/pac_gestureanywhere_preference" android:title="@string/gesture_anywhere_title" android:key="gesture_anywhere" android:fragment="com.android.settings.kryp.gestureanywhere.GestureAnywhereSettings" />
Compile and Decompile... replace Ids by comparing with the one i gave in zip
If you use my work just mention me... that makes me Happier
Regards
VK
Result
This is how it works and look like (my old video)
Its work in Lp 5.1 sir?
menjete said:
Its work in Lp 5.1 sir?
Click to expand...
Click to collapse
No just MM
---------------------------------------------------------------------
@venkat kamesh thanks bro
Can someone plz point me to a similar guide for KK??
You are a life saver! I will surely try this now. This post deserves to be pinned. Also please try to make another guide for Nougat! thanks.
venkat kamesh said:
Replace ids (compare from public that i gave in zip
Save and Compile
Replace the Ids by comparing with mine that i gave in zip
and replace
For final part of Settings continued in next post #3
Click to expand...
Click to collapse
Can you please tell me what do those long list of ids mean and where do i replace them? Im new to this.
rushabshah32 said:
Can you please tell me what do those long list of ids mean and where do i replace them? Im new to this.
Click to expand...
Click to collapse
Mate not that hard btw here u go
SecSettings
GestureAnywhereBuilderActivity$GesturesAdapter.smali
const v3, 0x7f04016a ### <public type="layout" name="ga_gestures_item" id="0x7f04016a" />
GestureAnywhereBuilderActivity.smali
const v2, 0x7f0c103e #### <public type="string" name="ga_gestures_error_loading" id="0x7f0c103e" />
const v1, 0x7f120378 #### <public type="id" name="addButton" id="0x7f120378" />
const v1, 0x7f120379 ### <public type="id" name="reloadButton" id="0x7f120379" />
const v1, 0x7f0e0081 #### <public type="color" name="ga_gesture_color" id="0x7f0e0081" />
const v1, 0x7f0b00db ### <public type="dimen" name="ga_gesture_thumbnail_inset" id="0x7f0b00db" />
const v1, 0x7f0b00dc ### <public type="dimen" name="ga_gesture_thumbnail_size" id="0x7f0b00dc" />
const v2, 0x7f120378 ### <public type="id" name="addButton" id="0x7f120378" />
const v2, 0x7f120379 ### <public type="id" name="reloadButton" id="0x7f120379" />
GestureAnywhereBuilderActivity.smali
const v1, 0x7f0c103b ### <public type="string" name="ga_gestures_delete_success" id="0x7f0c103b" />
const v0, 0x7f04016b ### <public type="layout" name="ga_gestures_list" id="0x7f04016b" />
const v2, 0x7f0c1039 #### <public type="string" name="ga_gestures_edit" id="0x7f0c1039" />
const v2, 0x7f0c103a ### <public type="string" name="ga_gestures_delete" id="0x7f0c103a" />
const v1, 0x7f0c1037 ### <public type="string" name="ga_gestures_empty" id="0x7f0c1037" />
GestureAnywhereCreateGestureActivity.smali
const v1, 0x7f120377 ## <public type="id" name="gestures_overlay" id="0x7f120377" />
const v6, 0x7f040169 ### <public type="layout" name="ga_create_gesture" id="0x7f040169" />
const v6, 0x7f1200b7 ### <public type="id" name="done" id="0x7f1200b7" />
const v6, 0x7f120376 ## <public type="id" name="gesture_name" id="0x7f120376" />
const v6, 0x7f120377 ### <public type="id" name="gestures_overlay" id="0x7f120377" />
const v1, 0x7f120377 ### ## <public type="id" name="gestures_overlay" id="0x7f120377" />
GestureAnywhereSettings.smali
const v3, 0x7f08009a ### <public type="xml" name="gesture_anywhere" id="0x7f08009a" />
const v1, 0x7f0c1025 ### <public type="string" name="gesture_anywhere_title" id="0x7f0c1025" />
ShortcutPickHelper$AppExpandableAdapter.smali
const v3, 0x7f0b00dd ### <public type="dimen" name="shortcut_picker_left_padding" id="0x7f0b00dd" />
ShortcutPickHelper.smali
const v10, 0x7f0c1047 ## <public type="string" name="profile_applist_title" id="0x7f0c1047" />
const v10, 0x7f0c1048 ## <public type="string" name="picker_activities" id="0x7f0c1048" />
const v11, 0x7f0c104a ### <public type="string" name="select_custom_activity_title" id="0x7f0c104a" />
const v9, 0x7f0c1047 ### <public type="string" name="profile_applist_title" id="0x7f0c1047" />
const v9, 0x7f0c1048 ### <public type="string" name="picker_activities" id="0x7f0c1048" />
const v9, 0x7f020168 ## <public type="drawable" name="activities_icon" id="0x7f020168" />
const v10, 0x7f0c1049 ### <public type="string" name="select_custom_app_title" id="0x7f0c1049" />
SeekBarPreferenceCham.smali
const v3, 0x7f120338 #### <public type="id" name="seekBarPrefBarContainer" id="0x7f120338" />
const v4, 0x7f040168 #### <public type="layout" name="charmseek_bar_preference" id="0x7f040168" />
const v2, 0x7f0c1046 ### <public type="string" name="seekbar_default" id="0x7f0c1046" />
const v5, 0x7f120336 ### <public type="id" name="seekBarPrefValue" id="0x7f120336" />
const v5, 0x7f120335 ### <public type="id" name="seekBarPrefUnitsRight" id="0x7f120335" />
const v5, 0x7f120337 #### <public type="id" name="seekBarPrefUnitsLeft" id="0x7f120337" />
SystemUI.apk
GestureAnywhereView.smali
const v0, 0x7f100140 ### <public type="id" name="content" id="0x7f100140" />
const v0, 0x7f10017d ### <public type="id" name="gesture_overlay" id="0x7f10017d" />
const v0, 0x7f10017f ### <public type="id" name="cancel_gesturing" id="0x7f10017f" />
TriggerOverlayView.smali
const v0, 0x7f02041c ### <public type="drawable" name="trigger_region" id="0x7f02041c" />
thank you for hard work and time
can you make zip to flash
thereassaad said:
Mate not that hard btw here u go
.
.
.
Click to expand...
Click to collapse
Thanks a ton! With this all the steps worked smoothly. The last problem I've is this.. Re compiling framework.jar with the files in priced zip merged in it.
Code:
>apktool b framework.jar.out
I: Using Apktool 2.2.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
Exception in thread "main" org.jf.util.ExceptionWithContext: Unsigned short value out of range: 65536
at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116)
at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:329)
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1027)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:803)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:252)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:230)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:53)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:38)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:400)
at brut.androlib.Androlib.buildSources(Androlib.java:331)
at brut.androlib.Androlib.build(Androlib.java:287)
at brut.androlib.Androlib.build(Androlib.java:263)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)
Really cool, Nougat?
DroidFreak32 said:
Thanks a ton! With this all the steps worked smoothly. The last problem I've is this.. Re compiling framework.jar with the files in priced zip merged in it.
Code:
>apktool b framework.jar.out
I: Using Apktool 2.2.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
Exception in thread "main" org.jf.util.ExceptionWithContext: Unsigned short value out of range: 65536
at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116)
at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:329)
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1027)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:803)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:252)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:230)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:53)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:38)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:400)
at brut.androlib.Androlib.buildSources(Androlib.java:331)
at brut.androlib.Androlib.build(Androlib.java:287)
at brut.androlib.Androlib.build(Androlib.java:263)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)
Click to expand...
Click to collapse
Move all stuff in classes_3, same path
DroidFreak32 said:
Thanks a ton! With this all the steps worked smoothly. The last problem I've is this.. Re compiling framework.jar with the files in priced zip merged in it.
Code:
>apktool b framework.jar.out
I: Using Apktool 2.2.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
Exception in thread "main" org.jf.util.ExceptionWithContext: Unsigned short value out of range: 65536
at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116)
at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:329)
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1027)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:803)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:252)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:230)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:53)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:38)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:400)
at brut.androlib.Androlib.buildSources(Androlib.java:331)
at brut.androlib.Androlib.build(Androlib.java:287)
at brut.androlib.Androlib.build(Androlib.java:263)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)
Click to expand...
Click to collapse
Look where u paste smali that provided by op just move them to classes3 with same folders path ..
please guide me how to get gesture anywhere in android oreo 8.1.
Amazing Tutorial, it works on my s6 MM
Fc systemUi how to fix
---------- Post added at 02:35 PM ---------- Previous post was at 02:02 PM ----------
java.lang.VerifyError: Verifier rejected class com.android.systemui.pac.gestureanywhere.GestureAnywhereView due to bad method void com.android.systemui.pac.gestureanywhere.GestureAnywhereView.enableNavButtons() (declaration of 'com.android.systemui.pac.gestureanywhere.GestureAnywhereView' appears in /system/priv-app/SystemUI/SystemUI.apk)
how to fix?
Hello guys
After a long time here is a new Guide
Thanks to @kingdj and dedy (my friends)
a ParaS.H.I.T team
We worked for months spent sleepless nights on this mod
This mod got extinct on 4.4 seems lol
Now we successfully done till MM
This works for all variety of devices (samsung/sony/ all devices running MM )
Sony theme works so no worries
Check the Video on how it look like
Requirements:-
1. Make sure you had SuperUserMod
2. SystemUI.apk (deodexed)
3. Settings.apk (deodexed)
4. TickleMyAndroid by @Ticklefish or Advanced APK Tool
Start:- (also included with 3 Dot Menu)
1. Download this View attachment SystemUI.apk.zip
2. Decompile SystemUI.apk
3. Merge the complete files to your SystemUI.apk (no worries)
4. Open systemui.apk/res/values/colors.xml
add these
Code:
<color name="status_bar_background_opaque">@color/system_bar_background_opaque</color>
<color name="status_bar_background_semi_transparent">@color/system_bar_background_semi_transparent</color>
<color name="status_bar_background_transparent">@color/system_bar_background_transparent</color>
<color name="navigation_bar_background_opaque">@color/system_bar_background_opaque</color>
<color name="navigation_bar_background_semi_transparent">@color/system_bar_background_semi_transparent</color>
<color name="navigation_bar_background_transparent">@color/system_bar_background_transparent</color>
<color name="keyguard_default_primary_text_color">#ffffffff</color>
<color name="keyguard_default_secondary_text_color">#b3ffffff</color>
<color name="keyguard_default_icon_color">#ffffffff</color>
5. Compile and decompile
6. Compare Public ids and replace or Use this Amazing tool Public ID Converter by @loserskater as this tool replaces IDS
The Remain part continued in next post
SystemUI part 2
Continuation
1. Open SystemUI.apk/smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
look for this code
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$DozeServiceHost;,
After this line
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$DozeServiceHost;,
Add this Annotation
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$100000023;,
Find this
Code:
# static fields
Below that add this
Code:
.field public static mExpandedVisible:Z
Find this line and Delete
Code:
.field mExpandedVisible:Z
Find this
Code:
# instance fields
Below add these lines
Code:
.field private mOverrideIconColor:I
.field private mPreviousOverrideIconColor:I
1.2. Now Find this method
Code:
.method public constructor <init>()V
find this line (v3 may vary)
Code:
iput v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNaturalBarHeight:I
Below add these lines
Code:
iput v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPreviousOverrideIconColor:I
iput v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mOverrideIconColor:I
1.3 Find this method
Code:
.method private addNavigationBar()V
Before that method add these methods
Code:
.method static synthetic access$L1000016(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)I
.locals 1
iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPreviousOverrideIconColor:I
return v0
.end method
.method static synthetic access$L1000017(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)I
.locals 1
iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mOverrideIconColor:I
return v0
.end method
.method static synthetic access$S1000016(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;I)V
.locals 0
iput p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPreviousOverrideIconColor:I
return-void
.end method
.method static synthetic access$S1000017(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;I)V
.locals 0
iput p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mOverrideIconColor:I
return-void
.end method
1.4 now you need to change Instance to Static
Using Notepad++ find this mExpandedVisible:Z
so you get similar lines like this
Code:
[COLOR="red"]i[/COLOR]get-boolean v0, [COLOR="Blue"]p0,[/COLOR] Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->[COLOR="red"]mExpandedVisible:Z[/COLOR]
In the above line do changes
Replace iget-boolean to sget-boolean and delete blue p0,
and it look like this after Edit
Code:
[COLOR="Red"]s[/COLOR]get-boolean v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;-[COLOR="red"]>mExpandedVisible:Z[/COLOR]
So like this you need to change them (Around 8 need to be changed )
Comparing files are available below
1.5 Find this method
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
at the end of that method find this line
Code:
invoke-static {v4, v5}, Landroid/view/ThreadedRenderer;->overrideProperty(Ljava/lang/String;Ljava/lang/String;)V
After that line add these lines
Code:
const/4 v2, 0x1
new-array v2, v2, [Lcom/android/systemui/statusbar/phone/BarBackgroundUpdater$UpdateListener;
const/4 v3, 0x0
new-instance v4, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$100000023;
move-object/from16 v0, p0
move-object/from16 v1, p0
invoke-direct {v4, v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$100000023;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Ljava/lang/Object;)V
aput-object v4, v2, v3
invoke-static {v2}, Lcom/android/systemui/statusbar/phone/BarBackgroundUpdater;->addListener([Lcom/android/systemui/statusbar/phone/BarBackgroundUpdater$UpdateListener;)V
Now find this method
Code:
.method public setSystemUiVisibility(II)V
in that find this lines
Code:
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mIconController:Lcom/android/systemui/statusbar/phone/StatusBarIconController;
above move-object/from16 v0, p0
Add this line
Code:
sget-boolean v5, Lcom/android/systemui/statusbar/phone/BarBackgroundUpdater;->mStatusEnabled:Z
save and close PhoneStatusBar.smali
2. Search for this mExpandedVisible:Z in child files of PhoneStatusBar$xx.smali
in Sony i found in PhoneStatusBar$11.smali
so same
from
Code:
[COLOR="Red"]i[/COLOR]get-boolean v0, [COLOR="Blue"]v0,[/COLOR] Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->[COLOR="red"]mExpandedVisible:Z[/COLOR]
to
Code:
[COLOR="red"]s[/COLOR]get-boolean v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->[COLOR="red"]mExpandedVisible:Z[/COLOR]
3. Now open SystemUI.apk/smali/com/android/systemui/statusbar/phone/StatusBarIconController.smali
find this line
Code:
.field private final mHandler:Landroid/os/Handler;
Replace that line to this
Code:
.field public final mHandler:Landroid/os/Handler;
Now save and Close all
Complie and replace
For compare Download this files View attachment dsb_compare_statusbar.zip
Now you need to place the Lib to you SystemUI.apk
Merge this lib to system/priv-app ( use any root explorer )
For 64 bit devices :- View attachment 64bit_lib_systemui_dsb.zip
For ARM / 32 bit devices :- View attachment arm_32bit_lib_systemui_dsb.zip
For x86_x64 devices :- View attachment 3940776
After Placing lib replace systemUI.apk and reboot tada
Video soon available
For settings Look for next post
settings.apk final part and Video
Settings Final part:-
1. Decompile Settings.apk
2. Download this View attachment settings.apk.zip
3. Extract and Merge it
4. Open Settings.apk/res/values/strings.xml
add these lines
Code:
<string name="dynamic_system_bars_category_title">Dynamic system bars</string>
<string name="dynamic_status_bar_title">Dynamic status bar</string>
<string name="dynamic_status_bar_summary">Automatically update the background of the status bar</string>
<string name="dynamic_navigation_bar_title">Dynamic navigation bar</string>
<string name="dynamic_navigation_bar_summary">Automatically update the background of the navigation bar</string>
<string name="dynamic_system_bars_gradient_title">System bar gradient</string>
<string name="dynamic_system_bars_gradient_summary">Overlay a gradient on the system bars</string>
<string name="dynamic_status_bar_filter_title">Darker status bar</string>
<string name="dynamic_status_bar_filter_summary">Overlay a darkening filter on the status bar</string>
5. Add this any where to your settings (display_settings.xml or your wish)
Code:
<PreferenceScreen android:icon="@drawable/kryp_dsb" android:id="@+id/dsb" android:title="Dinamic Engine" android:summary="Amaze Your view of Status and Navigation Bar" android:fragment="com.android.settings.kryp.Dsb" />
6. As this mod also contain 3 Dot mod to add settings Follow this post
7. Compile and Decomopile the Settings.apk
Compare ids (provided my public.xml) and replace the Ids
Recompile and replace
reboot and test
This is Part of My Rom Kryptonian
Dont Forget to mention me if you use My work
That feels me Happy
does this framework running just like as flat style colored bar module on xposed?
Intriguing. I'll have to keep an eye on this thread..
SystemUI.apk.zip not failed extrack?
ryandxter said:
does this framework running just like as flat style colored bar module on xposed?
Click to expand...
Click to collapse
Check video below bro
Ticklefish said:
Intriguing. I'll have to keep an eye on this thread..
Click to expand...
Click to collapse
Sure i can seen your Blink eye
vandiaz_sairavinz said:
SystemUI.apk.zip not failed extrack?
Click to expand...
Click to collapse
download again and try bro
Here is the Video On how the mod works
@venkat kamesh as always , your done best
DSB to lolipop bro...
Do you Have tutorial....
Nice, great work Sir VK
and thanks you.
excuse me,,could you please help me,.. im in step 1,after this one :
3. Merge the complete files to your SystemUI.apk (no worries)
4. Open systemui.apk/res/values/colors.xml
add these
5. Compile and decompile
6. Compare Public ids and replace or Use this Amazing tool Public ID Converter by @loserskater as this tool replaces IDS
I have read the tool,and we need Source smail file for compare IDs,,but could you please tell me which smail file in this file 1. Download this SystemUI.apk.zip is Source smail
Nice nice
Does this require UB? also, can I install on X system UI on a z3c? The framework res is from z3c
panzerox123 said:
Does this require UB? also, can I install on X system UI on a z3c? The framework res is from z3c
Click to expand...
Click to collapse
You don't need UB and it will work on that framework and systemUI
DavidMKD said:
You don't need UB and it will work on that framework and systemUI
Click to expand...
Click to collapse
Thanks!
Will it work if I used zervices.Jar SuperUserMod by Rajeev?
panzerox123 said:
Thanks!
Will it work if I used zervices.Jar SuperUserMod by Rajeev?
Click to expand...
Click to collapse
It should, just backup in case
DavidMKD said:
It should, just backup in case
Click to expand...
Click to collapse
Ok. Thanks!
And will it work with Xperia X SystemUI on z3c?
panzerox123 said:
Ok. Thanks!
And will it work with Xperia X SystemUI on z3c?
Click to expand...
Click to collapse
It should work on any SystemUI as long it is MM and it has those lines
DavidMKD said:
It should work on any SystemUI as long it is MM and it has those lines
Click to expand...
Click to collapse
Ok thanks!
Question: HOW DO I REPLACE PUBLIC IDS!! omg im hyperventilating..... sorry/// But how do I replace public ids?