[GUIDE] [LOLIPOP] [UPDATE :- 14.08.2015] Different Lolipop Mods Making Tutorials - Sony Cross-Device General

Hello XDA Community
After getting a lot of PMs and requests i am going to show you how to make some mods for Lolipop. This is only for Xperia devices that running official Android 5.0.2/5.1.1.
So here is the tutorial...
Things needed :-
PC
Latest Apk Tool ( I recomend TMA from my friend @Ticklefish )
Notepad ++
1. MAKING DYNAMIC NAVIGATION BAR
Dynamic Navigation bar means you will get the same color for navigation bar as like Statusbar after changing themes. If your statusbar color is RED means you will get same RED color in navigation bar too..
First decompile SystemUI.apk then go to res/values/drawbles.xml ( Open it with Notepad ++ )
(1) Find the below line :-
<item type="drawable" name="navigation_bar_gradient_background_non_skinnable">@drawable/nav_background</item>
Click to expand...
Click to collapse
And replace it with the below line :-
<item type="drawable" name="navigation_bar_gradient_background_non_skinnable">@drawable/status_background</item>
Click to expand...
Click to collapse
(2) Find the below line :-
<item type="drawable" name="somc_navbar_background_dark">@color/system_bar_background_opaque</item>
Click to expand...
Click to collapse
And replace it with the below line :-
<item type="drawable" name="somc_navbar_background_dark">@android:color/somc_color_dark_primary_dark</item>
Click to expand...
Click to collapse
(3) Find the below line :-
<item type="drawable" name="somc_navbar_background_light">@drawable/somc_navbar_background_dark</item>
Click to expand...
Click to collapse
And replace it with the below line :-
<item type="drawable" name="somc_navbar_background_light">@android:color/somc_color_dark_primary_light</item>
Click to expand...
Click to collapse
(4) Find the below line :-
<item type="drawable" name="somc_navbar_background_translucent">@drawable/nav_background</item>
Click to expand...
Click to collapse
And replace it with the below line :-
<item type="drawable" name="somc_navbar_background_translucent">@drawable/status_background</item>
Click to expand...
Click to collapse
Done. Save the xml file and close it. Then recompile SystemUI and use it..
SAMPLE SCREENS
{
"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. MAKING DYNAMIC NAVIGATION BAR WITH DROPDOWN STATUSBAR THEME
You will get Dynamic navigation bar mod and theme support for drop down statusbar also by using this guide.
First decompile SystemUI.apk then go to res/values/colors.xml ( Open it with Notepad ++ )
(1) Find the below line :-
<color name="system_primary_color">#ff263238</color>
<color name="system_secondary_color">#ff384248</color>
<color name="system_accent_color">#ff80cbc4</color>
Click to expand...
Click to collapse
And replace it with the below line :-
<color name="system_primary_color">@android:color/somc_color_dark_primary_dark</color>
<color name="system_secondary_color">@android:color/somc_color_primary_dark</color>
<color name="system_accent_color">@android:color/somc_color_accent_dark</color>
Click to expand...
Click to collapse
Save and close colors.xml
Then go to res/values/drawbles.xml ( Open it with Notepad ++ )
(1) Find the below line :-
<item type="drawable" name="navigation_bar_gradient_background_non_skinnable">@drawable/nav_background</item>
Click to expand...
Click to collapse
And replace it with the below line :-
<item type="drawable" name="navigation_bar_gradient_background_non_skinnable">@drawable/status_background</item>
Click to expand...
Click to collapse
(2) Find the below line :-
<item type="drawable" name="navigation_bar_lights_out_background">@color/system_bar_background_opaque</item>
Click to expand...
Click to collapse
And replace it with the below line :-
<item type="drawable" name="navigation_bar_lights_out_background">@android:color/somc_color_dark_primary_dark</item>
Click to expand...
Click to collapse
(3) Find the below line :-
<item type="drawable" name="navigation_bar_lights_out_background_land">@color/system_bar_background_opaque</item>
Click to expand...
Click to collapse
And replace it with the below line :-
<item type="drawable" name="navigation_bar_lights_out_background_land">@android:color/somc_color_dark_primary_dark</item>
Click to expand...
Click to collapse
(4) Find the below line :-
<item type="drawable" name="status_bar_lights_out_background">@color/system_bar_background_opaque</item>
<item type="drawable" name="somc_navbar_background_dark">@color/system_bar_background_opaque</item>
<item type="drawable" name="somc_navbar_background_dark_land">@color/system_bar_background_opaque</item>
<item type="drawable" name="somc_navbar_background_light">@drawable/somc_navbar_background_dark</item>
<item type="drawable" name="somc_navbar_background_light_land">@drawable/somc_navbar_background_dark_land</item>
Click to expand...
Click to collapse
And replace it with the below line :-
<item type="drawable" name="status_bar_lights_out_background">@android:color/somc_color_dark_primary_dark</item>
<item type="drawable" name="somc_navbar_background_dark">@android:color/somc_color_dark_primary_dark</item>
<item type="drawable" name="somc_navbar_background_dark_land">@android:color/somc_color_dark_primary_dark</item>
<item type="drawable" name="somc_navbar_background_light">@android:color/somc_color_dark_primary_dark</item>
<item type="drawable" name="somc_navbar_background_light_land">@android:color/somc_color_dark_primary_dark</item>
Click to expand...
Click to collapse
(5) Find the below line :-
<item type="drawable" name="somc_navbar_background_immersive">@color/system_bar_background_semi_transparent</item>
<item type="drawable" name="somc_navbar_background_immersive_land">@color/system_bar_background_semi_transparent</item>
Click to expand...
Click to collapse
And replace it with the below line :-
<item type="drawable" name="somc_navbar_background_immersive">@android:color/somc_color_dark_primary_dark</item>
<item type="drawable" name="somc_navbar_background_immersive_land">@android:color/somc_color_dark_primary_dark</item>
Click to expand...
Click to collapse
Done. Save the xml file and close it. Then recompile SystemUI and use it..
SAMPLE SCREENS
3. MAKING INVISIBLE POWER BUTTON IN STATUSBAR
So what is invisible power button ? U can put a invisible png in your statusbar's clock area to acces your power menu. You can simple tap it and turn ur display off. Long pressing the statusbar clock will give you power menu. So you can save your power hardware buttons life. Here is the tutorial for making a Invisible power button for Lolipop 5.0.2/5.1.1 deodexed roms..
First decompile SystemUI.apk then go to res/values/ids.xml ( Open it with Notepad ++ )
Add the below line to the end of ids.xml
<item type="id" name="lock">false</item>
Click to expand...
Click to collapse
Save and exit ids.xml
Then open res/values/strings.xml
Add the below line to the end of strings.xml
<string name="accessibility_lock">Lock</string>
Click to expand...
Click to collapse
Save and exit strings.xml
Then open res/layout/status_bar.xml
Find the line :-
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
Click to expand...
Click to collapse
Add the below line on top of above line :-
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="right" android:id="@id/home" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/screen_off" android:layout_toRightOf="@id/recent_apps" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" systemui:keyRepeat="false" androidrientation="vertical" />
Click to expand...
Click to collapse
So it should be like this :-
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="right" android:id="@id/home" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/screen_off" android:layout_toRightOf="@id/recent_apps" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" systemui:keyRepeat="false" androidrientation="vertical" />
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
Click to expand...
Click to collapse
Save status_bar.xml and close it.
Finally move the "screen_off.png" to res/drawable-hdpi
Recompile SystemUI and Enjoy.
Click HERE to download screen_off.png

Can you mod dynamic navibar with 3rd apps

Quoclam851995 said:
Can you mod dynamic navibar with 3rd apps
Click to expand...
Click to collapse
U can get with xda app.

Thanks for sharing friend. Very good ??

Erro
Gave error recompile ... Attached below

Marília de Oliveira said:
Gave error recompile ... Attached below
Click to expand...
Click to collapse
Well i can't help u for recompile or decompile error.. U need to use correct framework and apktool or Deodexed apks. I can only provide tutorials..

Nice tut bro @Rajeev
We RXSMB are everywhere now with more work like this ^^

Hey Rajeev bro, I was trying this out this morning but found that the paths on Z are different and I am not able to figure them out. Could you please guide me to the right way? Thanksss

Diatomix98 said:
Hey Rajeev bro, I was trying this out this morning but found that the paths on Z are different and I am not able to figure them out. Could you please guide me to the right way? Thanksss
Click to expand...
Click to collapse
Which path ? U using stock Lolipop or CM 12.1 ?

Rajeev said:
Which path ? U using stock Lolipop or CM 12.1 ?
Click to expand...
Click to collapse
Using stock lollipop, Existenz actually. I thought it's the rom's systemUI that is heavily modified so I downloaded your mod in theme and apps section but found it to be the same. I can't find values folder in res. Thus, no idea where the things you are pointing to.

Diatomix98 said:
Using stock lollipop, Existenz actually. I thought it's the rom's systemUI that is heavily modified so I downloaded your mod in theme and apps section but found it to be the same. I can't find values folder in res. Thus, no idea where the things you are pointing to.
Click to expand...
Click to collapse
Then u must done something wrong. Try to use latest Tickle My Android Tool by @Ticklefish and try again. There is no apks that without a value folder...

Rajeev said:
Then u must done something wrong. Try to use latest Tickle My Android Tool by @Ticklefish and try again. There is no apks that without a value folder...
Click to expand...
Click to collapse
Maybe you are right because I was using my phone to view it. Will take a look using my laptop later, thanks for the help

Bro @Rajeev I changed just like the OP sends but still not working, what can happen, you can look at it please arquivor.

ogunja said:
Bro @Rajeev I changed just like the OP sends but still not working, what can happen, you can look at it please arquivor.
Click to expand...
Click to collapse
What error u getting..? Is ur 5.0.2/5.1.1 SystemUI recompiled successfully without any errors?

Rajeev said:
What error u getting..? Is ur 5.0.2/5.1.1 SystemUI recompiled successfully without any errors?
Click to expand...
Click to collapse
Successfully recompiled Bro, I altered the 4 lines as OP but not work for me. Android 5.1.1.

ogunja said:
Successfully recompiled Bro, I altered the 4 lines as OP but not work for me. Android 5.1.1.
Click to expand...
Click to collapse
Don't worry.. Will look into to soon

Rajeev said:
Don't worry.. Will look into to soon
Click to expand...
Click to collapse
Bro is probably missing something in the OP because it altered the 4 lines and changed nothing in QuickSettings.
The color remains the same but the navbar is colored.
Thank you friend, greetings.

ogunja said:
Bro is probably missing something in the OP because it altered the 4 lines and changed nothing in QuickSettings.
The color remains the same but the navbar is colored.
Thank you friend, greetings.
Click to expand...
Click to collapse
Well first tutorial is only for navigation bar color change. Second tutorial will come soon after i find a pc. And quick settings toggles color won't change with this tutorial. I got quick settings toggle color because i am Using @serajr xperia xposed module..
So tutorial working fine... Good

Rajeev said:
Well first tutorial is only for navigation bar color change. Second tutorial will come soon after i find a pc. And quick settings toggles color won't change with this tutorial. I got quick settings toggle color because i am Using @serajr xperia xposed module..
So tutorial working fine... Good
Click to expand...
Click to collapse
? ? ? ? ? ? ? So I was right all along. My head was burning ? so. Thank Bro. Working fine here.

OP updated with more tutorials..

Related

[Tutorial] Adding new Activity Header/Sub Menu to Settings.apk

Hi Geeks
Here's a tutorial on how to add an Activity Header to Settings.apk​
Requirements:
1.Settings.apk
2.Notepad ++ or Editor Alternatives
3.Apktool to Decompile apk
4.A Little Common sense
Tutorial:
1. Decompile Settings.apk
2.Open to res/xml/settings_headers.xml
3.Lets take an example i want to Add "Maddy" as a activity header
{
"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"
}
add this line
Code:
<header android:icon="[COLOR="Brown"]@drawable/ic_settings_maddy[/COLOR]" android:id="[COLOR="SeaGreen"]@id/maddy_settings[/COLOR]" android:title="[COLOR="Purple"]@string/maddy_settings[/COLOR]" android:fragment="[COLOR="DarkOrange"]com.android.settings.Maddy[/COLOR]" />
The layout in settings_headers.xml is categorized. If you want submenu "Maddy" to appear after 'Apps' as shown,add the line after the line that says <header android:icon="@drawable/ic_settings_applications"..... as shown
Code:
<header android:icon="@drawable/ic_settings_applications" android:id="@id/application_settings" android:title="@string/applications_settings" android:fragment="com.android.settings.applications.ManageApplications" />
<header android:icon="@drawable/ic_settings_maddy" android:id="@id/maddy_settings" android:title="@string/maddy_settings" android:fragment="com.android.settings.Maddy" />
3.1-@drawable/ic_settings_maddy=This refers to the png in res/drawable-*dpi/ folder
Add a new png named ic_settings_maddy.png in res/drawable-*dpi/
It will be the Image that will show up in settings menu (The Wifi like icon in my case)
* = hdpi / mdpi /xhdpi /xxhdpi /xxxhdpi (Depends on your device)
3.2-@id/maddy_settings=This refers to id value in /res/values/ids.xml
Open res/values/ids.xml and add this code
Code:
<item type="id" name="maddy_settings">false</item>
3.3 - @string/maddy_settings = Refers to a string in res/values/strings.xml
Open strings.xml and add this code
Code:
<string name="maddy_settings">Your String here</string>
Add the string you wish to see in settings Submenu in place of 'Your String Here'
3.4-com.android.settings.Maddy = Refers to the smali file in smali/com/android/settings/
4. Open res/values/public.xml
and find the last line that says
<public type="xml" ...
like
Code:
<public type="xml" name="[I]somethig_something[/I]" id="[COLOR="Blue"]0x7f050053[/COLOR]" />
Note the Hex code in Blue.It can be different for you
and now add this line just after the last line of type="xml"
Code:
<public type="xml" name="maddy_settings" id="[COLOR="Red"]0x7f050054[/COLOR]" />
Also Note that the previous address in my case was 0x7f050053
so the new address will be "Previous address + 1(Hex addition)" i.e 0x7f050054
Replace 0x7f050054 with your calculated Address.
If your Address is 0x7f050039
Next Addres = 0x7f05003a
if your address is 0x7f05003f
next address = 0x7f050040
and so on..
5.Go to res/xml/
and add a new file named maddy_settings.xml
This xml would contain the Apps/Actions you wish to see inside the Submenu "Maddy"
Just like you see
Brightness
Screen timeout
etc etc
options when you click Display in Settings Menu
an example of what maddy_settings.xml may contain
PHP:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/maddy_settings"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<com.sonymobile.settings.preference.PreferenceCategory android:title="@string/uipref_title">
<PreferenceScreen android:icon="@drawable/cust_bar_wallpapers" android:title="@string/wallpaper_settings_title" android:key="wallpaper" android:fragment="com.android.settings.WallpaperTypeSettings" />
<com.sonymobile.settings.preference.IntentPreference android:icon="@drawable/ic_lighteffects" android:title="@string/light_effects_settings_title" android:key="light_effects" settings:dependOnIsValidIntent="true" settings:after="theme">
<intent android:targetPackage="com.sonymobile.settings.illumination" android:action="android.intent.action.MAIN" android:targetClass="com.sonymobile.settings.illumination.IlluminationSetting" />
</com.sonymobile.settings.preference.IntentPreference>
<com.sonymobile.settings.preference.IntentPreference android:icon="@drawable/homescreen_application_launcher" android:key="lockscreen" settings:dependOnIsValidIntent="true" settings:hasMetaData="true">
<intent android:action="com.sonyericsson.settings.intent.action.LOCKSCREEN" />
</com.sonymobile.settings.preference.IntentPreference>
</com.sonymobile.settings.preference.PreferenceCategory>
<com.sonymobile.settings.preference.PreferenceCategory android:title="@string/systemuipref_title">
<com.sonymobile.settings.preference.IntentPreference android:icon="@drawable/ic_systemui1" android:key="quicksettings" settings:dependOnIsValidIntent="true" settings:hasMetaData="true">
<intent android:action="com.sonymobile.intent.action.TOOLBAR_SETTINGS" />
</com.sonymobile.settings.preference.IntentPreference>
<com.sonymobile.settings.preference.IntentPreference android:icon="@drawable/ic_systemui2" android:key="power_toggles" settings:dependOnIsValidIntent="true" settings:hasMetaData="true">
<intent android:action="com.serajr.powertoggles.preferences.intent.PREFERENCES" />
</com.sonymobile.settings.preference.IntentPreference>
</com.sonymobile.settings.preference.PreferenceCategory>
</PreferenceScreen>
To Add these Apps/shortcuts to the submenu you just created,refer this guide [Tutorial] How to add any App/Option in Settings.apk by saqib nazm
Just use the new maddy_settings.xml to link your new apps/actions.
6.Open smali/com/android/settings/ and add a new file named Maddy.smali
paste this code in it
Code:
.class public Lcom/android/settings/Maddy;
.super Lcom/android/settings/SettingsPreferenceFragment;
.source "Maddy.java"
# direct methods
.method public constructor <init>()V
.locals 0
.prologue
.line 17
invoke-direct {p0}, Lcom/android/settings/SettingsPreferenceFragment;-><init>()V
return-void
.end method
# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
.locals 1
.parameter "savedInstanceState"
.prologue
.line 21
invoke-super {p0, p1}, Lcom/android/settings/SettingsPreferenceFragment;->onCreate(Landroid/os/Bundle;)V
.line 23
const v0, [COLOR="Blue"]0x7f050054[/COLOR]
invoke-virtual {p0, v0}, Lcom/android/settings/Maddy;->addPreferencesFromResource(I)V
.line 24
return-void
.end method
Find and replace "Maddy" with your smali name.
Smali names should always start with Capital Letters.
Also note the Hex code you added in Step 5.
replace 0x7f050054 with your Hex value.
7.Recompile your Apk and Done!
Note:
Should work with any versions of Xperia.
Also may work on other Devices,Please try and report.
Credits:
Saqib nazm : For teaching me all this!
DbcCabuslay : For Smali ideas
Jishnu Sur™ : For some Advice
Hit Thanks and Rate Good if you find it helpful and Motivate :good:​
Great guide, very nicely explained and elaborated :good: I hope this will help lots of users
saqib nazm said:
Great guide, very nicely explained and elaborated :good: I hope this will help lots of users
Click to expand...
Click to collapse
Thank you sir,for teachin me all this.
Good stuff.. glad to see you going ahead slowly..
Sent from my Nexus 5 using Tapatalk
Keep going Good work :good: All the Best !
Sent from my Nexus 5 using Tapatalk
Useful guide. Keep sharing this kind of stuffs.
vishal_android freak said:
Good stuff.. glad to see you going ahead slowly..
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Thank you!
Yes,the word slowly is so very important
Aman_Arora said:
Keep going Good work :good: All the Best !
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
BDFreak said:
Useful guide. Keep sharing this kind of stuffs.
Click to expand...
Click to collapse
Thank you Aman and Bd
Very good guide. Simple but very detailed. Better than many of the clustered one's! Congratulations..Keep up the good work!
Nice guide I was looking for something like this just this day.
Is it the same when adding sub menu inside another header like device_info_settings.xml?
Jishnu Sur™ said:
Very good guide. Simple but very detailed. Better than many of the clustered one's! Congratulations..Keep up the good work!
Click to expand...
Click to collapse
Thank you Jishnu
knightzero07 said:
Nice guide I was looking for something like this just this day.
Is it the same when adding sub menu inside another header like device_info_settings.xml?
Click to expand...
Click to collapse
This one is only for adding sub menus in main settings
For sub menu in device info,try studing "status" or "legal info" inside About to get an idea of how its referenced
Sent from my MT27i using Tapatalk
ok thanks @Madaditya
I was checking on that too. I'm adding codes without android:key
I guess it needs a key so it won't get fc.
Madaditya said:
Hi Geeks
Here's a tutorial on how to add an Activity Header to Settings.apk​
Click to expand...
Click to collapse
Why are you creating a new setting fragment? This is useless and complicated
You could have used this:
Code:
android:fragment="com.sonymobile.settings.GenericSettingsFragment"
This have been added by Sony since JB 4.2 and is allowing to create any new header with sub menus
Cheers
Great job !!!
Amazing tut, really useful!!!
@Pandemic ... was not exactly what were you needing?
niaboc79 said:
Why are you creating a new setting fragment? This is useless and complicated
You could have used this:
Code:
android:fragment="com.sonymobile.settings.GenericSettingsFragment"
This have been added by Sony since JB 4.2 and is allowing to create any new header with sub menus
Cheers
Click to expand...
Click to collapse
Wasn't aware of it
Thank you for guiding
Ill update this to the tut as well if the one doesn't exist
serajr said:
Amazing tut, really useful!!!
@Pandemic ... was not exactly what were you needing?
Click to expand...
Click to collapse
Thank u serajr
Yeah,pandemic got it.
We talked over the pm
Sent from my MT27i using Tapatalk
serajr said:
Amazing tut, really useful!!!
@Pandemic ... was not exactly what were you needing?
Click to expand...
Click to collapse
Yes bro @serajr
but i have it already i have moonwalker xposed in my settings with Xposed Modules and Xperia Xposed ^^
Brothers @serajr & @Madaditya
Sorry for spam but here just awesome ^^
Verstuurd vanaf mijn LT22i met Tapatalk
Pandemic said:
Brothers @serajr & @Madaditya
Sorry for spam but here just awesome ^^
Verstuurd vanaf mijn LT22i met Tapatalk
Click to expand...
Click to collapse
Wow... great bro... you got it!!
Once again, @Madaditya ... great job!
This kind of thread we want to see over xda!!
bro when i want recompaile i have this errors :
..\3-Out\Settings.apk\smali\com\android\settings\Maddy.smali[21,4] Error for input '.parameter': Invalid directive
..\3-Out\Settings.apk\smali\com\android\settings\Maddy.smali[21,15] mismatched input '"savedInstanceState"' expecting END_METHOD_DIRECTIVE
.
alinolaw71 said:
bro when i want recompaile i have this errors :
..\3-Out\Settings.apk\smali\com\android\settings\Maddy.smali[21,4] Error for input '.parameter': Invalid directive
..\3-Out\Settings.apk\smali\com\android\settings\Maddy.smali[21,15] mismatched input '"savedInstanceState"' expecting END_METHOD_DIRECTIVE
.
Click to expand...
Click to collapse
Are you using apktool 2? If so, you need to be using 1.5.2..
Sent from my C6603 using Tapatalk
Ticklefish said:
Are you using apktool 2? If so, you need to be using 1.5.2..
Sent from my C6603 using Tapatalk
Click to expand...
Click to collapse
bro pls send link to me.

[TUT]How To Change The Battery Icon On Stock Xperia KitKat..UPDATED!!

(***NOW UPDATED WITH CHARGING ICONS!!****)​
** THIS GUIDE IS FOR STOCK XPERIA KITKAT ROMS ONLY. IF YOU'RE ON A KK ROM THAT ISN'T MADE BY SONY, LOOK AT MY FRIEND @Erhany'S GUIDE HERE: http://forum.xda-developers.com/showpost.php?p=56300485&postcount=1 **
Changing the battery icon on a stock KitKat rom isn't easy. Google have changed how the icon is created and it's no longer possible to just change some icons and a few xml files.
Or is it?
Sony have put their own spin on KitKat and, if you've got an official stock Xperia 4.4 rom, you can still change the icon very easily. You just have to do something a little different to before..
How To Do It
So this is what the stock icon looks like:
{
"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"
}
It's okay..but we wouldn't be here if we weren't the sort who liked to change things.
First, you'll need to decompile your SystemUI.apk.
I'm not going to tell you how to do that, there's lots of guides already on xda. Although I do recommend taking a look at Tickle My Android (tinyurl.com/ticklemyandroid). It's made by a very good friend of mine..
You're also going to need four types of tiles:
a lot of files called 'stat_sys_battery_100.png', 'stat_sys_battery_99.png', 'stat_sys_battery_98.png', etc
a lot of files called 'stat_sys_battery_charge_anim100.png', 'stat_sys_battery_charge_anim99.png, 'stat_sys_battery_charge_anim98.png, etc
a file called 'stat_sys_battery.xml'
and a file called 'stat_sys_battery_charge.xml'
You'll find those all over xda as well. I've attached the ones I've used in this post, just so you can try them out.
Adding The Images
You'll need to copy those image files into your 'drawable-?dpi' folder. This will vary according to your device, on my XZ it's 'drawable-xxhdpi'.
This will give Android images to use as your battery icon.
Then comes the fun part.
Editing The XML
Normally, you'll copy 'stat_sys_battery.xml' and 'stat_sys_battery_charge.xml' into your drawable folder, overwriting the files that are already there.
There is no 'stat_sys_battery.xml' or 'stat_sys_battery_charge.xml' in KitKat.
Instead, rename 'stat_sys_battery.xml' to 'somc_sys_battery.xml'. And rename 'stat_sys_battery_charge.xml to 'somc_sys_charging.xml'. Then copy them into your drawable folder.
This will tell Android which images to use for each amount of charge in the battery.
Now edit status_bar.xml and change this piece of code:
Code:
<LinearLayout android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginStart="4.0dip">
<ImageView android:layout_gravity="center_vertical" android:id="@id/status" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<LinearLayout android:id="@id/battery_meter" android:layout_width="wrap_content" android:layout_height="fill_parent">
<ImageView android:layout_gravity="center_vertical" android:id="@id/battery_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ImageView android:layout_gravity="center_vertical" android:id="@id/stamina_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/somc_sys_powersaver" />
</LinearLayout>
<FrameLayout android:id="@id/battery_percent" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.sonymobile.systemui.statusbar.BatteryImage android:layout_gravity="start|center" android:id="@id/battery_percent_bg" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</FrameLayout>
</LinearLayout>
to:
Code:
<LinearLayout android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginStart="4.0dip">
<LinearLayout android:id="@id/battery_meter" android:layout_width="wrap_content" android:layout_height="fill_parent">
<ImageView android:layout_gravity="center_vertical" android:id="@id/status" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ImageView android:layout_gravity="center_vertical" android:id="@id/battery_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ImageView android:layout_gravity="center_vertical" android:id="@id/stamina_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/somc_sys_powersaver" />
</LinearLayout>
<FrameLayout android:id="@id/battery_percent" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.sonymobile.systemui.statusbar.BatteryImage android:layout_gravity="start|center" android:id="@id/battery_percent_bg" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</FrameLayout>
</LinearLayout>
This will place the charging icon next to the battery icon, inside the @id/battery_meter Layout. This will cause the charging icon to vanish if you turn on the percentage option in the Settings app.
We're nearly there..
Editing The Smali
Now comes the really fun part. It's time to edit some smali!
For this part, we need to do some detective work. Open your 'res/values/public.xml' and find these two lines:
<public type="drawable" name="somc_sys_battery" id="0x7f0200c9" />
<public type="drawable" name="somc_sys_charging" id="0x7f0200d6" />
Click to expand...
Click to collapse
They might be next to each other...or they might not.
The parts in red are the hex references that we're going to need to look for in our smali. It's likely the references will be different in your rom to mine.
Edit 'com\android\systemui\statusbar\policy\BatteryController.smali' and look for your 'somc_sys_charging' reference. The code you'll find should look like this:
const v11, 0x7f0200d6
invoke-virtual {v10, v11}, Landroid/widget/ImageView;->setImageResource(I)V
goto/16 :goto_3
Click to expand...
Click to collapse
You'll want to change this so it looks like this:
.local v10, "icon":Landroid/widget/ImageView;
const v11, 0x7f0200d6
invoke-virtual {v10, v11}, Landroid/widget/ImageView;->setImageResource(I)V
move-object/from16 v0, p0
iget v11, v0, Lcom/android/systemui/statusbar/policy/BatteryController;->mLevel:I
invoke-virtual {v10, v11}, Landroid/widget/ImageView;->setImageLevel(I)V
goto/16 :goto_3
Click to expand...
Click to collapse
Make sure you change the code in red to your own reference!
This will make Android change the charging icon when the battery level changes.
Then look for your 'somc_sys_battery' reference. The code you'll find should look like this:
.local v5, "icon":Landroid/widget/ImageView;
const v11, 0x7f0200c9
invoke-virtual {v5, v11}, Landroid/widget/ImageView;->setImageResource(I)V
Click to expand...
Click to collapse
Change it to:
.local v5, "icon":Landroid/widget/ImageView;
move-object/from16 v0, p0
iget-boolean v11, v0, Lcom/android/systemui/statusbar/policy/BatteryController;->mPlugged:Z
if-nez v11, :cond_40
const/4 v11, 0x0
goto: cond_50
:cond_40
const/16 v11, 0x8
:cond_50
invoke-virtual {v5, v11}, Landroid/widget/ImageView;->setVisibility(I)V
const v11, 0x7f0200c9
invoke-virtual {v5, v11}, Landroid/widget/ImageView;->setImageResource(I)V
Click to expand...
Click to collapse
Again, make sure you change the code in red to your own reference!
This will make the battery icon vanish when your phone's charging.
Now just save, recompile and push to your device as normal. Wait a while for it to reboot and...
(You'll also need to disable the battery percentage in the Settings app, if you haven't already.)
Of course, these aren't perhaps the best icons I could have chosen for these screenshots. I didn't have much time for this post, I just picked some at random and it looks a little lost. But that's the fun of battery icons..there are so many to choose from!
**HUGE Thanks Go To The Master, @serajr, For The Smali Help!**
**Thanks also go to @krzycho96 for their YouTube video**​
Amazing!!!
Great job bro!!!!! ... as always!!!
Masterpiece.... always dazzling our Xperias with mods!
Good job, but the hardest thing is make icon look good when stamina is activated , and low-battery mode activated,and when battery charging. I'm trying to do that
devilmaycry2020 said:
Good job, but the hardest thing is make icon look good when stamina is activated , and low-battery mode activated,and when battery charging. I'm trying to do that
Click to expand...
Click to collapse
I can take a look at this tomorrow, right now I'm away from computer.
The stamina icon could just be redrawn. Maybe we could reuse the one from 4.3?
Charging is a bit more complicated. In stock, a lightning bolt is displayed. I think we might be able to replace that with the same sort of level-list we had before..
Sent from my C6603 using Tapatalk
Great work bro :good: as what Ive expected again
hi all
i want the battery charging icon flashing like as video below, someone can help me. thanks
http://youtu.be/qkOgedJCKCI
devilmaycry2020 said:
hi all
i want the battery charging icon flashing like as video below, someone can help me. thanks
http://youtu.be/qkOgedJCKCI
Click to expand...
Click to collapse
I've got an idea about that. I'm trying something right now, in fact. Watch this space!
Ticklefish said:
I've got an idea about that. I'm trying something right now, in fact. Watch this space!
Click to expand...
Click to collapse
What's news ?
devilmaycry2020 said:
What's news ?
Click to expand...
Click to collapse
Not much, unfortunately. I tried changing a stat_sys_battery_charging.xml to somc_sys_charging.xml. But it didn't work the way I wanted.
The level-list was ignored and only the first drawable was shown. Which is a bit of a puzzle.
Hi, is there a chance to modify the Z2 systemUI into something like this? Please guide me to do this.
XPS_93 said:
Hi, is there a chance to modify the Z2 systemUI into something like this? Please guide me to do this.
Click to expand...
Click to collapse
Should be simple enough. Can you share your status_bar.xml please?
Sent from my C6603 using Tapatalk
Awesome Guide but something off-topic
How did you change the font of the lockScreen
Ticklefish said:
Should be simple enough. Can you share your status_bar.xml please?
Sent from my C6603 using Tapatalk
Click to expand...
Click to collapse
Alright, this is it. Is pulling it out from systemui.apk using winrar enough or I have to decompile the apk for it?
Edit: I've reuploaded the xml file decompiled from systemui.apk
XPS_93 said:
Alright, this is it. Is pulling it out from systemui.apk using winrar enough or I have to decompile the apk for it?
Click to expand...
Click to collapse
no no, you have to decompile system.apk, take out by winrar can not use because it was encrypted
John98Zakaria said:
Awesome Guide but something off-topic
How did you change the font of the lockScreen
Click to expand...
Click to collapse
I didn't. There isn't a picture of my lockscreen in this thread..
XPS_93 said:
Alright, this is it. Is pulling it out from systemui.apk using winrar enough or I have to decompile the apk for it?
Edit: I've reuploaded the xml file decompiled from systemui.apk
Click to expand...
Click to collapse
Thanks, I'll check it out. You know, xml files aren't exactly big. There's no need to archive them.
Sent from my C6603 using Tapatalk
That font isn't usual ?
John98Zakaria said:
That font isn't usual ?
Click to expand...
Click to collapse
Oh, you mean my clock widget. I made it using 'Make Your Clock Widget' and a font called Respective.
I used the same font for my dock icons and my softkeys.
Sent from my C6603 using Tapatalk
Ticklefish said:
Thanks, I'll check it out. You know, xml files aren't exactly big. There's no need to archive them.
Sent from my C6603 using Tapatalk
Click to expand...
Click to collapse
You're welcome, and sorry I wasn't able to upload it straight as xml attachment isn't allowed in post so simply I compressed it. :laugh: I'm looking forward for your guidance, thank you :good:
XPS_93 said:
You're welcome, and sorry I wasn't able to upload it straight as xml attachment isn't allowed in post so simply I compressed it. :laugh: I'm looking forward for your guidance, thank you :good:
Click to expand...
Click to collapse
That's okay.
There's nothing unusual or different about your XML. Which is good.
The easiest thing to do is use this mod here: http://forum.xda-developers.com/showthread.php?t=2356012
You'll be wanting to put the new line just under the signal_cluster line.
Sent from my C6603 using Tapatalk

[REQ]Jelly bean header/4.2.2 status bar guide for galaxy y s5360 (easier method)

After a week... i read, i learn, i try modding systemui with jelly header/4.2.2 status bar... but i go failed failed and failed.. got fc, status bar gone.. so i want to request more easier guide for making jelly header/4.2.2 status bar... please xda member.. guide me..
Guide 1
For my cm7 status bar I used
http://forum.xda-developers.com/showthread.php?t=1953934
although it should work on stock roms too
Follow guide 1 - its simple just requires add smali and line in status_bar_expanded where you want the header
The header will look like screenshot but without the brightness slider or icon and iv also modded the clear button too so you wont have that - will just be date and time
{
"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"
}
Guide 2
If you want to try something more complicated you can try the following and will look like
and you can add what you like to the second pannel - I made mine look like
Guide is http://forum.xda-developers.com/showthread.php?t=2315342
marcussmith2626 said:
For my cm7 status bar I used
http://forum.xda-developers.com/showthread.php?t=1953934
Click to expand...
Click to collapse
I will try it sir..
EpullSalvatrucha said:
I will try it sir..
Click to expand...
Click to collapse
I updated the post with more complicated guides for advanced stuff - gives second quick pannel but you can just have the header by itself if you want or do the entire guide for the quick pannel as well
marcussmith2626 said:
I updated the post with more complicated guides for advanced stuff - gives second quick pannel but you can just have the header by itself if you want or do the entire guide for the quick pannel as well
Click to expand...
Click to collapse
the guide said find this code:
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/carrier_label_layout" android:layout_width="fill_parent" android:layout_height="wrap_content">
but i cannot find in my statusbar expanded.xml...
EpullSalvatrucha said:
the guide said find this code:
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/carrier_label_layout" android:layout_width="fill_parent" android:layout_height="wrap_content">
but i cannot find in my statusbar expanded.xml...
Click to expand...
Click to collapse
This is why you cant blindly follow guides - you must have some level of understanding and be able to adapt code to your needs
you can try just putting this
under
Code:
<com.android.systemui.statusbar.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
put
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.systemui.statusbar.StatusBarJellyHeaderView android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
put the smali in the given location in the guide
dunno if it will work - if not follow the other more complicated guide for stock roms
without an understanding of what you are doing and how to fix any compiling errors and so on you will not succed - especially if you try guide 2 because you will get errors unless you manage to do everything perfect first time
marcussmith2626 said:
This is why you cant blindly follow guides - you must have some level of understanding and be able to adapt code to your needs
you can try just putting this
under
Code:
<com.android.systemui.statusbar.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
put
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.systemui.statusbar.StatusBarJellyHeaderView android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
put the smali in the given location in the guide
dunno if it will work - if not follow the other more complicated guide for stock roms
without an understanding of what you are doing and how to fix any compiling errors and so on you will not succed - especially if you try guide 2 because you will get errors unless you manage to do everything perfect first time
Click to expand...
Click to collapse
wait... i try..
marcussmith2626 said:
without an understanding of what you are doing and how to fix any compiling errors and so on you will not succed - especially if you try guide 2 because you will get errors unless you manage to do everything perfect first time
Click to expand...
Click to collapse
Working perfectly sir!! sir.. my flashlight not working even i edit the androidmanifest.xml in systemui and sign it.. can help me sir?
EpullSalvatrucha said:
Working perfectly sir!! sir.. my flashlight not working even i edit the androidmanifest.xml in systemui and sign it.. can help me sir?
Click to expand...
Click to collapse
in androidmanifest.xml
above
Code:
</application>
put
Code:
<activity android:theme="@*android:style/Theme.NoTitleBar.Fullscreen" android:name="com.lidroid.systemui.quickpanel.FlashlightActivity" android:clearTaskOnLaunch="true" android:launchMode="singleTask" android:configChanges="keyboardHidden|orientation" />
unzip the attchment and put the smai in smali/com/lidroid/systemui/quickpanel although backup the ones that are already there incase you need to replace them if they are different
sign once recompiled with zipsigner you can get from playstore - use either a testkey or platform key
marcussmith2626 said:
sign once recompiled with zipsigner you can get from playstore - use either a testkey or platform key
Click to expand...
Click to collapse
owh there is smali file? i think just edit the androidmanifest.xml only.. i will try it.. sir.. i want to put app in settings.apk and in the same time i want to hide the app from drawer(like hyperion).. the app is Quickpanelsettings.apk.. how to do it sir?
EpullSalvatrucha said:
owh there is smali file? i think just edit the androidmanifest.xml only.. i will try it.. sir.. i want to put app in settings.apk and in the same time i want to hide the app from drawer(like hyperion).. the app is Quickpanelsettings.apk.. how to do it sir?
Click to expand...
Click to collapse
you should already have the smali if you have lidroid - I was just providing it as a reference if you dont or its different
search for a guide - I cant spoon food you everything - You will have to learn to search and do things yourself - sorry
As a clue - you remove a line from the app you want to hide in androidmanifest.xml and you add some lines into settings apk in xml/settings.xml
marcussmith2626 said:
you should already have the smali if you have lidroid - I was just providing it as a reference if you dont or its different
search for a guide - I cant spoon food you everything - You will have to learn to search and do things yourself - sorry
As a clue - you remove a line from the app you want to hide in androidmanifest.xml and you add some lines into settings apk in xml/settings.xml
Click to expand...
Click to collapse
i understand sir... i will try it...
marcussmith2626 said:
you should already have the smali if you have lidroid - I was just providing it as a reference if you dont or its..
Click to expand...
Click to collapse
Flashlight still not working..
EpullSalvatrucha said:
Flashlight still not working..
Click to expand...
Click to collapse
I would say logcat and solve the error but since you dont have much knowledge I would just download a flashlight app from the playstore
marcussmith2626 said:
I would say logcat and solve the error but since you dont have much knowledge I would just download a flashlight app from the playstore
Click to expand...
Click to collapse
i will try logcat.. but my terminal emulator not working.. i open the app and got something like fc..

[Tut][MoD][Xperia devices] Bravia/Supervivid/x-reality

Tut on how to Add Bravia/ X-reality/ Super-vivid​
Hello Guys
Every one asked me on how to add These engines to settings
SO here i got a very small tut on how to add these settings to you app as shown in the Picture below
{
"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"
}
Requirements :-
1. Apktool or you can try one of my tool here
2. Java jdk installed
3. Framework-res.apk, SemcGenericUxpRes.apk and Settings.apk
4. Patience with good mind
Now lets start work mates
Step;-1
Download the Apk tool and place as per your requirement
install the Framework first . ( if you are using the tool then place at the location as provided and run script )
If you dont have a script then follow this code
Code:
apktool if framework-res.apk
and
apktool if SemcGenericUxpRes.apk
Now Your Framework got installed and you need to proceed for Step :-2
Step;-2
Now you need to De-compile the SEttings.apk
If you have tool then there is no need of code. If you Dont have try this
Code:
apktool d Settings.apk
After the settings.apk got extracted
move to res->xml->somc_add_display_settings.xml
open it using NotePad++
You will find something like this
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<com.sonymobile.settings.preference.CheckBoxPreference android:title="@string/swiqi_strings_swiqi2_txt" android:key="swiqi2" android:summary="@string/swiqi_strings_swiqi_desc_txt" android:defaultValue="true" settings:dependOnSystemProperty="ro.service.swiqi2.supported" settings:before="first" settings:valueOfSettingsSystem="com.sonymobile.swiqi2_mode" />
<com.sonymobile.settings.preference.CheckBoxPreference android:title="@string/swiqi_strings_swiqi3_txt" android:key="swiqi3" android:summary="@string/swiqi_strings_swiqi_desc_txt" android:defaultValue="true" settings:dependOnSystemProperty="ro.service.swiqi3.supported" settings:before="first" settings:valueOfSystemProperty="persist.service.swiqi3.enable" />
<com.sonymobile.settings.preference.CheckBoxPreference android:title="@string/glove_mode_checkbox_title" android:key="glove_mode" android:summary="@string/glove_mode_checkbox_summary" android:defaultValue="false" settings:dependOnResource="@android:bool/config_enable_glove_mode" settings:before="brightness" settings:valueOfSystemProperty="persist.sys.touch.glove_mode" settings:valueOfSettingsSystem="com.sonymobile.touch.glove_mode" />
<com.sonymobile.settings.preference.IntentPreference android:key="white_balance" settings:dependOnIsValidIntent="true" settings:after="brightness" settings:hasMetaData="true">
<intent android:targetPackage="com.sonymobile.whitebalance" android:action="android.intent.action.MAIN" android:targetClass="com.sonymobile.whitebalance.WhiteBalanceActivity" />
</com.sonymobile.settings.preference.IntentPreference>
<com.sonymobile.settings.preference.RemovePreference settings:targetKey="wallpaper" />
<com.sonymobile.settings.preference.RemovePreference settings:dependOnIsValidIntent="true" settings:targetKey="wifi_display">
<intent android:targetPackage="com.sonymobile.tvout.wifidisplay" android:targetClass="com.sonymobile.tvout.wifidisplay.WfdStarterActivity" />
</com.sonymobile.settings.preference.RemovePreference>
</PreferenceScreen>
So all you need is to add these lines
Code:
<com.sonymobile.settings.preference.IntentPreference android:key="image_enhancer" settings:dependOnIsValidIntent="true" settings:dependOnSystemProperty="ro.service.xrfm.supported" settings:before="first" settings:hasMetaData="true" settings:valueOfSystemProperty="persist.service.xrfm.mode">
<intent android:targetPackage="com.sonymobile.imageenhancer" android:targetClass="com.sonymobile.imageenhancer.ImageEnhancerSettings" />
</com.sonymobile.settings.preference.IntentPreference>
If you add you will view something like this (Red Lines Are added one )
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
[COLOR="Red"] <com.sonymobile.settings.preference.IntentPreference android:key="image_enhancer" settings:dependOnIsValidIntent="true" settings:dependOnSystemProperty="ro.service.xrfm.supported" settings:before="first" settings:hasMetaData="true" settings:valueOfSystemProperty="persist.service.xrfm.mode">
<intent android:targetPackage="com.sonymobile.imageenhancer" android:targetClass="com.sonymobile.imageenhancer.ImageEnhancerSettings" />
</com.sonymobile.settings.preference.IntentPreference>
[/COLOR] <com.sonymobile.settings.preference.RemovePreference settings:dependOnSystemProperty="ro.service.xrfm.supported" settings:targetKey="swiqi3" />
<com.sonymobile.settings.preference.CheckBoxPreference android:title="@string/swiqi_strings_swiqi2_txt" android:key="swiqi2" android:summary="@string/swiqi_strings_swiqi_desc_txt" android:defaultValue="true" settings:dependOnSystemProperty="ro.service.swiqi2.supported" settings:before="first" settings:valueOfSettingsSystem="com.sonymobile.swiqi2_mode" />
<com.sonymobile.settings.preference.CheckBoxPreference android:title="@string/swiqi_strings_swiqi3_txt" android:key="swiqi3" android:summary="@string/swiqi_strings_swiqi_desc_txt" android:defaultValue="true" settings:dependOnSystemProperty="ro.service.swiqi3.supported" settings:before="first" settings:valueOfSystemProperty="persist.service.swiqi3.enable" />
<com.sonymobile.settings.preference.CheckBoxPreference android:title="@string/glove_mode_checkbox_title" android:key="glove_mode" android:summary="@string/glove_mode_checkbox_summary" android:defaultValue="false" settings:dependOnResource="@android:bool/config_enable_glove_mode" settings:before="brightness" settings:valueOfSystemProperty="persist.sys.touch.glove_mode" settings:valueOfSettingsSystem="com.sonymobile.touch.glove_mode" />
<com.sonymobile.settings.preference.IntentPreference android:key="white_balance" settings:dependOnIsValidIntent="true" settings:after="brightness" settings:hasMetaData="true">
<intent android:targetPackage="com.sonymobile.whitebalance" android:action="android.intent.action.MAIN" android:targetClass="com.sonymobile.whitebalance.WhiteBalanceActivity" />
</com.sonymobile.settings.preference.IntentPreference>
<com.sonymobile.settings.preference.RemovePreference settings:targetKey="wallpaper" />
<com.sonymobile.settings.preference.RemovePreference settings:dependOnIsValidIntent="true" settings:targetKey="wifi_display">
<intent android:targetPackage="com.sonymobile.tvout.wifidisplay" android:targetClass="com.sonymobile.tvout.wifidisplay.WfdStarterActivity" />
</com.sonymobile.settings.preference.RemovePreference>
</PreferenceScreen>
Now you are done adding these things just compile now
Code:
apktool b Settings
If you have my tool it will compile/ zipalign/ sign
So now you are finally done with settings and you got ready to replace
Here is the main thing you need to do :-
Download the Bravia zip Provided at bottom
Place Your compiled Settings.apk at this zip (*.zip->system->priv-app->)
and Flash the Zip now you are done
Never mind That Your Rom is Odexed Or Deodexed This flash script will delete the *.odex file
If you use this mod just Mention me have fun
For F.A.Q just follow this thread Click here
reserved for some work
venkat kamesh said:
reserved for some work
Click to expand...
Click to collapse
Very good bro )))
thanks very much:good:
This tool would be more noob friendly than apktool
http://forum.xda-developers.com/showthread.php?t=2639400
Hello guys,
Bootloader lock required?
Can I test it on Xperia t2 ultra D5322(4.4.2/4.4.3)?
Thanks
Pakman123 said:
This tool would be more noob friendly than apktool
http://forum.xda-developers.com/showthread.php?t=2639400
Click to expand...
Click to collapse
yes that as per your availability mate
since that was my tool i had just posted
anyway mate your post will be helpful thank you
rrajesh said:
Hello guys,
Bootloader lock required?
Can I test it on Xperia t2 ultra D5322(4.4.2/4.4.3)?
Thanks
Click to expand...
Click to collapse
yes this works for all [4.0+] and works with your device too...
yes boot-loader is required so pics work goog
if you had unlocked not a problem pics may not show much difference...
but mode of these works good with videos.
Soon I will use this lines on my future ROM using AOSP [kk/LP?] to acro S... Maybe will work.. Maybe not... Will need much MUCH modding/hacking certificates to make that work with non stock sources but I'm have hope it will works
I'm crazy.. But nothing is impossible ;D
Sent from my LT26w using XDA Free mobile app
there is a little error.it would be
Code:
apktool b Settings
DvDwx. said:
Soon I will use this lines on my future ROM using AOSP [kk/LP?] to acro S... Maybe will work.. Maybe not... Will need much MUCH modding/hacking certificates to make that work with non stock sources but I'm have hope it will works
I'm crazy.. But nothing is impossible ;D
Sent from my LT26w using XDA Free mobile app
Click to expand...
Click to collapse
yes yes it would be worked. all it need is our work on that !
i am already working on that mate
but not perfectly sure. but i am trying on samsung device at present ( previously i worked with lg it worked )
once i have done with those i will post one more tut
slsamg7112 said:
there is a little error.it would be
Code:
apktool b Settings
Click to expand...
Click to collapse
thanks mate edited
can i add bravia to vanir 4.4.4 too or only on stock?
moonryder said:
can i add bravia to vanir 4.4.4 too or only on stock?
Click to expand...
Click to collapse
i am not sure it may not work good until it was stock
i am trying for that
if it once got finished i will update it
now i am working on that mate
venkat kamesh said:
yes yes it would be worked. all it need is our work on that !
i am already working on that mate
but not perfectly sure. but i am trying on samsung device at present ( previously i worked with lg it worked )
once i have done with those i will post one more tut
thanks mate edited
Click to expand...
Click to collapse
if you can share here the topic about that modification you already have maked to LG device we appreciate that ;D
DvDwx. said:
if you can share here the topic about that modification you already have maked to LG device we appreciate that ;D
Click to expand...
Click to collapse
please check my threads
Want this to work for Xperia Z2 on 4.4.4 Stock oxeded rom?
Does bravia engine effect applies to movie also?
Plz tell me
Thanks
Bravia engine not working in Sony video app
hi venkat, do you know or have a mod to make bravia engine on custom rom nougat?

