[GUIDE]Making themes for Theme Chooser (CM7) [work in progress, last update 14/4-13] - Sony Ericsson XPERIA X10 Mini

Making themes for Theme Chooser (CM7)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is a guide for making themes for Theme Chooser. Feel free to add idears of stuff I left out.
When getting a hold of what everything inside the theme-apk does, you should also be able to port CM10 themes to CM7.
Let's start by getting an overview of the content of a theme-apk.
In the root of the theme-apk we find:
Inside the res-folder there are some folders.
In the values-folder are we have a group of XMLs. This is just a quick run down. Detailed explanation comming later:
colors.xml - Defines colors as names (text) to be used in styles. Instead of writing "#ffc6c6c6" all the time, you can use a more understandable name like "@color/xperia_eclair_dark"
drawables.xml - Used to transform images in a themed app to a solid color. Eg. if we want to change the background image for an app to a red transparent filter, we can add a drawable item here with the value "88FF0000" (55 = transparency value. FF = full red. Green and Blue are both set to 00)
integers.xml - Used to set some system values, like the duration of animations, the color of LED on different occasions and more.
Read mere here: http://www.androidjavadoc.com/2.3/com/android/internal/R.integer.html
strings.xml - Here the strings for the theme (name, author etc.) are defined.
styles.xml - Here we have all the themed styles. If you know CSS in HTML you might say "Ahaaa" right away, if not it you might just say "huh?". Don't worry, I will explain later
This guide is devided into seperete parts in the folowing posts.
NOTICE: This is a first simple draft. More tips and tricks will be added to the posts over time.
2: Visual appearance in Theme Chooser etc
3: Transitions, animations and integers
4: PNGs and .9.PNGs
5: Styles and colors [updated 14/4-13]
6: XML-references [updated 14/4-13]
7: Advanced image and color animation [updated 14/4-13]
8: Compiling and signing the theme-APK
9: Best replys

Visual appearance in Theme Chooser etc
AndroidManifest.xml
This XML defines the visual part of the theme in Theme Chooser and the APK-information in Packet Installer and Application manager.
Here is an exampel:
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:hasCode="false" [COLOR="Red"]android:versionCode="1" android:versionName="1 Retro"[/COLOR] android:installLocation="internalOnly" [COLOR="red"]package="com.emperordk.theme.retro"[/COLOR]
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:pluto="http://www.w3.org/2001/pluto.html">
<uses-feature android:name="com.tmobile.software.themes" />
<application android:label="@string/theme_name" [COLOR="Blue"]android:icon="@drawable/icon"[/COLOR] android:hasCode="false" />
<theme pluto:themeId="XperiaEclair" [COLOR="Purple"]pluto:styleId="@style/Eclair"[/COLOR] [COLOR="Green"]pluto:name="@string/theme_name"[/COLOR] pluto:preview="@drawable/preview" pluto:wallpaperImage="@drawable/wallpaper" pluto:author="@string/author" pluto:copyright="@string/copyright" pluto:styleName="@string/style_appearance_name">
<meta-data android:name="com.tmobile.theme.redirections" android:resource="@xml/redirections" />
</theme>
</manifest>
The first thing the XML does, is define the theme version, and package ID (the red parts above).
To avoid collision with other apps and themes it's very important not to use a package ID that is used by other apps.
Eg. if I would make a retro-theme I would use this package ID:
package="com.emperordk.theme.xperiaeclair"
Click to expand...
Click to collapse
or something like that
It's not very likely, that this ID is used by any other app
Next we notice, that the name of the theme comes from a string (gren part), so this is edited elswhere, se right below in this post.
In the same TAG the APK-icon is also defined (blue part).
"@drawable/icon" is a reference to the file "res/drawable-ldpi/icon.png" (asuming we make a LDPI-theme).
If the file does not exists in drawable-ldpi, Android looks for it in drawable-mdpi or drawable-hdpi.
Making a LDPI theme, everything should be made in true LDPI for faster and smoother response (Android resizes from MDPI and HDPI to LDPI, and that takes up some CPU-power).
Next we set the parrent style (purple part). This style must exist in the styles.xml (later in this guide).
In the same line a lot of strings are fetched, like theme name and so on, we also define the reference to the preview image the same way as the icon was defined, we must have a file for portrait and landscape. (Notice: wallpaper will not be set by Theme Chooser in CM7).
You should not edit any of the TAGs and/or arguments that are not marked by a color above.
Editing @xml/redirections will have no effect. Theme Chooser will use redirections.xml anyway (I realy want to be able to set the redirection master-XML to another XML-file, but I have not yet found the part of Theme Chooser where I can make it read the string from AndroidManifest.xml).
We can from this XML identify the existence of the folowing files:
res/drawable-ldpi/icon.png
res/drawable-hdpi/preview.png
res/drawable-land-mdpi/preview.png
YES! For some reason place the portrait-preview in "drawable-hdpi" and the landscape-preview in "drawable-land-mdpi", or Theme Chooser will return an error.
The size of LDPI icons is 36 x 36 px
The LDPI prewiew image should be 135 x 209 px (if lager, Android will just resize)
res/values/strings.xml
Here strings for APKs are defined.
As a theme APK realy doesn't do anything but being a container for theme-parts, there are only a very few strings.
This would be the content for a Retro-theme made by me:
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Xperia Eclair Retro</string>
<string name="theme_name">Xperia Eclair Retro</string>
<string name="style_appearance_name">Retro</string>
<string name="author">Emperor</string>
<string name="copyright">2013</string>
</resources>

Transitions, animations and integers
XMLs that controls how transitions and animations looks are placed in the anim-folder.
integers.xml is used to set some system values, like the duration of animations, the color of LED on different occasions and more.
Read mere here: http://www.androidjavadoc.com/2.3/com/android/internal/R.integer.html
---- MORE COMMING -----

PNGs and .9.PNGs
There are meny folders for PNG files. Mostly these will be present in a theme:
drawable-hdpi
drawable-land-ldpi
drawable-land-mdpi
drawable-land-mdpi-finger
drawable-ldpi
drawable-mdpi
drawable-mdpi-finger
Here all the PNGs used by the themed apps are placed.
Making a theme for an LDPI device, it would be best to resize everything to true LDPI. This way, the device does not have to make the resizing it self, and it will speed up the smoothnes of using the device. Also the finished APK will take up less space.
Read more about screen-sizes here: http://developer.android.com/guide/practices/screens_support.html
Scaling ratio for LDPI:MDPI:HDPI:XHDPI is 3:4:6:8
• 36x36 for low-density
• 48x48 for medium-density
• 72x72 for high-density
• 96x96 for extra high-density
Notice: Almost all themes also got folders for MDPI and/or HDPI even if they claim to be LDPI-theme. In most cases it has no influence on the visuel look.
/drawable-finger-ldpi etc
Well, the "finger"-part is called a "qualifier" and this qualifier should actually not be nessesery for our devises to use.
This qualifier makes it explicit, that PNGs in this folder are for touchscreen devices, doh!. This makes it possible to have different PNGs for touchscreen and non-touchscreen devices.
But other qualifiers than "finger" can be usefull, eg. if we draw some letters on a PNG, that has to be different for different languages, or the PNG must look different because layouts are also different eg. left-to-right og right-to-left text, we can make language-dependent qualifiers.
This is advanced theming, LOL. List of qualifiers read more here: http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources
If you are theming an app that holds PNGs in a "finger" folder, just do the same in your theme.
How to edit .9.PNG read more here: http://forum.xda-developers.com/showthread.php?t=2033415

