[GUIDE][THEMING]How to theme any Android App

Search This thread

Raiz

Forum Moderator / XDA Welcome Team
Staff member
здравствуйте, прошу прощения если ошибся веткой, у меня открытие сайта происходит с ошибкой наверное проблема в браузере не пойму в чем проблема, у меня у одного так или у всех?
Hi there, could you please translate that in English for me, I tried to put the text in Google translate but the translation makes no sense.
Have a good day ?
 

ForestCat

Senior Member
Nov 29, 2012
104
27
Raiz,
The general question: Do you know of a reference/guide which explains the layout of the xml files which define ui objects, in particular, which image files are used?

The specific question: Samsung, in their infinite (NOT) wisdom, has decided that the .png standard is good enough for the rest of the android world, but not them. Enter .qmg, .pio, .spr, and, my favorite, an encrypted(?) version of .bmp.
So, the 'browse & replace' method in your OP re: changing icons/images within an app's res folder doesn't work.
Now, I am familiar w/ qmg2png and the like, but there are problems with this. Without listing them all, one of the big issues is that some images convert to blank white pictures, some images won't convert at all(.bmp), etc.

Specific Case:
Samsung Note 4
Stock rooted 6.0.1 Marshmallow
Trying to change the stock dialer keypad buttons.
Through long trial & error, was able to find & modify the InCallUI_M_OS_UP_Legacy.apk keypad buttons, put pushing the mod'd apk to the phone & reinstalling it via Root Explorer did not change the phone's dialer keypad. After 2 full ( and I mean full) days of decompiling apk's, copying res folders back to the phone to (try) to extract png's(the qmg decoders only work on the phone), copying thousands of png's back to the pc to browse for anything recognizable, etc., no joy.
I have searched the web/forum for all permutations of theme, skin, dialer, touchwiz, galaxy, stock, marshmallow, dialpad, SecContacts_M_OSup_Note_Legacy_USA.apk, etc, etc, etc. Just not finding anything anywhere which points me toward a way to modify the stock dialer appearance (other than background color) on a 6.0.1 (or even 5.1.1) touchwiz ROM. I hate to beg for help, but I'm out of ideas.
Thanks so much.
 
Last edited:

Raiz

Forum Moderator / XDA Welcome Team
Staff member
Raiz,
The general question: Do you know of a reference/guide
...
anything anywhere which points me toward a way to modify the stock dialer appearance (other than background color) on a 6.0.1 (or even 5.1.1) touchwiz ROM. I hate to beg for help, but I'm out of ideas.
Thanks so much.
Hi , I'm gonna take a deep look into this, so it may take time, I'll edit this post when the answer is written and will mention you to notify you when it's ready :cowboy:
 

ForestCat

Senior Member
Nov 29, 2012
104
27
Hi , I'm gonna take a deep look into this, so it may take time, I'll edit this post when the answer is written and will mention you to notify you when it's ready :cowboy:

