• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [Guide] Make a Theme/ROM

Willster419

The Casio Smartphone Guru
#This is currently version 5 updated 8/13/14#
As always, it is recommended that you perform this on a rooted "unbrickable" phone with adb enabled.
*NOTE: if you have problems with the battery icon, try downloading a themed ROM for the correct M version, and then copy out the /system/framework/framework.apk file, and use that one instead.
Hello Commando Users,
How many of you want a themed ROM. You want to make it yourself? Well then let's get started. Before you start you will need to install/download the following applications/files:
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
Ok, now that you have all that is needed, lets set up and get down to business!

Install all the above programs that need installing.

Extract the ROM Toolkit V1 to it's own folder. "Extract to ROM Toolkit V1\" option in 7zip.

Install BIMP. How to Install it:
  1. Install GIMP
  2. Download BIMP
  3. as copied from the instructions, "...it's saved in bin/win32 directory.
    Just copy bimp.exe, pcre3.dll and bimp-locale into the default GIMP-plugins folder:
    `<Programs-dir>\<GIMP-folder>\lib\gimp\<version>\plug-ins`"
    for me (windows 7 64 bit) it was "C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins"
Finally, if you do not see file extensions in explorer (.exe, .jpg, etc.) then you need to enable them.
In windows 7/vista go to organize->folder and search options->view tab. In windows xp go to Tools->Folder Options.
Then disable the following; hide extensions for known file types
----------------------------------------------------------------------------------------------------
Now that you are ready, it is time to edit!


  1. Plug in your phone, turn on adb, and run the file recieveFiles.bat
  2. Decompile each apk you want to using each apk's batch file. To make a "full" theme, or a themed ROM, you need to decompile all of them.
  3. If you wish to get your own PNG files, then you can make a copy of the gimpOutput folder, and place them in there. use the gimpOutput folder structure for each apk file, starting in the res folder. You can then use that folder instead of the "sample" folder references in the upcoming steps. If you are going to use the sample PNG folder, then you can skip this step and forget what it says.
  4. Open gimp and select file-> batch image manipulation. A bimp window should come up.
  5. Select the add folders button.
  6. Navigate to the sample folder, and go to the folder with the regular .png files in it. "\Contacts\drawable-hdpi-finger", for example. It then should display all the .png files in the file list. It will not add the png files from the ".9.png" folders
  7. Add a manipulation to the set. For changing the color, find the "gimp-colorize" function, and change it to the desired color. After you add it you can double-check that it is what you want by selecting an image from the list and clicking the preview button. If it shows the selected image being the same after manipulation, don't worry about it (trust me) and try another one.
  8. Select where you want the files to go. This is where the gimpOutput folder comes in. Click the output folder button, and tell BIMP to export the colorized images into the gimpOutput folder instead of the sample folder. For Example, it will default with "sample\Contacts\drawable-hdpi\". This should be changed to "gimpOutput\Contacts\drawable-hdpi\". Then, sit back and relax as it does its work.
  9. When it is done, go to the output directory. You will find one or both of two things:
    • Png files that are of the desired color.
    • Png files that are unchanged in color. That is normal.
  10. For the files that did not colorize , repeat steps 4-8, but add another gimp operation before colorizing, called gimp-convert-rgb.
  11. Repeat Steps 4-10 for all of the apk files you are changing, for each folder on PNG files.
  12. Inspect each file to make sure it came out the way you wanted. For some, they might have a black border that was colored in, and you don't want that. You must open the original png in GIMP, colorize the areas you want to be colorized, and then save over the old colorized image.
  13. Now comes the time-consuming part. Open one of the .9.png folders in GIMP. For these, you need to manually colorize each one, avoiding the outside black line. To save these, I you can either directly overwrite the file, or make a folder to same them to, ("colored.9.png", for example) and save them as PNG files. Use a select tool to select what you want and then colorize.
  14. Check that all of the files that were colorized came out correctly. For example, if you colorized a border that came out weird-looking in comparison to the original file, then those have to be fixed as well. Again this may be a long and boring process, but the light is near :)
  15. When all of the png files and .9.png have been colored correctly, then go back to the .9.png files. They need to be "built" before they can be put into the apk file.
  16. Copy the .9.png files that you modified and overwrite them into the decompiled apk's directory, and build the apk. Repeat for each apk file.
  17. The build .9.png files are in the newly built apk, residing in the apk's decompiled folder, in dist. Open the apk, and select and copy all the built .9.png files out of each apk into a built.9.png directory for each apk. You now have all the png files that you need.
  18. Open the original apk's directly using winrar (rename from .apk to .zip) or 7zip. Go to each png directory and copy your colorized png files into the apk. I recommend using "store" level compression, but if you try higher compression and it works, let me know.
