[GUIDE][HOW] Easy Preference Control - Asus Zenfone 4

Hi all.. i'm back again for share guide about add preference into stock Settings.apk
This guide is work for JB 4.1+
Feature:
PreferenceScreen
SeekBarPreference
ColorPickerPreference
MyListPreference
SwitchPreference
CheckBoxPreference
MyEditTextPreference
FilePreference
and many more..
Requirement:
- Understanding about APK compile/decompile
- APKTool
- Notepad++ (PC)
How:
1. Decompile Settings.apk
2. Copy smali and res folder from guide
3. Open AndroidManifest.xml
Find:
Code:
<uses-permission android:name="android.permission.REBOOT"/>
Add below:
Code:
<uses-permission android:name="android.permission.FORCE_STOP_PACKAGES" />
Scroll to end of line, add this above </application>
Code:
<activity android:label="@string/zen_control_title" android:name="com.android.settings.bamzzz.ZenControl" />
4. Open res/xml/dashboard_categories.xml (Lollipop) or res/xml/settings_headers.xml (JB)
Add this below "<dashboard-category android:id="@id/system_section" ..." or what do you want
Lollipop:
Code:
<dashboard-tile android:icon="@drawable/ic_settings_zencontrol" android:id="@id/zen_control" android:title="@string/zen_control_title" android:fragment="com.android.settings.bamzzz.ZenControl" />
JB:
Code:
<header android:icon="@drawable/ic_settings_zencontrol" android:id="@id/zen_control" android:title="@string/zen_control_title" android:fragment="com.android.settings.bamzzz.ZenControl" />
5. Open res/values/attrs.xml and add this:
Code:
<attr name="colorPrimary" format="color" />
<attr name="colorPrimaryDark" format="color" />
<attr name="colorAccent" format="color" />
<declare-styleable name="ThumbnailListPreference">
<attr name="drawableArray" format="reference" />
<attr name="entryList" format="reference" />
<attr name="entryValuesList" format="reference" />
<attr name="entryDefault" format="string" />
</declare-styleable>
6. Open res/values/colors.xml and add this:
Code:
<color name="colorAccent">#ffff4081</color>
<color name="colorPrimary">#ff3f51b5</color>
<color name="colorPrimaryDark">#ff303f9f</color>
7. Open res/values/dimens.xml and add this:
Code:
<dimen name="button_size">30.0dip</dimen>
8. Open res/values/ids.xml and add this:
Code:
<item type="id" name="zen_control">false</item>
<item type="id" name="appIcon">false</item>
<item type="id" name="linearLayout">false</item>
<item type="id" name="appName">false</item>
<item type="id" name="appPackage">false</item>
<item type="id" name="imageView">false</item>
<item type="id" name="color_picker_view">false</item>
<item type="id" name="text_hex_wrapper">false</item>
<item type="id" name="hex_val">false</item>
<item type="id" name="old_color_panel">false</item>
<item type="id" name="new_color_panel">false</item>
<item type="id" name="fileSwitch">false</item>
<item type="id" name="searchApp">false</item>
<item type="id" name="appsList">false</item>
<item type="id" name="progressBar">false</item>
<item type="id" name="iconForApp">false</item>
<item type="id" name="seekBarPrefUnitsRight">false</item>
<item type="id" name="seekBarPrefValue">false</item>
<item type="id" name="seekBarPrefUnitsLeft">false</item>
<item type="id" name="seekBarPrefBarContainer">false</item>
<item type="id" name="seekBarPrefSeekBar">false</item>
<item type="id" name="thumbnailRadioButton">false</item>
<item type="id" name="thumbnailImage">false</item>
<item type="id" name="thumbnailText">false</item>
<item type="id" name="thumbnailListView">false</item>
<item type="id" name="thumbnailIcon">false</item>
9. Open res/values/strings.xml and add this:
Code:
<string name="zen_control_title">Zen Control™</string> <!-- Rename if do you want -->
<string name="ok">OK</string>
<string name="app_reboot_required_title">App Reboot Required</string>
<string name="app_reboot_required_message">%1$s reboot is required for the changes to take effect.\n\nReboot now?</string>
<string name="dialog_color_picker">Color Picker</string>
<string name="press_color_to_apply">Press on Color to apply</string>
10. Open smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali
Find "0x1020018" and replace with public id from framework-res type="id" name="widget_frame"
11. Open smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali
Find "0x1020010" and replace with public id from framework-res type="id" name="summary"
12. Open res/xml/zen_prefs.xml, add/edit your preference here...
13. Done
Attention: Don't rename smali and/or folder structure without my permission..!!!
Keep oprek. Salam bootloop.
Thanks to:
[email protected]
[email protected]
Guide by [email protected]
fb.me/bamz4ever

Reserved

Ask um,
java.lang.RuntimeException: Unable to resume activity {com.android.settings/com.android.settings.SubSettings}: java.lang.NullPointerException: Attempt to read from null array
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3019)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3050)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2425)
at android.app.ActivityThread.access$900(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5294)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)

Check arrays.xml.. array null

missing 0x1020010 tutor no.11
bamzzz said:
11. Open smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali
Find "0x1020010" and replace with public id from framework-res type="id" name="summary"
Click to expand...
Click to collapse
i cant find that tutor sir
please help

No undefined array sir ?

shining.surya said:
i cant find that tutor sir
please help
Click to expand...
Click to collapse
i am also not able to find

@bamzzz @venkat kamesh
added missed
Code:
<public type="id" name="widget_frame" id="0x7f0f02e1" />
to public.xml
and missed
Code:
<item type="id" name="widget_frame">false</item>
to ids.xml
recompiled settings.apk to get public id´s
decompiled again and wanted to change id´s in smali.
But there is no value 0x1020010 in smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali

