This first draft will probably have confusing parts so if you get stuck let me know and I'll make it clearer.
The first thing you're going to want to do is backup the files you will be editing. I recommend making a CWM zip of the backed up files. That way if you bootloop you can easily flash back.
Steps To Backup:
You will most likely be theming framework-res.apk and systemui.apk at first. I will show you how to back them up. If you theme other files in the future be sure to add the original to your backup CWM update by repeating these steps. *note* this installer will only install files to the /system directory.
- Pull /system/framework/framework-res.apk and /system/app/SystemUI.apk from your device using either adb or root explorer.
- Download this pre-scripted zip and extract it to a folder of your choosing.
- Place your original framework-res and systemui in their repective folders (framework;app).
- Next zip the system and META-INF folders at the root of the extracted folder and be sure to choose a compression of "store" or "none".
- Copy the new zip to your SD and try to flash it. Just to make sure it works.
File Structure of the New Zip should be:
META-INF -(unchanged contents) system -app --systemui.apk -framework --framework-res.apk
Once you've got your back-up working you can begin theming.
These are my steps. They may seem backwards to some but I can get a quality port out in under an hour this way.
Getting the needed files.
- Find a hdpi theme of your choosing.
- Using winRAR extract the themes framework-res.apk and systemui.apk (if present).
- Extract each apk to its own folder.
- You should now have all the icons you should need inside each drawable-hdpi folder you just extracted, one for framework-res and one for systemui.
- Have a look through the drawable-hdpi folders. These are the only two folders you'll need so you can delete the others if you wish.
- Extract your back-up Zip to a new folder and name that folder after the theme you are working on.
- First open framwork-res.apk with winrar.
- Navigate to /res/drawable-hdpi
- You'll want to set both your winRAR window and the themes drawable folder side by side.
- Next overwrite the icons/images in winRAR with the icons/images in the themes folder. Make sure to only choose the icons/images that are in the /res/drawable-hdpi winRAR. Dont just drag them all in, this will undoubtly leave you with unused icons that will bloat your framework.
- Once youve copied over all the images you need, overwriting the originals.
- Close the archive (winRAR).
Do the same for systemui.apk, only choosing the needed files.
Tips: If porting a CM7 theme a lot of file renaming will be required. First, sort all the files based on their prefixes (eg. framework-res_; com_android_systemui_; etc). Then, use all file renamer to easily delete XX characters from the left side. You'll need to have a look at what I mean to really get it.
Tips: Some themes lack a systemui.apk but will instead have the images needed for systemui.apk inside their framework-res.apk.
Tips: If a theme doesnt have enough battery icons you will have to make more to suit your framework-res. Do this by spanning the gaps with copies. For instance, if there are only 20 icons and you need 100, make 5 copies of each and name appropriately. This is the biggest pain about a 1% battery.
Once you've overwriten all the images in framework-res and sytemui go ahead and zip up your package following the same steps as the backup, naming the zip appropriately. Don't forget the "store" or "none" compression.
Now try to flash it. If it works it most likely won't be perfect, this is a first draft.
If it doesn't work, again check your compression and zip file structure.
Now take notes of things that are wrong or need fixing, text colors particularly. We will fix them in the next steps.