THIS THEME IS FOR MORE EXPERIENCED THEMERS ONLY!
Adding a Holo ActionBar to an app using Theme Chooser
Apps this is known not to work with:
WinAmp
Tapatalk
TubeMate
What does this do?
So you have an app that's made for Gingerbread, but you're using ICS or JB? Doesn't look as nice as it should does it?
Some of you might have seen my theme Holo Fixer, which automatically attempts to make those apps use Holo. In some cases, it works just fine. But it's not complete that way. If you wish to get more out of it, this guide will help you.
Screenshots of the outcome
A before and after screenshot:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Before
After
(This is the XDA RC blog app, which I'll be using in the guide)
Guide
1.) Start with your theme, make sure it's minSdkVersion is 14 or above and that you're building for ICS or above
2.) Pull the apk of your 'target app' from your phone/tablet, for example with the xda RC app:
Code:
adb pull /data/app/com.xda.rc.blog-1.apk
3.) Using apktool, decompile that app
Code:
sudo java -jar apktool.jar d -s com.xda.rc.blog-1.apk
(No need for source, so use the -s tag to skip it)
4.) Firstly open the AndroidManifest.xml file and look for a "android:theme" tag, within the main activity area. That should be the theme being used by default for the app. If it isn't there (if the app uses code to set the theme it's unlikely it will have the tag), proceed to the next steps anyway, you may still be in luck. However, if it refers to "@android:style", you're out of luck, sorry
5.) Open the res/values/styles.xml of the app
6.) Search for the name of the style that matches the main theme of the app we found earlier. If you couldn't find it, look for a generic style that's likely to be the main theme. In the xda RC app, the main theme styles are the following:
Code:
<style name="Theme_Light" parent="@*android:style/Theme.Light">
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="Theme_Dark" parent="@*android:style/Theme.Black">
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
If there are more than one, that's fine, continue.
7.) Copy the main theme styles to your theme's styles.xml, and rename them so they won't clash with other app's styles
Code:
<style name="Theme_Light_XDARC" parent="@*android:style/Theme.Light">
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="Theme_Dark_XDARC" parent="@*android:style/Theme.Black">
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
8.) Change the parent theme to be its Holo equivalent:
Code:
<style name="Theme_Light_XDARC" parent="@*android:style/Theme.Holo.Light">
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="Theme_Dark_XDARC" parent="@*android:style/Theme.Holo">
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
9.) If it has tags that hide the title, remove them:
Code:
<style name="Theme_Light_XDARC" parent="@*android:style/Theme.Holo.Light">
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="Theme_Dark_XDARC" parent="@*android:style/Theme.Holo">
<item name="android:windowContentOverlay">@null</item>
</style>
Leave the rest of the style in-tact though
10.) Make a new xml file in your theme's res/xml, using the package name, without the -1 or -number tags, and using _ rather than . For example, the xda RC app would be:
Code:
com_xda_rc_blog
11.) Add the default resource redirect tags:
Code:
<?xml version="1.0" encoding="utf-8"?>
<resource-redirections>
</resource-redirections>
12.) Between the <resource-redirections> tags, add the following, replacing the "styleNameHere" with the original theme name, from the original app's styles.xml and the "modStyleNameHere" with the name of your theme name, from your theme's styles.xml
Code:
<item name="style/styleNameHere">@style/modStyleNameHere</item>
For example, the xda RC app's redirecion would be:
Code:
<item name="style/Theme_Light">@style/Theme_Light_XDARC</item>
Note: If there's more than one theme being modified, you must redirect all the styles you are redirecting.
The full xml of the xda RC app can be found here, with different style names (my naming system is weird :silly, and it also includes resource redirections, you don't need those yet.
13.) If you do not wish to customize your action bar at all, you are done here. If you do, proceed to post 2
Part 2: Customizing the action bar with colours, logos and more!
You must have completed the main guide to start
1.) Go back to your theme's styles.xml
2.) Add the following, as a new style:
Code:
<style name="ActionBar_XDARC" parent="@android:style/Widget.Holo.ActionBar">
</style>
Adding a logo to the action bar
Firstly, create a logo for the bar. It should be (up to) 72 pixels ^ and (up to) 300 pixels ->. The best idea is to use the app logo and customize it how you wish. I used the logo of the blog, and resized it.
Make sure the colour of the image will look OK on the action bar background
Basically, just use common sense really.
Now, add the following code to the style:
Code:
<item name="android:icon">@drawable/xda_rc_logo</item>
(Where xda_rc_logo is the name of the image you're using saved in the drawable folders of your theme)
Hiding the text in the action bar
This one is a bit of a hack, but can be done quite easily:
Firstly, add the following to your theme's styles.xml:
Code:
<style name="ActionBar_TitleTrans">
<item name="android:textColor">@android:color/transparent</item>
</style>
Now, add the following to the inside of your ActionBar style you created at the start of Part 2:
Code:
<item name="android:titleTextStyle">@style/ActionBar_TitleTrans</item>
(There's probably an easier way to do this, I'll edit the post if I find it)
Changing the background
Very simple, add the following to the inside of the style you added at the start of the part 2:
Code:
<item name="android:background">#0000FF</item>
Change the hex number to the one you want or use a colour in your theme's xml with @color/* or use an android one, such as @android:color/red
Finally, adding the action bar style to the app
Go back to the style you made in post 1, and add the following to it:
Code:
<item name="android:actionBarStyle">@style/ActionBar_APP</item>
(Where ActionBar_APP is the name you used at the start of post 2)
For example, the xda RC app would be:
Code:
<item name="android:actionBarStyle">@style/ActionBar_XDARC</item>
Now compile your theme and it should use your customized action bar. If you wish to move items out of the dropdown bar and onto your main actionbar, see post 3
Part 3: Moving items out of the dropdown bar onto the main actionbar
You must have completed the main guide to continue (you don't have to have completed part 2 though)WARNING: This part of the guide is quite complicated, and in most cases will not be needed. It's not compulsory to do this part, but it just looks better if you do.
1.) Start with your decompiled app, from part 1. Navigate to the res/menu folder and find the xml that you wish to move the options around on. In some cases there's only one xml, in most cases more. Open it/them
2.) Within the xml, find the items you wish to move the main action bar and add the following code to the end of them:
Code:
android:showAsAction="ifRoom"
The items that you are not moving can have their drawable tags removed, as they will not need them and will only cause problems later
If you want them to have icons
Add the android:icon tag, and use either a drawable or android:drawable
3.) Now you must add the ids of the options in that xml to your own, so the theme will compile.
First, open your theme's ids.xml
Now add the following to it:
Code:
<item type="id" name="idName">false</item>
Replace idName with the name of one of your ids from the menu file you had open
Do this for all the ids within the menu xmls.
4.) Save your menu file in a new folder in your theme, res/menu , with the normal name but with the app name after it, to prevent clashes
5.) Open your xml for redirecting that you had earlier
Add the following to it:
Code:
<item name="menu/menuName">@menu/menuName_app</item>
(Where the menuName is the app's original menu name and menuName_app is your theme's redirect for that file)
For example, for a menu file named "home_menu" and the app tag "XDARC", it would be:
Code:
<item name="menu/home_menu">@menu/home_menu_XDARC</item>
6.) Compile your theme, you are done
Might need another, just in case
Related
Guys - this is driving me nuts. After exploring stock Android inside out with the Milestone, there is a new and great learning curve with Sense, which is fine. In any case after investigating it is pretty clear what to do, if I want to change htcdialer to a black background and in this case certainly white (or another bright) font colour for the dialer buttons. After decompiling and checking the layout folders everything directly aims to style.xml - so I edited the corresponding values:
<style name="text_style_dialer_button_number">
<item name="android:textSize">27.0sp</item>
<item name="android:textColor">#ffffffff</item>
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:shadowColor">@color/color_255_255_255</item>
<item name="android:shadowDx">2.0</item>
<item name="android:shadowDy">2.0</item>
<item name="android:shadowRadius">1.0</item>
</style>
<style name="text_style_dialer_button_alphabet">
<item name="android:textSize">14.0sp</item>
<item name="android:textColor">#ff777777</item>
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginTop">42.0px</item>
</style>
<style name="text_style_dialer_button_zero_number">
<item name="android:textSize">27.0sp</item>
<item name="android:textColor">#ffffffff</item>
<item name="android:layout_gravity">center</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:shadowColor">@color/color_255_255_255</item>
<item name="android:shadowDx">2.0</item>
<item name="android:shadowDy">2.0</item>
<item name="android:shadowRadius">1.0</item>
Unforunately no success - I also tried several layout xml despite knowing it will not work, just to double check. I also looked into EVO threads (since there was nothing here) and found out, that this style.xml and my values are right (certainly knowing that HTC changed something for DHD).
I also checked htcframework - besides a few pngs which I certainly found and edited no corresponding xml. So the answer seems to be in the smali code.
Anyone else tried this and succeeded? Any help would be greatly appreciated - Thx
solved it myself - see Revolution theme thread
he_stheone64 said:
solved it myself - see Revolution theme thread
Click to expand...
Click to collapse
Would you mind sharing how you did it? I spent over an hour editing each PNG one by one to find out it doesnt work! Now that got me a bit pissed grrrrr
That is certainly not png related, you need to decompile the apk first and then need to edity styles.xml in values-hdpi folder.I was so used to AOSP (had a Milestone before, never had values-hdpi), that I started editing everything in values folder and with all the language value folders was not looking at the obvious...
Thanks. Last question, how would I go about making the buttons plain black, instead of having a sort of gradient around it/button around it? I'm trying to match my keyboard.
1. Use my themed htcdialer from Revolution Theme (which is already compiled for inverted use - credit is always nice, if you release it)
2. Make htc_pin_asset_rest.png in htcdialer 100% transparent
3. You should at least have a little glow or whatever effect for htc_pin_asset_pressed.png in order to have feedback for input
4. Make phone_keypad_background.png in com.htcresources.apk as dark as you like it
whaaa!!! almost a week looking at those files.... and indeed never looked between those language folders....H
Much appreciated and I will make sure to credit you if I release
can you install the dialer as an apk file? if you could please pass it over it would would go well with my screen setup at the moment
You only need to download the Revolution Theme and flash only the htcdialer (delete anything in the update.zip, which you don`t need -certainly not the Meta-INF...)
I`m having a very strange Problem - all system/apps and framework-res compile fine (why shouldn`t they...) - only with com.htc.resources.apk I have the same issue after trying it 20 times with different approaches - directly in apktool, apkmanager 4.9, transfering compiled resources to original htc framework, compiling with apkmanager 4.9, transfering Manifest and Meta-Inf to the compiled htc resources, basically all the bells and whistles...
The system boots and works fine, but after compiling I loose access to settings. Even if I decompile in a test run and CHANGE NOTHING and compile, same result.
Following warning comes from apktool, but build finishes and boots as mentioned:
aapt: warning: string 'htc_day' has no default translation in C:\apktool\com.htc
.resources-decoded\res; found: zh_HK
aapt: warning: string 'htc_hour' has no default translation in C:\apktool\com.ht
c.resources-decoded\res; found: zh_HK
aapt: warning: string 'htc_minute' has no default translation in C:\apktool\com.
htc.resources-decoded\res; found: zh_HK
aapt: warning: string 'htc_month' has no default translation in C:\apktool\com.h
tc.resources-decoded\res; found: zh_HK
aapt: warning: string 'htc_year' has no default translation in C:\apktool\com.ht
c.resources-decoded\res; found: zh_HK
I: Building apk file...
Usually if something`s wrong you get errors (no warnings) or system does not boot, but this here is really unique. It is clear that apktool is loosing some entries somewhere, which are necessary for settings to load, subsequently settings init fails due to these missing entries.
I even added the missing translations to strings.xml and it compiled again fine, same result. I don`t expect a solution here, since I reported that issue to brut, but I only need to know whether that`s an isolated problem on my PC or whether you guys are experiencing the same problem with the latest 2.2.1 com.htc.resources.apk
I'll try and compile the file tomorrow and see what I get, at the moment I've just decompiled the whole theme to take a look at its guts
Sent using my two thumbs.
It`s really a pity, since I added some cool new look to com.htc.resources and it looks great on the DHD, but not really nice with this settings bug...
Hmmm, still can't get the menu text to white or green...
changed it to
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">?textColorPrimary</item>
and even to
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">#ffffffff</item>
and to
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">#ff777777</item>
Still no luck, and yes i have even modded it in values and values-hdpi
How's your progress on this he_stheone64???
he_stheone64 said:
It`s really a pity, since I added some cool new look to com.htc.resources and it looks great on the DHD, but not really nice with this settings bug...
Click to expand...
Click to collapse
which version of apktool r u using? 1.3.1 or 1.3.2?
kurniawan77 said:
which version of apktool r u using? 1.3.1 or 1.3.2?
Click to expand...
Click to collapse
Both - 1.31 AND 1.32.
kurniawan77 said:
Hmmm, still can't get the menu text to white or green...
changed it to
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">?textColorPrimary</item>
and even to
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">#ffffffff</item>
and to
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">#ff777777</item>
Still no luck, and yes i have even modded it in values and values-hdpi
How's your progress on this he_stheone64???
Click to expand...
Click to collapse
No problem - I managed to invert menu AND all popups plus color in notification bar. I used the popups and menu from Gingerbread for the tests and even black menu for bright and medium popup`s. That gives a little DarkEdge feeling... The problem here is, that it looks great but due to described issues I`m loosing access to settings, a behaviour I never experienced and I compiled thousands of apk`s...
Coming from AOSP or CM6 ROM`s like me, you initially are editing the wrong framework... these changes for menu, popup and even the simple statusbar have all to be done in values folder of com.htc.resources - BUT due to compilation issues I can`t release the outcome. There might still be other approaches, but com.htc.resources OVERWRITES all style edits in framework-res you`ve tried before. It is like some png`s like popup, where the changes have to be done in com.htc.resources and not in framework-res.
So my question still remains the same - if you decompile and compile com.htc.resources and push it back and boot - do you also have the same issues, that settings don`t start anymore (no FC`s - they just don`t init)? Just try this without changing ANYTHING, only decompile, compile and push back. This helps me to understand, whether I have an isolated problem or whether this is a general apktool issue with the latest htc resources on DHD (maybe also on Z).I tried it with apktool 1.31 and 1.32, both directly and with apkmanager 4.9.
he_stheone64 said:
No problem - I managed to invert menu AND all popups plus color in notification bar. I used the popups and menu from Gingerbread for the tests and even black menu for bright and medium popup`s. That gives a little DarkEdge feeling... The problem here is, that it looks great but due to described issues I`m loosing access to settings, a behaviour I never experienced and I compiled thousands of apk`s...
Coming from AOSP or CM6 ROM`s like me, you initially are editing the wrong framework... these changes for menu, popup and even the simple statusbar have all to be done in values folder of com.htc.resources - BUT due to compilation issues I can`t release the outcome. There might still be other approaches, but com.htc.resources OVERWRITES all style edits in framework-res you`ve tried before. It is like some png`s like popup, where the changes have to be done in com.htc.resources and not in framework-res.
So my question still remains the same - if you decompile and compile com.htc.resources and push it back and boot - do you also have the same issues, that settings don`t start anymore (no FC`s - they just don`t init)? Just try this without changing ANYTHING, only decompile, compile and push back. This helps me to understand, whether I have an isolated problem or whether this is a general apktool issue with the latest htc resources on DHD (maybe also on Z).I tried it with apktool 1.31 and 1.32, both directly and with apkmanager 4.9.
Click to expand...
Click to collapse
I'll give it a try to de- and compile com.htc.resources... sometimes it helps to run as administrator... don't know if it helps u.
nope getting same warnings
Code:
I: Building resources...
aapt: warning: string 'htc_day' has no default translation in C:\Users\HP DV7-4030ed\Desktop\Irwan\apk_manager_4.9\other\..\projects\com.htc.resources.apk\res; found: zh_HK
aapt: warning: string 'htc_hour' has no default translation in C:\Users\HP DV7-4030ed\Desktop\Irwan\apk_manager_4.9\other\..\projects\com.htc.resources.apk\res; found: zh_HK
aapt: warning: string 'htc_minute' has no default translation in C:\Users\HP DV7-4030ed\Desktop\Irwan\apk_manager_4.9\other\..\projects\com.htc.resources.apk\res; found: zh_HK
aapt: warning: string 'htc_month' has no default translation in C:\Users\HP DV7-4030ed\Desktop\Irwan\apk_manager_4.9\other\..\projects\com.htc.resources.apk\res; found: zh_HK
aapt: warning: string 'htc_year' has no default translation in C:\Users\HP DV7-4030ed\Desktop\Irwan\apk_manager_4.9\other\..\projects\com.htc.resources.apk\res; found: zh_HK
I: Building apk file...
i'll try renaming it to comhtcresources.apk.... don't know if it helps but we'll see tonight... i'm off to work now...
hi guyz..
i just want to know how can i change the background of settings menu?
you can`t change the background in setting menu ....
explor3r3 said:
you can`t change the background in setting menu ....
Click to expand...
Click to collapse
really? :O there is no way?
explor3r3 said:
you can`t change the background in setting menu ....
Click to expand...
Click to collapse
not true
donjamal said:
really? :O there is no way?
Click to expand...
Click to collapse
I never tried in the stock/stock base ROM
would be more easy if use cm7, choose theme that support to change background menu (like MIUI by zduneX25) and change the background to your image
oh yeah sorrry for my poor english
slurpdroid said:
not true
I never tried in the stock/stock base ROM
would be more easy if use cm7, choose theme that support to change background menu (like MIUI by zduneX25) and change the background to your image
oh yeah sorrry for my poor english
Click to expand...
Click to collapse
u can change it. i'll post it here. gimme sometime
---------- Post added at 11:23 AM ---------- Previous post was at 11:09 AM ----------
this is NOT my tutorial.
our dev and champ themer Gabwerkz taught me this. am just sharing his tutorial to you.
give him a thumbs up
In framework-res/res/values/styles.xml you will find:
<style name="Theme">
If you are using notepadd++, input it in search and you'll be directed to it. you will see a long line, but I'll input just the beginning where I edited. Something like:
Code:
<style name="Theme">
<item name="colorForeground">@color/bright_foreground_dark</item>
<item name="colorBackground">@color/background_dark</item>
Now the "background_dark" is the black you see as background like in settings etc. Change that name to the image name you like. Example: "background_gabwerkz". Don't loose the "background_". Then your image should be in drawable-hdpi. The image name would be then "background_gabwerkz".
No further mod then is necessary. The custom background will show in settings, or other associated with it.
Doinks, last thing before you try.. Same location I mentioned
<style name="Theme">
<item name="colorForeground">@color/bright_foreground_dark</item>
<item name="colorBackground">@color/background_dark</item>
to:
<style name="Theme">
<item name="colorForeground">@color/bright_foreground_dark</item>
<item name="colorBackground">@drawable/background_gabwerkz</item>
Change the"@color" to "@drawable" cause it's not a color but a drawable image.
Woooh, last message, sorry. same location: framework-res/res/values/styles.xml
UNDER: <style name="Theme">
FIND: <item name="windowBackground">@drawable/screen_background_dark</item>
CHANGE: screen_background_dark to a custom image.
Same procedure as my previous message. Sorry bro, been a while not touching the style theme. It makes the scrolling stutter.
__________________
HAPPY TRYING
achyut said:
u can change it. i'll post it here. gimme sometime
---------- Post added at 11:23 AM ---------- Previous post was at 11:09 AM ----------
this is NOT my tutorial.
our dev and champ themer Gabwerkz taught me this. am just sharing his tutorial to you.
give him a thumbs up
In framework-res/res/values/styles.xml you will find:
<style name="Theme">
If you are using notepadd++, input it in search and you'll be directed to it. you will see a long line, but I'll input just the beginning where I edited. Something like:
Code:
<style name="Theme">
<item name="colorForeground">@color/bright_foreground_dark</item>
<item name="colorBackground">@color/background_dark</item>
Now the "background_dark" is the black you see as background like in settings etc. Change that name to the image name you like. Example: "background_gabwerkz". Don't loose the "background_". Then your image should be in drawable-hdpi. The image name would be then "background_gabwerkz".
No further mod then is necessary. The custom background will show in settings, or other associated with it.
Doinks, last thing before you try.. Same location I mentioned
<style name="Theme">
<item name="colorForeground">@color/bright_foreground_dark</item>
<item name="colorBackground">@color/background_dark</item>
to:
<style name="Theme">
<item name="colorForeground">@color/bright_foreground_dark</item>
<item name="colorBackground">@drawable/background_gabwerkz</item>
Change the"@color" to "@drawable" cause it's not a color but a drawable image.
Woooh, last message, sorry. same location: framework-res/res/values/styles.xml
UNDER: <style name="Theme">
FIND: <item name="windowBackground">@drawable/screen_background_dark</item>
CHANGE: screen_background_dark to a custom image.
Same procedure as my previous message. Sorry bro, been a while not touching the style theme. It makes the scrolling stutter.
__________________
HAPPY TRYING
Click to expand...
Click to collapse
i only need to change the windowBackground? cuz it changes the bg but when i touch it it will be black again..
Now Featured in XDA Portal. Thanks for the support
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
http://www.xda-developers.com/android/comprehensive-xthemeengine-theme-creation-guide/
***This Themer guide should work in any device running android 4.0.4 & +
About NICS Themer
NICS Themer works with Xposed App & X-Themer Engine. It is intended to serve the same purpose as T-Mobile/CM10 Theme Engine. NICS lets you to create own themed apk, my friend neroyoung first develop the idea of it & implemented in his NICS Rom. I am writing a complete guide here to share with you cause I think it's a really useful thing
Requirement
1. X-posed App by rovo89
2. X-Themer Engine by ruqqq
3. My Base.apk
4. Virtuous Ten Studio (VTS) - Official Website
5. A Editing Software like Paint.NET - Download Link
Note: # 1,2,3 are available in 2nd post attachment
Note: for more information about X-posed App & X-Themer Engine visit the official thread.
Main Guide
1. Download & install VTS in default directory & place Base.apk in Desktop
2. Open VTS & click on File>New Project (Right hand top corner). Click on Import tab & locate the Base.apk from Desktop, then click Import. Now click on Project tab & you will see the Project name as "Base", give a Solution name or just name it to "Base" as well. Then press Ok. For better understanding I am providing screenshot with serial number to the task you have to do.
3. You will see now task is running & in some seconds your apk will be decompile successfully. It will look like this, minimize VTS
4. Now go to there where VTS keeps projects. For me it is in C:\Documents and Settings\USER\My Documents\Virtuous Ten Studio\Projects
Now go inside your project "Base\Data folder.
Inside drawable folder there is a png which is the icon of the apk
Inside xml folder there is a redirection.xml, we have to redirect the packages which we will theme & other xmls need to be write here.
Go inside values folder & delete Public.xml
5. Now lets begin with the guide. As framework, systemUI & Settings are the three most important component of Rom, I will show how to theme & redirect them.
6. Now, 1st decompile Settings.apk which you want to theme to get the resources & pngs from there. Use another tool like Apktool, Xda Auto Apktool or Apk Multitool. Here is a Guide on Apk Multi Tool.
7. Open AndroidManifest.xml of Settings.apk, we need android version & package name of it. Like for my Settings.apk it is
android:versioncode="15"
pacakge="com.android.settings" Remember those or note it down somewhere
Also go to the drawable-hdpi folder of Settings.apk & copy the pngs you want to theme. Note that, according to your phone this drawable folder can be drawable-ldpi/mdpi/hdpi/xhdpi. So according to it make a drawable folder in Data\Res of the decompiled Base.apk
I am creating it in Data\res\drawable-hdpi, & adding the pngs in the folder which I have copied from Settings.apk
8. Now, inside the drawable-hdpi folder rename the pngs with anything you like. To avoid all conflicts I would suggest to add the package name infront of every png. For example, I have taken three pngs from settings. Here are the original & renamed name of them--
ic_settings_wireless.png -------------- com_android_settings_ic_settings_wireless.png
ic_settings_bluetooth2.png ---------- com_android_settings_ic_settings_bluetooth2.png
ic_settings_data.png ------------------- com_android_settings_ic_settings_data.png
9. Now go to xml folder & write a new xml named "com_android_settings.xml" & write according to how many pngs you have taken,
Code:
<?xml version="1.0" encoding="utf-8"?>
<resource-redirections>
<item name="drawable/ic_settings_bluetooth2">@drawable/com_android_settings_ic_settings_bluetooth2</item>
<item name="drawable/ic_settings_data_usage">@drawable/com_android_settings_ic_settings_data_usage</item>
<item name="drawable/ic_settings_wireless">@drawable/com_android_settings_ic_settings_wireless</item>
</resource-redirections>
Save it.
Here, item name="drawable/ic_settings_bluetooth2" - is the original png name which is inside Settings.apk
@drawable/com_android_settings_ic_settings_bluetooth2 - is the renamed pngs which will replace the original png
So it will look like this,
10. Now decompile SystemUI.apk the same way & get android version & package name from AndroidManifest.xml. For me it is,
android:versioncode="15"
package="com.android.systemui"
Copy the pngs you want to edit from drawable folder & add it to Data\res\drawable-hdpi folder of Base.apk. Now rename the pngs you have copied with the package name attached to the front. Like for a png the original & renamed is-
stat_bluetooth_on.png ---------- com_android_systemui_stat_bluetooth_on.png
11. Write a new xml in xml folder named "com_android_systemui.xml" & write according to how many pngs you have taken-
Code:
<?xml version="1.0" encoding="utf-8"?>
<resource-redirections>
<item name="drawable/stat_2g3g_off">@drawable/com_android_systemui_stat_2g3g_off</item>
<item name="drawable/stat_2g3g_on">@drawable/com_android_systemui_stat_2g3g_on</item>
<item name="drawable/stat_3g_on">@drawable/com_android_systemui_stat_3g_on</item>
<item name="drawable/stat_airplane_on">@drawable/com_android_systemui_stat_airplane_on</item>
<item name="drawable/stat_bluetooth_on">@drawable/com_android_systemui_stat_bluetooth_on</item>
<item name="drawable/stat_brightness_auto">@drawable/com_android_systemui_stat_brightness_auto</item>
<item name="drawable/stat_brightness_mid">@drawable/com_android_systemui_stat_brightness_mid</item>
<item name="drawable/stat_brightness_on">@drawable/com_android_systemui_stat_brightness_on</item>
<item name="drawable/stat_data_on">@drawable/com_android_systemui_stat_data_on</item>
<item name="drawable/stat_flashlight_on">@drawable/com_android_systemui_stat_flashlight_on</item>
<item name="drawable/stat_gps_on">@drawable/com_android_systemui_stat_gps_on</item>
<item name="drawable/stat_lock_screen_on">@drawable/com_android_systemui_stat_lock_screen_on</item>
<item name="drawable/stat_orientation_on">@drawable/com_android_systemui_stat_orientation_on</item>
<item name="drawable/stat_reboot">@drawable/com_android_systemui_stat_reboot</item>
<item name="drawable/stat_ring_on">@drawable/com_android_systemui_stat_ring_on</item>
<item name="drawable/stat_screen_timeout_1m">@drawable/com_android_systemui_stat_screen_timeout_1m</item>
<item name="drawable/stat_screen_timeout_2m">@drawable/com_android_systemui_stat_screen_timeout_2m</item>
<item name="drawable/stat_screen_timeout_10m">@drawable/com_android_systemui_stat_screen_timeout_10m</item>
<item name="drawable/stat_screen_timeout_30m">@drawable/com_android_systemui_stat_screen_timeout_30m</item>
<item name="drawable/stat_screen_timeout_15s">@drawable/com_android_systemui_stat_screen_timeout_15s</item>
<item name="drawable/stat_screen_timeout_30s">@drawable/com_android_systemui_stat_screen_timeout_30s</item>
<item name="drawable/stat_shutdown">@drawable/com_android_systemui_stat_shutdown</item>
<item name="drawable/stat_sync_on">@drawable/com_android_systemui_stat_sync_on</item>
<item name="drawable/stat_wifi_on">@drawable/com_android_systemui_stat_wifi_on</item>
</resource-redirections>
Save it.
12. Now decompile framework-res.apk get the package name & android version from AndroidManifest.xml & get the pngs from drawable folder & add them in Data\res\drawable-hdpi folder of Base.apk. My framework's package & version is -
android:versioncode="15"
package="android"
Now rename the framework-res pngs with package name "android" or like I have done. The original & renamed png name is like this for me-
switch_bg_on_disabled_holo_dark.png ------------ framework_res_switch_bg_on_disabled_holo_dark.png
Now open a new xml in xml folder named "android.xml" & write according to how many pngs you have taken to modify
Code:
<?xml version="1.0" encoding="utf-8"?>
<resource-redirections>
<item name="drawable/switch_bg_on_disabled_holo_dark">@drawable/framework_res_switch_bg_on_disabled_holo_dark</item>
<item name="drawable/switch_bg_on_disabled_holo_light">@drawable/framework_res_switch_bg_on_disabled_holo_light</item>
<item name="drawable/switch_bg_on_holo_dark">@drawable/framework_res_switch_bg_on_holo_dark</item>
<item name="drawable/switch_bg_on_holo_light">@drawable/framework_res_switch_bg_on_holo_light</item>
<item name="drawable/switch_thumb_disabled_focused_holo">@drawable/framework_res_switch_thumb_disabled_focused_holo</item>
<item name="drawable/switch_thumb_focused_holo">@drawable/framework_res_switch_thumb_focused_holo</item>
</resource-redirections>
Save it.
Note that for .9 pngs we won't add .9 to the xml
13. Open redirections.xml in xml folder & we have to write all the package redirections here. In my case I have three packages to redirect.
for Settings --
Code:
<package-redirections android:name="com.android.settings" android:resource="@xml/com_android_settings" android:minSdkVersion="15" />
for SystemUI --
Code:
<package-redirections android:name="com.android.systemui" android:resource="@xml/com_android_systemui" android:minSdkVersion="15" />
for framework --
Code:
<package-redirections android:name="android" android:resource="@xml/android" android:minSdkVersion="15" />
Here android:name is the main package which will be themed
android:resources is the xml from where png's will be redirected & replaced
android:minSdkVersion is the android:versioncode which we got from the main packages
So, the complete redirections.xml is may case will be -
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">
<package-redirections android:name="com.android.settings" android:resource="@xml/com_android_settings" android:minSdkVersion="15" />
<package-redirections android:name="com.android.systemui" android:resource="@xml/com_android_systemui" android:minSdkVersion="15" />
<package-redirections android:name="android" android:resource="@xml/android" android:minSdkVersion="15" />
</theme-redirections>
Save it. Note that, you need to close redirections with </theme-redirections> to the end.
Also, Remove "/" from the 3rd end of the line. So the 3rd line will be,
Code:
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:pluto="http://www.w3.org/2001/pluto.html">
14. Now go to drawable-hdpi folder where all the renamed pngs are. Open them with Paint.NET & change hue/saturation to the color you want to theme them. crtl+shift+U gives you the option in Paint.NET. When theming is done save all pngs. My drawable-hdpi folder looks like this-
15. Now check once again in Data\res folder.
In drawable folder there should be icon.png which will be the icon for your apk
In values folder there will be nothing as we have deleted public.xml earlier
In xml folder there should be redirections.xml with other xmls you have created
In drawable hdpi folder there will be all the renamed & themed pngs
16. Now maximize VTS window & open AndroidManifest.xml of the Base.apk. In android:label write something you want it to be shown as the apk name. In package name give name according to your color theme. Like for me it is "saqib.themer.green". If you make another one which is orange in color name it to "saqib.themer.orange" so that it doesn't replace the earlier apk when installing. After this, save the xml. For better understanding, I have marked screenshot with serial number-
When you are done press "Build all", it will run a process & create your new apk. CONGRATULATIONS :good: now you have successfully built your own themed apk. Get it from Data\Binary folder of VTS Project.
Attachments
* Download Xposed App & X-Themer Engine from attachment & install them as a normal apk in your device.
* Go to Xposed Installer App click on Install/Update, then go to Modules & tick mark on XTheme Engine. Reboot your device
* Install the newly created apk by yourself as a normal apk. You will find it inside XThemeEngine App. Apply it, it will ask for a soft reboot. After reboot you will see the changes that the app has made.
Here, I am sharing a screenshot after applying my Green themed apk via XTheme Engine
For automated batch file renaming & redirections go to this post by Madaditya - Link to Post
Credits
** neroyoung
** rovo89
** ruqqq
** Diamondback
For any more support, I am also attaching the Green_Hulk.apk I have made in the process. If you need to know more or have any confusion download that & decompile it. Your idea & conception will get more clear.
Nice Guide Mate...
Its really helpful for beginner
Nice work saqib,
Nicely written well mannered guide! Detailed enough to make even a beginner themer as pro
Awesome!!
nicely written bro... definitely a beginner would understand it with ease :good:
Awesome guide, bro...
Just a doubt... is it necessary to use vts? Can't I simply use apktool for decompiling the base apk? Im on linux and I dont think vts is for linux..
AJ
Amazing stuff there..Mate..
Keep it up ..Will link in my threads so as more people notice it..
Great guide mate! Keep it up! I'm sure even beginners are able to follow the steps
Abhinav2 said:
Awesome guide, bro...
Just a doubt... is it necessary to use vts? Can't I simply use apktool for decompiling the base apk? Im on linux and I dont think vts is for linux..
AJ
Click to expand...
Click to collapse
Thanks..Yes you can use other apk tools too for Base.apk. I have suggested VTS because with VTS when you change AndroidManifest you don't need to sign them or compile with old signature etc..If you use apktool then don't forget to re-sign the base apk
help
Hi saqib!
For first thank you for the gide!! It was really helpfull for me! But I got an error while I try to build my apk. I dont't know what is the problem, 'cause I did everything as you said (but change my android version to 16). The log says that I have some junk after document element, and I don't know what to do. Any suggestion?
question do you need to set resource file. like say Samsung framework resource would be 1.apk and so on. And if you do. what resource file do we need. from are rom or will it use java and android sdk for the resource files. thanks for this
dywerd said:
Hi saqib!
For first thank you for the gide!! It was really helpfull for me! But I got an error while I try to build my apk. I dont't know what is the problem, 'cause I did everything as you said (but change my android version to 16). The log says that I have some junk after document element, and I don't know what to do. Any suggestion?
Click to expand...
Click to collapse
Check redirections.xml line number 4, there is some problem in that line. If you cannot find it show it to me
monkeytools said:
question do you need to set resource file. like say Samsung framework resource would be 1.apk and so on. And if you do. what resource file do we need. from are rom or will it use java and android sdk for the resource files. thanks for this
Click to expand...
Click to collapse
When you setup VTS it will place some default frameworks which are needed for resources. So you don't need to install frameworks separately for this guide
Congrats for making it on the portal!
You're becoming something like a guru here hehe
Keep it up!
Hi saquib!
Thanks for the reply! I check those line a hundred times, even rewrite it, but no luck
Here's a creenshot, I hope you can figure it out :angel:
dywerd said:
Hi saquib!
Thanks for the reply! I check those line a hundred times, even rewrite it, but no luck
Here's a creenshot, I hope you can figure it out :angel:
Click to expand...
Click to collapse
You don't have any com_android_settings.xml in xml folder, that's why it is giving trouble. You also don't have android.xml from where the resources will be replaced. Go back to my guide & take a look again, you missed those parts
I don't know why they are not showing in vts, but now they are there (com_android_settings & so on), but android.xml not, and now I see that I have to create that, right? Can you tell me how to that? I check your gide, but can't find that... sorry
dywerd said:
I don't know why they are not showing in vts, but now they are there (com_android_settings & so on), but android.xml not, and now I see that I have to create that, right? Can you tell me how to that? I check your gide, but can't find that... sorry
Click to expand...
Click to collapse
rename com_android_framework.xml to android.xml, you have redirected to android.xml but named one xml as com_android_framework
you should download my Green_Hulk.apk which I attached to the 2nd post, it is a complete apk, you should get your concept clear from that apk
saqib nazm said:
rename com_android_framework.xml to android.xml, you have redirected to android.xml but named one xml as com_android_framework
you should download my Green_Hulk.apk which I attached to the 2nd post, it is a complete apk, you should get your concept clear from that apk
Click to expand...
Click to collapse
Thanks for your help! I really appreciate it!
I think I too noob for that, I do what you said or at least I think I do, but no succes :crying:
I upload my "creation"; if you so kind, will you see that and maybe you can help again for me... :angel::fingers-crossed:
Sorry for disturbing you
ImageRx
@saqib nazm
Thank You for Such an Awesome Guide!
I've just made a script ImageRx that would
1.Add the required prefix to image name and Rename them
2.Also create the required redirection xml
So this Would Automate renaming multiple images with same prefix as needed for NICS themer
Download ImageRx_Madaditya
Also Find my Updated tool Here ToolsX
Credits
[email protected] Used his Goptimizer Mini Cygwin Pack as Base for Bash script to Run on windows!
2 @saqib nazm-For this Awesome guide
Click to expand...
Click to collapse
Hope this will be helpful :good:
Since this is my first script might have errors.Please report
dywerd said:
Thanks for your help! I really appreciate it!
I think I too noob for that, I do what you said or at least I think I do, but no succes :crying:
I upload my "creation"; if you so kind, will you see that and maybe you can help again for me... :angel::fingers-crossed:
Sorry for disturbing you
Click to expand...
Click to collapse
Ohk I will take a look at night, or if not then tomorrow
Madaditya said:
@saqib nazm
Thank You for Such an Awesome Guide!
I've just made a script that would1.Add the required prefix to image name and Rename them
2.Also create the required redirection xmlSo this Would Automate renaming multiple images with same prefix as needed for NICS themer
Download ImageRx_Madaditya
Hope this will be helpful :good:
Since this is my first script might have errors.Please report
Click to expand...
Click to collapse
Really thanks for this man :good: you just made things alot easier now I will link this thread to my 2nd post
Hey Guys I am back with my new guide
{
"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"
}
Here i'll show you How to theme your settings.apk to look like xperia .As you all know sony uses colorizable function for changing the themes
But AOSP framework Doesn't support colorizable function so i've modified the files from xperia rom to make it work on AOSP roms
Topics Covered :-
1.changing switch style to look like Xperia
2.changing only settings background
3.changing the settings header style
4.How to theme settings.apk to look like XZ2
5.changing the icons and more
Click to expand...
Click to collapse
Requirements:-
apktool 2.0.0b9
Notepad++
Knowledge about decompiling and recompiling
Time and Patience
Click to expand...
Click to collapse
Decompile your framework-res.apk
download the resources from attachment and merege it with yours
navigate to framework-res.apk/res/values and open styles.xml
find
Code:
<style name="Widget.Holo.CompoundButton.Switch" parent="@style/Widget.Holo.CompoundButton">
OR
Code:
<style name="Widget.Holo.CompoundButton.Switch"
replace the style with this
Code:
<style name="Widget.Holo.CompoundButton.Switch" parent="@style/Widget.Holo.CompoundButton">
<item name="textOn">@string/somc_btn_on</item>
<item name="textOff">@string/somc_btn_off</item>
<item name="thumb">@drawable/semc_switch_inner_holo_dark</item>
<item name="switchTextAppearance">@style/TextAppearance.DeviceDefault.Widget.Switch</item>
<item name="track">@drawable/semc_switch_track_holo_dark</item>
<item name="switchMinWidth">72.0dip</item>
<item name="switchPadding">4.0dip</item>
<item name="thumbTextPadding">@dimen/somc_switch_text_padding</item>
</style>
like this :
and add this at the end of styles.xml before </resources>
Code:
<style name="TextAppearance.DeviceDefault.Widget.Switch" parent="@style/TextAppearance.DeviceDefault.Small">
<item name="textSize">10.0dip</item>
<item name="typeface">sans</item>
<item name="textStyle">bold</item>
<item name="textColor">@color/semc_switch_text_color</item>
</style>
like this :
now open /res/values/strings.xml and add the specified lines at the end
if you don't want on/off text on the switch add these
like this :
Code:
<string name="somc_btn_on">I</string>
<string name="somc_btn_off">?</string>
or
if you want on/off text on the switch add these
like this :
Code:
<string name="somc_btn_on">ON</string>
<string name="somc_btn_off">OFF</string>
open /res/values/dimens.xml and add this at the end
Code:
<dimen name="somc_switch_text_padding">7.0dip</dimen>
thats it now recompile your framework-res
EXTENDED THEMING TO YOUR SETTINGS ON POST #5
Enjoy
IF YOU LIKE MY WORK DON'T FORGET TO HIT THANKS BUTTON
To theme your settings look like honami style
for xperia stlye switch follow the above guide
First Decompile your settings.apk and merge the resources from the attachment
open AndroidMainfeast.xml and change this line as shown
Code:
<application android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher_settings" android:label="@string/settings_label" android:supportsRtl="true" android:taskAffinity="" [B][COLOR="Red"]android:theme="@style/Theme.Holo" [/COLOR][/B]android:uiOptions="splitActionBarWhenNarrow">
now open res/values/styles.xml and add this (if you alreadry have this style change it to look like mine)
Code:
<style name="Theme.Holo" [COLOR="Red"]parent="@*android:style/Theme.DeviceDefault.Light">[/COLOR]
<item name="android:textColor">#ff000000</item>
<item name="android:listSeparatorTextViewStyle">@style/ListSeparator</item> [COLOR="red"]#### add this line to apply new header style to settings and its activities ####
[/COLOR] [COLOR="Blue"]<item name="android:windowBackground">@drawable/[COLOR="Purple"]your_background[/COLOR]</item>[/COLOR] [COLOR="red"]#### add this line to apply custom background for settings and its activities ####[/COLOR]
</style>
if you want to add custom background to settings and its activities replace your_background with your image name
also add this at the end of styles.xml
Code:
<style name="ListSeparator" parent="@android:style/Widget.DeviceDefault.Light.TextView.ListSeparator">
<item name="android:textSize">14.0sp</item>
<item name="android:textStyle">normal</item>
[COLOR="blue"] <item name="android:textColor">[COLOR="Red"]#ffED2A2F[/COLOR]</item>[/COLOR] [COLOR="red"]####for changing header's text color ####
[/COLOR] <item name="android:gravity">center_vertical</item>
[COLOR="blue"] <item name="android:background">@drawable/[COLOR="red"]semc_list_section_divider_holo_light[/COLOR]</item>[/COLOR] [COLOR="red"]####for changing header background ####[/COLOR]
<item name="android:paddingLeft">8.0dip</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textAllCaps">true</item>
</style>
if you face any bugs like this
Now open
smali/com/android/settings/applications/ManageApplications$ApplicationsAdapter.smali
Search for
Code:
[B]getColorStateList[/B]
above that you will see this
Code:
[COLOR="red"]0x1060001 [/COLOR]
like this :
change it to
Code:
[COLOR="red"]0x106000[COLOR="Blue"]4[/COLOR][/COLOR]
This will fix the white text on white background problem in manage aplications tab items.
type 1 :
type 2 :
for type 1 merge the contents of type1.zip to your settings.apk
for type 2 merge the contents of type2.zip to your settings.apk
Finally Recompile your settings and flash it .
enjoy
nice work
Extended theming to your settings
In this guide I will show you how to change ram usage bar color and pager tabs color to your favourite color
1. for changing ram usage bar color
Decompile your settings.apk and Navigate to
Code:
\Settings.apk\smali\com\android\settings\applications\[COLOR="blue"][COLOR="blue"]LinearColorBar.smali[/COLOR][/COLOR]
now search for
HTML:
-0xff6634
replace --0xff6634 with your favourite color
To find smali equivalent of the color
download hex_to_smali_convertor.zip from attachment and open acc.hta type your favourite hex code and replace its smali equivalent thats it
like this :-
i.e In the above example replace -0xff6634 with -0xCC4A1B
2 .For changing the pager tab color
open settings.apk/res/values/colors.xml and add this at the end
Code:
[B]<color name="carbon_accent_dark">#[COLOR="Red"]ff9d4f93[/COLOR]</color>[/B]
replace ff9d4f93 with your favourite hex code( you can find easily hex equivalent in paint.net/photoshop )
recompile the settings
now again decompile the new settings.apk and navigate to
\Settings\smali\com\android\settings\applications\ManageApplications.smali
find
0x1060012
also open settings.apk/res/values/public.xml and find
Code:
<public type="color" name="carbon_accent_dark" id="[COLOR="red"]0x7f0a001a[/COLOR]" />
here replace 0x1060012 with 0x7f0a001a
thats it recompile everything and sign it and flash
Note :- the id 0x7f0a001a will be different for your rom
nice job
hi Sir
can u share na blur background? tnx sir
Hi pavan kr, I did follow your guide and try to modify my ROM as you said, but after I decompile your framework-res.apk successfully, I found there is no exist of framework-res.apk/res/values dircetory at all. My ROMis CM11 for HTC one X. I also check the other AOSP ROM, and again there is no framework-res.apk/res/values dircetory as well. How can that happen ? Thanks for advise.
I dont have the 0x1060012 in ManageApplications.smali
the_vanya1 said:
I dont have the 0x1060012 in ManageApplications.smali
Click to expand...
Click to collapse
If 0x1060012 is not present then search only for 0x10600 .
Always this must be a resource id linked with framework-res
chihliouma said:
Hi pavan kr, I did follow your guide and try to modify my ROM as you said, but after I decompile your framework-res.apk successfully, I found there is no exist of framework-res.apk/res/values dircetory at all. My ROMis CM11 for HTC one X. I also check the other AOSP ROM, and again there is no framework-res.apk/res/values dircetory as well. How can that happen ? Thanks for advise.
Click to expand...
Click to collapse
AFAIK once you decompile the apk there exist values folder if you have installed proper framework-res.apk ...
Use newer version of apktool 2.0+ and try..
Another metod
Settings\smali\com\android\settings\applications\ManageApplications.smali search
.local v4, tabs:Landroid/support/v4/view/PagerTabStrip;
- const v5, 0x1060012
and replace 0x1060012
pavan kr said:
AFAIK once you decompile the apk there exist values folder if you have installed proper framework-res.apk ...
Use newer version of apktool 2.0+ and try..
Click to expand...
Click to collapse
Thanks for the answer. I guess you are right that the software I use previously is not really decomiple the file. But after I have tried to build up the whole environment with JAVA JDK, and apktool from the ground, and start the decompile process, it jumps to me some error such as below :
"Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:........"
I tried to google but still not sure what's the issue there, can you advise me any website that I can learn to start the process correctly ? Thanks.
PS. atatched please find the framework-res.apk that Iried to decompile but fail. I hope the issue is not in the file itself.
PS2. I just tried to decompile some other apk file than this framework-res.apk, and it does decompile successfuly. Does that mean some native issue existing inside the framework-res.apk ???
chihliouma said:
Thanks for the answer. I guess you are right that the software I use previously is not really decomiple the file. But after I have tried to build up the whole environment with JAVA JDK, and apktool from the ground, and start the decompile process, it jumps to me some error such as below :
"Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:........"
I tried to google but still not sure what's the issue there, can you advise me any website that I can learn to start the process correctly ? Thanks.
PS. atatched please find the framework-res.apk that Iried to decompile but fail. I hope the issue is not in the file itself.
PS2. I just tried to decompile some other apk file than this framework-res.apk, and it does decompile successfuly. Does that mean some native issue existing inside the framework-res.apk ???
Click to expand...
Click to collapse
have a look at these guides it will help you
1 . http://forum.xda-developers.com/showthread.php?p=41491514
2. http://forum.xda-developers.com/showthread.php?t=1989533
pavan kr said:
have a look at these guides it will help you
1 . http://forum.xda-developers.com/showthread.php?p=41491514
2. http://forum.xda-developers.com/showthread.php?t=1989533
Click to expand...
Click to collapse
Thanks for the reply.In fact, I did google and tried some similar guide websites and I almost can confirm that my enrionement setup and apktool installation is good to go because it seems decompile other apks are quite ok, but only problem is to decoplie the attached framework-res.apk. If you have time, I am wondering if you can help to try to decompile in your current enerionment system to see if my assumption is correct. Thanks.
works on JB? 4.1.2 qualcomm
Nice job,,,thanks
when i try to recompile its show those error. see here http://forum.xda-developers.com/showthread.php?t=2964076
This tutorial does not work on my device. can anyone have a tutorial like this for Lenovo a328 (6582 MTK device with KK 4.4.2)
pavan kr said:
Hey Guys I am back with my new guide
Here i'll show you How to theme your settings.apk to look like xperia .As you all know sony uses colorizable function for changing the themes
But AOSP framework Doesn't support colorizable function so i've modified the files from xperia rom to make it work on AOSP roms
Topics Covered :-
Requirements:-
Decompile your framework-res.apk
download the resources from attachment and merege it with yours
navigate to framework-res.apk/res/values and open styles.xml
find
Code:
<style name="Widget.Holo.CompoundButton.Switch" parent="@style/Widget.Holo.CompoundButton">
OR
Code:
<style name="Widget.Holo.CompoundButton.Switch"
replace the style with this
Code:
<style name="Widget.Holo.CompoundButton.Switch" parent="@style/Widget.Holo.CompoundButton">
<item name="textOn">@string/somc_btn_on</item>
<item name="textOff">@string/somc_btn_off</item>
<item name="thumb">@drawable/semc_switch_inner_holo_dark</item>
<item name="switchTextAppearance">@style/TextAppearance.DeviceDefault.Widget.Switch</item>
<item name="track">@drawable/semc_switch_track_holo_dark</item>
<item name="switchMinWidth">72.0dip</item>
<item name="switchPadding">4.0dip</item>
<item name="thumbTextPadding">@dimen/somc_switch_text_padding</item>
</style>
like this :
and add this at the end of styles.xml before </resources>
Code:
<style name="TextAppearance.DeviceDefault.Widget.Switch" parent="@style/TextAppearance.DeviceDefault.Small">
<item name="textSize">10.0dip</item>
<item name="typeface">sans</item>
<item name="textStyle">bold</item>
<item name="textColor">@color/semc_switch_text_color</item>
</style>
like this :
now open /res/values/strings.xml and add the specified lines at the end
if you don't want on/off text on the switch add these
like this :
Code:
<string name="somc_btn_on">I</string>
<string name="somc_btn_off">?</string>
or
if you want on/off text on the switch add these
like this :
Code:
<string name="somc_btn_on">ON</string>
<string name="somc_btn_off">OFF</string>
open /res/values/dimens.xml and add this at the end
Code:
<dimen name="somc_switch_text_padding">7.0dip</dimen>
thats it now recompile your framework-res
EXTENDED THEMING TO YOUR SETTINGS ON POST #5
Enjoy
IF YOU LIKE MY WORK DON'T FORGET TO HIT THANKS BUTTON
Click to expand...
Click to collapse
Thank's bro.... This really helped me.:good:
Mate, if i dont ask much, can you please add a guide to make the settings ui like lollipop, white with green icons? Is that possible? I'm on MTK platform.
Hello to everyone.
Material Recent for Gingerbread
Made by zhaozihanzzh(ME Failed Coder), Open source
Created 2018-07-24
Last updated 2018-08-10
Note: If your native language is Chinese, you can go to this thread.
Hello guys. I have been making this material recent for a while. The project is based on @tentenponce 's SwipeRecentApps and ZieIony's library MaterialRecents. And I used m0r0's code to fix some bugs. I am a noob, but after many days' work I finally managed to get the performance improved and be able to convert it into framework. I made a short video for this: https://mega.nz/#!JJUVyYpL!cHySc82VtXUZpKVJGdVSHq6bLzQ0VE6q4Do3AcXTXIo
Features:
- Show the latest 7 recent apps
- Click to launch the application, swipe the card to try ending a process and long press the card to open application settings
- Click the clear button to launch an activity which is used to end processes
To start with, you need:
- Decompile / Recompile experience
- A rooted Android 2.3 with a process management app (the same as SwipeRecentApps)
- To be able to run Apktool 1.5.2
Before doing this, make sure you have a backup and are able to unbrick your phone.
Attachments: https://mega.nz/#!FdlyGYyQ!qP6-BUWGeVhWMbnBaLO3A839hhyE69qGbiWKJREbYas
Steps:
1. Decompile framework-res.apk and unzip the res folder to your decompiled files. (If your phone is not MDPI, you can manually resize the clear icon and put it under the proper drawable-??dpi folder.)
2. Open res/values/ids.xml and add the following lines before :
Code:
<item type="id" name="materialrecents_recentContent">false</item>
<item type="id" name="materialrecents_recentTitle">false</item>
<item type="id" name="materialrecents_recentIcon">false</item>
<item type="id" name="mainlayout">false</item>
<item type="id" name="materialrecents_recentHeader">false</item>
<item type="id" name="taskman">false</item>
<item type="id" name="noapps">false</item>
<item type="id" name="recent_frame">false</item>
Note: if you have done tenten's SwipeRecentApps you will find some ids already exist and you shouldn't add them.
Then, open res/values/strings.xml and add the following line before :
Code:
<string name="kill_app">The process has already been tried to end.</string>
3.Recompile framework-res and decompile the generated apk file and open the decompiled res/values/public.xml.(You can sign the generated framework-res apk properly and then let the apk wait for a while) Search for the item name below and write down their names and values:
Left: type Right: name
"color" transparent (I think this ID is same in all android devices, so maybe we can ignore it)
"layout" recent_apps_dialog
"id" taskman
"id" noapps
"id" mainlayout
"string" no_recent_tasks
"id" recent_frame
"string" kill_app
"layout" material_recents_card
"id" materialrecents_recentTitle
"id" materialrecents_recentIcon
"id" materialrecents_recentHeader
"id" materialrecents_recentContent
4. You need to have NineOldAndroids in your framework jars. Maybe some other guides you have done already add these library smalis to your framework.jar or android.policy.jar, such as the "nineoldandroids" in Ripple Effects on Button or "tentwentyoldandroids" in SwipeRecentApps. Therefore, if you already have this library, then you don't need to add my smali/com/noas folder and you should use a uniform path and name.(For example, if your path is com/nineoldandroids, then you should replace all the "com/noas" in all the smali files in smali/com/android/ and smali/tk/ with "nineoldandroids". By the way, in order to prevent Apps from loading the system NineOldAndroids instead of loading it from their own dex, I suggest not using "com/nineoldandroids".) If your ROM doesn't have nineoldandroids, or you don't understand what I am saying, then decompile android.policy.jar and merge the smali/com/noas folder.
5.Decompile android.policy.jar (If you have decompiled this in the 4th step, you don't need to decompile it again) and backup all the smali files related to recentapps and delete them. Then merge smali/com/android folder and smali/tk folder to your smali. After that, open smali/com/android/internal/policy/impl/RecentApplicationsDialog.smali and replace all the id numbers (commented with "#") with your own numbers which you have written down before. Notice that you should remove the first "0" after "0x", for example, if your id is 0x01080388, you are supposed to add "0x1080388" to your smali file. Do the same operation to smali/tk/zielony/merecents/RecentsList.smali.
6. Open smali/com/android/internal/policy/impl/RecentApplicationsDialog$100000001.smal and replace "com.sec.android.app.controlpanel" with the package name of your task management app, and replace "com.sec.android.app.controlpanel.activity.JobManagerActivity" with the task management activity of your application.
7. Recompile android.policy.jar and sign correctly. Push the modified android.policy.jar and framework-res.apk into system.
Source code: https://github.com/MeCreationTeam/ME_MaterialRecent.
If you want to compile it from source and decompile it into system by yourself, make sure the code
Code:
window.setType(WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG);
in onCreate method in RecentApplicationsDialog.java uncommented. I commented this line only for directly build apk and testing. And the class path in source code is different from my smali.
Note: If you face problem when using horizontal screen, try to change the value of paddingLeft and paddingRight in the RelativeLayout in res/layout-land/recent_apps_dialog.xml according to your screen.
In fact, I don't have much time, so I am sorry that if you have some questions, probably I cannot help you.
Credits:
- tenten
- ZieIony
- m0r0
And thanks to NineOldAndroids.
This project is born with the help of open source project, and hope this project can continue to help others.
Reserved.
Sent from my HUAWEI CHM-TL00H using XDA Labs
Hope this thread can help you.
Sent from my HUAWEI CHM-TL00H using XDA Labs
Good job
Do you still want to swipe to kill process? I managed to get swipe work in this recent dialog(I wrote the code myself so maybe some bugs). Check the updated OP to get the new feature.
Sent from my HUAWEI CHM-TL00H using XDA Labs
NB