Thanks, man, I really appreciate it. I've been hammering away at it, but no luck yet. I suspect it may involve smali, etc, which I haven't got my head around yet. Was hoping there might be a way to add glass buttons(yeah, I'm dated) to the dialer keypad just using xml/png, but it's not looking promising...
 

Raiz

Forum Moderator / XDA Welcome Team
Staff member
Thanks, man, I really appreciate it. I've been hammering away at it, but no luck yet. I suspect it may involve smali, etc, which I haven't got my head around yet. Was hoping there might be a way to add glass buttons(yeah, I'm dated) to the dialer keypad just using xml/png, but it's not looking promising...

So, First of all sorry for making you wait, I got busy lately, but I had the opportunity to look into your question ;)

For your general question, here is a thread I made after this one, that adds a more deeply-thought approche to what I've done here, plus I linked some other thread from really good themers (like ticklefish) that teached me a lot of things , here you go:
[GUIDE][THEMING]How to find in the code what you want to theme by Me (lol)
and
[Newbies][Documenation]What's an apk and how does it work by Me (again)

In those you'll find links to xda thread, google documentation that I strongly recommend you to read, it helped me a lot. I know that those are "long reads" but to me it's worth it.

For you specific question, I'm sorry to tell you that it's a problem for me to, and so far I had no luck with that. I used to have a samsung back in the days, but each time I tried something I just gave up because of that. When you asked me that, I retried with no success. So on this one I won't be able to tell you, sorry for that, I know how much of a drag it can be to be stucked like that, hope you'll have some luck with that.

Have a great day :highfive:
 
  • Like
Reactions: GAURAV THAKKAR

ForestCat

Senior Member
Nov 29, 2012
104
27
For you specific question, I'm sorry to tell you that it's a problem for me to, and so far I had no luck with that. I used to have a samsung back in the days, but each time I tried something I just gave up because of that. When you asked me that, I retried with no success. So on this one I won't be able to tell you, sorry for that, I know how much of a drag it can be to be stucked like that, hope you'll have some luck with that.
Have a great day :highfive:

Thanx for looking into it, I really do appreciate it. Yeah, it's bad news, but I feel a little better that it's not just my lack of skillz. I do love the Note 4, but I'm starting to despise Samsung for their anti-consumer tactics. Then again, why would they be different from Apple, Google, MS, et al.

I do mostly like the feel/function/features of the MM touchwiz stuff, I just don't like some of their icons, color choices, etc. I haven't found a third party replacement I like as much, unfortunately.

I do hope somebody will find a solution for this. I think it would open a few doors for Samsung owners.
 

CgMonkey

New member
Aug 12, 2020
1
0
Paris
Help

Hello,

I need your help regarding the Nextbit Robin. Mine don't boot at all the bootload is locked and the USB debug is off. And I don't know if the device charging when it plugged.
All this happened during the last installation of Lineage (Don't remember the version) under Windows 10, I usually use Win 7 to perform this operation.

Can I have your advise about my issue ?


Thank you !
 

Autissima

Member
Nov 24, 2020
7
0
Hello, I recently tried to crack open an apk (with permission from the owner ofc) and change some colour values, just as you said here.
I originally thought I only have to change some value for a colour and everything should be alright, but when I then open the app, either absolutely nothing will have changed, or the app closes itself...
Do I have to modify the android_manifest or some other values as well?

I know this thread is pretty old, but I am desperate for some help by now.
 

Raiz

Forum Moderator / XDA Welcome Team
Staff member
Hello, I recently tried to crack open an apk (with permission from the owner ofc) and change some colour values, just as you said here.
I originally thought I only have to change some value for a colour and everything should be alright, but when I then open the app, either absolutely nothing will have changed, or the app closes itself...
Do I have to modify the android_manifest or some other values as well?

I know this thread is pretty old, but I am desperate for some help by now.
I know it's old, but I'm still there don't worry lol.
It looks like a signature problem at first glance. Did you use when recompiling the "-c" to keep the signature unchanged ?
Also, sometimes it's that we forget to save the xml file before recompiling, so double check that.
More questions : did the recompiling process what successful with apktool? Did you use apktool? What's the name of the apk ?

For now I don't have much time to investigate but make sure to remind me of that story after the 11/12. From that date (if we still haven't figured out what's the matter) I'll be able to further investigate on my side, if you're willing of course to provide an apk and more details on the modifications you wanna bring.

But for now let's try to figure it out with questions & answers
 

Autissima

Member
Nov 24, 2020
7
0
I know it's old, but I'm still there don't worry lol.
It looks like a signature problem at first glance. Did you use when recompiling the "-c" to keep the signature unchanged ?
Also, sometimes it's that we forget to save the xml file before recompiling, so double check that.
More questions : did the recompiling process what successful with apktool? Did you use apktool? What's the name of the apk ?

For now I don't have much time to investigate but make sure to remind me of that story after the 11/12. From that date (if we still haven't figured out what's the matter) I'll be able to further investigate on my side, if you're willing of course to provide an apk and more details on the modifications you wanna bring.

But for now let's try to figure it out with questions & answers

Hmm I didn't use -c every time, but I can try it again with that. I definitely saved the XML, at least once, I tried this for a few days now.
The recompile process doesn't fail, and as I said sometimes the app will even start, but it'll close itself again, after showing the normal splash screen.
It's a game made in Kotlin "Antimatter Dimensions" and I just want to change some colours around.
 

Autissima

Member
Nov 24, 2020
7
0
I admittedly originally used a slightly different process from yours, signing and aligning the apk on my PC, but I tried to stay close to your guide this time but still no dice :C

It just crashes, or has no effect, so is this still applicable for newer android versions?

Additionally, there is the "values-night" folder, which has the colours that according to the developer are actually the colours in the app, I guess I should change those too then?

Also, in some other guides about de- and recompiling apks, they said to transfer the META-INF and some other files?

Edit:
P.S.
I just noticed that this might be a problem, it's a Kotlin app, so that might muck it up?
 
Last edited:

Raiz

Forum Moderator / XDA Welcome Team
Staff member
I admittedly originally used a slightly different process from yours, signing and aligning the apk on my PC, but I tried to stay close to your guide this time but still no dice :C

It just crashes, or has no effect, so is this still applicable for newer android versions?

Additionally, there is the "values-night" folder, which has the colours that according to the developer are actually the colours in the app, I guess I should change those too then?

Also, in some other guides about de- and recompiling apks, they said to transfer the META-INF and some other files?

Edit:
P.S.
I just noticed that this might be a problem, it's a Kotlin app, so that might muck it up?
Also, in some other guides about de- and recompiling apks, they said to transfer the META-INF and some other files?
That's the same as doing -c in apktool, this command will soon be deprecated tho. It keeps the signature unchanged. If you want to mod a system app then you need to keep the signature unchanged (using the -c). Else for the signature process I made a new bigger and deeper thread about how to sign apks, and much more.
Here it is

Additionally, there is the "values-night" folder, which has the colours that according to the developer are actually the colours in the app, I guess I should change those too then?
Yup change them if he said that.

It just crashes, or has no effect, so is this still applicable for newer android versions?
Apparently yes, but what app are you trying to mod ? (Name + if it's a system app or regular app)

P.S.
I just noticed that this might be a problem, it's a Kotlin app, so that might muck it up?
As long as there is xml to modify, I don't think kotline is a problem.
 

Autissima

Member
Nov 24, 2020
7
0
Antimatter Dimensions, an incremental game, not a system app.

Edit:
I played around a bit with the apk, and not changing anything in it, but just de- and recompiling it doesn't work either, unless I tell apktool to not decompile resource files, which makes the entire ordeal of, well, changing resource files, a bit harder

Edit 2:
Ok, I opened an issue on apktools, and apparently it wrongly decompiled the "<" in plurals.xml's
So uh, yay, it works now, thank you so much.
 
Last edited:

nihitthakkar

Member
Jan 25, 2021
35
5
USA
There are some launchers with themes, you have to just install the launcher on your android device to apply the theme.
 

nihitthakkar

Member
Jan 25, 2021
35
5
USA
To create a theme, follow these steps:
1. Go to the Theme menu near the top of the right side of the Theme Editor.
2. Click Create New Theme.
3. In the New Theme dialog, enter a name for the new theme.
4. In the Parent theme name list, click on the parent from which the theme inherits initial resources.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    I make (another) guide on how to theme, but it’s based on my experience. If moderators think this thread redundant , they are free to delete or close it.
    This tutorial is for « every » operating system. In this tutorial I will change the color of some object of the XDA Labs app . There will be 2 part for this guide, the first is the general method and the second one is the description of what I’ve done on the XDA Labs app to theme it. Please , before asking , read the entire OP , maybe your answer is into it.

    I’m running Ubuntu 16.04 LTS but the softwares are also compatible with windows and mac.
    Which software I use :
    Inkscape (to make icons)
    Alpha Colour for Android (to see which aplha code correspond to which level of opacity)
    Pipette for Android (to identify colors on the app’s screenshot) No longer available , use this app, it's even more accurate
    ZipSigner for Android(to sign apk)
    No longer available, for signing please refer to this tool

    I-General Method :


    1-First you need to set-up your PC’s environment:
    • A 64-bit PC Processor ( 32-bit has too many bugs linked to aapt compatibility)
    Apktool or other reverse engineering tools properly installed
    • Java 7 or above
    Notepad++ or any text editor



    2-What you should know before theming:
    A)Colors:
    Modifying colors is quite simple a process, but you should first understand it.Then you can change the app as your mind tells you to.
    1-A regular line in this file is built like this :
    -<color name="[object’s id]">#[alpha channel][hex code]</color>
    2-Meaning :
    - Alpha channel : This is the 2 characters that change the opacity of the color
    - Hex Code : This is the 6 characters that define the color itself
    3-For example :
    <color name="design_fab_stroke_end_outer_color">#0f000000</color>
    - «design_fab_stroke_end_outer_color» is the id of the object I want to change the color from
    - «0f» is the alpha channel of the initial color
    - «000000» is the hex code of the initial color
    4-To modify them :
    Replace the hex code of the initial colors by the hex code of the color you want to add , be careful not to delete a piece of the line with the old hex code because it will cause errors on apktool. I use alpha colour app for Android to see levels of opacity and to find color’s hex code.


    B)Pictures :
    You want to change pictures inside the app , that’s simple :
    • Search for the picture you want to change in the drawable folder or mipmap folder
    • Folders you want to browse to find the pictures :drawable-xhdpi-v4 / xxhdpi-v4 / xxxhdpi-v4 for the « in-app » pictures , every mipmap folders for icons (sometimes icons are in drawable folders and there aren’t any mipmap folders).
    • When you prepare the pictures , make sure they have the SAME SIZE as the original pictures.
    • Rename the picture you have prepared to replace old ones with the SAME NAME AS THE OLDER PICTURES.
    • Once you have renamed those pictures, put them into the folder where you found them.


    C) App name :
    • go to /res/values and open string.xml
    • Modify this string : <string name="app_name">[The name you want]</string>
    Example :<string name="app_name">XDA Evolved</string>



    3-Now , we can start theming :
    • Go to the apktool’s directory , and open a command prompt there (keep it open till the end)
    • Enter this command :
    Code:
    java -jar apktool.jar d [the apk name.apk]
    • There should be a new folder which has the name of your apk file. Open this folder.
    • Then go to /res/values and open the colors.xml file
    • Modify the colors
    • Search for the pictures you want to change and change them as I have written above
    • Open the terminal you kept open
    • Enter this command :
    Code:
    java -jar apktool.jar b [the apk name.apk]

    4-Before installing , signing :
    I use an Android app called zip signer , with which I can sign apks from my phone.
    • Open the app , click on input and browse for the apk you’ve put on your phone
    • Click on the file when you’ve found it
    • Click on Output and select the same apk file as in the first step
    • Rename the path adding a « -signed » just before « .apk » at the end of the path.
    • Select on the « key/mode » menu « platform »
    • Finally , click on « sign the file » and wait till the end of the progress bar.


    II-What I’ve done


    1-Identifying :
    Here is the list of the infos I’ve written down :
    • Image Size
    • The Hex code of the color I want to change :
    - Take a screenshot of the color(s) you want to modify
    - Open the screenshot on Pipette
    - Tap on the lock button and click on the color , the hex code will be displayed at the bottom
    • The Hex code of the color I want to add : Same process with Pipette
    • The colors I want to add :
    -Blue :3174f1
    -Yellow :fbb002
    -Background :47595c
    -Background of the posts :2d2d2d
    -the secondary color :c0c0c0
    • The colors I want to change:
    -Background color :212121
    -Accent color :edb02d
    -Primary color :353535
    -The secondary color :#aaffffff

    2-Editing and making new icon, etc.:
    • I used Inkscape (free alternative to illustrator) because there were vector-designed icons.
    • I used gimp to resize the picture after making them.


    3-Decompiling the apk file :
    • I typed in the terminal :
    Code:
     java -jar apktool.jar d XDALabs.apk

    4-Replacing icons and other images :
    • I put the pictures in the 3 drawable folders because it’s where I found them


    5-Editing colors and the name :
    • I went to /res/values and I opened colors.xml file and I replaced colors and some alpha channel :
    Code:
    <color name="accent">#ffedb02d</color>
    <color name="accent_translucent">#ddedb02d</color>
    <color name="background_dark">#ff212121</color>
    <color name="dialog_bg_dark">#ff212121</color>
    <color name="primary">#ff353535</color>
    <color name="primary_bg">#ff353535</color>
    <color name="primary_dark">#ff2b2b2b</color>
    <color name="search_divider_dark">#ff212121</color>
    <color name="search_list_results_bg_dark">#ff212121</color>
    <color name="secondary_text">#ff727272</color>

    to

    Code:
    <color name="accent">#fffbb002</color>
    <color name="accent_translucent">#ddfbb002</color>
    <color name="background_dark">#ff47595c</color>
    <color name="dialog_bg_dark">#ff2d2d2d</color>
    <color name="primary">#ff3174f1</color>
    <color name="primary_bg">#ff2d2d2d</color>
    <color name="primary_dark">#ff3174f1</color>
    <color name="search_divider_dark">#ff2d2d2d</color>
    <color name="search_list_results_bg_dark">#ff2d2d2d</color>
    <color name="secondary_text">#ffc0c0c0</color>

    • I opened strings.xml file and I replaced the app name line :

    Code:
    <string name="app_name">XDA Labs</string>

    to

    Code:
    <string name="app_name">XDA Evolved</string>

    6-Recompiling the new apk file :
    • I opened the same command prompt and I typed this command :
    Code:
     java -jar apktool.jar b XDALabs

    7-Signing the apk after install it :
    • The same process as in the step 4 in the part one of my guide (I - 4).


    8-Install the Apk :
    • Uninstall the original app
    • Install the signed version of the apk.


    You can ask me on this thread about everything about the theming and I'll do my best to solve your problems, but do it in the respect and following the Forum Rules
    You can go to themed XDA Labs version's thread clicking here.
    And please , if you found this guide useful , press the thank button.
    3
    nandakumar12 via PM said:
    dude one doubt, how can i change the background color of an app, i cant find a code to change..??

    First you should have installed the app and identified the hex code of the background color (E.G :#36ge87)
    You can do it via Pipette , an app which identify hex code in a picture. Just take a screenshot and identify the colors via Pipette .

    Then you will have to search for the hex code of the background color you identified with Pipette previously.
    This step is on your PC , you opened the color.xml file in notepad++ or whatever it is , and you wrote the hex code of the background color in the search bar. Make the search and find all the lines that have the hex code in it.

    If you found multiple line , try to modify one of the lines , compile the APK , sign it and install it on your phone to see if something changed. Do that until you find the line holding the background color.
    Theming , at the beginning is pretty long on require patience and many test before finding which line is the good one .

    I hope my answer will help you .

    Happy theming !!???
    2
    Thank you for posting this. I always wanted to customize an android app, but have never had much success.
    Glad to hear that , thanks!
    If you think this thread helped you , please press the thank button , I'm happy to see that my work is appreciated , Happy Theming !
    2
    Don't worry , that's a random spam , that's why I ignored it.
    And I don't think he'll respond .

    Since you've replied please check the Signing Apk Guide..
    You've mentioned a thread dated 4 sep
    Can you please link me to it?
    1
    Hello friends of the forum xda developers Instead, this forum is a newbie Needed to take a doubts:

    I have a mobile model with windows 10 installed that is stopped in the drawer without use

    He has put windows phone 10

    I would like to change it on an Iphone with COMPATIVEL System OR ate pie android EVEN Instalar 9,0

    I wonder if this is possible and what procedures to take I assume of all the risks ok

    Other question:

    I have a moto g5 plus and the Manufacturer Promised me an Update for the oreo 8.1.0 but until the moment nothing arrived and the artist said that it has already been released but up to the moment without conditions of receipt

    There is a rumor that will be released only in September

    Someone confirms this information

    I await any response

    Marcelo - DJ KUKA


    Don't know what you want to ask
    Please be clear
    All I can infer is that this doubt doesn't belong here look over the ROMs sections
    Thanks!