Advanced Theming


Last Updated:

  1. savoxis

    savoxis Well-Known Member Developer This Topic's Starter

    Joined:
    Aug 10, 2010
    Messages:
    812
    Likes Received:
    708
    So it is not that hard to make "image replacement" themes by going in a altering the PNG files packaged within APKs and constructing a MetaMorph package. Tried true, and it ends up being pretty hard to make a theme that wont apply doing it this way.

    But lets get into advanced techniques. MetaMorph theme packages consist of only a few different file types, PNG, XML, CSS, and JS files can all be pushed into an APK using MetaMorph. There is only one drawback - the xml,css and js files located inside the APKs are compiled, and editing them as they stand is impossible, all you get is a whole lot of gibberish when trying to edit. So after some research I came across the APK TOOL. This tool is incredible because it allows you to take a compiled APK file, and decompile it so files such as the XML, CSS, and JS files can be modified!

    Code (Text):
    1.  
    2. apktool d <file.apk> <directory to output to>
    3.  
    If you run this command you will end up with a directory filled with all the source for the APK. Inside you will find a res folder, containing all the "resources" the program uses, this is where you will find all the files needed for making a theme. Most of the files you will want to edit to change things such as text color, size, font will be located in XML files in the drawable, and layout directories.

    After you are done performing awesomeness simply recompile the APK using a command like this

    Code (Text):
    1.  
    2. apktool b <directory of decoded apk>
    3.  
    Now if you look inside <directory of decoded apk> you will find a folder called DIST, you will find the same file structure in this folder that you did in your decompiled folder, however all the files have been compiled!

    Now you can take the files you modified, and move them into your MetaMorph package making sure to retain filenames/structure.

    I literally just started playing around with Advanced Themes last night and I am very exited about what we should be able to create with this knowledge. My goal last night was to change the text for some of the notifications that are by default black. So far I have not been able to find the correct XML file to edit to make this possible but I know I am headed in the right direction. If anyone has any ideas as to making this process easier, or has an easier way to find out which XML files contain what information (because there are allot of XML files that control a wide variety of things within each APK) please let me know.

    So far I have had success at changing colors of fonts, as it seems to be pretty easy to spot the hexadecimal color codes used by most APPS.

    How-To Manual: Creating Android Themes
    SDX How to Modify an APK file
    XDA Re Engineering APK Files
    APK TOOL 1.2 Download
     

    Advertisement
    lostlaker24 likes this.
  2. savoxis

    savoxis Well-Known Member Developer This Topic's Starter

    Joined:
    Aug 10, 2010
    Messages:
    812
    Likes Received:
    708
    If I read correctly you DO NOT need to resign apks when using metamorph to push PNG and XML files!

    I have been testing thoroughly and I don't think MM breaks signature.
     
  3. savoxis

    savoxis Well-Known Member Developer This Topic's Starter

    Joined:
    Aug 10, 2010
    Messages:
    812
    Likes Received:
    708
  4. savoxis

    savoxis Well-Known Member Developer This Topic's Starter

    Joined:
    Aug 10, 2010
    Messages:
    812
    Likes Received:
    708
  5. treyjones424

    treyjones424 Well-Known Member

    Joined:
    Aug 22, 2010
    Messages:
    102
    Likes Received:
    21
    thanks. this was very helpful.
     

Share This Page

Loading...