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

How to theme APK's

D

Deleted User

Guest
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:http://forum.xda-developers.com/showthread.php?t=695701
Windows: Winzip, 7Zip, etc.
Image editing software: Gimp (FREE!!) or Photoshop
Advanced:
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.
 
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*
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones