View Single Post
Old September 23rd, 2010, 02:28 AM   #16 (permalink)
furstrated
New Member
 
Join Date: Jul 2010
Posts: 7
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by howetechnical View Post
NEW! Video tutorial at the bottom of this post.

Hey all,

Here's a quick and simple way to modify the images (backgrounds, etc) of wigets to match your layout and theme. First, I take no responsibility for anything that you do to your device because of this tutorial. There's really not much that can go wrong, but who knows what numbnuts is going to pull their entire /data/app folder out and delete it.

What you'll need:

Android SDK (this tutorial assumes it is installed before going ahead)

Your favorite image editing application

The auto-sign zip file attached to this post


Step 1: Get the .apk

If you already have the .apk app you want to modify, great, skip to step 2. If not, you can either download it from its developer website or from the market. If you download it from a website, simply save it to your computer. If you download it from the market:

-Use Root Explorer or another root file manager to navigate into your /data/app folder, and write down the name of the apk you want to modify
(ex: Pandora's is com.pandora.android.apk)
-Open a command prompt
-Change directory using "cd" to your AndroidSDK/Tools folder
(ex: cd c:\AndroidSDK\tools)
-Type in: adb pull /data/app/name_of_apk_file.apk

Now, the apk file will be in your /tools directory of your AndroidSDK installation.

Step 2: Modify the Widget Images

-Now that you have the .apk file, rename it to .zip.
-Extract the contents to a new folder, name doesn't matter.
-Once the contents are extracted, delete the META-INF folder.
-Navigate to res\drawable-hdpi and edit any of the image files you feel appropriate. The landscape orientation (when you hold your device sideways) images will/may be in res\drawable-land-hdpi.
-Once the images are edited to your liking, zip all of the contents back up into a single zip file (make sure you have everything, excluding the META-INF folder deleted previously). You want the zip file to have the same file structure and hierarchy as it originally had before modification.
-Lastly, rename the .zip file to .apk.

Step 3: Re-signing the .apk

The Android OS will not allow any unsigned apps to be installed, so we need to re-sign the .apk file (renaming it to .zip in the steps above took away the integrity of it's signature, FYI).

-Extract the contents of auto-sign.zip (attached to this post) to a folder anywhere on your computer.
-Copy/paste the modified .apk file into the root directory of auto-sign (make sure it's in there with the sign.bat file). Ensure that ONLY ONE .apk file is in there.
-Double click on sign.bat, continue by pressing spacebar when asked, and press spacebar (or any key, obviously) again when it is completed.

Step 4: Re-install the .apk Application

-Ensure the original application that you just modified is uninstalled before continuing, or you'll get an error in the next steps.
-Copy/paste the .apk file back into your AndroidSDK/tools folder.
-Open a command prompt, and again change directory ("cd") into your AndroidSDK/tools folder (see step 1 if you forgot how).
-Type: adb install name_of_apk_file.apk

Voila! You now have a modified and working (hopefully) widget. Keep in mind, if it doesn't work right away (ex: Vlingo's widget didn't work for me right away) a simple restart of the device should fix that. If it still won't work, then sorry.

You can see an example of what I did with the Vlingo(small) widget here, as well as the Pandora widget.
can you point me to the image files you edited?
been trying to edit my vlingo, i just want the text "Talk" only on the small 1x1 widget icon. with no background
but i dont know which of the files to edit
if you can send me your apk it would be appreciated
thanks
i also have a SGS
furstrated is offline  
Reply With Quote