moonryder said:
@bamzzz @venkat kamesh
added missed
Code:
<public type="id" name="widget_frame" id="0x7f0f02e1" />
to public.xml
and missed
Code:
<item type="id" name="widget_frame">false</item>
to ids.xml
recompiled settings.apk to get public id´s
decompiled again and wanted to change id´s in smali.
But there is no value 0x1020010 in smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali
Click to expand...
Click to collapse
Bro adding id was not a matter
In layout xml or any xml. Where id is defined
Just change @iD to @+id this will add the required id to ids.xml also creates public id
Coming to 0x10xxxxx these public ids will be with framework-res.apk.
Good luck bro

venkat kamesh said:
Bro adding id was not a matter
In layout xml or any xml. Where id is defined
Just change @iD to @+id this will add the required id to ids.xml also creates public id
Coming to 0x10xxxxx these public ids will be with framework-res.apk.
Good luck bro
Click to expand...
Click to collapse
hi bro,
thx for the tipp with the +id
I looked in the framework-res and saw that there has nothing to be changed in the smali cuz the id´s are the same.
But there is no value 0x1020010 in smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali - so i can´t check/change the id!
And without that value this mod did not work! (also the one from @venkat kamesh) - pity

moonryder said:
hi bro,
thx for the tipp with the +id
I looked in the framework-res and saw that there has nothing to be changed in the smali cuz the id´s are the same.
But there is no value 0x1020010 in smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali - so i can´t check/change the id!
And without that value this mod did not work! (also the one from @venkat kamesh) - pity
Click to expand...
Click to collapse
Haha this guide was not from me
I haven't tested it either bro
See @Bloodlvst solved this
Hope he may help you bro

venkat kamesh said:
Haha this guide was not from me
I haven't tested it either bro
See @Bloodlvst solved this
Hope he may help you bro
Click to expand...
Click to collapse
@moonryder - the ID shouldn't need changing. What's the error you get and what android version?

Bloodlvst said:
@moonryder - the ID shouldn't need changing. What's the error you get and what android version?
Click to expand...
Click to collapse
hi,
i will try to explain it the third time:
i followed the tut by bamzzz. All went fine until i wanted to change the values in "smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali" (look at step 11 of bamzzz´s tutorial).
--> there is NO value 0x1020010 so i could not change it (public id)
so i tried it without step 11, followed the tut of venkat kamesh to hide battery in statusbar (tutorial from here).
Compiling and flashing went fine, but it didn´t work.
pushing the button, the battery icon won´t disapper.
So i think the issue must be in the smali mentioned above.
i am on LP 5.1.1

moonryder said:
hi,
i will try to explain it the third time:
i followed the tut by bamzzz. All went fine until i wanted to change the values in "smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali" (look at step 11 of bamzzz´s tutorial).
--> there is NO value 0x1020010 so i could not change it (public id)
so i tried it without step 11, followed the tut of venkat kamesh to hide battery in statusbar (tutorial from here).
Compiling and flashing went fine, but it didn´t work.
pushing the button, the battery icon won´t disapper.
So i think the issue must be in the smali mentioned above.
Click to expand...
Click to collapse
Step 11 just had a typo for the filename. If you look at the Guide.txt in the zip file, it will give you the right file name. But in either case those values wouldn't affect if the battery will hide or not

moonryder said:
hi,
i will try to explain it the third time:
i followed the tut by bamzzz. All went fine until i wanted to change the values in "smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali" (look at step 11 of bamzzz´s tutorial).
--> there is NO value 0x1020010 so i could not change it (public id)
so i tried it without step 11, followed the tut of venkat kamesh to hide battery in statusbar (tutorial from here).
Compiling and flashing went fine, but it didn´t work.
pushing the button, the battery icon won´t disapper.
So i think the issue must be in the smali mentioned above.
i am on LP 5.1.1
Click to expand...
Click to collapse
why not a logcat
that show the problem
get a logcat bro

venkat kamesh said:
why not a logcat
that show the problem
get a logcat bro
Click to expand...
Click to collapse
there is no logcat to post cuz recompiling works without any error.
But the mod does not work

moonryder said:
there is no logcat to post cuz recompiling works without any error.
But the mod does not work
Click to expand...
Click to collapse
hmmm
i am not supposed you about build logcat
you should know more about logcat bro
look at this
http://forum.xda-developers.com/showthread.php?t=1726238
go on
get a logcat
that probably show the problem and then its easy to fix

venkat kamesh said:
hmmm
i am not supposed you about build logcat
you should know more about logcat bro
look at this
http://forum.xda-developers.com/showthread.php?t=1726238
go on
get a logcat
that probably show the problem and then its easy to fix
Click to expand...
Click to collapse
sorry bro,
i missunderstood.
log is attached

moonryder said:
sorry bro,
i missunderstood.
log is attached
Click to expand...
Click to collapse
Bro this is not exact log
When you create logcat
You should click on fc part
Example
Go to settings which you get fc
Start logcat. Open part of settings you get fc and after that fc. Stop log by unplug and send me bro
That shows what was wrong

venkat kamesh said:
Bro this is not exact log
When you create logcat
You should click on fc part
Example
Go to settings which you get fc
Start logcat. Open part of settings you get fc and after that fc. Stop log by unplug and send me bro
That shows what was wrong
Click to expand...
Click to collapse
i did it like you said

Related

[Q] [ADW]Theming help

