How to theme APK's

Last Updated:

  1. Dtatch

    Dtatch Well-Known Member

    People were asking how to theme widgets so I figured I make a quick write up how I do it.

    This is only a guide: I am not responsible for anything that may happen

    Tools you will need:
    Java JDK: Java SE Downloads - Sun Developer Network (SDN)
    Android SDK: Android SDK | Android Developers
    APK Manager:
    Windows: Winzip, 7Zip, etc.
    Image editing software: Gimp (FREE!!) or Photoshop
    Eclipse with ADT: Developing In Eclipse, with ADT | Android Developers

    Set up Android SDK will the correct packages. Ensure that ADB is recognizing your device. Open APK manager and follow the instructions on how to set it up at the xda site. If you are modifying an .apk from your phone select option 0. If the .apk is already on your computer skip step 0. (the following steps may be able to be skipped in windows with winzip or 7zip...someone help me that has experience working with windows) Select option 1 to unzip the .apk this will create an out folder with all the contents of the original file. At this point edit your desired images which will be located in the res/drawable and or res/drawable hdpi for those working on hdpi devices. The drawable mdpi is for lower pixel density screens and will not effect the outcome on hdpi devices. Open up your photo editing program and modify the .png files. Note: some files are labeled .9.png these files should not be modified unless you plan to proceed with the advanced steps or are ok with distorted images or trial and error. *SEE ADVANCED* if you want to work with .9.png's. After your images have been modified and saved with the original names back in the res folder go back to apk manager and select option 3 (you could do option 2 as well but it is not necessary) and then select 2 if it is a system or non system app. For safety reasons I would first learn how to do this with non system apps first. Once that finishes do step 4 then 5. Look in the folder that you placed the .apk for modeling and there should be a new signed .apk Rename the file and then put it on your sd card. Make sure you have unistalled the previous version first then install this .apk with astro or whatever file manager you prefer.

    Advanced To modify the .9.png images you will need the draw9patch tool in the android sdk and eclipse. First take the file that you intend to modify and do your modifications to it within your image editing software. When done save as to a different location without .9 in the file name. Open up the draw9patch tool in the SDK and drag the image into it. You then will need to add grids to where the image will stretch. They will be in the outer most part of the image. Do not add more than 2 next to each other on the top and left side. You can look in the SDK for examples of where they placed these grid markers. When satisfied with how the image looks save them and it will add the .9 to the file name automatically. Then you will need to open up eclipse and create a new android project. File - New Project - Android - Android Project. Select create project from existing sample. In your build target I believe any will work but I usually select Google APIs. Then you drag your images into the res folder and make sure there are no errors at the bottom, warnings are fine. Then right click on your project upper most, go down to android project and export as unsigned apk. Then you will need to go back into apkmanager and select option 1 or use winzip/7zip to take your files back out that you created. Place them back in their original res folder and then proceed with the steps listed above.

    If anyone can streamline some steps or has any information on how to do this on mac or windows let me know.

    Edit After reading a bit you may be able to use apk manager to work with .9.png's but I'm not exactly sure how. This would eliminate much of the advanced stuff so if I figure it out I will report back.

  2. ericnail

    ericnail Well-Known Member

  3. Kelmar

    Kelmar Done by choice VIP Member

  4. StuntinX

    StuntinX New Member

    IDK where it is! Thank you for this post cause I have been trying everything to get my moded apks to intall! THANKS
  5. StuntinX

    StuntinX New Member

    I am having trouble with it tho... I get an error file not found whenever I do a zipalign for step five. Anyone run into this too? or maybe have an idea of what's goin on?
  6. snapper.fishes

    snapper.fishes Well-Known Member

    Am I correct in assuming that this wouldn't work with market apps since it would mess up the md5sum?
  7. Dtatch

    Dtatch Well-Known Member

    Didn't expect this thread to get dug back up.

    You can make edits to market apk's but you cannot update directly from the market to an edited .apk because you are resigning it after you make edits.

    The process would be to pull, extract, edit, zip, sign and then install.

    *Be responsible and do not distribute warez*
  8. h20

    h20 Well-Known Member

    i am themeing an apk an have edited some indexed png's by changing them to rbg should
    i save them bac as a indexed png or rbg ?
  9. droiddekka

    droiddekka Well-Known Member

    if anyone wants to theme/black-out the spring visual voicemail apk, i'd be willing to compensate them for it.

    hit me up
  10. 1stshift

    1stshift Member

    Great tut will give this a try

Share This Page