image map of apk files - Captivate Q&A, Help & Troubleshooting

Is there any website that tells you what image files are what. Because when i extract the apk folder i get other folders with images inside of them obviously. The question is is there a site that would show me which image names are what images on the phone so i can edit those images to create my own theme.
Thanks

Related

[HOW TO] Manuals for creating a theme

In the following 3 manuals, you will be shown/told how too create a theme.
Thank you to the authors.​ Most of all to​ Stericson​ for he is the first to figure out HOW to create a theme for your phones.
Thank You Again
Restore your G1 back to it's original theme and fonts!​
To create themes, or to edit themes to your liking, you will need a working knowledge of android, adb, how to resign apk's, knowledge of your own O/S.
Things you will need:
The rom you intent to create a theme for... Now a days there are so many to choose from so none of this will be rom specific.
You will also want to get the latest and greatest bootloader installed on your phone and to HIGHLY suggest everyone trying your theme to install it as well.
You'll find this on Android Development
You will also need the latest SDK and java:
Link to Java: http://java.sun.com/javase/downloads/index.jsp
Downloading SDK: http://code.google.com/android/intro/installing.html
You can also use any zipping archive to extract files from and to the update.zips. I believe there are links below to some of these.
Very Important!
You do not usually need to resign every apk that you change! Usually you only need to resign the update.zip! However there may be times that you may need to resign an apk. So dont sign the apks...if you have problems with the update then try to resign the apks.
JesusFreke was kind enough to build a custom signing tool for me that would allow me to right click on an apk and resign it from there. I am posting it here for others to use as well. Note that this is a courtesy of JF, so thank him for it. I cannot stress how much time this has saved me and will save you.
Automatic version!
Do not use this to sign APK files in Vista or windows 7! It will cause your theme to loop phones when placed on a device. Only use this to sign update files if your using those O/S's
Note, this will not work if your SDK or the path that you place this in has any spaces in the dir name!
An Example of this is c:\users\Nikki and Stephen\sdk\tools
Try to put the SDK and the contents of the zip in a dir where the names are all together and not like the one above.
I have made a batch file that will automate the entire process of setting up to use the signing tool made by JF. This batch file will set the CLASSPATH, set the PATH, install the registries, and will even allow you to sign files manually if you wish. I plan on building onto this batch file to include other things. However, for the moment, it will only include what you see here.
In order to use this you should have downloaded the sdk already. Simply extract all of the files into the tools dir of your sdk, and run autosign.bat follow the instructions and go through the options one by one, starting with 1 working through 4. You can however, put the contents of this zip anywhere on your computer and it will work. It is just better to put them into the tools dir of your SDK. Especially for the consideration of future versions.
Autosign .zip: https://docs.google.com/leaf?id=0B5...MTEyMi00NzI4LWJkMDQtZTUzNjBjMTZlMWNj&hl=en_US
Want to set up the signing tool manually?
Before using this you need to know how to set this up:
Now you will need to add the tools dir of your sdk to the environment variable CLASSPATH.
FOR XP:
Right click on My Computer click properties, then choose the tab that says advanced.
Click the button that says environmental variables.
Go to system variables find the one that says CLASSPATH
double click it
go to the end of variable value.
There should be a semicolon ; at the end, type in the path to the testsign.jar located in the tools directory of your SDK
for example the path to my testsign.jar was c:\sdk\android-sdk-windows-1.0_r1\tools\testsign.jar
If CLASSPATH is not in your system variables then create it.
Secondly, Find the system variable called PATH and add to the end of it, the full path to your sdk directory.
For example, mine was c:\sdk\android-sdk-windows-1.0_r2\tools
FOR VISTA:
Open a cmd prompt.
Replace THEEXACTPATHTO-TESTSIGN with the path to the dir that holds the file testsign.jar.
Type:
echo %CLASSPATH%
If it is returns %CLASSPATH%
Type the following:
set CLASSPATH=THEXACTPATHTO-TESTSIGN\testsign.jar
If it comes back with something else then
Type the following:
set CLASSPATH=%CLASSPATH%;.;THEXACTPATHTO-TESTSIGN\testsign.jar
For Example, when I type this it looks like:
set CLASSPATH=%CLASSPATH%;.;c:\Android\SDK\tools\tests ign.jar
To set the PATH
Replace THEEXACTPATHTO-SDK with the path to the tools dir of your SDK.
Now type:
set PATH=%PATH%;.;THEXACTPATHTO-SDK\tools
For example, when I type this out it looks like this:
path-%PATH%;.;c:\Android\SDK\tools
Now through doing this you have done two things, first off you have made the resigning process extremely easy, secondly you will not have to cd to the tools dir of the sdk to use adb or any other tool in the sdk.
Signing the Files:
Now right click the reg file that you extracted and choose to install it, or merge.
Now, right click an apk, do you see an option that says ResignApk? That's how you will resign your .apks and .zips.
When you choose it a cmd window should open for a few seconds and then close. the file you signed will be overwritten with the new resigned file.
If you find the right click menu not working for some reason you can type the following in cmd to sign your files: java testsign whateverfiletosign
General Info:
You will need to be specific in addressing what version your theme is for, RC8, RC30, or ADP1. Make sure you test the update.zip before you release it.
Every .apk contains the images relating to itself. However, every apk has the ability to use the images in framework-res.apk. The images for every apk is located inside of itself. To find these images open up the apk, you can rename it to .zip or open it with an archiver of your choice, winrar, winace, etc. Then after opening the apk open the folder called res and inside of that there are folders that are named Drawable, drawable-land, drawable-port, etc. This is where the images are stored.
There are some things you cannot edit unless you rebuild the entire apk from source, which we will not go into here.(another tutorial, another time) Just know that at this time you SHOULD NOT edit, or even open images with the extension .9.png doing so will corrupt the .9.png and cause the image to distort. You can however compile the images with eclipse.
Editing .9.png's - http://forum.xda-developers.com/showthread.php?t=487001
Be aware, messing with .9.png's can cause problems if they are not done correctly.
If your going to build your own update.zip from scratch:
To simplify this process for you though, most rom devs provide a theme template with their roms now. You can also download someone elses theme and use their files, since they are resigned already. It may also be easier to see what files do what and go where since they have already been edited and are easy to point out.
Now, your ready to start changing things up.
You will now need to open the apk, which you can do by adding .zip after .apk, effectively changing it to a zip. or you can use your favorite archive opener.
I dont use the archive process because it can lead to very aggravating problems such as things not getting signed correctly and have heard reports of it interfering with the signing tool above. Anyways I just add zip and it works great for me.
For those renaming the .apk's to .zips
Note that if you are using windows you will need to unhide known file extension types. you can also use your favorite archiver such as winrar, winzip, etc.
See here to unhide known file extension types for Xp: http://www.mediacollege.com/microsof...on-change.html
See here to unhide file extension types for Vista: http://maximumpcguides.com/windows-v...ile-extension/
Tips:
After opening the apk copy the folder called res.
Go to your desktop, or wherever, create a new folder called Images, or whatever.
Open the folder, paste the res in there.
Now you can see what the files look like without opening them, by using thumbnails to see what they are.
Btw, you may also want to add -frame, or -launcher, to the end of the res folder you copy over to keep them separated from others.
Almost Done
So now your theme is done and your ready to make an update.zip for others to install your theme.
Update script
The update script is in a Unix format, while you do not need linux you must save it in a Unix format. I suggest using Textpad to edit this script and saving it in the Unix format.
Link to Textpad: ftp://download.textpad.com/pub/textpad5.2/txpeng520.exe
XML Edits
I have provided some additional support for the process of hex editing xml files to change things like text color, size, and more things not easily changeable.
You can find this thread here: http://forum.xda-developers.com/showthread.php?t=479019
Final Notes:
Editing market apps
With market apps, if you make changes you usually need to make sure you dont resign their apk because you will overwrite their signature keys with the test keys.
If anyone has any questions please try asking for help in this thread before emailing me for help Usually I will respond to questions in this forum.
I hope this Tutorial has been helpful. I will add on to it as needed.
Any questions can be directed to me at [email protected]
Stericson
Links of interest:
Using ADB: http://code.google.com/android/reference/adb.html
How To Theme Develop for Windows For Dummies in 10 easy steps (( no your really not a dummy its just an easy name for a how to lol))
well i'm going to give this a shot in the dark on how to create this how to be as easy as possible
1st
download these files if you don't already have them
JAVA
http://java.sun.com/javase/downloads/index.jsp
download the JDK
Winrar
http://rarlabs.com/rar/wrar380.exe
and Auto-sign.zip
http://www.mediafire.com/download.php?uwzjjydnm2r
2nd
Download my included Auto-sign files.
what it contains.
the Test keys file..
and an update.zip file
and a batch file i created called auto-sign to make things easier to sign
3rd
after you have downloaded my Auto-sign
then you extract it to where ever you want.
4th.
use the update.zip included if your a Beginner it includes my windows 7 theme .. i edit so many files that it's easier to tell what does what and whats goiing to go where. now open that zip file DON'T EXTRACT just open it using winrar..
5th
When it is open go to Framework.. and open Framework-res.apk
NOW IF THE APK. POPS UP AND SAYS IT CANT OPEN BLAH BLAH SELECT A PROGRAM AND THEN SELECT WINRAR.
6th
Once you open Framework-res.apk KEEP THIS WINDOW AND UPDATE.ZIP WINDOW OPEN!!
then just extract the whole Res Folder to where ever you like this makes it easier to see what files you wish to edit.. most of the files will be in the folder called Drawable
7th
open up your favorite photo editor .. i use photoshop along with 90% of the people who Graphic Design... Edit your pictures Remember a file with a .9 can mess up your phone so edit those carefully.. and save what ever pictures you have
8th
Now drag the whole Res Folder .. back into the Framework-res.apk
now your update.zip file is going to say files has been changed to framework-res blah blah do you wish to save it . click yes .. now your framework has been updated you can close everything out
9th
go to the Auto-sign folder.. and open Auto-sign this will now sign your update.zip .. and rename it to update_sign.zip .. now just delete your old update.zip.. rename update_signed.zip to update.zip
10th
put it on the root of your memory card.. reset using green call + menu + end
then hold home and end .. until the recovery mode shows up .. then press Alt+S and hope your device isn't bricked
Disclaimers
I'm not responsible if your brick your device.. but i will help to the best of my abilty and if i can't help i'm sure XDA will
i don't sign every file in my update.zip i just sign update.zip .. and hey it works lol..
For ADP or RC 8 versions .. just download your favortie ADP theme or RC 8
put it in the Auto-sign folder.. and rename it to update.zip if it isn't already then just follow my steps
ToDo:
1. Explain about the files that make up themes
a. Explain update.zip and folder structure
b. Explain about pngs and apks
2. Explain the tools
a. WinRaR
b. Auto-sign
c. Java JRE and JDK
d. Draw9patch tool
e. Editing tool
3. Setting up your phone for themes
a. Choosing which JF firmware to use
b. Using the Eng Boot Loader and why
4. Explain the process to get the files
5. Explain which files to edit
6. Explain how to import modified files
7. Explain about auto-sign and how to use it - I am building a program that will making signing files easier. check it out as i build it! here
1. When you download a theme it comes in the form of an update.zip file. Basically the same as the full update looks, but it is a watered down version. All of the operating system, boot loader and radio files have been removed.
a. If you check the file size of JF’s RC30 1.31 and compare it to any of the themes, you will notice that the theme file is about a 3rd the size. JF’s update.zip contains data, META-INF and system folders it also contains a boot.img file. Where as a theme update.zip contains app, framework and META-INF folders. The theme update.zip only contains the folders and files that are necessary for changing the Android theme. If you were to dig deeper into JF’s RC30 1.31 update.zip you will find the folders that are in the theme’s update.zip. For example, double click the system folder and you will see 11 folders and 2 files. The only ones we are concerned about are app and framework. So when you flash a theme it doesn’t bother rewriting all of the OS and boot loader, but only the app and framework folders.
b. Inside the app and framework folders are apk files, apk files are like zip files or containers. There are many folders and files inside the update.zip but we are only going to cover a few for now.
(app folder) - This folder contains all of the apps that will be installed during an update or wipe. You will need to extract only the apks of the apps you wish to change the icon and graphics for.
(Launcher.apk) - This file is in the app folder and contains the menu launcher tab, clock, Google search widget, wallpapers and a few other things.
(framework) - This folder contains framework-res.apk, this is where the bulk of your editing will take place.
When you open a apk you will see:
(assets) - This will contain images, sounds and other content used by the programs. Not always used!
(META-INF) - This contains the encryption data for the update.zip.
(res) - This folder contains all of the png and xml files. The xml files are used to format the UI, these can be used to change the locations of things on the screen. They need to be unencrypted first.
Depending on the apk there can be a bunch of folders under the res folder but we will only concentrate on the drawable ones.
-drawable - The png files in this folder are displayed wheather the keyboard is open or closed. The majority of the files are here.
-drawable-land - These are the files that will show when the keyboard is open. There won't be as many files in these folders. Most of the time the programmer will re-organize the layout with an xml file.
Basically the interface of Android is a bunch of pictures; the programmer links these to certain actions. As someone making themes you do not have to worry about any programming, in the future when people start unlocking the xml files to change the way things look. Then you will have to learn some basic programming, but for now we will only talk about changing the picture files.
2. The tools you use for creating themes are very basic and you might already have 3 out of 4 installed.
a. WinRaR is a must have for everyone, it allows you to create and open compressed files (i.e. Zips, RaRs and about 25 other file types) It would best if you associate WinRaR with zips and apks, the zips can be associated during the install of WinRaR. To associate apks you can right click on an apk and choose “Open With…” make sure to check off the box that says “Always use this program to open this kind of file”
b. Auto-Sign was released by Dave da illest 1, to make signing the apks and update.zip an easier process. Before you can flash an update or theme the phone checks to make sure the update.zip is signed by google or by JesusFreake. I will explain this more in Section 3.
c. Android apps are built on Java, hence the need for JRE and JDK, You will not be working directly with these apps but part of the signing process uses Java. You can get both files here: http://java.sun.com/javase/downloads/index.jsp you will want to grab the first and second downloads.
d. The draw9Patch tool comes with the Android SDK, it is located in the tools folder. This tool is used to edit stretchable images. There is still a lot of research that needs to be done on using this tool. So for now let’s just say do not touch any files with .9.png as an extension. Dave da illest 1 has changed a few of these .9.png files without issue so maybe we can get him to explain them better. I have also edited some of these files but it made some of the images stretch weirdly.
e. I am not sure what other photo editors you can use, but everyone I have spoken to about modding the theme uses Adobe Photoshop. I am sure you can use other programs. But I am not aware of any at the time of this writing.
3. Before changing the theme on your phone you will need to gain root access which is explain here: http://forum.xda-developers.com/showthread.php?t=442480
a. As you look through all of the different themes, you will notice some say they are for RC30, RC8 or ADP1.
i. RC30 – Is the US version
ii. RC8 – is the UK version
iii. ADP1 – Stands for Android Developers Phone and was produced for programmers. This version is completely unlocked and does not have any of T-Mobile’s software or locks.
b. So your phone is rooted and you’re wondering why you should have the engineering boot loader. Well one reason is because of the 3 Androids on skateboards, the other reason is if your phone bricks during a flash you can fully recover your OS with the fastboot option. More about this can be found here: http://forum.xda-developers.com/showthread.php?t=455860
4. You have a few options here, you can either get the files from RC30 update.zip, one of the other theme’s update.zip or you can use the themes template at the bottom of this thread. All 3 methods you will need to open the update.zip go into the framework folder (if you get it from RC30 you will need to go into system\framework) Extract the framework-res.apk to a folder of your choosing. Most of your editing will take place on the files from this apk. When you are looking at these files in Windows explorer it is best to change the view to Thumbnails and look at all of the images and see if you can figure out where they are placed on your phone’s screen.
::TIP1:: Your best bet is to create a Themes folder on your desktop or in My Documents, somewhere simple to find. You will be dealing with a lot of files and it can get very confusing quickly.
The other file you will want to change is Launcher.apk; this file is in the app folder and contains the menu launcher tab, clock, Google search widget, wallpapers and some other things.
::TIP2:: When you open Launcher.apk from inside the update.zip file, WinRaR may default to a temp folder...(i.e. C:\Documents and Settings\bobbyd\Local Settings\Temp\Rar$DI71.579\framework-res) double check the location of where WinRaR wants to extract the files, this is how I ended up flashing the original files after spending a decent amount of time photoshopping.
5. Now the only files you will want to edit are png image files. There are also xml files, they are used to format the UI, you can change the locations of things on the screen but the xmls need to be unencrypted before you can edit them. I have not done this process yet and will update more information later.
6. Importing the files is very simple, as long as you know the layout of the update.zip. Once you have edited all of the files you plan to or just want to test to see how your theme looks. Open the update.zip in WinRaR and go to the location of the files (i.e. Say you changed the 3G icons, you would go to the framework folder and double click on framework-res.apk. This will open another WinRaR window, open Windows Explorer where your edited files are and hold the Ctrl key while clicking the files you want to copy. Now drag them onto the open WinRaR window from the framework-res.apk. When it asks to replace the files choose “Yes” or Yes to All”. Close that WinRaR window and the one from update.zip will tell you “Files have changed would you like to save this file now” click “Yes” again and now your update.zip will contain your modified files.
7. Download and install Stericson's auto-signing tool here.
I have been slacking on this guide, I will update soon again.
[HOW TO] Easy steps for creating a theme
I know there are a million and 1 walkthroughs on here for creating themes but after doing it for a while I have really refined my process and made it as easy as possible. Im just hoping to clear up some of the confusion so after you know how to sign your files you will know how to finish making them into your own custom theme.
First you need to get signing setup properly. This topic is covered in many places and my recommendation is to use the Stericson walkthrough or the Stericson auto-signing setup tool. Once you can click on any zip or apk file and get the option to Resign it you are ready to proceed with making your own theme.
1. Download an archive manager that allows you to open archives inside of archives without creating new windows. My recommendation for this is the application 7-zip. It is tiny, free, easy to use, and on all my computers it has replaced winzip and winrar.
2. Now take a blank theme from Stericson to use as your starting point, in my case I use the ADP1.1h version since I am building for JFv1.43 which uses ADP1.1h this will be the minimum needed to change your theme and will contain all the original artwork.
3. Open the update.zip and inside are typically 3 files, framework, system or app, and META-INF. Leave META-INF alone, you wont be touching that. Inside framework and system/app is where the files are that you can change. In this case we will open update.zip, then double click framework and then double click framework-res.apk (this is where the next archive will open inside the same window, your life just got a little easier).
4. Now you are looking at assets, META-INF, res, and a couple other random files, the resources.arsc can be edited but I will show you that in another tutorial. Now open up the folder res and you will see the treasure we are searching for, folders with the name drawable. All of the folders that start with the name drawable are where we can edit the themes, this includes drawable, drawable-land, drawable-port, and drawable-finger.
5. Now drag and drop the folders drawable and drawable-land onto the desktop. Once they are on the desktop you can edit the .png files in those folders until you are ready to put your theme together.
6. Now in your still open window at \framework\framework-res.apk\res\ you will open the drawable folders one at a time and drag and drop your edited files into the archive, only dragging and dropping the files you edited and not just everything inside the folder.
7. Once you have your new images copied into the archive in the correct place you can just hit the close button or browse up a couple directories and find other files to edit. Any time you edit an apk and browse out of it or close it you will be prompted to update it in the archive by 7-zip (this is my secret shortcut), always press ok.
8. Now you have a freshly created theme ready to install, all you have to do is right click, chose to Resign the file, and once its done you can copy it to your SDcard, make sure its named update.zip, and flash your new theme.
Its literally that easy! And you use this same technique in the system/app folder to edit the apk files for the individual apps on the phone. Explore around in the update.zip and see what you can find, I only told you about the major items but there is plenty more to find and change. You can always copy a folder out of the archive and if you cant edit anything just toss it but if you can find something to edit, do so and throw it back in the archive. You guys now have all the info I had when I started plus all my tricks to making that process 10x easier.
I Just Want To Change My Clock. I want everything else stock. Sorry for asking but when i search so much comes up. I know its really simple to do. If anyone can just point me in the right direction or give me a quick how to that would me AMAZING!
Read:
http://forum.xda-developers.com/showthread.php?t=482205
notifi
jut want to change notification to white on statusbar
Before I tried to setup the autosign tool, when I double clicked on zip files it opened them up, which was how I wanted it. After trying to setup the autosign, when I double click on zip files nothing happens, except a java command prompt window pops up, same happens when I right click and hit resign zip, how can I fix this?
Edit: I reinstalled Java which fixed my issue
i got this tryin to update
E:No digest for framework-res.apk
i edited someone else theme, did not edit no .9 file.. i right click on the update.zip and resigned it. what went wrong?
EDIT: nevermind i got it.. i followed the one for dummies, guess i am dumb lol
What the image file for the tab on the bottom of the screen called? I couldn't find it searchin throguh the framework-res.apk
its in launcher.apk. Check in drawable portrait and drawable landscape.
Stericson
thanks i should of explore more before posting
Hi,
I've got 99% of my theme done although I can't find where the bottom of the notification bar is and the white bit where the notifications would be.
I've done a little picture below to help me explain.
Bottom notification bar is the arrow.
The white bit where the notifications would be is the hatched.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Thanks for help in advance.
Also could someone tell me how to put icons in for well know apps from the market. At the moment I have put the full apk in the update and change the icon. But this increases the theme size. Thanks again!
NO DIGEST? Failed?
what does it mean when I try to flash the new update.zip and it fails because it says NO DIGEST? What does this mean? Any help would be greatly appreciated. Thanks
parmenti said:
what does it mean when I try to flash the new update.zip and it fails because it says NO DIGEST? What does this mean? Any help would be greatly appreciated. Thanks
Click to expand...
Click to collapse
means it hasn't been properly resigned.
thanks, that's what I thought. Can't seem to get it right. Does the image, the apk, and the zip all have to be resigned? Or just one or the other? THanks for your help.
parmenti said:
thanks, that's what I thought. Can't seem to get it right. Does the image, the apk, and the zip all have to be resigned? Or just one or the other? THanks for your help.
Click to expand...
Click to collapse
Just the update.zip needs to be resigned.

[Q] Looking for a black and white hack/mod

Just wondering if there's something I can do to simply make all my apps and/or widgets black and white?
Or I suppose if someone can lead me to a tutorial on how I can just do it myself? I can just throw them all in Photoshop and greyscale em, if someone could just point me in the right direction
adb pull each app/widget that you would like to theme. Extract the apk using 7zip, winrar, or whatever you use. I prefer 7zip because I think you have to change the file extension with winrar, and there's no point in using extra steps to achieve the same thing. Anyways, after you extract the apk, navigate to the res folder. You'll then see folders that say drawable, drawable-mdpi, or something like that. In those folders are the .png images that you can edit using photoshop. Save them with the same name in the same directory that you got in from. Now, go back to the .apk file you pulled from your phone. Open the archive (DON'T EXTRACT). Navigate to the res/drawable folders within the archive and drag and drop the edited images into the archive. Now (still in the archive) back up to META-INF folder and delete everything in there. Now, close the archive and sign the .apk. Now, you can push it back to your phone.
Or you could get better cut or adw from the market and download icon packs that meet your monochromatic needs. Seems easier than the above.
YoungSinema said:
adb pull each app/widget that you would like to theme. Extract the apk using 7zip, winrar, or whatever you use. I prefer 7zip because I think you have to change the file extension with winrar, and there's no point in using extra steps to achieve the same thing. Anyways, after you extract the apk, navigate to the res folder. You'll then see folders that say drawable, drawable-mdpi, or something like that. In those folders are the .png images that you can edit using photoshop. Save them with the same name in the same directory that you got in from. Now, go back to the .apk file you pulled from your phone. Open the archive (DON'T EXTRACT). Navigate to the res/drawable folders within the archive and drag and drop the edited images into the archive. Now (still in the archive) back up to META-INF folder and delete everything in there. Now, close the archive and sign the .apk. Now, you can push it back to your phone.
Click to expand...
Click to collapse
There is no need to ever rename any archive with winrar just goto "open with" and choose winrar and then check the box to associate winrar with apks you can do this with jars also.
Check black mod them in apps and themes I think you'll be satisfied with that.
YoungSinema said:
adb pull each app/widget that you would like to theme. Extract the apk using 7zip, winrar, or whatever you use. I prefer 7zip because I think you have to change the file extension with winrar, and there's no point in using extra steps to achieve the same thing. Anyways, after you extract the apk, navigate to the res folder. You'll then see folders that say drawable, drawable-mdpi, or something like that. In those folders are the .png images that you can edit using photoshop. Save them with the same name in the same directory that you got in from. Now, go back to the .apk file you pulled from your phone. Open the archive (DON'T EXTRACT). Navigate to the res/drawable folders within the archive and drag and drop the edited images into the archive. Now (still in the archive) back up to META-INF folder and delete everything in there. Now, close the archive and sign the .apk. Now, you can push it back to your phone.
Click to expand...
Click to collapse
You failed to mention that modifying the 9.pngs will have to be 9patched or else they will get distorted. But an easier thing to do is look in the themes section and find a theme or use an alternate Home launcher and use themes for those found in the market.
A lot of what u want to do is XML edits. U can always change icon colors. 7zip is a must use cause winrar is crap and to many steps.
unCoRrUpTeD said:
You failed to mention that modifying the 9.pngs will have to be 9patched or else they will get distorted. But an easier thing to do is look in the themes section and find a theme or use an alternate Home launcher and use themes for those found in the market.
Click to expand...
Click to collapse
Oh yeah. Thanks. I recently read that we can edit 9.pngs using photoshop if a 1px border is added to the image. Is that true? If so, it'll be easier for me that eclipse.

[Q] creating task bar

how would i edit the task bar in asopmod rom i searched through google i found nothing can someone plz help
First you need to read up on theming but in short all those png's reside in the system/framework/framework-res.apk. In that apk if you goto res/drawable-hdpi folder you'll see all of the png's that make up the task bar.
You'll need apkManager and a paint program.
Simmons - I was trying to do something similar but was having no luck -
I wanted to pull the 4G icons out of an Evo rom and put them in place of the 3G icons on CM6 - i thought it would be a riot -
I extracted the 4G's and renamed them to their 3G counterparts names and have them saved on my desktop - but I dont know the right way to extract framework-res.apk, then put in my new icons, then, and probably most importantly, zip it back up so it will flash right !
any thoughts?
Simple how to theme.
Vandelay007 said:
Simmons - I was trying to do something similar but was having no luck -
I wanted to pull the 4G icons out of an Evo rom and put them in place of the 3G icons on CM6 - i thought it would be a riot -
I extracted the 4G's and renamed them to their 3G counterparts names and have them saved on my desktop - but I dont know the right way to extract framework-res.apk, then put in my new icons, then, and probably most importantly, zip it back up so it will flash right !
any thoughts?
Click to expand...
Click to collapse
heres the How to
An apk is really just a zip file... apk stands for android package (if i remember correctly). So treat it like a standard zip file.
You'll need apk manager this will allow you to sign zips which makes them flashable. get that here
Now get your favorite Rom and make a folder. In that folder make 2 folders one called packed the other called packed. Take your rom and unzip it in the unpacked folder. and then take the original zip and move it to the packed folder.
Next go into the unpacked folder and nav to system/framework.framework-res.apk take this apk and unzip it in this folder and then make a copy of the apk and move the copy to the packed folder.
Now when you want to make a change to the framework-res.apk use the unpacked as a reference. us the packed as the change dir, you do this by opening but not unzipping the apk you want to change and just dragging the files you are replacing into the apk, this will replace them. You might want to make a a 3rd folder sorta of a master copy if you ever mess up the packed roms.
Now that you have an altered framework-res.apk you can just push it to system/framework folder (i think) and reboot and your changes are in. I never do this since flashable is easier to manage I make a flashable.
A flashable is like a but allot smaller, so d/l one of my themes and take the zip file and place in in a folder next to the packed and unpacked folder call it something like staging. now unzip apk manager into the top dir next to 3 other folders you just made.
Now my theme zip can be renamed to whatever you want your going to use it as a place holder for signing flashable zips. go into the theme zip and delete ever thing in the system folder except the framework folder then go into the frame work folder and delete everything.
Your flashable zip folder should only have a a meta-inf folder and a system folder, the system folder should only have a framework folder. Now drag your altered framework-res.apk into the flashable zip folder you just cleaned out.
Ok now you have to sign it copy that flashable zip to the place-apk-here-for-signing folder, this should have shown up when you unzipped apk manager into the folder the also contains unpacked and packed folders.
Now click on the script.bat and you'll see a bunch of option you can do option 16 to sign your zip. it takes a second or two and the date should get updated on the flashable.zip file in the place-apk-here-for-signing folder.
Now you have your new them ready to install. if your changing something else find the apk and replace framework-res.apk in these instruction and it works the same. note that most app reside in system/app so you next to take that into account.
Edit: Maybe I should have made a new thread.
creating task bar
thanks simmons i will let u know how bad i mess up but yes thanks alot man

[Q] HELP - how to edit (modify) themes (mixing images)

Hello,
little background. i know my way around ROM installation (changing Kernels,modems, installing themes etc.) and read about how to use apk manager.
one of the things i still can't figure out, and seems to me like the next step is modifiyng themes.
i am currently using Perception 10.2, with stock theme. i really like the paragon basic theme + few more icons and items from phoneix and other themes.
i wend ahead and decompiled framework-res.apk from all the themes, and tried to copy over the images from the paragon drawable-hdpi folder to the same folder in Perception.
importent note, i know that there might be an issue with editing a .9.png file, but i assumed copying over a file that works in another rom is acceptable.
hope some of you are still with me.. here is the catch... tried to Compile the apk... and errors...
here is a parital log:
--------
|Sat 01/22/2011 -- 17:23:37.28|
--------------------------------------------------------------------------
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
'adb' is not recognized as an internal or external command,
operable program or batch file.
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
libpng error: Read Error
ERROR: Failure processing PNG image Z:\F\kombinator work\android hack and hebrew\Developer\Tools\apk_manager_4.9\other\..\projects\framework-res.apk\res\drawable-hdpi\btn_zoom_down_disabled.9.png
libpng error: Read Error
ERROR: Failure processing PNG image Z:\F\kombinator work\android hack and hebrew\Developer\Tools\apk_manager_4.9\other\..\projects\framework-res.apk\res\drawable-hdpi\btn_zoom_down_disabled_focused.9.png
libpng error: Read Error
ERROR: Failure processing PNG image Z:\F\kombinator work\android hack and hebrew\Developer\Tools\apk_manager_4.9\other\..\projects\framework-res.apk\res\drawable-hdpi\btn_zoom_down_normal.9.png
libpng error: Read Error
ERROR: Failure processing PNG image Z:\F\kombinator work\android hack and hebrew\Developer\Tools\apk_manager_4.9\other\..\projects\framework-res.apk\res\drawable-hdpi\btn_zoom_down_pressed.9.png
libpng error: Read Error
ERROR: Failure processing PNG image Z:\F\kombinator work\android hack and hebrew\Developer\Tools\apk_manager_4.9\other\..\projects\framework-res.apk\res\drawable-hdpi\btn_zoom_down_selected.9.png
libpng error: Read Error
Click to expand...
Click to collapse
different error:
Z:\F\kombinator work\android hack and hebrew\Developer\Tools\apk_manager_4.9\other\..\projects\framework-res.apk\res\values\public.xml:3756: error: Public symbol drawable/zzzzz_tw_quickcontact_slider_grip_left declared here is not defined.
Z:\F\kombinator work\android hack and hebrew\Developer\Tools\apk_manager_4.9\other\..\projects\framework-res.apk\res\values\public.xml:3757: error: Public symbol drawable/zzzzz_tw_quickcontact_slider_grip_right declared here is not defined.
Click to expand...
Click to collapse
i hope someone can make sense out of this... i thought it would be a simple proccess, hope i did something wrong and it will be an easy fix...
Thank you so much for reading this far, your help will be appreciated!
Yossi
The problem you're having is with semi-transparent .9 files. The Android SDK png handler can't decompile them, so when you look at them in explorer they'll have a default image meaning they're corrupt.
The easiest way to deal with them is to not decompile and recompile.
PNG Only: With apk manager, take the original framework files from the ROM (or phone if stock) and drop them into place-apk-here-for-modding, then take the themed frameworks, rename them (something like framework-resParagon.apk) and drop those into place-apk-here-for-modding.
Select each one and extract (not decompile).
Open the drawable-hdpi folders side-by-side of the original and the theme, and drag (Copy) the ones you want to the original.
Then Zip the original and select System APK, and you're done. The reason this work is because the .9 files are still in their compiled state.
If you need to copy xml files, do this first, then the first step for png files: Decompile the two, copy the XML files, and recompile. Compiled XML files convert the png names to IDs which may be different between two roms. If you already have .9.png files that don't decompile, here's the fun part and I guess I'm doing all of this out of order, sorry...
Have an orginal apk decompiled with a different name, extract your modded apk, drag the drawable-hdpi out to say desktop, delete that project, decompile, drag the original decompiled drawable-hdpi into your modded one, and now you can edit/copy XML files and recompile. Then delete the project, extract, delete drawable-hdpi and drag the desktop drawable-hdpi to the project and zip it up. Done.
Or quick version.. 7zip helps.
right click the apk you want the images from, extract it.
right click open archive the apk you want the images in.
navage down to the folder that the images are stored in while in 7zip.
go back to the extracted folder and navagate down to the folder the images you want are in.
drag and drop them into the open archive 7zip window.
close archive
push
whiteguypl said:
Or quick version.. 7zip helps.
right click the apk you want the images from, extract it.
right click open archive the apk you want the images in.
navage down to the folder that the images are stored in while in 7zip.
go back to the extracted folder and navagate down to the folder the images you want are in.
drag and drop them into the open archive 7zip window.
close archive
push
Click to expand...
Click to collapse
CuriousTech said:
The problem you're having is with semi-transparent .9 files. The Android SDK png handler can't decompile them, so when you look at them in explorer they'll have a default image meaning they're corrupt.
The easiest way to deal with them is to not decompile and recompile.
PNG Only: With apk manager, take the original framework files from the ROM (or phone if stock) and drop them into place-apk-here-for-modding, then take the themed frameworks, rename them (something like framework-resParagon.apk) and drop those into place-apk-here-for-modding.
Select each one and extract (not decompile).
Open the drawable-hdpi folders side-by-side of the original and the theme, and drag (Copy) the ones you want to the original.
Then Zip the original and select System APK, and you're done. The reason this work is because the .9 files are still in their compiled state.
If you need to copy xml files, do this first, then the first step for png files: Decompile the two, copy the XML files, and recompile. Compiled XML files convert the png names to IDs which may be different between two roms. If you already have .9.png files that don't decompile, here's the fun part and I guess I'm doing all of this out of order, sorry...
Have an orginal apk decompiled with a different name, extract your modded apk, drag the drawable-hdpi out to say desktop, delete that project, decompile, drag the original decompiled drawable-hdpi into your modded one, and now you can edit/copy XML files and recompile. Then delete the project, extract, delete drawable-hdpi and drag the desktop drawable-hdpi to the project and zip it up. Done.
Click to expand...
Click to collapse
Thanks guys! i knew there should be a simple solution!
will try this soon. and post results!
Yossi
Also make sure to double check the sizes, the height and width my be different and give you issues if you copy and past the pngs
Sent from my SGH-I897 using XDA App
Also with 2.2.1 there's a problem with compressed apk files, so in apk manager, you need to set compression to 0. It's not a problem when dropping them into an apk with 7zip.
Different sized png files are usually the expanded notification bar switches. The darkness theme for example uses smaller ones. The size change is in twframework-res.apk/res/layout/status_bar_expanded.xml so those should be copied together (decompiled).
Another way to customize just 1 or a few .xml or .9.png files is to decompile the original, edit the xml or .9.png (with your modified one in mind), then compile. Then rip the compiled files from it and drop them into the themed one, assuming you already used the original the first time.
CuriousTech said:
Also with 2.2.1 there's a problem with compressed apk files, so in apk manager, you need to set compression to 0. It's not a problem when dropping them into an apk with 7zip.
Different sized png files are usually the expanded notification bar switches. The darkness theme for example uses smaller ones. The size change is in twframework-res.apk/res/layout/status_bar_expanded.xml so those should be copied together (decompiled).
Another way to customize just 1 or a few .xml or .9.png files is to decompile the original, edit the xml or .9.png (with your modified one in mind), then compile. Then rip the compiled files from it and drop them into the themed one, assuming you already used the original the first time.
Click to expand...
Click to collapse
so, double - checking that i understood...
method1: replacing images (same size) using copmpiled source and destination.
if i want to copy iver png's from one theme to another, i only decompress (or 7ZIP - open) the apk's - Replace the pics, and compress bacl (with compression set to 0).
method 2 : replacing images of different sizes
if the images are of different sizes, i should decompile both apk's, than i should copy the corrosponding XML from the new image's source, and drop in the original drawable directory, compile the apk, than copy over the image using method 1.
am i correct?
Thank you all for your help!!!
Yossi
In method 1, don't decompress it when using 7zip (or any other), just open the apk, drop the files in where they go, leaving the apk (zip) intact. If you extract the full apk, modify the files, and compress it back to a new apk it will lose the signature. That's what apk manager does when you zip it and select "system APK". It copies the signature from the original to the new one. Think of it like a zip comment. It's not a file, but a chunk of data attached to the zip that can't be copied from one zip to another.
Method 2: Too complicated. Just use method 1 to do as much as you can.
Whoever put the theme together originally did it incorrectly/lazily.
If you want to spend the time fixing it, then you need to decompile the same version of the .apk (the Samsung stock version, for example) and copypasta the themed one on top of it, while keeping the 1 pixel border.
One more question...or maybe two
when i decompile a framework-res.apk, i only get one drawable-hdpi folder.
if i open the apk using 7zip...i have a 2 folders: one is the same... and and another one that have this name: drawable-hdpi-v4
i replaced all the items i wanted in the drawable-hdpi folder..uploaded to the phone...and nothing happend... than i tried copying over some items to the drawable-hdpi-v4 foder..than i saw the changes.... the question is... do i have to copy the files to both follders? or just the drawable-hdpi-v4 folder?
another question tha poped into my mind right now, is it common that after i replace the framework-res.apk, my accounts data gets erased? (gmail account, facebook, etc)?
Thanks!
Yossi
Get the apktool in this thread and rename your old one just in case:
http://forum.xda-developers.com/showthread.php?t=864424&page=5
Oh, read the thread too. Good info!
The -v4 folders are higher resolution, or supposed to be. They take priority over the others, so if the image is only in drawable-hdpi it will be used, if it's in both the -v4 is used, or if it's only in -v4 it's used. I just leave the non-v4 alone, but it might save space to empty it, just scared to try.
You shouldn't lose account data though. That might indicate a problem. Not sure?
MikeyMike01 said:
Whoever put the theme together originally did it incorrectly/lazily.
Click to expand...
Click to collapse
I don't think the theme makers are to blame. Try decompiling a stock apk, then set the opacity of any .9.png to anything but 100%, draw9patch it again, then compile, then decompile and try to view that png. It's going to be damaged.
Well, it's actually easier to photoshop a compiled one, then remove the .9 and drop in draw9patch but you know what I mean.
I just don't think apktool can handle the extra info in a png.

[TUTORIAL][updated 11/9] ANDROID .xml(decryption) & .9.png EDITING

I am not a developer myself , i did learn few thing through various search sites & posts (most frustrating way), today wildfire owners are desperately requesting for few tweaks , roms (SFM) etc , to be frank wildfire is loosing its developers(sorry dev's)due to new & improved phones being released in the market which are greater than our's
=================================================================================
CONTENTS:
Post 2 : how to edit .9 images
Post 3 :apk manager method
USEFUL LINKS
1.EVERY NEWBIE MUST READ THIS POST
2.BASIC JAVA , ANDROID JAVA TUT
3.ANDROID KITCHEN (basic)
4.ROM BUILDING GUIDE(bit outdated)
=================================================================================
1.EDIT .9 IMAGES
DESCREPTION:
.9 images are basically PNG images , but are modified to specify a few extra expandable instrustions such as HEIGHT , WIDTH . These images are compiled in draw9patch of sdk & are encrypted via eclipse software
REQUIRED SOFTWARE:
1.WinRar(or any other zip tool)
2.Android sdk manager (draw9patch)
3.eclipse IDE for java developers(download it from www.eclipse.org)
4.image editor(i use paint.net tool)
PROCEDURE:
As an example i am using cm7 nightly & i am editing a .9 image in systemui.apk(theme related file) which is in System>app folder
EDIT : now you can download the attachment or can directly see my example images in post itself
__________Extracting Image__________
1.open the cm7 zip via winrar , navigate to app folder which is in system folder
**cm7nightly 170.zip
2. double click on the systemui.apk & a new window pops up with the contents in the syatemui.apk
**cm7nightly 170.zip>systemui.apk
3.all images are in res folder(common for any app) go to res folder
**cm7nightly 170.zip>systemui.apk>res
4. now you have to keep in mind that all the images used by that particular apk are in RES folder & are kept in sub folders named starting with 'drawable' as
drawable-ldpi,drawable-mdpi,drawable-hdpi,drawable
**cm7nightly 170.zip>systemui.apk>res>drawable-ldpi , ref image step2
5.go to drawable-ldpi and extract those image to any folder in your pc
**c:/vimjam/desktop/myfolder , ref image step3
6. rename that image which you want to edit by removing the .9 in the name(original image name : header.9 edit it to header)
**c:/vimjam/desktop/myfolder/header.png , ref image step4
7.edit that image as you wish & save it in .png file only
**c:/vimjam/desktop/myfolder/header.png
8.now open draw9patch.jar which will be in the following folder x1:/x2/Android\android-sdk\tools\lib (x1 refers to your C drive or D drive or whatever partition where you installed your sdk)(x2 refers to program files folder or program files(x86) in few windows versions)
**c:/program files(x86)/android/android-sdk/tools/lib/draw9patch.jar
9.drag your edited image on the draw9patch window , then it will show as the screen shot given below
**c:/program files(x86)/android/android-sdk/tools/lib/draw9patch.jar , ref image step5
__________.9 Image Editing__________
10.this is the part where you encode .9 script on your image
11.basically what draw9patch does is it gives a black lining at the ends of the image(which are to be specified by us)which are later encrypted as instructions in eclipse software)
12.in draw9patch first tick the show patches option
13.now you have to experiment a little bit to understand this procedure , when you left click at the edges of the image a black spot appears that black spot is the .9 code
**right click on that black spot to erase it
14. for now see the screen shots and do the black lining just as what i did(type 1) (do not use the black line at round edges(only at rectangular edges)(refer type 2 image for more details)**after you've completed the procedure use the lining as done in type2 screenshot provided below , ref image type1
15. save that image with the same name as the original file (see screen shot named savetype)(you can see that the image still contains these black dots , dont worry its natural)
**c:/vimjam/desktop/myfolder/header.9.png , ref image header.9
__________Eclipse Encryption__________
16.this is the part where you complete the encryption using ECLIPSE
17. now open eclipse , click new>project>android>android project , ref image step6
18.a new window opens fill the details (refer my pic named demo)(i use the word demo in the details you can use any other) & click finish , ref image step7
19. now expand the demo project , you can see a couple of things like src , gen... ignore them except res folder , ref image step8
20.expand res folder , drag the .9 patched image(which you edited using draw9patch.jar) in drawable-xxx
(xxx refers to ldpi or hdpi or mdpi )
**NOTE: if your edited image is from drawable-ldpi place it in drawable-ldpi only similarly hdpi to hdpi , mdpi to mdpi only , ref image step8
21. right click on the demo folder project & click on android tools , and then on
EXPORT UNSIGNED APPLICATION PACKAGE.... & save your file
**your saved file will be demo.apk , ref image step8
22.now drag that saved file into any zip file(don use the cm7 nightly zip) or you can create a zip archive of that demo.apk which is generated by eclipse
** compress demo.apk to demo.zip
23. open the demo.zip archive, double click on demo.apk , navigate to res , drawable-ldpi and extract the header.9.png image
24. now open cm7nightly170.zip , navigate to systemui.apk , double click on it , click res,drawable-ldpi & now drag the previous image which you extracted from the demo.zip archive ,then the winrar will ask for confirmation click ok
** cm7nightly170.zip>systemui.apk>res>drawable-ldpi , ref image step9
25.dont close the cm7 nightly zip yet , after you clicked ok the winrar will ask for a save confirmation to save changes in parent folder click yes and close it .done
(this confirmation will be small & will be hidden behing other open windows/applications so check carefully & do not miss this confirmation) , ref image step10
now you can flash that nightly file via recovery,same procedure can be applied to any .9 images of any apk
==========================================
EDIT2: UPDATED IMAGE SCREENSHOTS , PLACED ALL IMAGE EXAMPLES IN ".9 IMAGE EXAMPLES.RAR" FILE
**RAR FILE CONTAINS ALL THE IMAGES WITH LITTLE EXPLANATION IN THE IMAGES ITSELF TO UNDERSTAND THIS PROCEDURE DOWNLOAD THAT RAR FILE(contains no virus its my word)
***EDIT : using apk manager to recomoile a sense apk is causing few errors , although decompiling is working fine
Another easier way is to just decompile the framework using apk manager, and editing the .9 png on photoshop since you can edit the black patches as well and just recompile @kevin2516
you can also use apk manager to decrypt .xml files
here are the links for apk manager 4.9 & 5.0 (detailed method will be published soon)
for version 4.9 http://forum.xda-developers.com/showthread.php?t=695701
for version 5.0 http://forum.xda-developers.com/showthread.php?t=1227179
guys as my suggestion use the apk manager method only to decompile the apk's ,(compiling them is kinda messy)(1 out of 5 times the files ive compiled caused force close so better safe than sorry)
procedure:
1. place the apk you want to edit in the folder named "place apk here for modding"
2.double click script file a cmd opens(if it shows java not found error then watch this video and get it right http://www.youtube.com/watch?v=X05JPrto_c8)
3.type 22 and hit enter
4.enter its the apk file's no which you want to edit
5.type 9 and hit enter
6.it might show some errors ignore them
7.now go to project folder which will be in the same place in apk manager folder
8.now open any .xml file with any text editor (i use notepad++)(you can also edit .9 images this way)
9.do the required changes & save it
10.type 11 if what you are editing is a system apk
11.else use 14
12.if your choice was 11(in cmd) then a the cmd will ask few confirmations(type y for both)
13. a new folder gets created by name keep
14.go to that folder and delete every file that you've changed & if you have edited a .xml file then delete the resources.arsc(else dont)
15.after doing this press any key in cmd done
16.a file by the name unsigned.apk will be created in the place the apk here for modding folder
16.sign that file if it is not a system apk , & replace it in your rom
good going mate... I'm desperately waiting to get over with my CAT exams in November... then I'll give my sole into developing!!!
oh that's great & all the best for your CAT exam , i am planning for CAT in the coming years
Another easier way is to just decompile the framework using apk manager, and editing the .9 png on photoshop since you can edit the black patches as well and just recompile
Sent from somewhere far far away.
kevin2516 said:
Another easier way is to just decompile the framework using apk manager, and editing the .9 png on photoshop since you can edit the black patches as well and just recompile
Sent from somewhere far far away.
Click to expand...
Click to collapse
I don't know how it goes with you, but I have always a bootloop when I do that. Probably because the signature isn't correct.
So perhaps to complement Kevin: after recompiling, you can take your modified files out of your "new" apk and put it in the "old" one, and then flash the "old-new hybrid" apk.
Erwin
ErwinP said:
I don't know how it goes with you, but I have always a bootloop when I do that. Probably because the signature isn't correct.
So perhaps to complement Kevin: after recompiling, you can take your modified files out of your "new" apk and put it in the "old" one, and then flash the "old-new hybrid" apk.
Erwin
Click to expand...
Click to collapse
For the framework-res.apk you don't sign it.
They would work too if the above doesn't.
Sent from somewhere far far away.
pyroblazer said:
good going mate... I'm desperately waiting to get over with my CAT exams in November... then I'll give my sole into developing!!!
Click to expand...
Click to collapse
You are not giving any of the other mgmt exams after that? Just CAT?
/ENd OT
EDIT : NVM
Very , very good job. I searched weeks on this forum and other on how to tweak , or create , or modify a rom , and all i could find was some programs ... but still don't know how to use them.
So this thread is very usefull
currently i'm busy with exams ,will update this thread for more simplicity & will add more images about .9 encryption soon

Categories

Resources