OTA Mods and Theming
BEGINNERS GUIDE TO OTA MODS AND THEMING
This guide is about what does what / how to go about theming your phone and was written by Goldie. You`ll find more details about decompiling apks or how to use ADB here.
It focuses on an overview of what mods contain and setting up the necessary files for theming via OTA.
THINGS THAT COME IN HANDY WHEN MODDING
- APK Manager
- Java JDK
- Android SDK
- ADB Magic (optional but very useful)
- Photoshop/GIMP/Paintshop or other image editing software
- Notepad ++
- Araxis Merge or similar file comparison tool
WHAT DOES WHAT
We are not going to look at modifying apks or jars here but I thought a brief outline would help people understand what is in different mods and why some of them overwrite things like battery, images etc.
BATTERY PERCENTAGE mod CONTAINS:
framework-res.apk (images and control xmls for battery)
POWERMENU mod CONTAINS:
framework_res.apk (images, strings and id`s for the power menu), framework.jar (does the shutdown parts of the menu), android.policy.jar (does most of the work of the mod)
ANYTHING WITH CRT On/Off:
contains framework-res.apk (needed for config slow blur), services.jar (does the work)
framework-res.apk (contains the images, layouts, strings etc. for the locks) framework.jar (does some of the lockscreen work), android.policy.jar (does most of the lockscreen work)
SystemUI.apk (contains the images, layouts and controls of the toggles)
ANYTHING with MIUI bar:
SystemUI.apk (contains MIUI bar), batterysettings.apk (controls the color etc.)
Understanding this explains why you lose theming you did from OTA when you install a mod. (example: if you install battery percentage mod and then theme with OTA and afterwards the lockmod you will lose your themed battery. This happens because both zips contain a framework-res.apk which holds the images. The latter overwrites the first.
So lets start your own theme, first things first...
Download one of the themes from the OTA app. I would recommend Goldielicious Red for S1 and JussiRM`s DeadlyViolet for S2 as these contain ALL the images needed for lockmods and toggle mods. This way you know your not going to be missing images which would make your theme look wrong. Once downloaded, copy the theme.zip from sdcard to your PC and extract the zip with 7zip.
When you extract the zip you will see a list of folders. These folders have names which are exactly the same as apk (app) files in system/framework and system/app. DO NOT CHANGE THESE NAMES!
Inside the folders you will find a folder named ˝res˝ and inside some other folders named ˝drawable-hdpi˝etc. The majority of images are in drawable-hdpi but there are some in the others so check all folders.
If you need to add other system apps to your theme later than make sure the name of the folder you create is identical (including capital letters) to the name of the apk in system/app.
We will look at generic folders which should be in all themes first... so here they are...
This contains most of the non- app and non-dropdown images that you see on your phone. Things like battery, lockscreen, powermenu, overscroll glow, checkboxes etc.
You will probably be surprised at just how many images there are in here.
Now, before we continue, a quick note about some some of these images...
As not all windows, text boxes, menus etc. are the same size, Android need to be able to stretch some of them to fit the space they need to be in. Any images that need to be stretched have a .9 before .png extension of their name.
These images can have their hue and brightness changed but should not have any other changes made unless:
- you decompile an apk first with apk manager
- you are willing to repatch the image afterwards with something like draw9patch
For now, you can just hue the existing images to fit with your theme.
Work your way through this folder replacing/editing any non .9 images with images of your choice (you can replace the .9s with images from another theme). Make sure that they images you use are near to the original sizes. This can be a lot of work but can be made easier by using photoshop/paintshop scripts to batch process a number of images at once to change their hues etc.
Once you have finished changing any images you want in this folder move onto the next…
This folder contains the images you see in your status bar (minus battery!!). Things like Toggles, Signals, Dropdown backgrounds etc. Have a look through and make any changes you want remembering the .9 rule!
This folder contains other images you see. Tab images for example. You will have to have a look through and change what you want. Some images are duplicated here from framework-res.
These 2 are different depending on the device. S1 has both Contacts and DialerTabActivity whereas S2 has all images in Contacts. Theme them as above, making sure to keep the folder names as they were in the theme you downloaded.
Now you get the idea! Repeat this process for any other apps you want to theme. Remember that only system apps can be themed this way.
Once you have finished all the desired apps, highlight all the folders and right click “add to archive” with 7 zip. Make sure compression is set to store. Name your zip “somename.theme.zip” (the .theme is the important part to get the app to recognise what it is about to flash). Put on sd and flash with the OTA APP.
If all goes well your phone should now be themed as you wanted and you can send to us to add to OTA.
edited by: arawn
Robbie Hood likes this.