[Tutorial] Customize Ultra Stamina Mode

In The Name of GOD​
Hi EveryOne ​
Here's a Tutorial on How to Customize Ultra Stamina Mode!
{
"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"
}
Requirements:
1.USMHome.apk
2.SuperStamina.apk
3.Notepad++ or any Editor
4.Apktool to Decompile apk
5.A Brain!
Introduction:
in order to change and customize ultra stamina mode you need two main apk: "USMHome.apk" & "SuperStamina.apk"
USMHome.apk is launcher and setting page but SuperStamina.apk control apps in ultra stamina mode
you can find both of them in System/app
Add & Remove app From Launcher:
1.Decompile "SuperStamina.apk"
2.Open res/xml/usm_packages.xml
you can see lots of code but i will explane each one them:
Code:
<package name="com.android.wallpaper" />
this code means you can't access Wallpaper App in Ultra Stamina
Code:
<package name="com.sonymobile.moviecreator" authorizedActivitiesByDefault="true"
this code means you can't see Movie Creator icon app in launcher but you can run it
Code:
<package name="com.android.calendar" authorizedActivitiesByDefault="true">
<launchable-activity name=".LaunchActivity" priority="50" />
</package>
this code means you can see Calendar icon app in launcher and you can run it
Code:
<package name="com.sonyericsson.music">
<authorized-activity name=".picker.MusicPickerActivity" />
</package>
this code means you can run Walkman app but just you can play music with it and other Activities are disable
Code:
<package name="com.android.systemui" authorizedActivitiesByDefault="true">
<unauthorized-activity name=".recent.RecentsActivity" />
</package>
this code means SystemUI is lunchable but you can't access Recent Button
so all you need to do is follow these patterns and you can do want you want!!!
3. i will show you some examples
for example the main code of Movies app is
Code:
<package name="com.sonyericsson.video" />
it means the app is disabled in Ultra Stamina mode but we are going to Change it
how about adding it to launcher?
all you need to do is replace this code with previews one
Code:
<package name="com.sonyericsson.video" authorizedActivitiesByDefault="true">
<launchable-activity name=".browser.BrowserActivity" priority="110" />
</package>
I'm going to explane these codes but first lets add another app
4. lets add MXPlayer to ultra Stamina Launcher
first of all add these codes
Code:
<package name="com.mxtech.videoplayer.ad" authorizedActivitiesByDefault="true">
<launchable-activity name=".ActivityMediaList" priority="120" />
</package>
name="com.mxtech.videoplayer.ad" it's package name of application
name=".ActivityMediaList" it's main Activity (main page of MXPlayer)
authorizedActivitiesByDefault="true" it means that your application can run in Ultra Stamina
<launchable-activity it means that this activity can run but if you use <unlaunchable-activity it won't let that Activity run
priority="110" i didn't understand it well but stock numbers are till 100 and you have to add it 10------so next number is 110 and then 120 and so on....!!! (if "X" app is 110 and "Y" app is 120 so in launcher first show "X" and then "Y")
5. i told you how to add app in launcher but if you want to add lots of app i recommend you to add them n Setting
first of all you need to introduce app to Ultra stamina with step 3 and 4 but like this pattern
Code:
<package name="[B]com.sonyericsson.advancedwidget.clock[/B]" authorizedActivitiesByDefault="true" />
so all you need is app package name that you can find it with MOD EDIT Rule 6 @gregbradley
after you introduce app you need to add app in setting menu
follow this ------------------>TUT<---------------------
6. now you should know how to remove app from launcher or don't let app to run in ultra stamina mode
first of all read step 2 again. you can see the patterns but i show you with some examples!!!
here I'm going to remove camera from launcher:
the main code is:
Code:
<package name="com.sonyericsson.android.camera" authorizedActivitiesByDefault="true">
<launchable-activity name=".CameraActivity" priority="30" />
</package>
you just need to change the code like this:
Code:
<package name="com.sonyericsson.android.camera" authorizedActivitiesByDefault="true" />
but if you want to kill any Activity you must change it to:
Code:
<package name="com.sonyericsson.android.camera" />
Hit Thanks if you find it helpful :good:​
Change Lock Screen and Desktop Wallpaper:
1.Decompile "SuperStamina.apk"
2.Go to res Folder
depend on your Phone DPI and Res
Change the Pictures in these Folders:
480 x 854---------------------------------->drawable-sw320dp-hdpi
720 x 1280---------------------------------->drawable-sw360dp-xhdpi
1080 x 1920--------------------------------->drawable-sw360dp-xxhdpi​
Add section to Setting:
1.Decompile "USMHome.apk"
2.Open res/xml/settings_headers.xml
3. in this example I'm going to add Developement Setting to Ultra Stamina Setting
first add this code
Code:
<header android:id="@id/development_settings" android:title="@string/development_settings_title" android:icon="@drawable/ic_settings_development" >
<intent android:targetPackage="com.android.settings" android:targetClass="com.android.settings.DevelopmentSettings" />
</header>
android:id="@id/development_settings": Open res/values/ids.xml and add this code
Code:
<item type="id" name="development_settings">false</item>
android:title="@string/development_settings_title": Open strings.xml and add this code
<string name="development_settings_title">Development Settings</string>
android:icon="@drawable/ic_settings_development": set the logo that is going to display in Setting
drawable-hdpi---------------------------------->48*48 Pixels
drawable-mdpi---------------------------------->32*32 Pixels
drawable-xhdpi--------------------------------->64*64 Pixels
drawable-xxhdpi-------------------------------->96*96 Pixels​
targetPackage="com.android.settings": this code shows that the Activity That we want is in setting Apk
android:targetClass="com.android.settings.DevelopmentSettings": the Activity that we want to run when we touch it in setting
you can find this in Settings.apk/res/xml/settings_headers.xml
you just need find the option that you are going to add and find the code in android:fragment then copy it to above code.
Adding Toggles to StatusBar:
1.Decompile "SuperStamina.apk"
2.Open res/values/arrays.xml
3.Find this code
Code:
<string-array name="usm_allowed_quick_settings">
<item>autorotate</item>
<item>brightness</item>
<item>sound</item>
<item>bluetooth</item>
</string-array>
3.now you can add Flashlight toggle by adding this code
<item>flashlight</item>
Hit Thanks if you find it helpful :good:​
If you have idea or you can help me to improve the TUT say it!!!
i hope you enjoy it :good:
Is this USMHome.apk and SuperStamina.apk mod available/ported for XZR stock 4.4.4?
sourabhp said:
Is this USMHome.apk and SuperStamina.apk mod available/ported for XZR stock 4.4.4?
Click to expand...
Click to collapse
i don't know but if someone ported it so it got to be in one of your custom roms
There was a little mistake in Tutorial
so
Tutorial Updated
Sorry Guys
OMG :fingers-crossed::fingers-crossed::fingers-crossed:
Awesome Tutorial.We can see it in Xda News Portal.Thanks:good::good::good:
excellent!!
gamzekal said:
OMG :fingers-crossed::fingers-crossed::fingers-crossed:
Awesome Tutorial.We can see it in Xda News Portal.Thanks:good::good::good:
Click to expand...
Click to collapse
sh4d1t0 said:
excellent!!
Click to expand...
Click to collapse
URW
thanks for your support
Xposed-able?
Any chance something like this could be done with an xposed mod? As an example, you could use the mod to swap out apps of your choosing. I'm not a dev, but just curious of this was possible for someone far smarter than I.
craigeryjohn said:
Any chance something like this could be done with an xposed mod? As an example, you could use the mod to swap out apps of your choosing. I'm not a dev, but just curious of this was possible for someone far smarter than I.
Click to expand...
Click to collapse
i didn't create any xposed mod so it's better to ask someone that knows this stuff
is possible add whatsapp??
gioiellino said:
is possible add whatsapp??
Click to expand...
Click to collapse
yes it is
but i tried to add wifi and i failed
i add it to setting and set all permission but couldn't turn it on
only with wifi super stamina work... or with mobile data too?
gioiellino said:
only with wifi super stamina work... or with mobile data too?
Click to expand...
Click to collapse
ops
i forgot!!!!
yep you are right
mobile data works in Ultra stamina
How you make temperature on statusbar?
-Mr.freeze- said:
How you make temperature on statusbar?
Click to expand...
Click to collapse
I'm using "Coolify"
SamadiPour said:
I'm using "Coolify"
Click to expand...
Click to collapse
HI... i have question =) ?
Is it possible to mod the USMHome.apk to be regular launcher =) (love that there is not app drawer)???
nomaj said:
HI... i have question =) ?
Is it possible to mod the USMHome.apk to be regular launcher =) (love that there is not app drawer)???
Click to expand...
Click to collapse
I replied you in other thread
nomaj said:
HI... i have question =) ?
Is it possible to mod the USMHome.apk to be regular launcher =) (love that there is not app drawer)???
Click to expand...
Click to collapse
Why don't you use Solo Launcher or MiUi Launcher?

Categories

Resources