Can someone make this into an update.zip/teach me how to do it? - Verizon Droid Charge

I ported a theme for a XDA user here in this forum. But I cant seem to know how to make it into update.zip status. Can someone make it for/teach me how? http://www.mediafire.com/download.php?cxth4pchn488p6q and http://www.mediafire.com/download.php?rmnsr07y3m92d6i

There is a basic overview of how to create an update.zip file here, but this is out of date and won't fully work with our phones. The folder structure and basic process are the same though, so it will be a good overview.
The part that won't work with that guide is the update-script, as we use the new update-binary/updater-script that uses edify for flashing. It's more complicated, but I believe it also allows you to do more stuff. Here is an overview of the new functions of edify and what the old amend versions would have been.
Usually, the easiest way to get what you want is to download something that is known to work for what you are doing (theme, rom, etc.) and just replace the contents of it. You can look at the updater-script and edit it as needed. The basics are setting up the progress bar, mount /system (or where ever it is you're copying files to), copy files, set permissions (if needed), and then you should be done.

imnuts said:
There is a basic overview of how to create an update.zip file here, but this is out of date and won't fully work with our phones. The folder structure and basic process are the same though, so it will be a good overview.
The part that won't work with that guide is the update-script, as we use the new update-binary/updater-script that uses edify for flashing. It's more complicated, but I believe it also allows you to do more stuff. Here is an overview of the new functions of edify and what the old amend versions would have been.
Usually, the easiest way to get what you want is to download something that is known to work for what you are doing (theme, rom, etc.) and just replace the contents of it. You can look at the updater-script and edit it as needed. The basics are setting up the progress bar, mount /system (or where ever it is you're copying files to), copy files, set permissions (if needed), and then you should be done.
Click to expand...
Click to collapse
Awesome! Thanks a lot man.

Related

How-to Theme Development

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.
Before you start be aware that you will probably end up wiping your phone once, if not more. So lets go over the things that you will need.
You will need JF's RC30, RC8, or ADP1 V1.3, depending on what version you intend to create for.
Here is the link to these: http://forum.xda-developers.com/showthread.php?t=466174
You will also want to get the dev bootloader installed on your phone and to HIGHLY suggest everyone trying your theme to install it as well.
Link to dev bootloader: http://forum.xda-developers.com/showthread.php?t=455860
You will also need to resign all the apks located in /system/app and framework-res.apk located in /system/framework. When you push all of these to your phone, you will need to do a wipe.
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.
Here is the link: Http://www.FightForthePits.com/testsign(2).zip
Before using this you need to know how to set this up:
I will assume that you have the sdk downloaded and extracted somewhere(if not, do that now), extract both files to the tools directory of your sdk.
Now you will need to add the tools dir of your sdk to the environment variable CLASSPATH.
To do this, 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.
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
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? If not hit the windows key and R at the same time. Type in regedit. go to HKEY_CLASSES_ROOT and expand it. Now find .apk and click it. Double click on (Default) and erase apk_auto_file. Hit ok and close the Reg editor. Now right click an apk and the option ResignApk should be there.
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.
You will also need a version of linux installed or running vmware with linux, so that you can create an update file which will install the theme onto the users phone.
You need to make sure that you do this correctly, because if you don't then you will have the potential to create problems for people trying to install your theme. You also need to be specific in addressing what version your theme is for, RC8, RC30, or ADP1. Make sure every file gets signed. 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 res and more specifically in folders that are named Drawable, drawable-land, drawable-port, etc. 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. If you do you will have problems...Trust me. These are special images called ninepatch images and android resizes these images to fit wherever android, or any other apk, needs it to. if you do open them or edit them they will no longer render correctly when resized. I believe that in order to edit these you must do so and then put them into the source and rebuild the entire apk.
Before getting started you must also realize that you cannot simply resign one or two apk's and stick them in your phone and expect them to work. You must resign every apk inside of /system/app and framework-res.apk and put them on your phone at the same time.
To simplify this process for you though, I have provided an update which will do all of this for you. Note that these updates will not completely wipe your phone, your apps will be retained, however, they will require you to re-enter your Google info, and you will lose you call history.
Links down
Just put the correct update.zip, depending on what version you are running, onto your sd card, boot into recovery and hit alt + s.
Now you can push your own apk's one at a time without re-wiping your phone.
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. Note that if you are using windows you will need to unhide known file extension types.
See here to unhide known file extension types for Xp: http://www.mediacollege.com/microsoft/windows/extension-change.html
See here to unhide file extension types for Vista: http://maximumpcguides.com/windows-vista/how-to-change-a-file-extension/
After changing the apk to a zip open it go to res and copy the folders that have drawable in their name. Go to your desktop, or wherever, create a new folder called Images, or whatever. Open the folder, paste the drawable folders in there. Now you can see what the files look like without opening them. Btw, you may also want to add -frame, or -launcher, to the end of the folders you cope over to keep them separated from others.
Finally, you've edited the images put them all in the apk renamed it back to an apk and resigned it. Now it's time to push it to your phone and see the changes you've made.
Important! : Whenever pushing files to the phone NEVER do it while the phone is running. Do this in recovery mode! If you do this while the phone is running normally you will begin to lose space in /system.
So, boot into recovery plug your phone in and open a cmd prompt. From the cmd prompt type adb shell mount /system then type the following: adb push c:\whereveryourfileis\whateveryourpushing.apk /system/app (system/framework if your pushing framework-res.apk)
Now reboot your phone. If it doesn't boot, try doing a wipe, if that doesn't work reinstall an update and try again. There are alot of things people can do wrong, I can't explain them all here. If you get real stuck, you can ask for help here or contact me on Gtalk [email protected].
So now your theme is done and your ready to make an update.zip for others to install your theme.
This must be done in LINUX! Not WINDOWS! Yes it may work for you if you do it in windows but other people's phones will enter an indefinite loop! Just do it from Linux! If you absolutely cannot make your own update.zip, contact me and we'll see if I can make one up for ya.
I have created a template for you to make your own update.zip. Just download, open in Linux, and add the system apps to app, and framework to framework. Zip it up, SIGN IT, TEST IT YOURSELF, and then distribute it!
Empty update.zip template: Http://www.FightForthePits.com/Androidstuff/update_empty.zip
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.
Stericson
Links of interest:
Downloading SDK: http://code.google.com/android/intro/installing.html
Using ADB: http://code.google.com/android/reference/adb.html
Working with ninepatch should be straightforward if you use the draw9patch tool included in the SDK. Documentation on usage here:
http://code.google.com/android/reference/draw9patch.html
JF could also save theme users a wipe by resigning /system/app/* and /system/framework/framework-res.apk in his builds with the test keys. Nice tutorial, btw.
However it doesn't. I have used that to no avail. I believe you need to edit the images, put them in the source then rebuild the apks from the source.
As for JF's update, it does not currently wipe your phone after install. So, for him to do this he would have to have his update do a wipe. So technically, they would still have to do this initial wipe.
Stericson
Stericson said:
However it doesn't. I have used that to no avail. I believe you need to edit the images, put them in the source then rebuild the apks from the source.
Click to expand...
Click to collapse
Good point. I thought you could simply drop a similarly dimensioned PNG in but apparently there is some metadata that only the android tool can create.
As for JF's update, it does not currently wipe your phone after install. So, for him to do this he would have to have his update do a wipe. So technically, they would still have to do this initial wipe.
Click to expand...
Click to collapse
True, but a user who is upgrading to a JF update after having put in customized (and test-key signed) system apps will have to wipe again anyway =) Anyone using custom themes will have to wipe every time a JF update (or any update) comes out. However if JF resigns, custom theme users would not have to wipe and stock theme users only have to wipe once. (Nevermind the fact I think everyone should wipe when updating...)
thx stericson this will help big time how long before I can get resigned rc30 last night when you said all the apk. need to be resigned I was like this is going to be a long night but I see jf hooked you up save some big time with his resigning tool
jashsu said:
Good point. I thought you could simply drop a similarly dimensioned PNG in but apparently there is some metadata that only the android tool can create.
True, but a user who is upgrading to a JF update after having put in customized (and test-key signed) system apps will have to wipe again anyway =) Anyone using custom themes will have to wipe every time a JF update (or any update) comes out. However if JF resigns, custom theme users would not have to wipe and stock theme users only have to wipe once. (Nevermind the fact I think everyone should wipe when updating...)
Click to expand...
Click to collapse
Ah, good point
The resigned apps will be released maybye sometime tonight...I had them done but ran into a script problem on adp1 and I have yet to try the rc30 and rc8 ones yet. so I won't release those until I've tested them. If you want to be a Guinea pig however, just let me know
Stericson
Stericson said:
Ah, good point
The resigned apps will be released maybye sometime tonight...I had them done but ran into a script problem on adp1 and I have yet to try the rc30 and rc8 ones yet. so I won't release those until I've tested them. If you want to be a Guinea pig however, just let me know
Stericson
Click to expand...
Click to collapse
The resigned apps have been released, each update file will resign all of apps in /system/app and framework-res.apk. However, these updates make no changes to them whatsoever...Meaning your phone will look just like a brand new phone without any modifications.
rc30 works thx Stericson made it easy for use
Issues with using the update.zip above
Hi all,
I just wanted to point out that after I applied the update.zip above and rebooted applications kept force closing randomly and constantly even through the initial setup (where you have to click the green android to start).
Prior to this, I had JF's RC30 1.3, and the engineering bootloader V2 no sigcheck.
First I did just a alt+s then a alt-w and alt+s. And still nothing.
I'm new to all this so I'm not even sure where to begin troubleshooting. Should I be using the HardSPL?
Thanks in advance and I appologize if this isn't the right place for this post.
Update:
After reflashing with JF's 1.3 RC30 and the problem persisted I noticed that there was a new release 1.31 and this has fixed the problem. I hope this helps anyone else who runs into the same problem.
I still don't know what went wrong though, can anyone shed some light on this? thanks.
Truly there's no telling, sounds like J'f's update fixed it. Can I ask what version you tested?
I would also like to announce that now, thanks to JF, again, you do not have to wipe your phone completely to apply the resigned app updates. However, you will have to re-enter your google info and your call history and other minor things will be gone, but all of your apps will be retained.
Stericson
Stericson said:
Truly there's no telling, sounds like J'f's update fixed it. Can I ask what version you tested?
I would also like to announce that now, thanks to JF, again, you do not have to wipe your phone completely to apply the resigned app updates. However, you will have to re-enter your google info and your call history and other minor things will be gone, but all of your apps will be retained.
Stericson
Click to expand...
Click to collapse
Hey, I tested it with this one:
Rc30 resigned: http://www.fightforthepits.com/Andro...pdate_Rc30.zip
Update went fine, until I booted back up then the applications kept force quitting, without me even doing anything.
Thanks,
Limitlis
yes there is a temp problem with those right this moment I am on the problem as we speak, expect a fix tonight...
Stericson
Can we get the fix cuz it bricking fone I had to flash rc29 nbh
Edit: I forgot please.... feel kinda rude when ur helping me out lol but it bricking some phones and for our less experince members we don't global meltdown lol
These files have been fixed and uploaded.
Stericson
I found the cyclon boot effect images in in framework-res/assets/images,
is there any way to replace the android boot image with those images?
Is there anyway to make the theme with a custom boot screen? Also is there a way to change the second boot screen(The one that says Android and has the little robot)
i tried using the testkeys from JF to resign my apks, but the update still says there is not signature =[
hello, I used the tutorial and everything worked great. I'm trying to change the background to the notification section but I can't find that file. Could you tell me where it is? Thank you.
hey stericson, how do u create a theme for rc33?

Custom clockworkmod compatible update.zip

Hello, I would like to create my own update.zip that would be compatible with clockwork mod. I have several files in several locations that I manually copy over after new installs like multicolored bash nano iwconfig iwlist etc. And I think it would be much easier to create a installable package for that, I also delete a number of built I. Apps like tweeter amazon etc. And I have seen the scripts inside oyhers update.zip's that I could add the bash commands to remove those things as well.unfortunately I know nothing about what clockworkmod wants and I see binarys inside these zips dont know if those are customized for each zip or the same in all of them, I dont know what files or information is absolutely required. The best possible solution is if I had a blank update.zip that held all of the required files settings and all I needed to do was add my files and asd a few lines to a preexisting script to remove sum stock apps.thinking back I might have seen a file containing all the files names and md5 chucksums for each as well which if necessary I can do. Is there something like this available for download sumwhere? If not ajy resources to learn the required information and find the required binarys.thank you in advance.
Sent from my Droid using Tapatalk
Hi,
I've been trying to learn the same thing. I'm curious if you found anything useful since posting this.
Of course, if I find anything, i'll post back here too.
Thanks.
Same problem here
Good to hear someone with same problems. I want to create a generic ROM for myself and I want to use ClockworkMod to help flash it instead of using fastboot.
Well, I have found no documentation about what ClockworkMod may need for a zip file.
But I guess it could be possible to just replace them with your own by downloading an existing zip file created by someone else.
I'll try it to see if that works or not. Of course, a documentation would be better.
I regularly flash a new CM7 Nightly as they are released and I have to manually modify some things each time a new rom is flashed. I change screen density and add a notification ringtone that CM7 does not have. I wanted to automate that. Since I have to reflash the Google Apps each time anyway, I thought why not modify the gapps zip to include my changes. After searching the web I found a little info about how to do it. I just modify the zip on my computer using WinRar, copy the file to my device and re-sign the package using signapktic which is free on the market. Then flash using CWM. It worked great. No more manual adjustments. There are some instructions here which helped me:
http://forum.cyanogenmod.com/topic/15030-moving-apps-to-system/
I been getting into the kitchen
http://forum.xda-developers.com/showthread.php?t=633246
So far i`ve managed to integrate a few apps , ringtone should be easy
next the fonts from utmost rom
thanks to the kitchen, Im now running at script kiddie level

[GUIDE] Newbie's How To: Port Theme's

How To Port Theme's
(Using Apktool, and Theme Porter)
Since there are some people out there willing to learn but not exactly able to with all of the convoluted information on the forums, I decided I'd start putting together a guide similar to other's to aid those trying to learn. Stay tuned as this is under construction!
All credit is due to original creators of the product's used in this process, without them there wouldn't be a reason for this guide . Please be respectful of other's work, sometimes it's best to ask before attempting (if it is an original product) but at very least give credit and a link back.
What is porting?
Porting very basically is taking .png files and XML changes from one theme (typically created for a different model, but using the same resolution) and copying them into deodexed stock rom's such as EC10/EE19 Pick and Pack so that they can be flashed onto our phones and used with our framework and/or updated framework.
Sounds really easy, doesn't it? At first it will be cumbersome and frustrating, but after you've used the processes enough you will be able to snap these out in 30 minutes or less! The problem lies in the way these files are packaged, they are mainly just a .zip file that isn't compressed, however there is another layer to an .apk that you can only see once you've learned how to use tools such as apktool/apkmanager. The other tool we will use to aid us in this painstaking process is an application called Theme Porter, which essentially is a script that has been written that will do all of the legwork for us. Let's get started!
What will I need?
Apktool I currently use an older version of the program, you can download here, this one I know works for sure - last I heard the other has issues.
ThemePorter
7zip (Win rar could be used instead)
Notepad++ (Or equivalent code editing software) which will be used to make the xml changes. If you're not familiar with using something such as this, you may want to take time to research before attempting to port.
How to set up;
Begin by getting ThemePorter setup, you just need to unzip the download and that will be "theme porter" It is basically just made up of a few folders, and has a batch script that you will use to initiate the process. I just place mine on the desktop for easy access.
Secondly, get apktool downloaded and unzipped. place the apt folder somewhere where you can easily navigate to it through a command prompt. C: might be a good place if you want to save yourself some keystrokes.
Next just make sure you have notepad++ or another editor installed for use later.
Lastly, get 7zip installed so that you're able to open .apk and .zip files without actually extracting the files.
Where do I get my source files?
You can use any framework from any rom that can be decompiled correctly with apktool. This means when you decompile it, there are no errors and it generates a folder with the same name. Download the rom of your choice and save it (still zipped) somewhere on your desktop, and make an extra copy in case you mess up and overwrite the wrong files. You will ALWAYS use these in the NEW folder within theme porter, but we will get to that.
As for the theme you're trying to port, I usually use fascinate theme's, because it is basically a direct copy of our phone (Note: As of 2.2 they now have a Data on/off icon in their status pull down, where we have Silence, so this will often need to be taken care of separate from this process.) I've also recently started using Vibrant theme's, as these are also very similar - but there are tweaks with these too and I will try to cover them in the guide at some point. You may find others that will work too, at this point this is all I've had time to mess with. Either way, download the .ZIP file and also place it somewhere easy to access.
This is where it get's sort of difficult.
Stock ROM's have some differences to theme's that theme porter cannot handle for you. These are basically MOD's that may exist in the theme ROM and/or XML changes that have been made to alter text color's to accommodate the theme (black to white, white to black, etc.) These changes WILL NOT be ported over using theme porter and unfortunately also cannot be made AFTER using theme porter, so there is a certain process to go about this.
Now enter's apktool. Apktool is a script brut.all very kindly wrote to assist android developers in decompiling/recompiling .apk files without losing structure that normal compression software breaks. Basically there are two reasons you will need to take this step.
When;
Editing Text Color- When choosing a theme to port you will need to pay attention to the screenshots the original poster has posted, as these will clue you in whether or not this needs to happen.
The Pick and Pack rom is essentially still stock, as far as XML goes - so the text on menu's for example, will be Black text on a white background. If the theme you chose has something different, you will need to take this step so that the text is legible in the final theme.
Adding accurate battery MOD- Also when choosing a theme you will need to take a look at the framework-res.apk file to determine if the themer has added the accurate battery mod. Essentially all this means is the XML and image's have been edited to show you each percentage of battery life vs. the stock one that only shows odd increments of 10/15/20.
Open framework-res.apk with 7zip
Navigate to res/drawable-hdpi (this also may be drawable-hdpi-v4 depending on your theme, I haven't quite figured out why this is)
Scroll down until you see the status_battery icons near the bottom - if there are not images for every percentage - then no mod exist's and you can skip using apktool for this step.
How;
For either change you will follow this process to decompile To gain access to the XML/PNG files that contain these text values, we will need to decompile the framework-res.apk file from the rom.
Copy framework-res.apk from the rom and place in the APT folder created earlier.
Rename this to something shorter such as "FW.apk" for easier command lines
Start a command prompt (in windows 7 type "cmd" in the search bar within start menu)
Navigate to the APT folder, For example;
Code:
CD c:\Users\brandon\Desktop\apt
Type
Code:
apktool d FW.apk
This will decompile the .apk into a folder called FW within the APT folder, allowing you access to the files. I will cover the actual changes in a later post.
At this point you have the files in a folder and they can be edited how you see fit (should you choose to just edit the stock ones vs. actually porting already changed ones).
You'll notice when examining the folder that there are quite a bit more files. Also, you will be introduced to the .9.png file type, which essentially is just a .png file that has some black lines embedded in the file to instruct android how to resize and reuse the image within the framework.
Any edits made to these files must be made carefully, as to not alter the integrity of these black lines. When the file is recompiled, the lines will disappear but will be included (if you tried doing this without decompiling - your photo editor would nix these lines and android wouldn't know how to size them)
If all your edits were complete, you would then recompile the file through apktool. (I will continue with the theme porting guide in the next step, this is just a good reference point for these steps.)
Type this into the command prompt
Code:
apktool b FW framework-res.apk
This would then create the framework-res.apk file in the APT folder, however there is an important step here. During this process the META folder is lost, and the AndroidManifest file is corrupted.
Delete the AndroidManifest.xml file from the new framework-res.apk
Copy the META-INF folder and the AndroidManfiest.xml file from the ORIGINAL framework-res.apk (now named FW.apk in this example) and place it in the new framework-res.apk using 7zip (do not extract the file, open the archive with 7zip.)
At this point, your framework could be ready for replacing in your theme.zip (will be covered later) with the edit's you've made Or if you're learning how to port theme's, continue reading.
Guide Part 2....
Preparing for Theme Porter
Okay now that we have some of the side process out of the way, let's get back to the guide.
Determine if you need to make any XML edit's for battery or text color changes and perform them per the processes detailed below. If you do not need to make them, you may skip this step completely and move on to using theme porter.
Correcting Accurate Battery Mod Animations-
Follow this guide to make the changes to the framework to use the new charging animation images and will allow you to then use theme porter to swap the .png files
Decompile the framework-res.apk from the ROM download (I usually just rename this to EE19.apk or whatever the rom is i'm working with)
Decompile the framework-res.apk (I first rename the framework-res.apk file to NEW.apk (or whatever you wish) Note: It will typcially give you errors (unless it's theme'd correctly) but you're just after some code from a few .xml files so don't worry.
In the NEW folder Navigate to
Code:
\res\drawable-hdpi\
or
\res\drawable-hdpi-v4\
Copy all of the battery charging .png's and drag them to a folder on your desktop. Then open the EE19 folder within APT (the one you decompiled from the rom you're working from) Drag those images into the /res/drawable-hdpi-v4 directory replacing any existing ones.
open the following file in notepad++
Code:
\apt\NEW\res\drawable\stat_sys_battery_charge.xml
Also open the same file within the EE19 decompiled folder
In the THEME xml file select all and copy
In the EE19 xml file, paste this replacing the text. Then save it overwriting the original.
At this point, the battery mod is done and the new .png files exist so that theme porter can do it's work (And the xml is there to make it works when it get's to your phone). If you don't have any text edits to make, you can recompile the apk (as stated in steps in first post) and move on to steps below (skipping the section on changing text).
Changing text colors-
If you have determined that the text in the theme is different from the rom framework (I.E. Text on notifications, menu's, etc.) then you will follow these steps to locate where these changes need to be made.
If you haven't already, decompile the framework-res.apk from the Rom.
Next, determine what text color edit's you need to make and then use this wonderful reference to determine which actual files those edit's correspond to.
Locate the file you need to edit in the decompiled folder, and open it with 7zip.
Typically removing the "inverse" reference on the color line will change it from black to white, or white to black and is the easiest/best way to alter colors in a ROM. (For a quick note, searching for "menu" in the styles.xml files located in /values/ will give you the items you need to change, watch for _bright references for the dividers, change those to _dark instead.
Once you are done making these edits, recompile the folder as stated in first post. And move on to using theme porter.
Using Theme Porter-PAY CLOSE ATTENTION HERE.
Now that you have the appropriate prep-work done, the easy part finally comes. (Hopefully)
Copy and paste the applications & framework-res.apk twframework-res.apk files from the THEME.zip into the appropriate folders within the OLD folder in theme porter.
Now copy and paste the same files that you copied from the theme.zip, now from the rom (EE19 for example) to the NEW folder in theme porter.
Once all files are in appropriate folders, run the Script.bat file in theme porter. Use a selection of "1" and press enter.
Theme porter will now copy all of the .png files from one .apk to the other (where the folder names are an exact match)
NOTE:At this step, you may have issues where the images aren't brought over (This typically only effects the framework files and just depends on how the file was generated/edited). This can be detrmined by opening the .apk in 7zip and pulling out the res folder, where you can view the files (you will see if it's been changed or not) If it hasn't, you will need to make sure the folder within the Themed .apk's are the exact same as the ROM you're themeing and re-run the theme porter script. (meaning you need to add or remove the -v4 ending depending on where the previous themer placed the themed files)
If you're lucky, everything is done at this point and you can move on to packaging a flashable update.zip.
Packaging A Flashable Update.Zip
A flashable package is simply a .zip file (stored as "store" in 7zip, no compression) that is made up of META-INF and System folders. The META-INF folder is very important as there is a big difference between using one from a ROM (pick and pick) and a theme (NeonGT) You will need to download a theme and pull the META-INF folder out so that you can use it in your theme ports. This is to ensure you have the correct script (edify or ammend) typically now we're using edify so use one from one of the H57 theme's via baked_tator The system folder should contain two folders "framework" and "app" each of which will hold the respective .apk files you have been working with. (but could also contain a "Media" folder for changing bootanimation.zip files, basically any files within the folder structure you create (matches the system structure) will be replaced when flashed. So be careful not to include things I haven't listed here unless you know what you're doing. And be sure to test these things before even thinking about a release.
Create the following folder that can be re-used with any new theme port, it's the easiest way to keep things organized and not lose track of files.
Create a new folder on your desktop called New Theme
Within that folder paste in the META-INF folder from another EE19 theme.
Create a new folder called "system"
Open system and create two new folders "app" and "framework" (and "media" if you are including the bootanimation.zip from the theme (which typically will work on our phone)
Place approprate files from the NEW folder within theme porter into these folders, respectively
Back up so that you see the META-INF folder and System folder, select those two, right-click and select "add to archive" in the 7zip menu.
Name the file "EE19 ThemeName VX.zip" and select "Store" for the method
Drag this to your desktop and this will be what you will place on your SD card for flashing.
Test the theme thoroughly to make sure everything ported over and everything still works (make sure to test USB, even color XML edits can cause odd issues) and get help from others to make sure the bugs are out.
If you run into issues, check the next post for possible resolutions.
BE SURE TO CREDIT THE PROPER CREATORS!!! I can't express this enough, I have a format for the way I do release posts, feel free to copy it if you'd like but either way make sure you make it known that it's not your work!
FAQ / Common Issues / Other Resources
Common Issues:
Images do not transfer to new framework.apk files.
(typically the applications all have the same folder names, so no problems occur here.)
As stated in the guide, all folders within each res folder within each .apk file used in theme porter must have exact matching folders/files for the .png to actually transfer. If it's been edited with apktool, it typically has the -v4 extension.
Troubleshoot your issue by opening the resulting .apk file in 7zip and comparing to the downloaded theme file in 7zip. You may have to pull the res folders out and look that way to actually see which images didn't transfer.
First thing to check is the folder names within the res folder, if the rom folder's names are "drawable-hdpi" and "drawable-land-hdpi" and the theme has "drawable-hdp-v4" then you need to remove the -v4 from those folders and run theme porter again.
NOTE: I've also run into situations where both folder's existed in the .apk file, meaning both drawable-hdpi and drawable-hdpi-v4 folders were there, but only one actually had the themed .pngs. In this case it was the drawable-hdpi folder that had the themed ones, but I needed it to be -v4, so I deleted the existing -v4 folders and renamed the others to -v4 - this also slimmed the rom because you really don't need the extra folders/files (nor wan't them!)
Some times icons don't exist on other phones, or they are completely different icons. I.E. with 2.2 fascinate theme's the Silence icon does not exist and therefore would need to be pulled from another theme or created to be fixed. This can be done with 7zip, no need to decompile the file if you're just swapping .png files (in the final framework-res.apk .
[*]Problems after testing theme.
This has happened to me on all sorts of levels;
Problems Restoring - Sometimes after testing theme's you'll go to restore and things will not be right when you boot, FC's and whatnot. Best case scenario you can restore to a vanilla restore (meaning your rom + any app's you wanted, but no theme's) or just flash your rom to fix.
Problems with icon's not being correct on a restore or a flash.
Same as above, sometimes things just go awry when you're flashing theme on top of theme, so i'ts best to start from the rom. Make a restore point with your rom + all your apps, then you can always go back to it and flash your day to day theme - this will give you the least trouble.
Phone stuck in airplane mode, setting is disabled.
I had this happen to me randomly once, no idea why but if you do run into this the only thing that fixed it for me was an odin back to a full build. No restore or flash would fix it. Typically your problem should be solved with a fresh flash of your rom, but sometimes going to a full build with odin is the only way.
FAQ:
Post them and we'll get them answered and edited in here. So far I've tried to cover everything I knew of in the guide .
Reserved
Reserved
Reserved
Other Resourcs:
Great guide by nitsuj17 on how to theme
Hex Colors
Free Photoshop Alternative
XML Color Edit Guide - in case you missed it above - credits to KBanause
wow, you rock bde. thanks for your time and help with this, I will be following it to help you guys out with stuff more.
Sent from my SCH-I500 using Tapatalk
sageDieu said:
wow, you rock bde. thanks for your time and help with this, I will be following it to help you guys out with stuff more.
Sent from my SCH-I500 using Tapatalk
Click to expand...
Click to collapse
Great, and thanks, I'm glad to share what I've learned with the community
Great write up,ive read through it several times. Just wish I hadn't traded my desktop for tattoo work this weekend. ..
Sent from my SCH-I500 using Tapatalk
man you write some good tutorials...
Very thorough and still easy to understand, Great work!!
Very nice! Just fixed the white on white text in my super light port. Big Thanks!
Great write up!
So, I tried using apktool to decompile the framwork-res.apk and it worked fine, recompiled it and everything was good, are these the same steps I would use for other APK's such as in the apps folder (i.e. Settings.apk) because I cannot get them to work I keep getting brut.androlib errors
bwot75 said:
So, I tried using apktool to decompile the framwork-res.apk and it worked fine, recompiled it and everything was good, are these the same steps I would use for other APK's such as in the apps folder (i.e. Settings.apk) because I cannot get them to work I keep getting brut.androlib errors
Click to expand...
Click to collapse
Usually if you get errors in compiling there have been things added or removed after compiling, this is sometimes caused by using theme porter for example.
Apktool works on any apk, but i'ts fussy about what's there before it recompiles. Try decompiling and recompiling with no changes, if it doesn't work then it won't work on that .apk (to my knowledge). You basically will always need to start with one of the deodexed apks from phidelt's pick and pack, then add changes while i'ts decompiled, then run theme porter after it's recompiled if needed.
And glad you all appreciate it
I vote sticky on this how-to...very good write up and it makes my life easier!!!
Definitely sticky
Sent from my SCH-I500 using XDA App
Thanks for the good reading bde. great tutorial.
Hey thanks, glad to share the wealth
Sent from my SCH-I500 using XDA Premium App
I followed this guide and made XML editing for Framework-res.apk to change font colour in the Menu using Notepad++, but after xml edit, cant build the framework.apk, it says sources have changed and does not build the apk. Am using apktool for this. Any suggestions how to go about it. Or somebody can guide, how can I change the menu background so that Menu texts are visible?
trip007in said:
I followed this guide and made XML editing for Framework-res.apk to change font colour in the Menu using Notepad++, but after xml edit, cant build the framework.apk, it says sources have changed and does not build the apk. Am using apktool for this. Any suggestions how to go about it. Or somebody can guide, how can I change the menu background so that Menu texts are visible?
Click to expand...
Click to collapse
As stated in an above post, try decompiling the framework-res.apk you are working with - without any edits and see if it will recompile with no error. If it doesn't then re-read my guide
Ok thanks will check it.
Never mind, I figured it out.
Sent from my SCH-I500 using XDA App
I did some major fixin' on the OP, hope it's more clear!

[Q] How to modify a deodexed .zip ROM file?

I wanted to get some insight, direction and perhaps guidance on how to take the existing Deodexed ED2 ROM and get inside and make some edits, remove bloatware, replace Touchwiz with a different launcher etc. I am not looking to build a full blown custom ROM, I am just looking to edit a stock (yet deodexed) ROM to meet my needs.
Any help would be greatly appreciated so I can learn more about this process.
There are two ways you can do it. First way, that is usually a little easier to work with, is to extract the zip file, make the changes you want, and re-zip the whole thing. The other method is to just open the zip file (7zip or similar will make this a little easier) and add/delete stuff as you want. It eliminates the decompress/recompress part, but is a little harder to work with unless you know exactly what you want to do.
As far as figuring out what to remove and such, some files are named in a manner that they are easy to figure out (Mms.apk for example) and other files are not (Dlna.apk is AllShare). If you want to figure out what an APK file is, a good indication is sometimes opening it with say 7zip (they are essentially zip files) and extracting res/drawable-hdpi/icon.png and you can see what the icon is. Astro File Manager can also give you some info on the specific Apks, as can Titanium Backup I believe.
As for replacing things (like the launcher) it is as simple as taking one out and putting another in for most stuff. I will let you know that I had battery drain issues when I removed the stock TWLauncher, but I believe I know how to fix it then. A lot of stuff though, if you are replacing things, you'll want to do 1 or 2 things at a time and also be familiar with logcat as it is an invaluable tool when testing out ROM changes and problems.
Thanks imnuts, I will start to play with a zip file and go from there. As you mentioned the bloatware is in the system folder and not the data folder so perhaps I will just delete the bloat, and install GB Launcher on my phone and make it default so that TW is still there just not in use.
Hi,
a little late, but...
did you actually make this work? I'm trying the exact same thing, but my 4ext recovery always aborts the installation. Do I need to sign it or what is wrong?
Thanks a lot...
Please use the Q&A Forum for questions Thanks
Moving to Q&A

AutoMod [Modding Tool] [Script] [Linux/OSX]

AutoMod BETA 1.6 by MAD Industries
-----------------------------------------------------------------------------------------------------------------------------------
First off, this is not another APK Manager, this is also not Auto APK Tool. These two tools focus on the decompiling and recompiling of APK and jar files. AutoMod intends to bring a new paradigm to modding. That is, there are mods and there are roms. AutoMod makes them friendly with eachother. APKs are handled internally by the script.
I wrote this tool because as a developer who was using APK Manager, I ran into several obstacles along the way. One of them was that I liked to be able to take requests from users and personalize the mod to their tastes. Unless I was impeccable with my folder organization, it very quickly got out of hand with people asking for personalizations based on other personalizations. I would find myself decompiling a version I made the day before so I could remember what was in it and create yet another version on top of it. All this back and forth and I would end up with a mess of recompiled, decompiled, original, custom, extracted, etc files all over the place taking unnecessary HD space. On top of that, every step of the way required user input in the form of a yes/no prompt or selected a menu option for decompiling/recompiling/keep folders/signing/etc. And then I would manually create a flashable zip file for each version. AutoMod solves many of this issues in it's current BETA state. When it is finished, it will have solved all of them.
Features for End-Users:
Mods are dynamically applied to your ROM (this allows mods to stay up-to-date with the ROM without original developer support)
Mods often work across multiple similar ROMs (easy porting)
Mods are stored in what I call "opensource" format which means it is very easy to dig into the Mod package and change things to your personal preferences with very little knowledge modding
Only the modified files within the apk are stored in a mod package. This greatly reduces filesize
AutoMod encourages backups at every major step in the process
Backups are dynamic, meaning it will only backup the files which are modified
Backups are automatically saved as a flashable zip file so you can have it ready if a mod does not successfully integrate
AutoMod always keeps itself up-to-date with the latest features
Distribution of AutoMod requires only the script itself
AutoMod has the ability to accept a ROM Install file or an actual device as a base for creating a flashable zip file out of any mod package
Supported devices can have mods applied instantly and automatically over adb
Features for Developers
Since mod packages only contain changed files, you no longer have to hunt through hundreds of files to find a single png (such as when creating five different colored versions of a theme)
Easy packaging of mods for redistribution for this tool as well as update.zip format
AutoMod can "install" multiple ROMs into it's system so you can make a mod once, and then distrubute it for several ROMs at the same time
If you run nightly builds of your own ROM, AutoMod will soon include a scriptable feature which will allow you to release nightly themes, mods, etc with no extra effort
Much of the developer features are yet to come (such as quick prototyping of mods and parallel device/ROM support)
---------------------------------------------------------------------------------------------------------------------------------------
Tutorial written by mybook4 on post #16 (be sure to thank him)
---------------------------------------------------------------------------------------------------------------------------------------
1) Download automod.sh script and place it into an appropriate directory (I used one called AutoModTest)
2) Download the ROM Install zips you would like
3) Create your mod package (see below)
4) Run automod by typing “bash automod.sh” in a terminal
5) Select option 5 (Install a new ROM file into AutoMod), and follow the script's directions (copying your ROM zip, to the directory, not moving it or it will be overridden)
6) Select option 4 (Install a new mod package into Automod), and follow the script's directions (copying your mod zip, to the directory, not moving it or it will be overridden)
7) Select option 3 (Use a ROM Install zip + mod to create a flashable zip for another ROM/device), choosing the appropriate ROM and mod package.
8) Out came the zip! This makes things soooooooooooo much easier and more manageable!
Notes about automod mod packages:
1) A mod file is structured as a zip file with the extension .zip replaced with .mod (so as to separate it from flashable zips with the same name)
2) In the mod file is a directory with the name of the mod.
3) In the directory with the name of the mod is a directory tree leading to the files within the specific apk you would like to modify. For example, in the ICSBlueFull.mod file, the directory tree is as follows: ICSBlueFull, system, app, SystemUI (the apk being modified), res, directories with modified files (images, xml files, etc).
4) Just to be safe (and to match the ICSBlueFull mod supplied), I set permissions on all folders in my mod to 755 and all files to 644 (if these numbers don't mean much to you, open a terminal and type “man chmod”)
5) There is a command to package mods you have made into .mod files. This can be found in the developer menu. (option 11)
6) Spaces in file name are currently not handled very well. Try and name your mods accordingly.
---------------------------------------------------
How To Create A Mod
click to enlarge
---------------------------------------------------
Download the script here: http://cl.ly/code/463B1C3B123i
Note: Proper syntax is 'bash automod.sh'
Download an example mod here (for stock GS3 touchwiz based ROMs) [Fixed!]: https://github.com/downloads/MADindustries/automod/ICSBlueFull.mod
Original thread for this mod can be found here: http://forum.xda-developers.com/showthread.php?t=1775235
View the source/branch it here: https://github.com/MADindustries/automod (check this to see if using a 'forceupdate' would add features/functions)
awesome work dude!
invisiblek said:
awesome work dude!
Click to expand...
Click to collapse
Thanks. Btw you are in the credits on the script itself. (even if it was a couple binaries haha)
Wow. Great work. Can't wait to see more!
Ta very much indeed.
ALQI
Sent from my SCH-I535 using xda app-developers app
Nice job buddy..No Windows support?
This is amazing. +100000000000
Sent from my SCH-I535 using xda app-developers app
incubus26jc said:
Nice job buddy..No Windows support?
Click to expand...
Click to collapse
Not just yet. I'm on Mac personally which makes it not too difficult to see some Linux support as well. But Windows would be a completely new write from what i can tell. It will likely happen after this is out of beta unless a Windows dev feels like working with me on it. Obviously everything is open source and i would love to see a port pop up before i get around to it.
Sent from my Galaxy Nexus using Tapatalk 2
Very cool indeed.
Tried to download the example mod but appears it's down/not available.
Definitely want to give this a try.
Thanks for sharing
MAD Industries said:
Not just yet. I'm on Mac personally which makes it not too difficult to see some Linux support as well. But Windows would be a completely new write from what i can tell. It will likely happen after this is out of beta unless a Windows dev feels like working with me on it. Obviously everything is open source and i would love to see a port pop up before i get around to it.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
It might work on windows with the right install of cygwin. I'd have to create a windows VM to test it out and I'm not all that familiar with cygwin anymore, any windows devs out there good with cygwin?
Sent from my SCH-I535 using xda app-developers app
alquimista said:
It might work on windows with the right install of cygwin. I'd have to create a windows VM to test it out and I'm not all that familiar with cygwin anymore, any windows devs out there good with cygwin?
Sent from my SCH-I535 using xda app-developers app
Click to expand...
Click to collapse
Oh yeah! I totally forgot about cygwin. Yeah that should do it. It has all dependencies packaged with it except java and wget/curl. And only java is really necessary if you kinda know your way around.
Nice! Another great tool for the community!
Just what ive been waiting for
---------- Post added at 08:40 PM ---------- Previous post was at 08:32 PM ----------
Looks like running with cygwin gives unknown operating system. Can't proceed after that.
clark44 said:
Just what ive been waiting for
---------- Post added at 08:40 PM ---------- Previous post was at 08:32 PM ----------
Looks like running with cygwin gives unknown operating system. Can't proceed after that.
Click to expand...
Click to collapse
Oh yeah, that will have to be changed. run the command 'echo $(uname)' in a cygwin terminal and let me know what it outputs. I'm guessing just cygwin. Then i'll update the script to support it.
Any chance anyone has the example mod posted in the first post available on another hosting provider? It's been down for 2 days
myn said:
Any chance anyone has the example mod posted in the first post available on another hosting provider? It's been down for 2 days
Click to expand...
Click to collapse
Fixed it! Sorry about that. I don't know what happened with cloud.
Automod works great! Thanks so much! Here are the steps I took to create a quick little test mod to enable a 40x38px navigation bar and have only the wifi, bluetooth, gps, rotation, sync status bar toggles for Beans R8. I'm on Beans R3.1, so I didn't get a chance to test the zip in CWM.
1) Download automod.sh script and place it into an appropriate directory (I used one called AutoModTest)
2) Download the ROM Install zips you would like
3) Create your mod package (see below)
4) Run automod by typing “bash automod.sh” in a terminal
5) Select option 5 (Install a new ROM file into AutoMod), and follow the script's directions (copying your ROM zip, to the directory, not moving it or it will be overridden)
6) Select option 4 (Install a new mod package into Automod), and follow the script's directions (copying your ROM zip, to the directory, not moving it or it will be overridden)
7) Select option 3 (Use a ROM Install zip + mod to create a flashable zip for another ROM/device), choosing the appropriate ROM and mod package.
8) Out came the zip! This makes things soooooooooooo much easier and more manageable!
Notes about automod mod packages:
1) A mod file appears to be structured as a zip file with the extension .zip replaced with .mod
2) In the mod file is a directory with the name of the mod.
3) In the directory with the name of the mod is a directory tree leading to the files within the specific apk you would like to modify. For example, in the ICSBlueFull.mod file, the directory tree is as follows: ICSBlueFull, system, app, SystemUI (the apk being modified), res, directories with modified files (images, xml files, etc).
4) Just to be safe (and to match the ICSBlueFull mod supplied), I set permissions on all folders in my mod to 755 and all files to 644 (if these numbers don't mean much to you, open a terminal and type “man chmod”)
The 5StatusBarNavBar mod package for Beans R8
The CWM zip for the above mod package
MAD Industries said:
Oh yeah, that will have to be changed. run the command 'echo $(uname)' in a cygwin terminal and let me know what it outputs. I'm guessing just cygwin. Then i'll update the script to support it.
Click to expand...
Click to collapse
CYGWIN_NT-6.1-WOW64 (edit: uname -o will just return Cygwin)
Took a quick look at your script and I don't think it will too much of effort to offer cygwin support. Package manager by default will install bash, and curl/wget is available as well. You would need to install java naively on OS (it is accessible via your bash shell). Also to note don't think it will be required for your script based on my quick look, but you could always use the built in 'cygpath' command to convert windows<->unix paths if necessary.
Unfortunately only have a Windows box at work so can't spend to much time on but if no one gets to it I will take a stab later this week time permitting.
incubus26jc said:
Nice job buddy..No Windows support?
Click to expand...
Click to collapse
Linux is free and easy to dual boot. Nothing stopping you.
Or just run Linux from a VM. You can even forward the USB ports with Vitualbox.
mybook4 said:
Automod works great! Thanks so much! Here are the steps I took to create a quick little test mod to enable a 40x38px navigation bar and have only the wifi, bluetooth, gps, rotation, sync status bar toggles for Beans R8. I'm on Beans R3.1, so I didn't get a chance to test the zip in CWM.
1) Download automod.sh script and place it into an appropriate directory (I used one called AutoModTest)
2) Download the ROM Install zips you would like
3) Create your mod package (see below)
4) Run automod by typing “bash automod.sh” in a terminal
5) Select option 5 (Install a new ROM file into AutoMod), and follow the script's directions (copying your ROM zip, to the directory, not moving it or it will be overridden)
6) Select option 4 (Install a new mod package into Automod), and follow the script's directions (copying your ROM zip, to the directory, not moving it or it will be overridden)
7) Select option 3 (Use a ROM Install zip + mod to create a flashable zip for another ROM/device), choosing the appropriate ROM and mod package.
8) Out came the zip! This makes things soooooooooooo much easier and more manageable!
Notes about automod mod packages:
1) A mod file appears to be structured as a zip file with the extension .zip replaced with .mod
2) In the mod file is a directory with the name of the mod.
3) In the directory with the name of the mod is a directory tree leading to the files within the specific apk you would like to modify. For example, in the ICSBlueFull.mod file, the directory tree is as follows: ICSBlueFull, system, app, SystemUI (the apk being modified), res, directories with modified files (images, xml files, etc).
4) Just to be safe (and to match the ICSBlueFull mod supplied), I set permissions on all folders in my mod to 755 and all files to 644 (if these numbers don't mean much to you, open a terminal and type “man chmod”)
The 5StatusBarNavBar mod package for Beans R8
The CWM zip for the above mod package
Click to expand...
Click to collapse
Thank you so much for writing this! I am adding it to the OP. (let me know if you want me to take it down for some reason though)
Quick note, I think step 6 was supposed to be copy mod file to install directory? Also, a .mod file is exactly that; a zip file renamed to .mod. I did this to differentiate it from flashable zip files because the two would likely have the same name and it would cause confusion yet I still wanted to keep the .mod format easily modifiable/not proprietary. And one last thing, there is a hidden command called "packagemod" which can be used after you create your own mod to zip it up properly for distribution. It is entered at the main menu in place of choosing an option. Syntax: 'packagemod ICSBlueFull'.
lowg said:
CYGWIN_NT-6.1-WOW64 (edit: uname -o will just return Cygwin)
Took a quick look at your script and I don't think it will too much of effort to offer cygwin support. Package manager by default will install bash, and curl/wget is available as well. You would need to install java naively on OS (it is accessible via your bash shell). Also to note don't think it will be required for your script based on my quick look, but you could always use the built in 'cygpath' command to convert windows<->unix paths if necessary.
Unfortunately only have a Windows box at work so can't spend to much time on but if no one gets to it I will take a stab later this week time permitting.
Click to expand...
Click to collapse
Thanks for the tips. I have next to no experience with cygwin so this information is very helpful. I'll look into adding support to the next release.

Categories

Resources