I am trying to make my own ADW theme. Everything is set up correctly and I'm using Eclipse.
The problem I have is that I don't know how I should edit the xmls in /res/drawable without getting force close in Emulator when trying it out.
i.e. I edit home_arrows_left.xml from:
Code:
<?xml version="1.0" encoding="utf-8"?><level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="0" android:drawable="@drawable/dot_big" />
<item android:maxLevel="1" android:drawable="@drawable/dot_big" />
<item android:maxLevel="2" android:drawable="@drawable/dot_big" />
<item android:maxLevel="3" android:drawable="@drawable/dot_big" />
<item android:maxLevel="4" android:drawable="@drawable/dot_big" />
<item android:maxLevel="5" android:drawable="@drawable/dot_big" />
<item android:maxLevel="6" android:drawable="@drawable/dot_big" />
</level-list>
to:
Code:
<?xml version="1.0" encoding="utf-8"?>
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="0">dot</item>
<item android:maxLevel="1">dot</item>
<item android:maxLevel="2">dot</item>
<item android:maxLevel="3">dot</item>
<item android:maxLevel="4">dot</item>
<item android:maxLevel="5">dot</item>
<item android:maxLevel="6">dot</item>
</level-list>
And I create a file in drawable called dot.png
If I export+install with adb and select as ADW theme in emulator I get ADW force close when pressing home button.
I'm not a pro with XML but I could spend some time to learn more if someone just tells me what I need to know to create ADW themes.
Maybe I could use some tool to validate the XML?
The only problem I have is to edit the XML in the right way.
Zalastax said:
I am trying to make my own ADW theme. Everything is set up correctly and I'm using Eclipse.
The problem I have is that I don't know how I should edit the xmls in /res/drawable without getting force close in Emulator when trying it out.
i.e. I edit home_arrows_left.xml from:
Code:
<?xml version="1.0" encoding="utf-8"?><level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="0" android:drawable="@drawable/dot_big" />
<item android:maxLevel="1" android:drawable="@drawable/dot_big" />
<item android:maxLevel="2" android:drawable="@drawable/dot_big" />
<item android:maxLevel="3" android:drawable="@drawable/dot_big" />
<item android:maxLevel="4" android:drawable="@drawable/dot_big" />
<item android:maxLevel="5" android:drawable="@drawable/dot_big" />
<item android:maxLevel="6" android:drawable="@drawable/dot_big" />
</level-list>
to:
Code:
<?xml version="1.0" encoding="utf-8"?>
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="0">dot</item>
<item android:maxLevel="1">dot</item>
<item android:maxLevel="2">dot</item>
<item android:maxLevel="3">dot</item>
<item android:maxLevel="4">dot</item>
<item android:maxLevel="5">dot</item>
<item android:maxLevel="6">dot</item>
</level-list>
And I create a file in drawable called dot.png
If I export+install with adb and select as ADW theme in emulator I get ADW force close when pressing home button.
I'm not a pro with XML but I could spend some time to learn more if someone just tells me what I need to know to create ADW themes.
Maybe I could use some tool to validate the XML?
The only problem I have is to edit the XML in the right way.
Click to expand...
Click to collapse
Just change all of the
Code:
android:drawable="@drawable/dot_big"
to
Code:
android:drawable="@drawable/dot"
And create a dot.png
Thank you for the help!
I have one more question.
How do I refer to images in drawable-hdpi/drawable-mdpi/drawable-ldpi depending on if they are hdpi/mdpi/ldpi?
I have tried to open some APK's but you can't see what's written in the XML files. Maybe someone could contribute with the source of an ADWTheme that have different images based on dpi?
You have to decompile an APK in order to view XML files as plain text. I suggest apkmanager 4.8 (I tried 4.9 and it wasn't compiling apks right for me.)
Once extracted, the tool will allow you to extract the contents of .apk's, and decompile them so you can edit the xml files. You will have to recompile and sign the .apk file once you decompile and edit it.
I extracted an apk from my device and turned it into a zip. I have viewed some XML's via AXMLPrinter2.jar but If I look what's written in android:drawable it says android:drawable="@7F020007". Thats not a path or a file so when it compiles the path changes. I shall see if the same thing happens with the program you told me about tomorrow.
Do you need to make different images for different dpi levels?

[Q] How To Edit progress_horizontal.xml ?

Hi.. i wanna change my Volume Progress Bar. and i figure out that the "progress_horizontal.xml" is the file needed to be edit, but i don't know how. i wanna make mine look like the ICS just a thin Line. but i want a different color a white one. but i don't know how to change the color and how to make the thick yellow progres bar to a thin white line............
by the way im using GinggerYoshi...
any help? Thanks in Advance!
Have a look a t the sources / resources of ICS (framework/base), there you can find what you need to modify the progress / seek layout.
If you have the sources of GingerYoshi (which I do not expect ) then you can edit the xml files with an editor, change the required images and rebuild.
If you don't have the sources you will need first to decompile framework_res.apk (for example by using apktool), before you can edit the xml. After that you need to re-compile everything. *But* it's not guaranteed, that this will always work ...
For changing the color of the progress bar images, you need to use draw9patch tool, because they are .9.png.
B.t.w. I suggest you to have a look at G1 Themes and Wallpapers or Arrow
[GUIDE] Want to learn how to theme?
AndDiSa said:
Have a look a t the sources / resources of ICS (framework/base), there you can find what you need to modify the progress / seek layout.
If you have the sources of GingerYoshi (which I do not expect ) then you can edit the xml files with an editor, change the required images and rebuild.
If you don't have the sources you will need first to decompile framework_res.apk (for example by using apktool), before you can edit the xml. After that you need to re-compile everything. *But* it's not guaranteed, that this will always work ...
For changing the color of the progress bar images, you need to use draw9patch tool, because they are .9.png.
B.t.w. I suggest you to have a look at G1 Themes and Wallpapers or Arrow
[GUIDE] Want to learn how to theme?
Click to expand...
Click to collapse
thanks for the help!, yeah i don't have the ginger yoshi sources
but i will try your advice... and that forum that you linked, thanks again!
You need to modify this areas if you wanna make it thinner "Widget.ProgressBar.Horizontal" and "Widget.SeekBar" in framework-res.apk\res\values something like this:
Code:
<style name="Widget.ProgressBar.Horizontal" parent="@style/Widget.ProgressBar">
<item name="maxHeight">5.0dip</item>
<item name="indeterminateOnly">false</item>
<item name="indeterminateDrawable">@drawable/progress_indeterminate_horizontal</item>
<item name="progressDrawable">@drawable/progress_horizontal</item>
<item name="minHeight">5.0dip</item>
</style>
<style name="Widget.SeekBar" parent="@style/Widget">
<item name="focusable">true</item>
<item name="maxHeight">5.0dip</item>
<item name="indeterminateOnly">false</item>
<item name="indeterminateDrawable">@drawable/progress_horizontal</item>
<item name="progressDrawable">@drawable/progress_horizontal</item>
<item name="minHeight">5.0dip</item>
<item name="thumb">@drawable/seek_thumb</item>
<item name="thumbOffset">8.0dip</item>
DorianX said:
You need to modify this areas if you wanna make it thinner "Widget.ProgressBar.Horizontal" and "Widget.SeekBar" in framework-res.apk\res\values something like this:
Code:
<style name="Widget.ProgressBar.Horizontal" parent="@style/Widget.ProgressBar">
<item name="maxHeight">5.0dip</item>
<item name="indeterminateOnly">false</item>
<item name="indeterminateDrawable">@drawable/progress_indeterminate_horizontal</item>
<item name="progressDrawable">@drawable/progress_horizontal</item>
<item name="minHeight">5.0dip</item>
</style>
<style name="Widget.SeekBar" parent="@style/Widget">
<item name="focusable">true</item>
<item name="maxHeight">5.0dip</item>
<item name="indeterminateOnly">false</item>
<item name="indeterminateDrawable">@drawable/progress_horizontal</item>
<item name="progressDrawable">@drawable/progress_horizontal</item>
<item name="minHeight">5.0dip</item>
<item name="thumb">@drawable/seek_thumb</item>
<item name="thumbOffset">8.0dip</item>
Click to expand...
Click to collapse
Thanks a lot.. by the way. I tried your Froyo Cream Sandwich and i'ts great.
junio07 said:
Thanks a lot.. by the way. I tried your Froyo Cream Sandwich and i'ts great.
Click to expand...
Click to collapse
and change color for have pannel white type here-> http://s15.postimg.org/ooqhsxltn/Screenshot_2014_12_27_13_55_01.png

tab n grid all versions GPS BUG FIXED!!

When you try to use the gps the tab n grid crashes right? well this is the solution for every version of tab n grid for every model... im not sure if this bug exist in all models but the ones who have this bug you can do this
when you enter a app that uses gps the tab n grid shuts down to resolve that bug just go with this steps:
1: first use this tutorial to decompile and compile the SystemUI.apk -> http://forum.xda-developers.com/showthread.php?t=2251719
2: after you decompile, go into SystemUI folder then -> res\drawable\stat_sys_gps_acquiring_anim.xml
the its -> : o without the white space, i didnt know how to put the code here in an other way
it should be something like this:
<?xml version="1.0" encoding="utf-8"?>
<animation-list androidneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="500" android:drawable="@drawable/stat_sys_gps_acquiring" />
<item android:duration="500" android:drawable="@*android:drawable/APKTOOL_DUMMY_06ff" />
</animation-list>
Click to expand...
Click to collapse
3: and you delete this line:
<item android:duration="500" android:drawable="@*android:drawable/APKTOOL_DUMMY_06ff" />
Click to expand...
Click to collapse
it should look like this:
<?xml version="1.0" encoding="utf-8"?>
<animation-list androidneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="500" android:drawable="@drawable/stat_sys_gps_acquiring" />
</animation-list>
Click to expand...
Click to collapse
4: Save and recompile.
5: Open the recompiled SystemUI.apk with winrar and delete AndroidManifest.xml
open the official SystemUI.apk of tab n grid (the one that you used to decompiled) and copy META-INF and AndroidManifest.xml to the new SystemUI.apk (the one you compiled) using winrar.
if you want an example of a tab n grid v1 for xperia j with 1 % step circle battery image and gps bug fixed, its in the attachments BTW I added full translation of tab n grid for Portuguese-Portugal for the oder languages is the same as the official tab n grid.
Thanks for your time,
i just wanted to share... sory for my english

[Guide][How to get Fmd L Panel]

This is a guide by Fmd devs to get L panel in kitkat and jellybean devics...
It is time consuming and u need to be very patient.
It isn't for extreme noob but i shall try my best understand u in all possible ways
Take a backup of ur current systemUI.apk before following it
if this guide is already on xda, then let me know i'll close the thread
Let's start now
Things u need -
Apktool 1.5.2
SystemUI.apk
Notepad++
Brain.jar
Step 1:
- Decomile ur systemUI.apk (i m not gonna explain u how to decomile and recomile , there are already many guides for that )
Download systemuiFiles.zip from attachments, extract it merge the files to respective folders
- Go res/values
open ids.xml
Copy the codes below and paste them before </resources>
Code:
<item type="id" name="recents_clear">false</item>
<item type="id" name="LayE2">false</item>
<item type="id" name="owner">false</item>
<item type="id" name="photo_picker_cover">false</item>
<item type="id" name="owner_cover">false</item>
<item type="id" name="name_field_cover">false</item>
<item type="id" name="name_edit_cover">false</item>
<item type="id" name="image_cover">false</item>
<item type="id" name="photo_picker">false</item>
<item type="id" name="name_field">false</item>
<item type="id" name="name_edit">false</item>
<item type="id" name="colored_bar">false</item>
<item type="id" name="thumbnail_border">false</item>
Save the xml
- Open dimens.xml search for <dimen name="quick_settings_cell_height"> change its value to 90.0dip
Also search for <dimen name="quick_settings_cell_gap"> and replace its value with 0.0dip
Then save it
- Now open styles.xml
Find this -
Code:
<style name="TextAppearance.StatusBar.Expanded.Clock" parent="@style/TextAppearance.StatusBar.Expanded">
Change it to make it like -
Code:
<style name="TextAppearance.StatusBar.Expanded.Clock" parent="@style/TextAppearance.StatusBar.Expanded">
<item name="android:textSize">14.0sp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#ffffffff</item>
<item name="android:fontFamily">sans-serif-medium</item>
</style>
Now find -
Code:
<style name="TextAppearance.StatusBar.Expanded.Date" parent="@style/TextAppearance.StatusBar.Expanded">
Change it to become like -
Code:
<style name="TextAppearance.StatusBar.Expanded.Date" parent="@style/TextAppearance.StatusBar.Expanded">
<item name="android:textSize">14.0sp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#b2ffffff</item>
</style>
Add the codes below at the bottom before </resources>
Code:
<style name="TextAppearance.QuickSettings.Toggle" parent="@style/TextAppearance.QuickSettings">
<item name="android:textSize">12.0sp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#b3ffffff</item>
<item name="android:fontFamily">sans-serif-regular-systemui</item>
</style>
<style name="Theme.Lalalee" parent="@*android:style/Theme.Holo.Light.Dialog">
<item name="android:windowBackground">@*android:color/transparent</item>
<item name="android:windowNoTitle">true</item>
</style>
Done Now save the xml
- Open arrays.xml
Add these codes at the bottom before</resources>
Code:
<integer-array name="batterymeter_color_levels">
<item>4</item>
<item>15</item>
<item>100</item>
</integer-array>
<array name="batterymeter_color_values">
<item>#ffff3300</item>
<item>#ffff3300</item>
<item>#ffffffff</item>
</array>
<integer-array name="batterymeter_bolt_points">
<item>73</item>
<item>0</item>
<item>392</item>
<item>0</item>
<item>201</item>
<item>259</item>
<item>442</item>
<item>259</item>
<item>4</item>
<item>703</item>
<item>157</item>
<item>334</item>
<item>0</item>
<item>334</item>
</integer-array>
Save arrays.xml
Search for them before adding, if these are already there, then skip this process...
- Open colors.xml
Copy the codes below and paste them before </resources>
Code:
<color name="qset_text_color_off">#b3ffffff</color>
<color name="qset_text_color_on">#b3ffffff</color>
<color name="qs_tile_normal">#ff263238</color>
<color name="batterymeter_charge_color">@android:color/white</color>
<color name="batterymeter_bolt_color">#b2000000</color>
Before doing this, search for them seperately , u must not add them twice.. If u find them, change the hex code only..
Save it...
- Open strings.xml
Add the codes below before </resources>
Code:
<string name="battery_meter_very_low_overlay_symbol">!</string>
Save the xml
Skip it if it is already there..
- Go back and open AndroidManifest.xml
Paste these codes below at the bottom before </application>
Code:
<activity android:theme="@style/Theme.Lalalee" android:name="com.android.settings.Profile">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
Save the xml
- Now go to smali/com/android/systemui
Open SystemUIService.smali
Copy the codes below and paste them after #virtual methods
Don't forget to add 1 gap after .end method
Code:
.method public FMDProfPic(Landroid/view/View;)V
.locals 3
.parameter "v"
.prologue
.line 2431
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 2432
const-string v1, "com.android.systemui"
const-string v2, "com.android.settings.Profile"
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x1000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapsePanels()V
.line 1720
return-void
.end method
Done Step 1, u can recompile systemui apk
Wait Wait!!!
If u're a KitKat user, u may get compiling error "no resource found @id/header_settings_button" something like that.. Then follow step 2.. If u hve succefully recompiled then skip that step...
Step 2:
- Download For_KitKat.zip from attachments and copy the files to respective folders
- Navigate to res/values , open ids.xml add the code below before </resources>
Code:
<item type="id" name="header_settings_button">false</item>
Done, Recompile ur systemui...
now u can proceed to Step 3
Step 3:
This step is for Id replacement, u must hve heard about it
- Decompile newly compiled systemUI.apk
- Open LBatteryBar$1.smali in /smali/com/fmd/btn
Search
0x7f020145
replace with the value of
<public type="drawable" name="stat_sys_battery_charge" from your public.xml
Search
0x7f02013c
replace with the value of
<public type="drawable" name="stat_sys_battery" from your public.xml
- Open SlideBrightness.smali in /smali/in/jmkl/dcsms/statusbargreper
Search
0x7f020263
replace with the value of
<public type="drawable" name="progress_horizontal" from your public.xml
Search
0x7f020270
replace with the value of
<public type="drawable" name="thumb" from your public.xml
- Open Profile.smali in /smali/com/android/settings
search code and replace with your public.xml
0x7f04004d = <public type="layout" name="profile_cover"
0x7f08012b = <public type="id" name="photo_picker_cover"
0x7f08012c = <public type="id" name="owner_cover"
0x7f08012d = <public type="id" name="name_field_cover"
0x7f08012e = <public type="id" name="name_edit_cover"
0x7f08012f = <public type="id" name="image_cover"
0x7f020264 = <public type="drawable" name="fmd_me"
- Open ProfilePicture$1.smali in /smali/com/android/settings
search code and replace with your public.xml
0x7f020264 = <public type="drawable" name="fmd_me"
- Open ProfilePicture.smali
Search code and replace with your public.xml
0x7f08000b = <public type="id" name="image"
0x7f020264 = <public type="drawable" name="fmd_me"
Done!!
Now ur Systemui is of FMD panel but the wifi and bt toggles are two, one is that of fmd and 2nd one is of ur stock.... :angel:
So, follow next step...
Step 4:
Open Quicksettings.smali in smali/com/android/systemui/statusbar/phone
For Jellybean -
To remove bluetooth toggle find this-
Code:
bluetoothTile:Lcom/android/systemui/statusbar/phone/QuickSettingsTileView;
then scroll until you find
Code:
Landroid/view/ViewGroup;->addView(Landroid/view/View;)V
delete all that including the invoke
(note: just scroll dont use search button so you won't
get confused)
For data connection toggle find-
Code:
dataconnectiontile:/Lcom/android/systemui/phone/Quicksettingstileview
then scroll until you find this
Code:
invoke-virtual {v0, v7}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V
Delete it..
now just search for other tiles that you want to remove in the quicksettings..
For Kitkat-
Copy the line below search for it
Code:
.method private addAudioProfileTile(Landroid/view/ViewGroup;Landroid/view/LayoutInflater;)V
that is the tile of audio profile if you want to remove it from your panel then scroll find this in the method:
Code:
Landroid/view/ViewGroup;->addView(Landroid/view/View;)V
delete that whole line including the .line at the top of it
also delete the gaps because there must be only 1 gap
if you want to delete wifi tile from your panel
then search:
Code:
.method private addWifiTile(Landroid/view/ViewGroup;Landroid/view/LayoutInflater;)V
that is the tile of wifi if you want to remove it from your panel then just find again the this line in the method
Code:
Landroid/view/ViewGroup;->addView(Landroid/view/View;)V
delete that whole line including the .line at the top of it
Do it with all the toggles which u wanna remove
This step is slightly confusing, just skip it if u r not getting
Step 5:
Now What! Recompile ur systemui
Patch ur services.jar, yes! U have edited Androidmanifest.xml , so u gotta sign it with custom signature
Don't know how to patch services.jar.. Just search on XDA, there are many guides
Now make flashable zip of systemUI.apk and flash it.
SystemUi force closed , same as mine! Don't Worry Follow next step
Step 6:
Download fix.zip from attachments below.. Copy png to res/drawable-hdpi folder
Recompile ur systemui.apk and again decomile it
Open SignalToggle in /smali/com/fmd/qset
find 0x7f0201f3
replace with
<public type="drawable" name="stat_sys_signal_null"
from your public.xml
Ah! Done Now. Recompile ur systemui and flash it.. Enjoy
Credits-
Fmd Devs
Klark Luis Peralta
Jeff Rivera
Aljhun Bumaya
b16h22
Maaadr
i m not so cheap to take credit only for sharing it
Just Hit Thank you button if i helped u in anyway
Screenshots
Great work..
Thanks bhai for your grat work.....
Help Required...
I tried steps as in the tutorial but im not able to recompile after step 1... its says @style/TextAppearance.QuickSettings no resources found that matches the name. ... am i doing sumething wrong?? plz help.... thanx
Gokulb1 said:
I tried steps as in the tutorial but im not able to recompile after step 1... its says @style/TextAppearance.QuickSettings no resources found that matches the name. ... am i doing sumething wrong?? plz help.... thanx
Click to expand...
Click to collapse
have add that line on your style?
There is a guide similar to this on XDA already but it didn't work for some of the members. You can leave your guide so that others may try.I know I will. Thanks and keep up tew good work. :good:
Ran out of thanks will thank you tomorrow
nophyan said:
have add that line on your style?
Click to expand...
Click to collapse
Yes bro...in the first step its there... if i delete that i get many other errors...
Help
I tried but got too many errors and didn't know how to solve them. Can i make a request that you do it for me and send back please. Here are the files and recompiling log from Tickle my Android. SystemUI.apk
Note: This might help, I have an Alcatel device so that means i have a custpack partition. In the custpack partition there is an apk file where the resources (res folder) for the SystemUI.apk is. It is called SystemUI-res.apk. So when decompiling you have to add the AndroidManifest.xml inside the apk before decompiling and remove it after recompiling. The files I've attached I've already done that for you so it would be great if someone can made the Android L for me .
Samsung SystemUI Support?
Is this method support samsung SystemUI..???
nashj1975 said:
I tried but got too many errors and didn't know how to solve them. Can i make a request that you do it for me and send back please. Here are the files and recompiling log from Tickle my Android. SystemUI.apk
Note: This might help, I have an Alcatel device so that means i have a custpack partition. In the custpack partition there is an apk file where the resources (res folder) for the SystemUI.apk is. It is called SystemUI-res.apk. So when decompiling you have to add the AndroidManifest.xml inside the apk before decompiling and remove it after recompiling. The files I've attached I've already done that for you so it would be great if someone can made the Android L for me .
Click to expand...
Click to collapse
Same problem here, does anyone have a solution?
http://pastebin.com/n0bZM60N
edit: found a solution in post http://forum.xda-developers.com/showpost.php?p=61808403&postcount=18
QuBeX said:
Same problem here, does anyone have a solution?
http://pastebin.com/n0bZM60N
Click to expand...
Click to collapse
I googled one of your errors this one
Code:
Error for input '.parameter': Invalid directive
and i realized that you need to use apktool 1.5.2 and not 2.0. Sadly I couldn't find anything with the other error
nashj1975 said:
I googled one of your errors this one
Code:
Error for input '.parameter': Invalid directive
and i realized that you need to use apktool 1.5.2 and not 2.0. Sadly I couldn't find anything with the other error
Click to expand...
Click to collapse
Yeah i googled it also, .parameter lines are for debugging so you can delete them all, or use baksmali instead of apktool.
Then the no viable alternative at input 'dx' is a syntax error, in the code it is like this .local v1, dy:F but you need to put " " at the dx in this case: .local v1, "dy":F
Gokulb1 said:
Yes bro...in the first step its there... if i delete that i get many other errors...
Click to expand...
Click to collapse
Make sure you merged all the files from the res folder into your res folder in SystemUI.apk
---------- Post added at 02:43 PM ---------- Previous post was at 02:41 PM ----------
QuBeX said:
Yeah i googled it also, .parameter lines are for debugging so you can delete them all, or use baksmali instead of apktool.
Then the no viable alternative at input 'dx' is a syntax error, in the code it is like this .local v1, dy:F but you need to put " " at the dx in this case: .local v1, "dy":F
Click to expand...
Click to collapse
Seems like a lot and i don't know much, hardly anything about smali code. So I'm hoping someone can patch my SystemUI.apk :fingers-crossed:
BRoy_98 said:
Is this method support samsung SystemUI..???
Click to expand...
Click to collapse
I think so... Give a try
@itsraj011 Can you help me? Are you in the process of helping? If so then my bad.
itsraj011 said:
I think so... Give a try
Click to expand...
Click to collapse
Hi, I am getting some error... Log is in attachment. Please help me.
QuBeX said:
Yeah i googled it also, .parameter lines are for debugging so you can delete them all, or use baksmali instead of apktool.
Then the no viable alternative at input 'dx' is a syntax error, in the code it is like this .local v1, dy:F but you need to put " " at the dx in this case: .local v1, "dy":F
Click to expand...
Click to collapse
Hi bro, can you tell me how to use baksmali to recompile it..???
BRoy_98 said:
Hi bro, can you tell me how to use baksmali to recompile it..???
Click to expand...
Click to collapse
Ok, the problem is that the smali code in the systemuifiles.zip has an old syntax...
Here is what i did:
1.- Baksmali SystemUI.apk classes.dex with baksmali 1.4.2
2.- Merge smali files from systemuifiles.zip
3.- Smali the folder with smali 1.4.2 and get a new-classes.dex
4.- Baksmali the new-classes.dex with baksmali 2.06 into a folder called "new-smali"
5.- Decompile SystemUI.apk with latest apktool
6.- Delete smali folder from working folder and copy new-smali folder into apktool working folder (renaming it to smali)
7.- Make all the changes
8.- Recompile with latest apktool
That should work, anyway I couldn't get it to work, after patching services.jar and pushing both systemui and services to the device the status bar doesn't change... Don't know why
QuBeX said:
Ok, the problem is that the smali code in the systemuifiles.zip has an old syntax...
Here is what i did:
1.- Baksmali SystemUI.apk classes.dex with baksmali 1.4.2
2.- Merge smali files from systemuifiles.zip
3.- Smali the folder with smali 1.4.2 and get a new-classes.dex
4.- Baksmali the new-classes.dex with baksmali 2.06 into a folder called "new-smali"
5.- Decompile SystemUI.apk with latest apktool
6.- Delete smali folder from working folder and copy new-smali folder into apktool working folder (renaming it to smali)
7.- Make all the changes
8.- Recompile with latest apktool
That should work, anyway I couldn't get it to work, after patching services.jar and pushing both systemui and services to the device the status bar doesn't change... Don't know why
Click to expand...
Click to collapse
I asked what are the commands to use the baksmali.jar or smali.jar..? Did you seen my log..?? Can you tell me what should I do??
nashj1975 said:
@itsraj011 Can you help me? Are you in the process of helping? If so then my bad.
Click to expand...
Click to collapse
U r getting error in styles.xml if I m right.. Search for the lines before adding them. Only change their values if it is already there Or wait for some days, I'll do it for u when i shall get time

[Guide] Add "Coloricker" in Settings

In this guide , I will tell "How to add Colorpicker" in Settings.
Tested this on 4.2 and 4.4 ​
REQUIREMENTS :
1. Brain
2. Apktool
3. Notepad ++
4. Knowledge on How to Decompile/Recompile the apk
Lets start ,
1. Decompile your Settings.apk and merge the file (given below).
2. Now open strings.xml and add these lines above </resources>.
PHP:
<string name="dialog_color_picker">Color Picker</string>
<string name="press_color_to_apply">Press on color below to apply</string>
<string name="arrow_right">→</string>
<string name="arrow_down">↓</string>
<string name="hex">Hex:</string>
<string name="hex_hint">\#ff000000</string>
<string name="set">Set</string>
3. Now open ids.xml and add these lines above </resources>.
PHP:
<item type="id" name="hex">false</item>
<item type="id" name="enter">false</item>
<item type="id" name="white_panel">false</item>
<item type="id" name="black_panel">false</item>
<item type="id" name="cyan_panel">false</item>
<item type="id" name="red_panel">false</item>
<item type="id" name="green_panel">false</item>
<item type="id" name="yellow_panel">false</item>
<item type="id" name="old_color_panel">false</item>
<item type="id" name="new_color_panel">false</item>
<item type="id" name="reset">false</item>
<item type="id" name="color_picker_view">false</item>
<item type="id" name="ics_color">false</item>
<item type="id" name="color_panel_view">false</item>
4. Now Recompile your Settings.apk , Sign it and then again Decompile it.
5. Now go to smali/net/margaritov/preference/colorpicker and open the "ColorPickerDialog.smali". Then replace the id with the id present in public.xml of your Settings.apk
0x7f0400bb
PHP:
<public type="layout" name="dialog_color_picker"
0x7f0b09ba
PHP:
<public type="string" name="dialog_color_picker"
0x7f08028a
PHP:
<public type="id" name="color_picker_view"
0x7f080288
PHP:
<public type="id" name="old_color_panel"
0x7f080289
PHP:
<public type="id" name="new_color_panel"
Do this with other same id
0x7f080282
PHP:
<public type="id" name="white_panel"
0x7f080283
PHP:
<public type="id" name="black_panel"
0x7f080284
PHP:
<public type="id" name="cyan_panel"
0x7f080285
PHP:
<public type="id" name="red_panel"
0x7f080286
PHP:
<public type="id" name="green_panel"
0x7f080287
PHP:
<public type="id" name="yellow_panel"
0x7f080280
PHP:
<public type="id" name="hex"
0x7f080281
PHP:
<public type="id" name="enter"
Important Information :
• If you are having colorpicker , but its having old ui and want to use this then first follow the guide and then go to that option layout xml and change the path of the colorpicker to the line given below.
PHP:
net.margaritov.preference.colorpicker.ColorPickerPreference
Special Thanks To :
1. Cyanogenmod
2. XDA
Screenshot
{
"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"
}
Thanks bro..
Anyone tried on LL?
My English is poor, thanks for sharing, I ask how to modify the default color? White, black,Cyan,Red,Green...
Hamidreza2010 said:
Anyone tried on LL?
Click to expand...
Click to collapse
Yep. Works fine
05Gurpreet said:
In this guide , I will tell "How to add Colorpicker" in Settings.
Tested this on 4.2 and 4.4 ​
REQUIREMENTS :
1. Brain
2. Apktool
3. Notepad ++
4. Knowledge on How to Decompile/Recompile the apk
Lets start ,
1. Decompile your Settings.apk and merge the file (given below).
2. Now open strings.xml and add these lines above </resources>.
PHP:
<string name="dialog_color_picker">Color Picker</string>
<string name="press_color_to_apply">Press on color below to apply</string>
<string name="arrow_right">→</string>
<string name="arrow_down">↓</string>
<string name="hex">Hex:</string>
<string name="hex_hint">\#ff000000</string>
<string name="set">Set</string>
3. Now open ids.xml and add these lines above </resources>.
PHP:
<item type="id" name="hex">false</item>
<item type="id" name="enter">false</item>
<item type="id" name="white_panel">false</item>
<item type="id" name="black_panel">false</item>
<item type="id" name="cyan_panel">false</item>
<item type="id" name="red_panel">false</item>
<item type="id" name="green_panel">false</item>
<item type="id" name="yellow_panel">false</item>
<item type="id" name="old_color_panel">false</item>
<item type="id" name="new_color_panel">false</item>
<item type="id" name="reset">false</item>
<item type="id" name="color_picker_view">false</item>
<item type="id" name="ics_color">false</item>
<item type="id" name="color_panel_view">false</item>
4. Now Recompile your Settings.apk , Sign it and then again Decompile it.
5. Now go to smali/net/margaritov/preference/colorpicker and open the "ColorPickerDialog.smali". Then replace the id with the id present in public.xml of your Settings.apk
0x7f0400bb
PHP:
<public type="layout" name="dialog_color_picker"
0x7f0b09ba
PHP:
<public type="string" name="dialog_color_picker"
0x7f08028a
PHP:
<public type="id" name="color_picker_view"
0x7f080288
PHP:
<public type="id" name="old_color_panel"
0x7f080289
PHP:
<public type="id" name="new_color_panel"
Do this with other same id
0x7f080282
PHP:
<public type="id" name="white_panel"
0x7f080283
PHP:
<public type="id" name="black_panel"
0x7f080284
PHP:
<public type="id" name="cyan_panel"
0x7f080285
PHP:
<public type="id" name="red_panel"
0x7f080286
PHP:
<public type="id" name="green_panel"
0x7f080287
PHP:
<public type="id" name="yellow_panel"
0x7f080280
PHP:
<public type="id" name="hex"
0x7f080281
PHP:
<public type="id" name="enter"
Important Information :
• If you are having colorpicker , but its having old ui and want to use this then first follow the guide and then go to that option layout xml and change the path of the colorpicker to the line given below.
PHP:
net.margaritov.preference.colorpicker.ColorPickerPreference
Special Thanks To :
1. Cyanogenmod
2. XDA
Click to expand...
Click to collapse
Bro..credit goes to Sergey Margaritov for creating this colorpicker ans anyways Thanks for sharing
ARGHA_DAS said:
Bro..credit goes to Sergey Margaritov for creating this colorpicker ans anyways Thanks for sharing
Click to expand...
Click to collapse
Why you quoting the whole OP my friend?
ARGHA_DAS said:
Bro..credit goes to Sergey Margaritov for creating this colorpicker ans anyways Thanks for sharing
Click to expand...
Click to collapse
Ok , will definitely give full credits to Sergey Sir. I have extracted this from cyanogenmod ROM.
I got fc on settings when I click to modify color .-.
Tnx bro working on LL 5.1.1 Xperia
05Gurpreet said:
Important Information :
• If you are having colorpicker , but its having old ui and want to use this then first follow the guide and then go to that option layout xml and change the path of the colorpicker to the line given below.
PHP:
net.margaritov.preference.colorpicker.ColorPickerPreference
Click to expand...
Click to collapse
where is that option layout xml file???
is it color_picker_item.xml?
if yes how to change it???
I didn't found this one in my public.xml,
Code:
<public type="layout" name="dialog_color_picker"
Is that okay?

Categories

Resources