Styles and colors
styles.xml
When you for the first time open and look at the content of styles.xml you might regret starting to learn about theming.
But it's not that hard first you understand what it's all about.
Lets start with a very simple example.
We got this simple app: Calculator.apk with the package ID: com.android.calculator2
NOTICE: Some genius made a fixed black background in the layout-XML for this app. That's why the background can't be themed, but I fixed that. Grab the fixed Calculator.apk here. http://www.mediafire.com/?8x4q08tpcqnl2jf
Calculator.apk looks like this unthemed:
The steps to learn how to theme that app would be to decompile it and then read it's "AndroidManifest.xml"
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="10" android:versionName="2.3.7" package="com.android.calculator2"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="10" />
<original-package android:name="com.android.calculator2" />
<application android:label="@string/app_name" android:icon="@drawable/icon">
<activity [COLOR="Red"]android:theme="@android:style/Theme.Black.NoTitleBar"[/COLOR] android:name="Calculator">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Here we learn that it's themed by the style named "Theme.Black.NoTitleBar" from "@android" (red line) wich is the same as "framework-res.apk".
So we decompile "framework-res.apk" and open "res/values/styles.xml" and look for a style named "Theme.Black.NoTitleBar" and find this:
Code:
<style name="Theme.Black.NoTitleBar" parent="@style/Theme.Black">
<item name="windowNoTitle">true</item>
</style>
It doesn't look of much, but it tells us, it enheriets it's styles from "Theme.Black". Aha! We find it and it looks like this:
Code:
<style name="Theme.Black" parent="@style/Theme">
<item name="colorBackground">@color/black</item>
<item name="windowBackground">@color/black</item>
</style>
It should be very obvious, that the style makes a solid black background. Let's change that from our theme.
First lets set up a string for a transparent color. We will almost for sure need that a lot anyway. Chances are, that you a using an exsisting theme as a base for your theme, and most likely it's already defined.
In our theme-APK-folder we open "res/values/colors.xml" and add this inside the resources-tags:
Code:
<resources>
...
<color name="transparent">#00000000</color>
...
</resources>
Still in our theme-APK-folder we open "res/values/styles.xml" and add this inside the resources-tags:
Code:
<resources>
...
<style name="Theme.Black" parent="@android:style/Theme.Black">
<item name="android:colorBackground">@android:color/transparent</item>
<item name="android:windowBackground">@drawable/semc_bg</item>
</style>
...
</resources>
Notice the difference in how to write the style in our theme and how it was written in the original framework-res.apk!
Lets explain what it does:
First of all we give it a name. It's smart to keep the same names to make it easy to remember what this is for.
Next we add an argument that inheriets styles from the original style from the original framework-res.apk. It's not nessesery for this style as we change everything, but for other styles where we only will change a few things this is smart.
The two item-lines then sets background-color to transparent and sets background-image to "res/drawable-ldpi/semc_bg.png" from our theme-APK.
Final step is to add style-reference. In our theme-APK-folder we open "res/xml/android.xml" and add this line inside the resource-redirections-tags
Code:
<resource-redirections>
...
<item name="style/Theme.Black">@style/Theme.Black</item>
...
</resource-redirections>
Now Theme Chooser will replace the style in framework-res.apk with the style from our theme-APK.
We have made our first themed style (In post #6 we will also theme the PNGs of Calculator.apk). The result looks like this:
So your next question will be: What all the style-names in styles.xml are responsible for different texts etc.?
Well, I will gather all info about that. Untill then read here:
http://developer.android.com/guide/topics/ui/themes.html
https://android.googlesource.com/pl...s/heads/master/core/res/res/values/styles.xml
------ for geeks ------
The problem is in Calculator.apk in the file main.xml in folders layout-land and layout-port.
At the top of both XMLs we find these lines:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:background="#[COLOR="red"][B]ff[/B][/COLOR]000000" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
...
The problem is the part highlighted in red.
This defines a non-transparent full black background for the entire layout of the app.
The first 2 hex ff is = no transparency. 00 would = full transparency. The rest is just normal hex-RGB-color-code.
Yes, the app starts by getting it's layout as described in my link in post #5 above. This is all fine. But then on top of that, we get a LinearLayout-container with solid black background, covering any other background defines by our styles... not clever at all LOL.
The fix i made in link above is just to change the background to full transparency, like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:background="#[COLOR="Red"][B]00[/B][/COLOR]000000" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
...

XML-references [updated 13/2-13]
In the xml-folder we have all the XMLs that are responsible for theming apps.
We already had a sneak-peek at res/xml/android.xml above. Let's see how the redirection-XMLs work.
The master-XML is "redirections.xml". Here each themed app is referenced to an XML.
All themed app then have it's own XML that controles how the app is themed - both PNGs from drawable-folders and styles from "res/values/styles.xml".
It's not only standard apps that can be themed. Any app, also from Google Play, can be themed.
The most simple theme is just to change the apps icon in the app drawer. Most themes for the stock email app only changes the icon.
More theming would be to exchange drawables (PNGs), and the next more advanced step is theming styles, and if you are totally crazy you also make a lot of qualifier dependent theming (mostly language dependent).
This is an example from a theme, that themes all standard apps:
Code:
<?xml version="1.0" encoding="utf-8"?>
<theme-redirections
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:pluto="http://www.w3.org/2001/pluto.html">
[COLOR="Red"]<package-redirections android:name="android" android:resource="@xml/android" android:minSdkVersion="7" />[/COLOR]
<package-redirections android:name="com.android.systemui" android:resource="@xml/com_android_systemui" android:minSdkVersion="7" />
<package-redirections android:name="com.android.phone" android:resource="@xml/com_android_phone" android:minSdkVersion="7" />
<package-redirections android:name="com.android.settings" android:resource="@xml/com_android_settings" android:minSdkVersion="7" />
<package-redirections android:name="com.android.browser" android:resource="@xml/com_android_browser" android:minSdkVersion="7" />
<package-redirections android:name="com.android.calendar" android:resource="@xml/com_android_calendar" android:minSdkVersion="7" />
<package-redirections android:name="com.android.music" android:resource="@xml/com_android_music" android:minSdkVersion="7" />
<package-redirections android:name="com.android.camera" android:resource="@xml/com_android_camera" android:minSdkVersion="7" />
<package-redirections android:name="com.android.mms" android:resource="@xml/com_android_mms" android:minSdkVersion="7" />
<package-redirections android:name="com.android.contacts" android:resource="@xml/com_android_contacts" android:minSdkVersion="7" />
<package-redirections android:name="com.android.calculator2" android:resource="@xml/com_android_calculator2" android:minSdkVersion="7" />
<package-redirections android:name="com.android.deskclock" android:resource="@xml/com_android_deskclock" android:minSdkVersion="7" />
<package-redirections android:name="com.cooliris.media" android:resource="@xml/com_cooliris_media" android:minSdkVersion="7" />
<package-redirections android:name="com.android.email" android:resource="@xml/com_android_email" android:minSdkVersion="7" />
<package-redirections android:name="com.android.inputmethod.latin" android:resource="@xml/com_android_inputmethod_latin" android:minSdkVersion="7" />
<package-redirections android:name="com.google.android.apps.genie.geniewidget" android:resource="@xml/com_google_android_apps_genie_geniewidget" android:minSdkVersion="7" />
<package-redirections android:name="com.sonyericsson.home" android:resource="@xml/com_sonyericsson_home" android:minSdkVersion="7" />
<package-redirections android:name="com.android.providers.downloads.ui" android:resource="@xml/com_android_providers_downloads_ui" android:minSdkVersion="7" />
<package-redirections android:name="com.android.packageinstaller" android:resource="@xml/com_android_packageinstaller" android:minSdkVersion="7" />
</theme-redirections>
The reference to the framework-res.apk is a little special. See the red line at the top.
The rest uses the apps package-ID. Knowing the package-ID you can theme any app. Also apps from Google Play.
In each of the XMLs for each app, all file-redirections are defined.
So we want to theme Calculator.apk to make it look like in stock Eclair ROM.
We already themed the style above, now we want to theme the icon and all images used by Calculator.apk.
In the decompiled Calculator.apk from CM7 ROM we find 2 drawable-folders:
drawable
- blue_button.xml
- button.xml
drawable-mdpi
- advanced.png
- clear_history.png
- icon.png
- simple.png
In the decompiled Calculator.apk from stock Eclair ROM we find these 2 drawable-folders:
drawable
- blue_button.xml
- button.xml
- transparent_button.xml
drawable-ldpi
- advanced.png
- calculator_button.9.png
- calculator_button_pressed.9.png
- clear_history.png
- icon.png
- simple.png
First we notice that the 3 normal PNG files looks exactly the same, aside from MDPI/LDPI. In this case there is no need for theming those.
Also notice there is no folder for landscape, as there is no need for a different looking PNG/XML.
But we want to theme the icon and the two XMLs from drawable. Remember, that XMLs in the drawable-folder are seen as any other PNG in a drawable-folder.
The icon from stock Eclair is renamed into something easy to understand, like ic_launcher_calculator2.png, and copied to our theme-apk-folder res/drawable-ldpi.
We will also copy the two .9.PNGs, as we will use them to make button-animations (explained in next post below).
The content of "res/xml/com_android_calculator2.xml" will look like this for theming the icon and the two XMLs.
Code:
<?xml version="1.0" encoding="utf-8"?>
<resource-redirections>
[COLOR="red"]<item name="drawable/icon">@drawable/ic_launcher_calculator2</item>[/COLOR]
<item name="drawable/blue_button">@drawable/calculator_button</item>
<item name="drawable/button">@drawable/calculator_button</item>
</resource-redirections>
The red line makes a redirection for the icon as shown in the app-drawer to a PNG in our theme-APK "res/drawable-ldpi/ic_launcher_calculator2.png".
We also make redirections for the XML-drawables, but as all buttons looks the same in stock Eclair we redirect to the same file for both button-types. Read more in next post about Advanced image and color animation.
Notice, that we do not make any redirections to the two .9.PNGs as they do not replace anything.

Advanced image and color animation [updated 14/4-13]
/color
The "color"-folder is a somewhat misleading foldername. Here we place XML-files that are used instead af a HEX-color-code. Yes, the XML-file it self is the color.
Normaly to set a text color in a style-class, you would use a tag like this:
Code:
<item name="android:textColor">#ffffffff</item>
Notice 8 HEX-digits.
This will just make the text full bright white. The first 2 hex-digits sets transparancy to "ff" = no transparency (00 = full transparency). The next 6 digits is the color in RGB-format, 2 hex-digits for each (red, green and blue).
But we could also set the color of some text to - not a HEX-color-code, but - the name of an XML-file in the "color" folder, like this:
Code:
<item name="android:textColor">@color/eclair_button_default</item>
This tag sets the text color to the XML-file "res/color/eclair_button_default.xml". The content of the XML-file can then define colors for different stages like selected, pressed etc.
In this way we can have the color of the text change when eg. a button is tapped. Cool stuff right?
---- MORE COMMING -----
/drawable
This folder is used just like the "color" folder, just for PNGs instead of colors, so eg. the PNG will change when tapped.
Normally the XML that theme an app will make a reference to a new PNG-file from the theme-APKs drawable-ldpi folder, but if no PNG with the refered name exists, Android looks for an XML-file in "res/drawable" instead.
The content of the XML-file can then define PNGs for different stages like selected, pressed etc.
Theming Calculator.apk we came across two XMLs in the drawable-folder.
The content of the 2 XMLs in Calculator.apk from CM7 ROM looks like this:
button.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:startColor="#ff000000" android:endColor="#ff333333" android:angle="90.0" />
<corners android:radius="0.0dip" />
</shape>
blue-button.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:startColor="#ff071622" android:endColor="#ff253541" android:angle="90.0" />
<corners android:radius="0.0dip" />
</shape>
As noted, the XMLs defines a gradient color for two different colors (blue and black), that looks like this:
When tapped there is no button-animation aside from edge-glow when relesed.
The chalange is to make it look like in stock Eclair ROM; transparent and when tapped the whole button glows bright:
The two steps (normal and pressed) comes from two .9.PNGs mentioned above.
In Calculator.apk from stock Eclair ROM this is accomplished by the use of a drawable-XML:
transparent_button.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="false" android:drawable="@drawable/calculator_button" />
<item android:state_pressed="true" android:drawable="@drawable/calculator_button_pressed" />
</selector>
The other two XMLs are not used, but must be leftovers from the original devs.
Looking at the XML-code, we notice a fairly simple way of making animations in buttons. We have got two item-lines acording to a pressed or not-pressed state.
Thats all there is to it.
The drawables refered to is the two .9.PNGs
So we rename transparent_button.xml to calc_button.xml (carefull not to use filenames already used by other drawables like another PNG) and copy it to "res/drawable" in our theme-apk-folder.
The result looks like this with the old icon, look and feel from the stock Eclair ROM:
You might notice a slight difference in spacing betwean the buttons from the stock one. Well, we will fix this too in another post - here in this thread - soon.
HA! Not a dry eye in the room.

Compiling and signing the theme-APK
Get all tools here: http://forum.xda-developers.com/showthread.php?t=2033415
--------- MORE COMMING SOON ---------

References to best replies
Reserved for ref to best replies in this thread :good:

thanks emperor

Renz29 said:
thanks emperor
Click to expand...
Click to collapse
i will add more examples and images soon in every section

Thank you!
☜ Sent from my Xperia ☞

Just updated posts #5, #6 and #7

How I can change the images of a theme? (res / drawable)
Thanks for your reply.

can you make this theme a theme chooser for my cm10? please..
View attachment 2176394
i like only the icons of that theme..

thanks

Related

Transparent Contacts.apk Froyo 2.2.2

I wish to make transparent the contacts.apk on my streak , I have tried many guides but none of these worked for my froyo 2.2.2. Any of you tried by chance?
Have you looked here?
http://forum.xda-developers.com/showthread.php?t=990014
Seems to be a lot of transparent apps here and some instructions for editing your own.
thanks for the help (useful link), even if I meant something like
I'm sorry if you do not see too much but definitely makes the idea (sorry but taken from the web)
Now that is cool and I want it too....
I found this guide on the web,i tried many times it did not work :
What you have to do:
Extract the Contacts.apk from your phone/rom zip file
Decompile Contacts.apk
Open
call_background.xml
in res/drawable
Change
--- Code: ---<?xml version="1.0" encoding="UTF-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:drawable="android:color/transparent" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="android:drawable/menuitem_checkbox_on" />
<item android:state_focused="false" android:state_pressed="false" android:drawable="android:drawable/screen_background_dark" />
</selector>
--- End code ---
To:
--- Code: ---<?xml version="1.0" encoding="UTF-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:drawable="android:color/transparent" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="android:drawable/menuitem_checkbox_on" />
<item android:state_focused="false" android:state_pressed="false" android:drawable="android:color/transparent" />
</selector>
--- End code ---
Save and close.
Open
styles.xml
in res/values.
Change lines 3-6
--- Code: ---<style name="DialtactsTheme" parent="android:style/Theme">
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">null</item>
</style>
--- End code ---
To.
--- Code: ---<style name="DialtactsTheme" parent="android:style/Theme.Wallpaper">
<item name="android:windowBackground">drawable/custom_background_dialer</item>
<item name="android:windowNoTitle">null</item>
</style>
--- End code ---
Save and close.
Next add the transparent custom_background_dialer.png to the drawable-mdpi-finger folder.This can also be a custom image doesn't have to be a transparent one.
IN APKManager choose the option to compile your Contacts
Answer yes when you get asked if it is a system apk and if you want to copy files from the original framework. After the original framework has been extracted, change to your "keep"-Directory and delete the files resources.arsc and everything that you changed, (i.e. call_background.xml and the styles.xml is now hidden so you can't delete that so just delete the resources.arsc & call_background.xml)
Let apkmanager continue its work.
Now you have a new apk file in your place-here-for-modding directory, which you can push on your phone (DO IT IN RECOVERY): adb push unsignedContacts.apk /system/app/Contacts.apk or rename taking the unsigned out and put in your theme zip.
Now you must make the dialer buttons transparent.Change the following to be transparent,
Images are in the drawable-mdpi-finger folder:
btn_dial_action_left_disable.9
btn_dial_action_left_disable_focused.9
btn_dial_action_left_normal.9
btn_dial_action_left_pressed.9
btn_dial_action_left_selected.9
btn_dial_action_middle_disable.9
btn_dial_action_middle_disable_focused.9
btn_dial_action_middle_normal.9
btn_dial_action_middle_pressed.9
btn_dial_action_middle_selected.9
btn_dial_action_right_disable.9
btn_dial_action_right_disable_focused.9
btn_dial_action_right_normal.9
btn_dial_action_right_pressed.9
btn_dial_action_right_selected.9
btn_dial_normal.9
btn_dial_pressed.9
btn_dial_selected.9
btn_dial_textfield_activated.9
btn_dial_textfield_normal.9
btn_dial_textfield_pressed.9
btn_dial_textfield_selected.9
Screen Shot of what it looks like:
You have ideas on how to do (even call_background.xml is different )
I did ok, this is for you (although I have to change something again)
could we see a teaser screenie on the streak with this, thanks guys!
nice work!

[HOW TO] Port a Theme: By Nottach

How To Port a Theme: The Nottach Way
This first draft will probably have confusing parts so if you get stuck let me know and I'll make it clearer.
Backing Up:
The first thing you're going to want to do is backup the files you will be editing. I recommend making a CWM zip of the backed up files. That way if you bootloop you can easily flash back.
Steps To Backup:
You will most likely be theming framework-res.apk and systemui.apk at first. I will show you how to back them up. If you theme other files in the future be sure to add the original to your backup CWM update by repeating these steps. *note* this installer will only install files to the /system directory.
Pull /system/framework/framework-res.apk and /system/app/SystemUI.apk from your device using either adb or root explorer.
Download this pre-scripted zip and extract it to a folder of your choosing.
Place your original framework-res and systemui in their repective folders (framework;app).
Next zip the system and META-INF folders at the root of the extracted folder and be sure to choose a compression of "store" or "none".
Copy the new zip to your SD and try to flash it. Just to make sure it works.
File Structure of the New Zip should be:
Code:
META-INF
-(unchanged contents)
system
-app
--systemui.apk
-framework
--framework-res.apk
If it doesn't flash the most common mistake would be not choosing "store" or "none" for compression.
Once you've got your back-up working you can begin theming.
Basic Theming:
These are my steps. They may seem backwards to some but I can get a quality port out in under an hour this way.
Getting the needed files.
Find a hdpi theme of your choosing.
Using winRAR extract the themes framework-res.apk and systemui.apk (if present).
Extract each apk to its own folder.
You should now have all the icons you should need inside each drawable-hdpi folder you just extracted, one for framework-res and one for systemui.
Have a look through the drawable-hdpi folders. These are the only two folders you'll need so you can delete the others if you wish.
Prepping.
Extract your back-up Zip to a new folder and name that folder after the theme you are working on.
First open framwork-res.apk with winrar.
Navigate to /res/drawable-hdpi
Copying Images.
You'll want to set both your winRAR window and the themes drawable folder side by side.
Next overwrite the icons/images in winRAR with the icons/images in the themes folder. Make sure to only choose the icons/images that are in the /res/drawable-hdpi winRAR. Dont just drag them all in, this will undoubtly leave you with unused icons that will bloat your framework.
Once youve copied over all the images you need, overwriting the originals.
Close the archive (winRAR).
Do the same for systemui.apk, only choosing the needed files.
Tips: If porting a CM7 theme a lot of file renaming will be required. First, sort all the files based on their prefixes (eg. framework-res_; com_android_systemui_; etc). Then, use all file renamer to easily delete XX characters from the left side. You'll need to have a look at what I mean to really get it.
Tips: Some themes lack a systemui.apk but will instead have the images needed for systemui.apk inside their framework-res.apk.
Tips: If a theme doesnt have enough battery icons you will have to make more to suit your framework-res. Do this by spanning the gaps with copies. For instance, if there are only 20 icons and you need 100, make 5 copies of each and name appropriately. This is the biggest pain about a 1% battery.
Once you've overwriten all the images in framework-res and sytemui go ahead and zip up your package following the same steps as the backup, naming the zip appropriately. Don't forget the "store" or "none" compression.
Now try to flash it. If it works it most likely won't be perfect, this is a first draft.
If it doesn't work, again check your compression and zip file structure.
Now take notes of things that are wrong or need fixing, text colors particularly. We will fix them in the next steps.
Editing the status bar.
Now that you can see what needs fixing in the status bar we will decompile your original (backup) systemui.apk and edit the xmls. I will assume you have apkmanager and know how to use it. There are other guides for that so I won't go to deep into it. Look here for a video tutorial on apkmanager.
Decompile systemui.apk
Make edits to XMLs.
These are the edits I make most often.
/res/layout/status_bar.xml -
Code:
<TextView android:textSize="16.0sp" android:textStyle="bold" android:gravity="left|center" android:id="@id/onsText" android:paddingLeft="6.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:maxLength="[COLOR="Red"]0[/COLOR]" /> [COLOR="red"]///HIDES CARRIER TEXT[/COLOR]
Click to expand...
Click to collapse
/res/layout/status_bar_expanded.xml -
Code:
<com.android.systemui.statusbar.DateView android:textAppearance="?android:textAppearanceLarge" android:textColor="[COLOR="Red"]#ffffffff[/COLOR]" android:layout_gravity="center_vertical" android:id="@id/dateLabel" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" /> [COLOR="red"]///DATE TEXT COLOR[/COLOR]
Click to expand...
Click to collapse
/res/values/drawable.xml -
Code:
<item type="drawable" name="shade_bgcolor">[COLOR="Red"]#ff162939[/COLOR]</item> [COLOR="red"]///NOTIFICATION TITLE BACKGROUND (eg. Ongoing)[/COLOR]
Click to expand...
Click to collapse
/res/values/style.xml -
Code:
<style name="TextAppearance.StatusBar.Title" parent="@android:style/TextAppearance.StatusBar">
<item name="android:textAppearance">?android:textAppearanceSmall</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">[COLOR="red"]#ffffffff[/COLOR]</item> [COLOR="red"]///NOTIFICATION TITLE TEXT (eg. No Notifications)[/COLOR]
</style>
Click to expand...
Click to collapse
After making your xml edits recompile, be sure to delete the edited files and resources.arsc from the keep folder during recompiling. If you don't you won't see any changes.
If you compiled with no errors you're good to go. If you have errors then you have a mistake in your code. You can check the apkmanager log for line number errors.
Once recompiled you will have unsignedSystemUI.apk in your place_here_for_modding folder. Open it in winRAR along with your previous version of SystemUI.apk from the first draft and drag the images from the first draft drawable-hdpi folder into the new unsignedSysemUI.apk's corresponding folder, overwriting the images there. Now rename unsignedSystemUI.apk to SystemUI.apk and overwrite your first draft version. This is your second draft SystemUI.apk and we will create a second draft framework-res.apk in the next step using these same steps.
Editing the framework.
We will now decompile your original (backup) framework-res.apk and edit the xmls. Again using apkmanager.
Decompile systemui.apk
Make edits to XMLs.
These are the edits I make most often.
/res/drawable/progress_horizontal.xml - sliders & volume bars
Code:
<?xml version="1.0" encoding="UTF-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@id/background">
<shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#ff262223" android:endColor="#ff414042" android:angle="270.0" android:centerY="0.13" android:centerColor="#ff262223" />
<stroke android:width="2.0px" android:color="#ff999999" />
</shape>
</item>
<item android:id="@id/secondaryProgress">
<clip>
<shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#80[COLOR="red"]547f8c[/COLOR]" android:endColor="#a0[COLOR="red"]87cce2[/COLOR]" android:angle="-90.0" android:centerY="0.13" android:centerColor="#80[COLOR="red"]547f8c[/COLOR]" />
<stroke android:width="2.0px" android:color="#ff999999" />
</shape>
</clip>
</item>
<item android:id="@id/progress">
<clip>
<shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#ff[COLOR="red"]547f8c[/COLOR]" android:endColor="#ff[COLOR="red"]87cce2[/COLOR]" android:angle="-90.0" android:centerY="0.13" android:centerColor="#ff[COLOR="Red"]547f8c[/COLOR]" />
<stroke android:width="2.0px" android:color="#ff999999" />
</shape>
</clip>
</item>
</layer-list>
Click to expand...
Click to collapse
/res/values/styles.xml - text colors
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">[COLOR="red"]#ff555555[/COLOR]</item> [COLOR="red"]///POP UP MENU TEXT COLOR[/COLOR]
</style>
Code:
<style name="Theme.ExpandedMenu" parent="@style/Theme">
<item name="listViewStyle">@style/Widget.ListView.Menu</item>
<item name="textColor">[COLOR="red"]#ff555555[/COLOR]</item> [COLOR="red"]///SECONDARY MENU TEXT COLOR[/COLOR]
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
[COLOR="red"]///DELETED LINE[/COLOR]
</style>
Code:
<style name="TextAppearance.WindowTitle" parent="@style/TextAppearance">
<item name="textSize">14.0sp</item>
<item name="textStyle">bold</item>
<item name="textColor">[COLOR="Red"]#ffffffff[/COLOR]</item> [COLOR="red"]///WINDOW TITLE TEXT (App Title Bar)[/COLOR]
</style>
Code:
<style name="TextAppearance.StatusBar.Title" parent="@style/TextAppearance.StatusBar">
<item name="textStyle">bold</item>
<item name="textColor">[COLOR="red"]#ffffffff[/COLOR]</item> [COLOR="red"]///STATUS BAR TITLE (May be same as SystemUI?)[/COLOR]
</style>
Code:
<style name="TextAppearance.StatusBar.EventContent.Title" parent="@style/TextAppearance.StatusBar.EventContent">
<item name="textSize">16.0sp</item>
<item name="textStyle">bold</item>
<item name="textColor">[COLOR="red"]#ffffffff[/COLOR]</item> [COLOR="red"]///FIRST LINE OF NOTIFICATION[/COLOR]
</style>
Code:
<style name="TextAppearance.StatusBar.EventContent" parent="@style/TextAppearance.StatusBar">
<item name="textColor">[COLOR="red"]#ffffffff[/COLOR]</item> [COLOR="red"]///2ND LINE OF NOTIFICATION[/COLOR]
</style>
Code:
<style name="Widget.Button" parent="@style/Widget">
<item name="textAppearance">?textAppearanceSmallInverse</item>
<item name="textColor">[COLOR="red"]#ffffffff[/COLOR]</item> [COLOR="red"]///BUTTON TEXT COLOR[/COLOR]
<item name="gravity">center</item>
<item name="background">@drawable/btn_default</item>
<item name="focusable">true</item>
<item name="clickable">true</item>
</style>
Click to expand...
Click to collapse
After making your xml edits recompile, be sure to delete the edited files and resources.arsc from the keep folder during recompiling. If you don't you won't see any changes.
If you compiled with no errors you're good to go. If you have errors then you have a mistake in your code. You can check the apkmanager log for line number errors.
Now following the same steps as we did for SystemUI we will overwrite the images in the new unsignedframework-res.apk with those from the first draft framework-res.apk. By dragging from one winRAR window to the other. Once you've done that rename the new apk and overwrite the first draft version. Create a new update zip, using "store" or "none", and flash it. You should now see the text edits you just made.
Advanced Tips
.9 Images.
--If a .9.png is all (every pixel) one color then the .9 patch does not matter.
Hex editing.
--It is not always necessary to decompile to make text color or slider edits. Instead if know what color you're looking for you can use a hex editor to make the edits.
--For instance, to change text colors without decompiling you would.
Open framework-res.apk in winRAR.
Extract resources.arsc
Open resources.arsc in a hex editor.
Search for the color in this format BB GG RR AA, as opposed to usual aarrggbb. (Red = ffff0000 = 00 00 FF FF)
Replace with desired color following same format.
Save and overwrite original by dragging new version into winRAR.
--To change slider colors without decompiling you would.
Open framework-res.apk in winRAR.
Extract /res/drawable/progress_horizontal.xml
Open progress_horizontal.xml in a hex editor.
Search for 08 00 00 1C.
After each instance examine the next four pairs.
The first few will be grey but eventually youll come to a color.
That's where you start editing. (6 total)
Replace with desired color following same format.
Save and overwrite original by dragging new version into winRAR.
Undoing Moto's Status Bar Edits.
Post #15
Adding an Animated PullDown Shade.
[RESOURCES] - Theming the Atrix 4G: tools, processes, locations, etc.
Spot on work! Thanks a lot! I am planning to see if I can make a clean minimalistic theme once I can figure out how to do theming correctly
Motorola Atrix 2.3.4 bl unlocked full debian weptop and themed
Small donation on it's way to you for all your hard work!
Confirmation number: 3W612387P3801853H.
Awesome work! Hopefully I will get some time to understand this and port a theme or two
Nottach said:
Advanced Tips
.9 Images.
--If a .9.png is all (every pixel) one color then the .9 patch does not matter.
Hex editing.
--It is not always necessary to decompile to make text color or slider edits. Instead if know what color you're looking for you can use a hex editor to make the edits.
--For instance, to change text colors without decompiling you would.
Open framework-res.apk in winRAR.
Extract resources.arsc
Open resources.arsc in a hex editor.
Search for the color in this format BB GG RR AA, as opposed to usual aarrggbb. (Red = ffff0000 = 00 00 FF FF)
Replace with desired color following same format.
Save and overwrite original by dragging new version into winRAR.
--To change slider colors without decompiling you would.
Open framework-res.apk in winRAR.
Extract /res/drawable/progress_horizontal.xml
Open progress_horizontal.xml in a hex editor.
Search for 08 00 00 1C.
After each instance examine the next four pairs.
The first few will be grey but eventually youll come to a color.
That's where you start editing. (6 total)
Replace with desired color following same format.
Save and overwrite original by dragging new version into winRAR.
Click to expand...
Click to collapse
Can i ask you a question seeing though you know abit about framework modding can you see were i have gone wrong here - http://forum.xda-developers.com/showthread.php?t=1195549
I can live with it but i would rather change it to a light gray or a different color? Or if not how would i be able to change the text in these pop up windows so i can see them properly? Any help would be very nice & not had a reply about this yet? Can you help? you can private message me if you would prefer
Thanks in advance
Png sizes
Okay do the PNG/.9.png from the ported theme have to be the same size as the ones in the Atrix drawable-hdpi?
Thanks a lot on the tutorial it helped me figure out how to edit the XMl files.
D$G said:
Okay do the PNG/.9.png from the ported theme have to be the same size as the ones in the Atrix drawable-hdpi?
Thanks a lot on the tutorial it helped me figure out how to edit the XMl files.
Click to expand...
Click to collapse
Not necessarily. As long as the .9 patch is ok then it should work. though it may look weird if theres a themed background. such as a aosp buuton on motoblur background. trial and error is your best bet there.
I'm guessing that this is a generic tutorial for most, if not all android devices?
XCellPhoneSalesRep said:
I'm guessing that this is a generic tutorial for most, if not all android devices?
Click to expand...
Click to collapse
You are correct.
If I change some icons in other .apks like the blur-res.apk, will the updater script you posted include that when it updates?
redz22 said:
If I change some icons in other .apks like the blur-res.apk, will the updater script you posted include that when it updates?
Click to expand...
Click to collapse
Yes, those are in the /system directory so it will work. Just make sure to put them in the right folder (framework). That disclaimer is more for those editing something in /data.
How to "undo" MotoBlurs Status Bar
As many of you themers out there have mostly likely noticed, Moto has screwed with the Status Bar layout in GingerBread which makes theming difficult. I will show you how to revert to the way it was in Froyo.
I will show you you how to perform these edits:
Change the Date Background back to status_bar_header_background.
Change the Title Background back to title_bar_portrait.
{
"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"
}
1. Decompile SystemUI.apk
2. Open /res/layout/status_bar_expanded.xml
---First we'll change the Date Background.
---Out of the box it calls the drawable title_bar_portrait. In Froyo its called status_bar_header_background. So in order to go back to that we will change:
Code:
<LinearLayout android:orientation="horizontal" android:background="@drawable/title_bar_portrait" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
---to:
Code:
<LinearLayout android:orientation="horizontal" [COLOR=Red]android:background="@drawable/status_bar_header_background"[/COLOR] android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
Click to expand...
Click to collapse
---And add your status_bar_header_background png to drawables-hdpi. It can be either .png or .9.png. If it's a .9.png make sure it's in decompiled form, with the 1 pixel border, or else you will get an error during recompiling.
Click to expand...
Click to collapse
---Next we'll have the title background use the existing title_bar_portrait image instead of the shade_bgcolor.
---So we change:
Code:
<com.android.systemui.statusbar.NotificationLinearLayout android:orientation="vertical" android:id="@id/notificationLinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/noNotificationsTitle" android:background="@drawable/shade_bgcolor" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/ongoingTitle" android:background="@drawable/shade_bgcolor" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_ongoing_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/ongoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/priorityTitle" android:background="@drawable/shade_bgcolor" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_priority_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/priorityItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/latestTitle" android:background="@drawable/shade_bgcolor" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_latest_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</com.android.systemui.statusbar.NotificationLinearLayout>
---To:
Code:
<com.android.systemui.statusbar.NotificationLinearLayout android:orientation="vertical" android:id="@id/notificationLinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/noNotificationsTitle" [COLOR=Red]android:background="@drawable/title_bar_portrait"[/COLOR] android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/ongoingTitle" [COLOR=Red]android:background="@drawable/title_bar_portrait"[/COLOR] android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_ongoing_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/ongoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/priorityTitle" [COLOR=Red]android:background="@drawable/title_bar_portrait"[/COLOR] android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_priority_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/priorityItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/latestTitle" [COLOR=Red]android:background="@drawable/title_bar_portrait"[/COLOR] android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_latest_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</com.android.systemui.statusbar.NotificationLinearLayout>
Click to expand...
Click to collapse
---No need to add an image as it already exists.
Click to expand...
Click to collapse
3. Compile SystemUI.apk, be sure to delete the old status_bar_expanded.xml from the keep folder.
4. Done.
Hi,
Very cool to see someone documenting what they are doing! Keep up the good work.
Cheers!
I've been waiting for this! Love you so much...in brotherly way
I came into this android world with guns.blazing. a fresh newb and learnt to flash/root/oc etc. At one point I had stayed up 4 days in a row (using a different,but similar guide) trying to tweak a theme. Hell I was only trying to change the battery icon! I never got it,till this day. In gonna give it another shot (havent tried in months) using this guide. If finally get it,ill post a very detailed step by step video on youtube. One question though,when adding the icon I want to the framework folder,do I delete the one already there,or just let it overwrite? Thats one thing I never understood fully
Sent from my MB860 using XDA Premium App
brd912 said:
I came into this android world with guns.blazing. a fresh newb and learnt to flash/root/oc etc. At one point I had stayed up 4 days in a row (using a different,but similar guide) trying to tweak a theme. Hell I was only trying to change the battery icon! I never got it,till this day. In gonna give it another shot (havent tried in months) using this guide. If finally get it,ill post a very detailed step by step video on youtube. One question though,when adding the icon I want to the framework folder,do I delete the one already there,or just let it overwrite? Thats one thing I never understood fully
Sent from my MB860 using XDA Premium App
Click to expand...
Click to collapse
Im thinking you mean in the decompiled projects folder. you overwrite the image in that folder but during recompiling when given the prompt, you delete the old one from the keep folder. if you delete it from keep it will replace it with the one from the project.
When I decompile systemui.apk, it gave me 'an error occured'. Is it normal?

[Q] How to add new/more wallpapers in CM7 theme

Hi Guys
I am changing a theme, and I've tryed to put on "redirections.xml" a redirection with new wallpapers like below:
<package-redirections android:name="com.sec.android.app.twwallpaperchooser" android:resource="@xml/com_android_wallpaper" android:minSdkVersion="7" />
And in file "com_android_wallpaper.xml" I put:
<?xml version="1.0" encoding="utf-8"?>
<resource-redirections>
<item name="drawable/wallpaper_my_one">@drawable/wallpaper_my_one</item>
<item name="drawable/wallpaper_my_one_small">@drawable/wallpaper_my_one_small</item>
</resource-redirections>
And on folder drawable-mdpi I put the images, but no success.
Anybody knows how to add more wallpapers in CM7 theme ?
Thanks

[Modding Guide - 11/9/2013] Prism / SystemUI / Framwework (4.2.2)

Hello all,
Just thought i would drop you all a quick guide i will add to this as much as i can.. Drop me a message if you need anything else.
For Transparent NavBar - Decompile Prism.apk
Once decompiled navigate to \Prism\res\drawable-xxhdpi look for home_nav_bg
Just modify the above image to your liking color, transparency etc
For modified app drawer - 4 x 5 etc - Decompile Prism.apk
Once decompiled navigate to \Prism\res\integers - the below are the modifications you need to make
<integer name="config_allAppsTabbedCellCountX">4</integer>
<integer name="config_allAppsTabbedCellCountY">5</integer>
<integer name="config_allAppsTabbedCellCountXAlt">5</integer>
<integer name="config_allAppsTabbedCellCountYAlt">6</integer>
Once made you need to head over to the arrays XML and change - The below to match the above
<string-array name="apps_grid_option">
<item>4 × 5</item>
<item>5 × 6</item>
</string-array>
Please note modding the app drawer may require you to mod the dimensions in values to have it all fit nicely.
Ill check shortly but i am pretty sure its the below you need to modify for a better fit.
<dimen name="page_view_icon_cell_width">90.0dip</dimen>
<dimen name="page_view_icon_cell_height">97.0dip</dimen>
<dimen name="page_view_icon_cell_width_alt">75.0dip</dimen>
<dimen name="page_view_icon_cell_height_alt">90.0dip</dimen>
Statusbar Mods [Colors/Transparency etc] - Decompile SystemUI.apk
Navigate to \SystemUI\res\layout - Open Status_Bar.xml
Look at Line 2 where it says - android:background="@drawable/status_bar_background"
The Red is what we are going to modify
1. You will find in the drawables folder and image labeled status_bar_background open this and mod this to whatever you wish
2. Alternatively you can also mod this by changing the green text to "#FF000000" This is a Hex color - FF is level of Transparency and 000000 is the Color White
App Drawer / Blink Feed Clock Backgrond - Decompile Prism.apk
Navigate to \Prism\res\drawable-xxhdpi
Change automotive_common_app_bkg_top.png to whatever you wish
Recent Apps Pull Down Background - Decompile SystemUI.apk
To Change the Statusbar Pull-down Shade Background Color/Transparency
• First Decompile SystemUI.apk and navigate to the "res/layouts" and find "status_bar_expanded.xml"
• Next, find where it says android:background="@*android:color/black" and change it to android:background="@color/transparent_black" and save it.
• Now go to "res/values" and open "colors.xml"
• We are going to add a new color to this by adding this <color name="@color/transparent_black">#A5000000</color>
• Save that and recompile and now your pull-down shade is semi-transparent​
#00000000 is 100% Transparent.
#40000000 is 75% Transparent.
#80000000 is 50% Transparent.
#B0000000 is 25% Transparent.
#FF000000 is 0% Transparent.
XML QUICK COLOR GUIDE
• When you see a Hex color in xml it will probably look like #FF1A2B3C (I will be explaining this from LEFT to RIGHT following the # sign)
• The First two digits represents the level of Transparency 00 is Transparent and FF is Opaque
• The Second two digits represents the level of RED where 00 is No Red (0) and FF is Full Red (255)
• The Third two digits represents the level of GREEN where 00 is No Green (0) and FF is Full Green (255)
• The Fourth two digits represents the level of BLUE where 00 is No Blue (0) and FF is Full Blue (255)​
App Drawer Transparency - Decompile Prism.apk
Next navigate to \Prism\smali\com\htc\launcher
Go to Launcher . Smali and CTRL + F and search for .method public updateWallpaperVisibility(Z)V
Highlight this line and highlight everything below until you see end method. just to clarify we are deleting From .method to .end method
.method public updateWallpaperVisibility(Z)V
.end method
after this CTRL + F and search for updateWallpaperVisibility - remove any line that has this
[We now have to clean the code navigate to the 3 files below - for each CTRL + F and search for updateWallpaperVisibility and remove all lines which include this
Launcher$21.Smali
Launcher$22.Smali
Launcher$25.Smali
Workspace.smali
Now navigate to DragLayer.Smali
CTRL + F and search for const/high16 v2, -0x100, change this line to const/high16 v2, 0x0
Navigate to Prism/smali/com/htc/launcher/pageview
Open AllAppsPagedViewHost.smali - CTRL + F and search for const/high16 v2, -0x100, change this line to const/high16 v2, 0x0
When complete it looks like a small glitch but its a duplication transition animation to make this less glitchy navigate to Values/ Dimens and Modify the below till you achieve your desired results
<integer name="config_appsCustomizeZoomInTime">150</integer>
<integer name="config_appsCustomizeZoomOutTime">100</integer>
<integer name="config_appsCustomizeZoomInScaleFactor">200</integer>
<integer name="config_appsCustomizeZoomOutScaleFactor">133</integer>
<integer name="config_appsCustomizeFadeInTime">100</integer>
<integer name="config_appsCustomizeFadeOutTime">150</integer>
App Drawer / Blink Feed Background - Decompile Prism.apk
First of all to add backgrounds to either of these we need to achieve transparency (see guide below) App Drawer Transparency
Add the below to achieve a background for whatever you wish
res/layouts/feed_view.xml - Blinkfeed
<com.htc.launcher.feeds.view.FeedScrollView - At this line add android:background="@drawable/12345"
res/layout/all_apps_pagedview.xml - App Drawer
<com.htc.launcher.pageview.AllAppsPagedView - At this line add android:background="@drawable/12345"
\Prism\res\values\colors.xml - BlinkFeed Tiles - Change the red color below to your desired Color / Transparency
<color name="feedview_background">#ff33b5e5</color>
12345 - This refers to the name of your Background image - Once the tags have been added add the images to drawable-xxhdpi
#ff33b5e5 - 33b5e refers to the color and the FF refers to transparency, FF = non transparent / 00 = Fully Transparent / 68 = 50% i believe)
Remove App Drawer / Blinkfeed Clock - Decompile Prism.apk
!!!Please note this is a work in Progress!!!
SO FAR:
Navigate to Prism\smali\com\htc\launcher\masthead
Open Masthead.Smali
Remove this whole method - .method private attachToContainer(Landroid/view/ViewGroupV
We need to then navigate to Values Dimens and modify the following for the correct fitting
Remove Carrier Label - Decompile SystemUI.apk
Navigate to \SystemUI\res\layout - Open Status_Bar_Expanded.xml
At line <com.android.systemui.statusbar.phone.CarrierLabel where is says android:visibility="invisible change to "android:visibility="gone"
Center Clock - Decompile SystemUI.apk
Navigate to SystemUI\res\layout - Status_Bar.xml
Step 1. First of all locate and delete this line
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent">
Step 2. Next locate the following line - Change this to replicate the line below
Code:
Original - <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
New - <LinearLayout android:gravity="right|center" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" >
Step 3. Copy the following above your modified line in Step 2
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="@*android:color/white" android:gravity="center" android:id="@id/clock" android:paddingTop="3.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_weight="1.0" />
</LinearLayout>
Step 4. Check it resembles the below
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="@*android:color/white" android:gravity="center" android:id="@id/clock" android:paddingTop="3.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout android:gravity="right|center" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" >
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<ViewStub android:id="@id/signal_cluster" android:inflatedId="@id/signal_cluster_tree" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="@*android:color/white" android:gravity="center_vertical" android:id="@id/battery_text" android:paddingLeft="1.0dip" android:paddingRight="1.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
<ImageView android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
Remove Status Bar Icons - Thanks to .torrented
To make statusbar icons disappear you must decompile SystemUI.apk navigate to the "res" folder and then into the "drawable - xxhdpi" folder and there you will see a bunch of png's.
From there locate which statusbar image you wish to make disappear and copy its exact name, change the tranparant png's name to whatever the original name was and replace it with the newly transparent version.
Just replicate this for any statusbar image you wish (delete the old ones are you are done with them)
Recompile SystemUI.apk and replace the one on the device, your statusbar images will now be GONE!
Settings Background - Decompile framework-res.apk
Coming Soon
Hello,
Thank you for this... Could you also add how to achieve a transparent app drawer? I am still using Nos2.03 and not interested in moving to the 4.2.2 version just yet. I see you have a zip already for this.
Cheers
Will post shortly
Sent from my HTC6435LVW using XDA Premium 4 mobile app
xvicedice said:
Will post shortly
Sent from my HTC6435LVW using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Rock on, editing smali leaves no room for error :good:
Updated
Sent from my HTC6435LVW using XDA Premium 4 mobile app
Hi,
Thanks for your guide, could you please try to port the following
http://forum.xda-developers.com/showthread.php?t=2138654
or guide which files to be modded to get the big photo on calling screen.
thanks
:thumbup:
Remove/Edit Some Statusbar Images
this is an xxhdpi resource
To make statusbar icons disappear you must decompile SystemUI.apk navigate to the "res" folder and then into the "drawable - xxhdpi" folder and there you will see a bunch of png's.
From there locate which statusbar image you wish to make disappear and copy its exact name, change the tranparant png's name to whatever the original name was and replace it with the newly transparent version.
Just replicate this for any statusbar image you wish (delete the old ones are you are done with them)
Recompile SystemUI.apk and replace the one on the device, your statusbar images will now be GONE!
Hope this helps anyone!
*** There probably are other ways of doing this but I find this the easiest (aka Quick'n'Dirty), OP is allowed to post this in the OP if he desires
Thank you for the help .torrented (OP updated)
I will update this shortly to show modifications for 4.3 and 4.4
Ashle said:
Please edit me ..... :crying:
Click to expand...
Click to collapse
Please backup first and then push this to the phone, let me know what happens.
https://dl.dropboxusercontent.com/u/67055555/SystemUI.apk
[QUOTxvicedice;49055500]Please backup first and then push this to the phone, let me know what happens.
https://dl.dropboxusercontent.com/u/67055555/SystemUI.apk[/QUOTE]
No ....systemui has stopped
To Change the Statusbar Pull-down Shade Background Color/Transparency
First Decompile SystemUI.apk and navigate to the "res/layouts" and find "status_bar_expanded.xml"
Next, find where it says android:background="@*android:color/black" and change it to android:background="@color/transparent_black" and save it.
Now go to "res/values" and open "colors.xml"
We are going to add a new color to this by adding this <color name="@color/transparent_black">#A5000000</color>
Save that and recompile and now your pull-down shade is semi-transparent
#00000000 is 100% Transparent.
#40000000 is 75% Transparent.
#80000000 is 50% Transparent.
#B0000000 is 25% Transparent.
#FF000000 is 0% Transparent.
XML QUICK COLOR GUIDE
When you see a Hex color in xml it will probably look like #FF1A2B3C (I will be explaining this from LEFT to RIGHT following the # sign)
The First two digits represents the level of Transparency 00 is Transparent and FF is Opaque
The Second two digits represents the level of RED where 00 is No Red (0) and FF is Full Red (255)
The Third two digits represents the level of GREEN where 00 is No Green (0) and FF is Full Green (255)
The Fourth two digits represents the level of BLUE where 00 is No Blue (0) and FF is Full Blue (255)
xvicedice said:
Drop me a message if you need anything else.
Click to expand...
Click to collapse
Thanks, this is all very useful information. Can you by any chance put a guide to which files need altering to change the home screen grid size and spacing in prism.apk?
Many Thanks
Of course I'm away from my pc today but I'll get that up for you tomorrow
Sent from my HTC Droid DNA using XDA Premium 4 mobile app
Hello I'm looking to decompile prism.apk to try and change values to enable me to have more then 4 app in my locksceeen dock and home screen dock. I have a HTC one max so it won't look out of place just hoping someone can help thanks.
Hi if you wish to do this you have to navigate to the values folder and find the integers.xml.
Once you are there look for hotseat_cell_count (think that’s the one) increase the value to what you like should be 5 as standard I think.
Once you increase it though bear in mind things will look squashed so you will need to modify the padding either side, so in the Values folder look for a file called dimens.xml look for 2 lines button_bar_width_left_padding & button_bar_width_right_padding decrease both values on these to suit.
Hope that helps
Jamie

[DEV][GUIDE][MODDING][SETTINGS] Collection of mods and features [TOUCHWIZ]

Hello buddies..
From the concept SHARING IS CARING, I am going to share some mods specifically on SecSettings.apk that I stumbled across and share it with you in one thread
Keep in mind that most of them are not mine but from the community so actual credits are to be given to the owners. So please let me know if you have any modding that I didn't mention
So let's start!!
Needed tools:
1) Apktool or others that do the job
2) Notepad++ program from here
3) The patience and a willing partner! sorry no link for that
I am not going to teach you how to use these programs because I am assuming that you already know how to use them if not then check their respective documentations!
You must deodex SecSettings.apk before proceeding.
A lot of works are done by various xda members, some are from other sites, some are mine. If you found the guide of your mod here and you haven't been credited, please PM.
Click to expand...
Click to collapse
Adding Custom image + Onclick Functionality
Credits to @iamareebjamal
Decomplie SecSettings.apk using Apktool
Download the SettingsSource.zip
Extract contents of SettingsSource.zip to respective folders in SecSettings.apk
Open res/xml/device_info_settings.xml
Add this just a line above the first Preference tag
Code:
<PreferenceCategory android:layout="@layout/areebisawesome" android:key="blah" android:title="" />
Now go to res/drawable
There, you'll see cosmic.png Change it to any png of size 320x200 You can change this size description in res/layout/areebisawesome.xml
N.B: Also we can use android:layout_width="fill_parent"so that if we add small resolution picture then it will automatically fill whole width
Click to expand...
Click to collapse
Recompile
Onclick Functionality
Credits to @abhi922
Open res/layout/areebisawesome.xml
Add the blue code to the XML
Code:
<?xml version="1.0" encoding="utf-8"?>
<ImageView android:layout_gravity="center" android:paddingBottom="6.0dip" [COLOR="Blue"]android:clickable="true"[/COLOR] android:layout_width="fill_parent" android:layout_height="400.0px" [COLOR="blue"]android:src="@drawable/about"[/COLOR] android:scaleType="fitXY"
xmlns:android="http://schemas.android.com/apk/res/android" />
What I've Done ????
Added android:clickable="true" ------> to make our layout clickable
Added android:src="@drawable/about" ------> it is a xml not a picture/png...[it will replace our images on click ]
Create new file about.xml at drawable folder
Add this code to it
Code:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/about2" />
<item android:state_selected="true" android:drawable="@drawable/about2" />
<item android:drawable="@drawable/about1" />
</selector>
Now add about1.png as first unpressed picture
And about2.png as pressed picture...
Recomplie
Adding About ROM new information
Decompile SecSettings.apk
Open /res/xml/device_info_settings.xml
In device_info_settings.xml, go to the end and add these lines before </PreferenceScreen> line
Code:
<PreferenceCategory android:title="@string/rom_info" android:key="dummy_key">
<Preference android:title="@string/rom_name" android:key="rom_name" android:summary="@string/rom_name_details" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/rom_ver" android:key="rom_ver" android:summary="@string/rom_ver_details" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/rom_date" android:key="rom_date" android:summary="@string/rom_date_details" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/rom_developer" android:key="rom_developer" android:summary="@string/rom_developer_name" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/dev_thanks" android:key="dev_thanks" android:summary="@string/dev_thanks_name" style="?android:preferenceInformationStyle" />
</PreferenceCategory>
N.B: all referred android:key here are dummy ones they are only there just to prevent code fragmentation
Click to expand...
Click to collapse
Then open res/values/strings.xml & add the following lines
Code:
<string name="rom_info">[COLOR="Sienna"]About Rom[/COLOR]</string>
<string name="rom_name">[COLOR="Sienna"]Rom name[/COLOR]</string>
<string name="rom_name_details">[COLOR="Sienna"][ROM Name][/COLOR]</string>
<string name="rom_ver">[COLOR="Sienna"]Rom version[/COLOR]</string>
<string name="rom_ver_details">[COLOR="Sienna"]vx.x[/COLOR]</string>
<string name="rom_date">[COLOR="Sienna"]Release date[/COLOR]</string>
<string name="rom_date_details">[COLOR="Sienna"]month-year[/COLOR]</string>
<string name="rom_developer">[COLOR="Sienna"]Rom developer[/COLOR]</string>
<string name="rom_developer_name">[COLOR="Sienna"][your name] - xda.developers.com[/COLOR]</string>
<string name="dev_thanks">[COLOR="Sienna"]Thanks to[/COLOR]</string>
<string name="dev_thanks_name">[COLOR="Sienna"]Everyone for the support[/COLOR]</string>
You can change the green color text to whatever you want to display
Click to expand...
Click to collapse
You can add or remove fields in device_info_settings.xml and strings.xml as you like
Recompile
Integrating application
Decompile SecSettings.apk.
Decompile the program that you want to add to settings menu (in this example will take chainfire's SuperSU app)
Go to res\drawable-xhdpi folder and add icon for your program that you want to add (you can take it from decompiled program in res/mipmap-xhdpi.
Go to res\values folder and open strings.xml by NotePad++ and add these lines just before </resources> for your program
Code:
<string name="romaddons">ROM Addons</string>
<string name="superuser_text">Superuser</string>
Go to \res\xml folder and open settings_headers.xml by NotePad++ and add the blue lines
Code:
<header android:icon="@drawable/ic_settings_accessibility" android:id="@id/accessibility_settings" android:title="@string/accessibility_settings" android:fragment="com.android.settings.AccessibilitySettings" />
[COLOR="Blue"] <string name="romaddons">ROM Addons</string>
<header android:icon="@drawable/ic_settings_superuser" android:title="@string/superuser_text">
<intent android:targetPackage="eu.chainfire.supersu" android:action="android.intent.action.MAIN" android:targetClass="eu.chainfire.supersu.MainActivity" />
</header>[/COLOR]
<header android:icon="@drawable/ic_settings_development" android:id="@id/development_settings" android:title="@string/development_settings_title" android:fragment="com.android.settings.DevelopmentSettings" />
Then install the program you want to add on your phone
Extra step is to remove this line in AndroidManifest.xml in your decompiled SuperSU app so to disappear from the launcher
Code:
<category android:name="android.intent.category.LAUNCHER" />
Adding other apps
Sample down here for learning
Code:
<header android:icon="@drawable/ic_settings_xxxx" android:title="@string/xxxx_text">
<intent android:targetPackage="" android:action="" android:targetClass="" />
</header>
"android:icon="@drawable/ic_settings_xxxx"" : name of icon you put in drawable-xhdpi folder if you want it to be empty the add this to drawable and empty_icon as the name of the icon
"android:title="@string/xxxx_text"" : name of string put for added program in strings.xml
"android:targetPackage=""" : package of wanted program inside its own AndroidManifest.xml
"android:action=""" : first action of wanted program inside its own AndroidManifest.xml
"android:targetClass=""" : class of the wanted package inside its own AndroidManifest.xml to start with in this case its .MainActivity
Settings menu extra hidden options
Credits to @tkari4
Baksmali SecSettings.apk
Open com\android\settings\Settings.smali
Look for these lines and delete them:
Code:
invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
goto/16 :goto_23
Note that some FC so head to the forum or download SettingsSmali.rar to see what works or not
Adding TorchLight Option
Credits to @Stavr0s91i
Decompile SecSettings.apk
Goto res/xml/display_settings.xml
Apply Changes Below (Blue)
Code:
<PreferenceCategory android:title="@string/tts_general_section_title" android:key="general" />
<PreferenceScreen android:title="@string/wallpaper" android:key="wallpaper" android:fragment="com.android.settings.WallpaperSettings" />
<PreferenceScreen android:title="@string/led_indicator_settings" android:key="led_indicator_settings" android:fragment="com.android.settings.LedIndicatorSettings" />
[COLOR="Blue"]<PreferenceScreen android:title="Torchlight" android:key="torchlight" android:fragment="com.android.settings.torchlight.TorchlightSettings" />[/COLOR]
<PreferenceScreen android:title="@string/notification_panel_title" android:key="notification_panel_edit" android:fragment="com.android.settings.NotificationPanelMenu" />
<CheckBoxPreference android:title="@string/multi_window_title" android:key="key_multi_window" android:summary="@string/multi_window_summary" android:widgetLayout="@touchwiz:layout/preference_widget_twcheckbox" />
<SwitchPreferenceScreen android:title="@string/page_buddy" android:key="contextualpage_settings" android:summary="@string/page_buddy_summary" android:fragment="com.android.settings.ContextualPageSettings" />
Compile SecSettings.apk!
Setting up a custom settings tab
Credits to @Didact74
Download Smali.zip
Place it in smali/com/android/settings
Navigate to res/xml/settings_headers.xml
Add this line of code anywhere you want it
Code:
<header android:icon="@drawable/ic_settings_romcontrol" android:id="@id/new_tab" android:title="@string/rom_control" android:fragment="com.android.settings.NewTab" />
android:icon="@drawable/ic_settings_romcontrol = The icon you see in the tab and the location that icon is stored
android:id="@id/new_tab" = Android ID thats stored in res/values/ids
android:title="@string/rom_control" = The title the new tab is given located in res/values/strings
android:fragment="com.android.settings.NewTab" = points to the smali that controls this tab
Create your own icon.png (size 50 x 50) and drop it in res/drawable-xhdpi
Navigate to res/values/strings.xml & add this line of code before </resources>
Code:
<string name="rom_control">Rom Control</string>
<string name="rom_addons">Rom Addons</string>
Create an XML file with the name "new_tab.xml"
Navigate to res/values/ids.xml & add this line of code before </resources>
Code:
<item type="id" name="new_tab">false</item>
Example:
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/rom_addons"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<!-- Place your settings here -->
</PreferenceScreen>
You will need to add the necessary lines to res/strings found in the XML if would add any others
Do not worry about finding a unique ID for res/public just let the system generate one for you
Click to expand...
Click to collapse
Recompile the decompile to generate ids in public.xml
Find this line in res/values/public.xml
Code:
<public type="xml" name="new_tab" id="0x7fxxxxxx" />
Take your unique id and change it in NewTab.smali from
Code:
const v1, [COLOR="Red"]0x7f070082[/COLOR]
To
Code:
const v1, [COLOR="Blue"]0x7fxxxxxx[/COLOR]
Then change
Code:
invoke-virtual {p0, v1}, Lcom/android/settings/[COLOR="Red"]didact/RomSettings[/COLOR];->addPreferencesFromResource(I)V
To
Code:
invoke-virtual {p0, v1}, Lcom/android/settings/[COLOR="Blue"]NewTab[/COLOR];->addPreferencesFromResource(I)V
Done :good:
Switch to Light theme
Decompile the SecSettings.apk
Go to "res/values/" folder and open the file "styles.xml" with Notepad++
Click "Replace" or press "Ctrl+H"
In the "Find What :" box enter "DeviceDefault" and hit next
In the "Replace with: " box enter "DeviceDefault.Light"
Make sure only "wrap around" box is checked
Then press replace all
Compile SecSettings.apk
Permanent "Official" Device Status
This one is explained very well by @[email protected] in this post. Make sure to hit Thanks button for him
Owner Profile in About Device
Credits to @Deckoz2302, @b16h22 and @nightwalker
Download the zip and extract it Owner_Profile_Mod.zip
Decompile SecSettings.apk
Go to res/values/ids.xml... add these:
Code:
<item type="id" name="image">false</item>
<item type="id" name="owner">false</item>
<item type="id" name="linear_layout">false</item>
<item type="id" name="profile_pic">false</item>
<item type="id" name="layout1">false</item>
<item type="id" name="change_picture_text">false</item>
<item type="id" name="photo_picker">false</item>
<item type="id" name="linear_layout1">false</item>
<item type="id" name="layout2">false</item>
<item type="id" name="name_field">false</item>
<item type="id" name="name_edit">false</item>
<item type="id" name="profile">false</item>
<item type="id" name="profile_name">false</item>
<item type="id" name="ic_qs_default_user">false</item>
Next go to res/values/strings.xml.. add these:
Code:
<string name="change_pic">Change profile picture</string>
<string name="profile_pic">SET PROFILE PICTURE</string>
<string name="profile_name">CHANGE PROFILE NAME</string>
Now find the files you extracted and put the com folder in correct directory..
Code:
SecSetting/smali/com/blac
Now put the files from the res folder in correct directories..
Code:
res/layout/lacourb.xml
res/layout/profile_info.xml
res/drawable-hdpi/ (is where the png files go)
res/drawables/done.xml
res/drawable/pick_profile_picture.xml
Forgot to include it so add ic_qs_default_user to res/drawable/xhdpi
Now go to where you want to have the option of changing the Profile Picture and Name. Maybe display_settings.xml it doesn't matter so put it where you want it.
Code:
<PreferenceScreen android:title="Owner Profile Picture">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.blac.Profile" />
</PreferenceScreen>
XML's will vary too depending on which one you pick so you need adjust the tag in the beginning of the line and the end of line depending on what it is calling. Example: <PreferenceScreen></PreferenceScreen> OR <headers></headers> so visualize the layout of the xml
Now go to res/xml/device_info_settings.xml and add:
Code:
<PreferenceCategory android:title="Device Info" />
<PreferenceScreen android:fragment="[COLOR="Orange"]com.android.settings.deckoz.RomControl.General[/COLOR]" android:focusable="false" android:layout="@layout/lacourb" android:key="profile_pic" />
Pay special attention to the line in ORANGE. This line defines where it takes you when the image is clicked when in About Device. So you would NOT add the same directory as mine because you won't have it. But you DO need to define this because if DO NOT it will FC
So say you want it to be under Users in SecSettings/General/Users.. you would add it like this:
Code:
<PreferenceCategory android:title="Device Info" />
<PreferenceScreen android:fragment="[COLOR="Orange"]com.android.settings.UserSettings[/COLOR]" android:focusable="false" android:layout="@layout/lacourb" android:key="profile_pic" />
So now when you click the picture in About Device it will bring you to this directory in SecSettings. So you'll end up in SecSettings/General/Users
Now open your AndroidManifest.xml. At the bottom add these lines:
Code:
<activity android:label="@string/change_pic" android:name="com.blac.Profile">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
</activity>
Okay now compile your SecSettings..Then grab the newly compiled one and decompile it.. Make sure you keep the AndroidManifest.xml because you changed it..
Now go to the MY public.xml you downloaded and extracted and then open YOUR res/values/public.xml open it and keep it open..You need to have these open to compare ids..
Open your smali folder you added: com/blac/
You need to find all the ids in the smali and change them to match yours.. for example open com/blac/Profile.smali.. Search 0x7f0401ee
Under my public.xml this id: 0x7f0401ee is for "profile_info".. Yours will NOT be the same.. SO you need to search each id in the smali and then in MY public.xml, you downloaded, then search yours and changed the id's...
NOTE: Be free to changed whatever you want..directories, names of xml etc...
Adding 5 icons shortcut on lockscreen
Credits to @Mirko ddd
Decompile SecSettings.apk and navigate to:
smali\com\android\settings\lockscreenshortcut\LockScreenShortcutSettings.smali
Search for the method ".method static constructor <clinit>()V"
Add the blue code in change of the red code
Code:
.method static constructor <clinit>()V
.registers 2
.prologue
const/4 v1, 0x0
.line 79
[COLOR="Blue"] const/4 v0, 0x5[/COLOR]
[COLOR="Red"] const/4 v0, 0x3[/COLOR]
sput v0, Lcom/android/settings/lockscreenshortcut/LockScreenShortcutSettings;->MAX_SHORTCUT_ICON:I
.line 80
sput v1, Lcom/android/settings/lockscreenshortcut/LockScreenShortcutSettings;->DEFAULT_CURSOR_WIDTH:I
.line 81
sput v1, Lcom/android/settings/lockscreenshortcut/LockScreenShortcutSettings;->ICON_5_CURSOR_WIDTH:I
return-void
.end method
Now we need to set the right icon width for the icons, if not the fifth icon won t be showed
Decompile framework-res.apk
Navigate to res\values-hdpi\dimens.xml
Edit these 2 strings with following values
Code:
<dimen name="keyguard_lockscreen_application_shortcut_icon_width">52.0dip</dimen>
<dimen name="keyguard_lockscreen_application_shortcut_icon_height">50.0dip</dimen>
Recompile and push both apks with 0644 permissions
Theming
1. Go to res/drawable-[your device dpi]
2. In here you'll find all kind of images but I'm gonna give you about some of the main images and you figure out the others
ic_settings_* : These where you find all the icons on the settings menu, some of these are unused which are hidden
ic_sync_*_holo : These are sync animations that appear in the "Accounts and sync" menu
ic_wifi_lock_signal_* & ic_wifi_signal_ *: These are wifi signals that appear in the "Wi-Fi" menu
shortcut_ *: These icons in which we make shortcuts from the settings widget
lock_anim_* : These are the tutorial images to teach you how to use pattern (don't bother if its hidden)
motion_ *: Motion tutorial (don't bother if its hidden)
3. Navigate to res/mipmap-[your device dpi]
ic_launcher_settings : Launcher icon
Now im gonna share with you S6 SecSettings resource files mainly png files. Link
CSC Features
Navigate to system/csc/feature.xml or others.xml..
These are some of the features you can add so read the description and choose your preference
Code:
[COLOR="Green"]<!-- Most of them are universal but no guarantees given -->[/COLOR]
[COLOR="green"] <!-- Start Features -->[/COLOR]
[COLOR="green"] <!-- Hide Software Update from Settings -->[/COLOR]
[COLOR="blue"]<CscFeature_Setting_DisableMenuSoftwareUpdate>true</CscFeature_Setting_DisableMenuSoftwareUpdate>[/COLOR]
[COLOR="green"] <!-- Show your hardware revision in Settings->About (same as dialing *#12580*369#) -->[/COLOR]
[COLOR="blue"]<CscFeature_Setting_EnableHwVersionDisplay>true</CscFeature_Setting_EnableHwVersionDisplay>[/COLOR]
[COLOR="green"]<!-- Restore the hidden APN -->[/COLOR]
[COLOR="blue"] <CscFeature_Setting_HideApnList>pcweb.tmobile.com</CscFeature_Setting_HideApnList>[/COLOR]
[COLOR="green"]<!-- Find my mobile/Sim replacement alert -->[/COLOR]
[COLOR="blue"] <CscFeature_Setting_DisableMenuFindMyMobile>false</CscFeature_Setting_DisableMenuFindMyMobile>
<CscFeature_Settings_FindMyMobile>true</CscFeature_Settings_FindMyMobile>[/COLOR]
[COLOR="green"]<!-- Call and message block -->[/COLOR]
[COLOR="blue"]<CscFeature_Setting_EnableMenuBlockCallMsg>true</CscFeature_Setting_EnableMenuBlockCallMsg>[/COLOR]
[COLOR="green"]<!-- Factory data reset password -->[/COLOR]
[COLOR="blue"] <CscFeature_Setting_EnableFactoryResetPasswordWhenNoSIM>true</CscFeature_Setting_EnableFactoryResetPasswordWhenNoSIM>[/COLOR]
[COLOR="green"]<!-- Display installed variant -->[/COLOR]
[COLOR="blue"]<CscFeature_Common_EnableRegionalDevice>true</CscFeature_Common_EnableRegionalDevice>[/COLOR]
[COLOR="green"] <!-- End Features -->[/COLOR]
Push the xml & set permissions to 0644
Reserved
Additions:
- Added CSC Features
Awesome guide mate
Straight Outta Wcoast
wcoast said:
Awesome guide mate
Straight Outta Wcoast
Click to expand...
Click to collapse
Thanks its only the beginning
RainbowLaw said:
Thanks its only the beginning[emoji14]
Click to expand...
Click to collapse
Keep up the good work...
Straight Outta Wcoast
Wohoo thanks a lot mate, i am new learner will test your guides on my galaxy note 5 rom. Keep up the good work mate
nice mate
since i never want to search about sec bla bla bla .apk mod tutorial
thx for ur guide
keep it up
Really good guide, hope you continue to add to it. Should be on xda portal
Sent from my SM-N920C using Tapatalk
RainbowLaw said:
Theming
1. Go to res/drawable-[your device dpi]
2. In here you'll find all kind of images but I'm gonna give you about some of the main images and you figure out the others
ic_settings_* : These where you find all the icons on the settings menu, some of these are unused which are hidden
ic_sync_*_holo : These are sync animations that appear in the "Accounts and sync" menu
ic_wifi_lock_signal_* & ic_wifi_signal_ *: These are wifi signals that appear in the "Wi-Fi" menu
shortcut_ *: These icons in which we make shortcuts from the settings widget
lock_anim_* : These are the tutorial images to teach you how to use pattern (don't bother if its hidden)
motion_ *: Motion tutorial (don't bother if its hidden)
3. Navigate to res/mipmap-[your device dpi]
ic_launcher_settings : Launcher icon
Now im gonna share with you S6 SecSettings resource files mainly png files. Link
CSC Features
Navigate to system/csc/feature.xml or others.xml..
These are some of the features you can add so read the description and choose your preference
Code:
[COLOR="Green"]<!-- Most of them are universal but no guarantees given -->[/COLOR]
[COLOR="green"] <!-- Start Features -->[/COLOR]
[COLOR="green"] <!-- Hide Software Update from Settings -->[/COLOR]
[COLOR="blue"]<CscFeature_Setting_DisableMenuSoftwareUpdate>true</CscFeature_Setting_DisableMenuSoftwareUpdate>[/COLOR]
[COLOR="green"] <!-- Show your hardware revision in Settings->About (same as dialing *#12580*369#) -->[/COLOR]
[COLOR="blue"]<CscFeature_Setting_EnableHwVersionDisplay>true</CscFeature_Setting_EnableHwVersionDisplay>[/COLOR]
[COLOR="green"]<!-- Restore the hidden APN -->[/COLOR]
[COLOR="blue"] <CscFeature_Setting_HideApnList>pcweb.tmobile.com</CscFeature_Setting_HideApnList>[/COLOR]
[COLOR="green"]<!-- Find my mobile/Sim replacement alert -->[/COLOR]
[COLOR="blue"] <CscFeature_Setting_DisableMenuFindMyMobile>false</CscFeature_Setting_DisableMenuFindMyMobile>
<CscFeature_Settings_FindMyMobile>true</CscFeature_Settings_FindMyMobile>[/COLOR]
[COLOR="green"]<!-- Call and message block -->[/COLOR]
[COLOR="blue"]<CscFeature_Setting_EnableMenuBlockCallMsg>true</CscFeature_Setting_EnableMenuBlockCallMsg>[/COLOR]
[COLOR="green"]<!-- Factory data reset password -->[/COLOR]
[COLOR="blue"] <CscFeature_Setting_EnableFactoryResetPasswordWhenNoSIM>true</CscFeature_Setting_EnableFactoryResetPasswordWhenNoSIM>[/COLOR]
[COLOR="green"]<!-- Display installed variant -->[/COLOR]
[COLOR="blue"]<CscFeature_Common_EnableRegionalDevice>true</CscFeature_Common_EnableRegionalDevice>[/COLOR]
[COLOR="green"] <!-- End Features -->[/COLOR]
Push the xml & set permissions to 0644
Click to expand...
Click to collapse
Nice
Super helpful thread
Does anyone want to know how to change the default app on the home screen? I want to basically be able to change it where my app shows default on the home. So even if I factory reset it will still show on the homescreen.
asapmoola310 said:
Does anyone want to know how to change the default app on the home screen? I want to basically be able to change it where my app shows default on the home. So even if I factory reset it will still show on the homescreen.
Click to expand...
Click to collapse
Well its off-topic but you need to decompile your launcher if its samsung launcher then its SecLauncher2.apk or touchwiz30launcher.apk then go to res/xml here you will find the arrangements modify it then compile push it to your device and then clear data for the launcher
@RainbowLaw thanks for mentioning one of my tricks. Great thread, welldone.
Thanks for the guide really helpful
I was wondering if you can help me theming
How to change actionbar blue color ?
And settings text color ?
image hosting free no registration
I couldnt find those colors in color.xml !!!!
Thanks in advance

Categories

Resources