[help] how to make a update.zip??? - Nexus One Q&A, Help & Troubleshooting

hey does anyone know how to make a update.zip for a apk???

you need to create an update-script that basically tells the flashing app where the file of your apk goes in the live system.
zip and sign and you're done.
if your next question is "how do I write an update-script" I would suggest you download any of the roms available, extract their script and have a look at it.
its quite basic, not much more difficult than writing a batch file on DOS.
there are a couple of threads that give a few pointers as well but they are somewhere in xda, not necessarily in the nexus section.
search for update-script and you'll see.

nmesisca said:
you need to create an update-script that basically tells the flashing app where the file of your apk goes in the live system.
zip and sign and you're done.
if your next question is "how do I write an update-script" I would suggest you download any of the roms available, extract their script and have a look at it.
its quite basic, not much more difficult than writing a batch file on DOS.
there are a couple of threads that give a few pointers as well but they are somewhere in xda, not necessarily in the nexus section.
search for update-script and you'll see.
Click to expand...
Click to collapse
thanks mam ill give it a try

Remove the .txt extension or use the META-INF folder in the .zip that already has the same update-script in it or finally, you can use the empty update.zip which already has all the components in it, you just need to add your .apk's and .jar's to it.
This is a basic update script that works well for themes (or at least for me it does). In your .zip have META-INF (for the update-script) folder (take one from a ROM or theme) and an app and a framework folder and it will work.

Related

General Questions about Themes GO HERE!!!!!