You have successfully themed all the files you need to for a ROM! Time to test them!
  1. If there are any original apk's that you did not modify, delete them.
  2. Before you send the files over, make sure you have at least 5MB space free on the system partition, and that you have a nandroid backup of your system. After you do both of those, you are ready to send files over to the phone!
  3. Connect your phone to your PC and Run the sendFiles.bat
If everything works, congrats! You now need to make an "update.zip" file for it! If you know how to make them and how they work, then you are done from here, go do your thing. If you don't, no fear, because there is a way to make them still!
  1. Go the the play store and download app2zip. make an "update.zip" of the apk files, and then connect your phone to your pc to copy it to your computer.
  2. In the zip file, overwrite the non-colored apk's with the new ones that you placed PNG files into.
  3. Extract the file, /META-INF/com/google/andorid/updater-script. right click it and open it in notePad++. Here you can use the UI_PRINT(""); method to print whatever you want onto the screen when someone is flashing your zip. Basicly you can the theme and script yours.
  4. When you are done, get it back onto your phone and flash it from the recovery flash zip menu and make sure that it works!

CONGRATS you have made a theme/ROM for the phone!!!1!

"Anything to make the phone more enjoyable..."
 
This phone is so tough. I would be surprised if it didn't last ten years its lasted 4 already. I don't care about "4G" 3 G is plenty fast enough for me. I don't use it to watch and surf the net. I have a office computer to do that. Plus the radiation the 4g puts out i can feel the brainwaves in the truck getting microwaved with this commando 2. If it does "break" the ie. 20 feet high (screen not able to rotate (possible to fix?) dire. from being dropped on a cycle going 45 mph which it did not) I would get another one just like it.
 
one of my commandos survived being attached to a model rocket and launched hundreds of feet in the air AND being launched from a trebuchet for a high school physics project. If my commando 2 ever breaks I know which phone i'm going back to :D
 
Ok so I did the recoloring of the files. I downloaded the pngfilestobechanged but from there this apktool thing is where I get lost.

Is there a better step by step process because if you can download all the stuff already decompiled then what do you do from there.:)
 
Ok so I did the recoloring of the files. I downloaded the pngfilestobechanged but from there this apktool thing is where I get lost.

Is there a better step by step process because if you can download all the stuff already decompiled then what do you do from there.:)

yeah you make a good point. I should just decompile the apks and make the separate folder structure with the original PNG files. I'm thinking i'll make a "ROM Toolkit" or something with everything in it. See when i can get around to that. You will notice I mark in the guide where I will fix that.
I also tried to do a better job explaining the apktool business. You never actually open "apktool.bat" or "apktool.jar" you just use all the batch files associated with it.
 
Yippee...finally got it to work. Needed to get 7zip, once I got that I was able to get in the apks. It is pretty cool, now on to play.

Thanks for the help:)
 
Yippee...finally got it to work. Needed to get 7zip, once I got that I was able to get in the apks. It is pretty cool, now on to play.

Thanks for the help:)
yeah you can also open them with winrar by changing the file extension to .zip or opening it from the winrar file explorer. probably should have mentioned that. :o

On a separate note I am going to try writing this guide with the "Rom Toolkit V1" I just made. It should make things a little easier.
 
Yippee...finally got it to work. Needed to get 7zip, once I got that I was able to get in the apks. It is pretty cool, now on to play.

Thanks for the help:)

I have re-made the guide, with the ROM Toolkit. Does it make more sense now?

If anyone sees something that doesn't make sense please let me know :)
 
Back
Top Bottom