Hello, I am a little new here. I am kind of a newb with a lot of things. I did root my device and replaced the boot images.. but i do not know how to make themes. I was wondering if anyone would be willing to help by making a theme for me?
I added some images as to what i am looking to have done, that is of course anyone is willing to help. it is fairly simple i am looking to get the color scheme and kids icons if possible... maybe have a little fun with the clock or not if its too much work.
If anyone could help me out I would appreciate it... i am a graphic designer more than a programmer.. a lot of this is confusing to me.
I really like this site and hopefully i can be of some help at some point. This is my first post but i plan on posting a lot more.
Nice concept...but I`m not sure if you have looked at this topic http://forum.xda-developers.com/showthread.php?t=467639 It describe how to make a theme and stuff, good starting point anyways. Hope it helps!
Yeah ive seen that thread but it scares me...lol
I really dont know what I am doing with all that stuff. I dont really know if I understood everything in it either :-\
thanx though I will try to follow it and make a theme myself but it might take me a while...lol
RandumAccess said:
Yeah ive seen that thread but it scares me...lol
I really dont know what I am doing with all that stuff. I dont really know if I understood everything in it either :-\
thanx though I will try to follow it and make a theme myself but it might take me a while...lol
Click to expand...
Click to collapse
hahaha I would offer help but unfortunately I am no programmer
Im teaching myself how to make themes as well. I have found it best to read through that walkthrough a million times and then PM a couple of the dev guys to answer specific questions.
Basically this is the process:
- Take a theme that you like for RC30 or ADP1 or whatever you wanna make it in
- Extract 2 folders inside, app, and framework into a new folder on your computer
- Rename add a .zip to the end of the apk files and extract them all so you have a bunch of folders with your app names
- Go into res and find any folder that says drawable and inside of there are the files to edit for your theme. Make sure not to edit the .9.png files.
- Once all your editing is done get into linux and turn all the folders back into zip files, then turn them back into apk files.
- Then take your app folder and framework folder that contain the new files and in linux create it into one zip file.
- Then you send the file back to windows, get the SignAPK files, put your zip in the folder with the SignAPK files and run some commands in the CMD to resign the file.
- Then rename that file update.zip and put it on the SDcard and give it a whirl.
This is how I understand the process after talking to a couple people for the last few days. I am hoping to release my own theme soon and if it works you will know that these steps are right. LOL And dont follow those directions, they are just to give you an idea of the steps involved.
Agusta - haha s ok thanks anyway :-D
@brandenk
why do we need to zip the files in linux? By the way thanks for the theming for dummies guide.
trying it out
brandenk said:
Im teaching myself how to make themes as well. I have found it best to read through that walkthrough a million times and then PM a couple of the dev guys to answer specific questions.
Basically this is the process:
- Take a theme that you like for RC30 or ADP1 or whatever you wanna make it in
- Extract 2 folders inside, app, and framework into a new folder on your computer
- Rename add a .zip to the end of the apk files and extract them all so you have a bunch of folders with your app names
- Go into res and find any folder that says drawable and inside of there are the files to edit for your theme. Make sure not to edit the .9.png files.
- Once all your editing is done get into linux and turn all the folders back into zip files, then turn them back into apk files.
- Then take your app folder and framework folder that contain the new files and in linux create it into one zip file.
- Then you send the file back to windows, get the SignAPK files, put your zip in the folder with the SignAPK files and run some commands in the CMD to resign the file.
- Then rename that file update.zip and put it on the SDcard and give it a whirl.
This is how I understand the process after talking to a couple people for the last few days. I am hoping to release my own theme soon and if it works you will know that these steps are right. LOL And dont follow those directions, they are just to give you an idea of the steps involved.
Click to expand...
Click to collapse
hey thanks... i am gonna try it now
Geo411m said:
@brandenk
why do we need to zip the files in linux? By the way thanks for the theming for dummies guide.
Click to expand...
Click to collapse
I don't know why, something about how linux packages zip files opposed to windows, and yes once I figure it out and find all the problems people can have I am going to make up a nice walkthrough on making themes. But I wouldn't be surprised if there were already some theme manager apps in the works to make this whole process easier.
to tell everybody the truth i do all my themes in windows lol and only windows and it has worked on other peoples devices but shhhh thats out lil secret
package it for me?
Hey I was wondering if anyone could package my files for me?
I don't know linux commands at all and am lost... I did manage to edit the files but I can't put them back together.
If anyone could help with my New problem I would be very grateful!
randumaccess.com/r.a%20rc30.zip
That is the zip with the folders I edited.
Thanks
RandumAccess
Dave Da illest 1 said:
to tell everybody the truth i do all my themes in windows lol and only windows and it has worked on other peoples devices but shhhh thats out lil secret
Click to expand...
Click to collapse
Yes, you can make the update.zip in Windows as long as you have the update script I wrote in linux and you do not edit, or open it in Windows. If you do it will get corrupted.
Stericson
Stericson said:
Yes, you can make the update.zip in Windows as long as you have the update script I wrote in linux and you do not edit, or open it in Windows. If you do it will get corrupted.
Stericson
Click to expand...
Click to collapse
So as long as we take that empty update.zip and just throw the apk's in their respective folders and resign the zip when we are done it should be good to go?
brandenk said:
So as long as we take that empty update.zip and just throw the apk's in their respective folders and resign the zip when we are done it should be good to go?
Click to expand...
Click to collapse
That's correct it should be good to go.
Stericson
I guess I need to start learning how to create some themes
I did something wrong (theme newb)
Dave Da illest 1 said:
to tell everybody the truth i do all my themes in windows lol and only windows and it has worked on other peoples devices but shhhh thats out lil secret
Click to expand...
Click to collapse
how do you do the themes in windows?
heres what i did:
1. I unzipped a theme
2. renamed apk's to zip's
3. unzipped each folder
4. edited the drawable files
5. zipped the folders with winrar
6. renamed them back to apk's
7. then i took the update script from Stericson and opened it with winrar and threw them in the app/framework folders
it didnt work for me.
I dont know linux and use windows, i am a newb with a lot of this stuff. I would like to know so i can create themes to my liking.
any help you could give me would be great!
i have all the files edited i just need to package them now.
thanks,
RandumAccess
make sure you zip the folders inside the main folder. If you're working on launch folder, zip the folder inside the folder named launch not the launch folder itself.
Dave Da illest 1 said:
to tell everybody the truth i do all my themes in windows lol and only windows and it has worked on other peoples devices but shhhh thats out lil secret
Click to expand...
Click to collapse
How about a how-to using the Windows only method??
Geo411m said:
make sure you zip the folders inside the main folder. If you're working on launch folder, zip the folder inside the folder named launch not the launch folder itself.
Click to expand...
Click to collapse
yeah that didnt work either :-(
I would like to see a "Windows Only Theme Tutorial: Super-Newb Edition" ...lol
did you sign each of the edited apk's? and your update.zip file?

Resigning ROMS?

Ok so im a noob when it comes to coding. I want to replace the wallpaper that comes in some roms and from my understanding when I extract the .zip rom to replace them, I have to resign the .zip for it to work. If this is true, how do I resign them?
punkmanj said:
Ok so im a noob when it comes to coding. I want to replace the wallpaper that comes in some roms and from my understanding when I extract the .zip rom to replace them, I have to resign the .zip for it to work. If this is true, how do I resign them?
Click to expand...
Click to collapse
first make sure you grab all the signing tools (do a search and you'll find Stericson's stuff somewhere)
extract the zip of the update.zip
now in the main folder you should see META-INF
go in there and remove the three files that are not folders
now go up one level back to main folder
depending on how they packaged the update, you should see either a system or app folder
if you see system, then go into it and then into app
if you see app, then go into it
now you should see some .apks
the one you want is Launcher.apk
use 7z and open the archive
now navigate to the res/drawable folder and you should find your wallpapers in there
just use the name of a wallpaper thats in there that you dont like and replace it with the wallpaper you want
now navigate to the main directory of Launcher.apk
delete the META-INF folder
now close 7z
resign Launcher.apk
now navigate to the main folder of the update.zip
zip it all up again and resign the new .zip file
sorry if the instructions arent that clear .. its kinda late and been studying for a midterm for some time now .... PM me up if you need any more help
Stericson said:
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.
Ok, so 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, let you sign the files manually, and let you push/pull files to the phone.
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.
Enjoy,
Stericson
Autosign .zip: http://www.fightforthepits.com/Androidstuff/signing.zip
Click to expand...
Click to collapse
there's stericson's OP in the signing made easy thread
Yeah sorry for posting I soulda did a search first. I found the Signing Made Easy post after posting this... Thanks for the quick reply Now I can start doing themes as well. Thanks again.
punkmanj said:
Yeah sorry for posting I soulda did a search first. I found the Signing Made Easy post after posting this... Thanks for the quick reply Now I can start doing themes as well. Thanks again.
Click to expand...
Click to collapse
np .. dont forget to edit your OP with "SOLVED" so mods can start cleaning up
What am I doing wrong if I get the message "java is not recognized as an internal or external command, operable program or batch file."
uansari1 said:
What am I doing wrong if I get the message "java is not recognized as an internal or external command, operable program or batch file."
Click to expand...
Click to collapse
you're missing java ... http://developers.sun.com/downloads/top.jsp .. i think you only need the jre but i always get the jdk

[GUIDE] How to make mymode themes

Well I haven't had much time lately to make themes but I figured i got enough time to explain how. This is how i do it in windows 7.
1) First thing i assume that you already have androidsdk on the root of your C drive. Lets go ahead and add it to your system path. If it's not called androidsdk go ahead and change it to that. Now open up your startmenu, right click computer, click properties, then click advanced system settings, in the advance system settings select environment variables. In the second box down look for path select it and choose edit. copy and paste this
Code:
;C:\androidsdk\tools
in there. Click okay.
2) download the jre and jdk from here and install them. Now you need to add them to your system path so copy paste this
Code:
;C:\Program Files (x86)\Java\jre6\bin;C:\Program Files (x86)\Java\jdk1.6.0_20\bin
to your system path just like you did in the first step.
3) Download apk manager from here. Now run it and when it says clean out all current projects click yes. Now thats ready to go.
4) Download an image editing program. I use gimp. Also if you don't have it 7-zip
your all set to go now so lets start over with the numbers
1) choose a mymode apk and extract it with 7-zip. Open up the res folder select a png that you want to change and change it with the image editor you chose.
2) when you've changed the images you want open up the original apk as an archive with 7zip. Then place the res folder of the modified unzipped apk into the archive and close the archive.
3) Now open up apk manager and place the mymode apk into the place here for signing folder click script batch choose no then type 15.
4) Now put the newly signed apk into your androidsdk/tools folder and close apk manager.
5) open command prompt and type this
Code:
cd\
cd androidsdk/tools
adb install whatever.apk
I'll update this with pics a more thorough guide.
Thanks to everyone that made this easy
reserved for themes to come
Thanks been waiting for a thread like this.
thanks, if i ever get any free-time between jobs and kid and fiancee i will look into this a little more
This is an awesome guide! I messed around with theming mytouch/g1 back when I had one.. so this will be great to make some themes for the slide..
One question though.. let's say you pull the nest theme.. theme it and re install it.. will it just override the nest theme or in the theme listing will it appear as a new theme and still allow you to have the original theme?
Sent from my T-Mobile myTouch 3G Slide using XDA App
ryanolson7 said:
One question though.. let's say you pull the nest theme.. theme it and re install it.. will it just override the nest theme or in the theme listing will it appear as a new theme and still allow you to have the original theme?
Sent from my T-Mobile myTouch 3G Slide using XDA App
Click to expand...
Click to collapse
The nest theme is in the framework, its not an .apk like the rest, its built into the system. The rest of the mymodes themes are .apks and if you edit those they will override the stock "nest" theme. The only way it will show up different in the theme chooser is if you edit the preview snapshot to be a preview of your theme. If you wanna keep the original theme, the nest theme is it and you should edit a different theme .apk...
-BMFC
Sent from my ROOTED MyTouch3G Slide
Okay so I got the next three days off and I already got two mymode themes pretty much done well their done but I just learned of a way to change the name so they are there own standalone apk instead of using another apk name. I've been using puppypride (which by the way isn't puppies those are full grown dogs) and switching out the pngs and you couldn't have the regular puppypride now you can have both
hope you don't mind but I did a mod of your themes and took out the bubbles since some people always create threads about it
Help with following guide
I am a newb at this so please don't attack me if I am doing something wrong. I have been struggling with following the guide posted to make mymode themes. I have successfully got up to the step of signing the apk file. I modified the files in the free_kick.apk. When I try to use APK Manager 4.8 and using the directions given the file just gets erased and nothing happens. My log file just shows errors. Any help with a more detailed directions one what to do in APK manager as I am trying different things and not getting anywhere. I use the option 15 like told in the guide. I can send my modified apk file to anyone if they can get this to work and get it installed that would be appreciated so much. I hope I can figure this out my own but thought I would try get help from the forums. Thanks in advance.
impimms said:
I am a newb at this so please don't attack me if I am doing something wrong. I have been struggling with following the guide posted to make mymode themes. I have successfully got up to the step of signing the apk file. I modified the files in the free_kick.apk. When I try to use APK Manager 4.8 and using the directions given the file just gets erased and nothing happens. My log file just shows errors. Any help with a more detailed directions one what to do in APK manager as I am trying different things and not getting anywhere. I use the option 15 like told in the guide. I can send my modified apk file to anyone if they can get this to work and get it installed that would be appreciated so much. I hope I can figure this out my own but thought I would try get help from the forums. Thanks in advance.
Click to expand...
Click to collapse
Actually the guide needs to be fixed a little because i'm guessing your getting compiling errors when using apk manager? But the best way to do this is to open up the mymode theme (using 7zip) as an archive delete meta-inf folder then replace the pngs with ones of your choice as long as they are the same scale. Then resign. and install
totally lost
I've followed these directions to a T and when it comes to using the apk manager i am getting nothing, please help
You guys that are having trouble with apk manager...its honestly not necessary to use Apk Manager for this. Mymodes themes are system .apks and shouldn't be re-signed. What you need to do is forget about apk manager (for now) and drop the UNsigned .apk into the ROM update you are using, and resign the whole ROM using the autosign tool created by jesusfreke. Or just adbpush the .apk. but don't resign the .apk.
Here's the link for the autosign tool to sign ROM updates. its in the THIRD POST and its auto-sign .zip, NOT the signing.zip in the first post. you can put it anywhere you want and you just drop (a copy of) your ROM update in the autosign folder, rename it update.zip, then run the sign.bat to sign. it will create another file, update-signed.zip. you shouldnt need to wipe when flashing the same ROM over itself, but i cant guarantee this is true for all ROMs.
you can also make an update that will only flash the .apk to /system/app, and nothing else will be changed. basically just make a copy of the update for the ROM youre using, then delete everything but the /system directory from the zip. then go into that /system directory and delete everything but the /app directory, then go into it and delete all the .apks and odex file or whatevers in there. ALL OF IT. when you are finished you should have an update with nothing in it but a /system/app directory. you put your modded .apk in there in /system/app, and thats it for that.
then you must edit the update script and remove MOST of its contents so that it only does what you want it to. THIS IS IMPORTANT! Go here to learn how to create an update script. what youll need is way simpler than the examples, youll want it to look basically like this...
Code:
assert compatible_with("0.2") == "true"
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
this update script will copy ANYTHING in the /system directory to /system on your device, regardless of subdirectories. that means anything in /system will go in /system, anything in /system/app will go to /system/app, etc. but since you only have one .apk in there it wont mess with anything but what you put in there. this way, you have a NOWIPE update for...well, whatever you want to put in it.
so you just drop the new shortened update-script in /META-INF/com/google/android/
and then use the autosign tool to resign your new update then flash away! This also takes less time cus its only flashing one file instead of flashing a whole ROM just to replace that one file...
hope this helps...
-BMFC
Sent from my T-Mobile myTouch 3G Slide using XDA App
So you cannot do this on t-mobile's rom which is 2.1 right now? I'm leery of rooting in case they ever release froyo
Tbrewer80 said:
So you cannot do this on t-mobile's rom which is 2.1 right now? I'm leery of rooting in case they ever release froyo
Click to expand...
Click to collapse
I'm having issues with this as well... After I do the whole signing apk thing, it installs fine, but when I go to MyModes, the preview is black and when I select it, the MyModes app force closes. I don't get it.

[Q] Integrating a language with a ROM .zip?

Hi,
I have a ROM, for example Enomther's. and I also have the arabic language libs. how can I integrate the arabic libs into the ROM's zip file so I don't have to flash another zip for arabic libs? I have attached the arabic libs.
Bump! anyone?
Come on, what kind of answer do you expect?
Here's the answer: you need to substitute the files in the original ROM zip and resign it - that's it.
Now you're going to ask, how to do it, because you have no clue - and the explanation is a lot of work to try and put in one post, and setting up signing applications involves installing Java SDK and some knowledge. If you're asking the question you're asking - it seems like you're far from being skilled enough in Android depths to do what you're asking to do, and that's why you see no answer. After all, if you'd want to do it - you'd have to search anyway, Google "sign apk zip" and here you go, a lot of tutorials show up. And if you didn't search and posted instead - it speaks for itself.
By the way, there's no good reason to integrate the libs into a standard ROM, moreover - it's a bad idea. ROMs tend to be updated, and the work that needs to be done setting up the environment for signing APKs and ZIPs is way more than flashing one update right after updating the ROM to a newer version. And ROMs are updated quite often.
Yeah i'm not skilled. I'm trying to learn... I am trying to make my own customized ROM for my country's users. And I didn't mean editing ROM files, I was saying how to push the lib into the ROM zip so people don't have to flash the arabic zip lib when they flash my customized ROM. So I hope you haven't missunderstood my question...
Ah, I see, you want to customize and share the ROM. In that case, you have to have the setup I'm talking about. The update.zip contains folders and files, which directly replace the files in the same folders in ROM, so if you have a ROM zip - you need to replace those files. The easiest way would be just extracting your update.zip, opening a ROM zip in 7zip / WinZip / WinRar / etc, putting those extracted files from update.zip in the right place into ROM zip by drag-and-drop, and then resigning the ROM file.
Please do some googling as to how to sign ZIP and APK files. There are some pretty good tutorials.
I have done that before, and I replaced the lib file with the ROM default lib. it's libskia.so, but I think because I didn't know I have to sign it it gave me an error while flashing through recovery. so after I replace the lib I have to re-compress the file and then sign the zip right?
You don't have to re-compress if you replace the file without decompressing the original ROM archive, by dragging-and-dropping the file into the archive.
And yes, you have to re-sign the ZIP after any changes you make to anything inside it.

How can I create a the META-INF files?

Hi...
I want to create my own update.zip from a original and clean RUU.exe I already know how to extract the exe file and all the other stuff that has to be done. But in the system.img arnt the necessary META-INF files.
I know its made with Android SignApk, but all Guides that I found show only how to sign one single apk. But it seems I need to sign all the stuff at once.
My question at the devs: How do you do this? And can I use my own key?
Don't know if can help you, but check dsixda's kitchen:
http://forum.xda-developers.com/showthread.php?t=633246
Cheers
8ut8f8rder said:
Hi...
I want to create my own update.zip from a original and clean RUU.exe I already know how to extract the exe file and all the other stuff that has to be done. But in the system.img arnt the necessary META-INF files.
I know its made with Android SignApk, but all Guides that I found show only how to sign one single apk. But it seems I need to sign all the stuff at once.
My question at the devs: How do you do this? And can I use my own key?
Click to expand...
Click to collapse
Dude, that's simple:
Pack all your stuff into an update.zip and then let run Signapk with the zip file as filename and it will sign it for you correctly by creating a META-INF folder and calculating all SHA1 checksums...
Thanks, finally I got a selfmade working rom. dsixda has some usefull templates for the update-script in his kitchen.
@TheSSJ
I will try that, but I guess the zip-file has to contain a proper update-script.
TheSSJ said:
Dude, that's simple:
Pack all your stuff into an update.zip and then let run Signapk with the zip file as filename and it will sign it for you correctly by creating a META-INF folder and calculating all SHA1 checksums...
Click to expand...
Click to collapse
Can you detail it sir? im kinda new here Thanks in advance

Categories

Resources