i'm learning how to make flashable zips and in the tutorial i'm reading he says that the one he linked is for that specific device. I understand the script provides access to update commands and functions or something. So if it is specific to each phone, does that mean i can pull the file out of any flashable that works on my phone and use it? if so, how do you make flashables that are universal?
i sense i'm missing some important information about this file, the tutorial is quite breif because he just links the file and says this is the update-binary file for this phone. I google update-binary explained and a few other things and couldn't seem to find anyone who could explain much about the file. my assumption is that the updater-script file calls on functions found in the binary file or something.
edit sorry forgot to mark this as a question
Related
ok here is my question..
im trying to extract the system.img files to restore some of the original files i changed.
here is the things i want to know in a list
1, Which tool is used to extract those IMG files? guide please. if you do need to compile it please post guide on how to compile as well?
2, how to repack the files into readable Img files which we can use to fastboot flash system with?
3, the shutdown.zip and downanimation.zip what are the requirements? i have sucessfully made a custom bootanimation.zip but failed the downanimation and shutdown. the bootanimation works when i made zip file with store only attributes "no compression", but the other 2 wont work either way..
if i can get this information i would make a general thread about DHD with all the information so it would be easier for anyone to find out all about xda and the development for DHD
example, Radio/Eng S-Off CID-1111111 simunlock, adb commands/tools/guide, cygwin/unyaffs GIMP etc including graphical mods and specific how to's.
please help me out this might reward the newbies alot saving loads of precious time searching.. just like me
rofl edited to change adb to fastboot. sry my bad. stupid typo ;x
Hi im working on creating some boot animations. Ive got the files ready, but i cant figure out how to put them into a flashable .zip.
I flashed this file thunderbolt boot animation and it worked so i figured if i just replaced my animation and audio it would work but i get an error saying "e:update script not found" or something along those lines.
Id like to know if there is an easy way to create a "template" were i just copy my animation into a folder and zip it, or if there is a program that will package it for me including the script/etc.
Any input or guide on how to make these boot animations flashable .zip's would be great, thanks.
Eat it iPhone said:
Hi im working on creating some boot animations. Ive got the files ready, but i cant figure out how to put them into a flashable .zip.
I flashed this file thunderbolt boot animation and it worked so i figured if i just replaced my animation and audio it would work but i get an error saying "e:update script not found" or something along those lines.
Id like to know if there is an easy way to create a "template" were i just copy my animation into a folder and zip it, or if there is a program that will package it for me including the script/etc.
Any input or guide on how to make these boot animations flashable .zip's would be great, thanks.
Click to expand...
Click to collapse
Thats weird it didn't work. Should. Maybe it wasn't re-packaged correctly.
Try the one attached.
CCallahan said:
Thats weird it didn't work. Should. Maybe it wasn't re-packaged correctly.
Try the one attached.
Click to expand...
Click to collapse
Thanks ill try it out, just dont have the time right now.
If you cant figure it out i'll give you a guide tomorrow when i'm off my iPad .
did you rezip it correctly?
I ran into this trouble, I forget what it is, but you have to zip the files a certain way or they will not work. I don't remember the settings anymore, but just creating a regular zip file won't work.
There is a good guide to making your own update script on xda somewhere. Just search the entire site. If i'm just flashing something simple like a theme or boot animation sometimes I just use someone else's flashable zip and replace the necessary files. I can't remember off the top of my head, but iirc there are two folders you want to keep from someone else's zip. Meta-inf which is basically the signature files and something else which contains the script. If you dissect someone's zip it should be obvious what the other folder you want to keep is. You will find the update script in one of the sub folders, and if you want you can open it with a text editor and get an idea of how the script works.
If you need more info I can help you more when I get to my computer.
Sent from my PC36100 using XDA App
dkdude36 said:
If you cant figure it out i'll give you a guide tomorrow when i'm off my iPad .
Click to expand...
Click to collapse
Id appreciate a guide either way, id rather learn to do it myself than use someone else's. No rush as i cant really approach this til the weekend.
Eat it iPhone said:
Id appreciate a guide either way, id rather learn to do it myself than use someone else's. No rush as i cant really approach this til the weekend.
Click to expand...
Click to collapse
ok, here it goes.
first, figure out where you want to push your file. i'd reccomend pushing manually in recovery to make sure the file itself works. then, using a tool like 7zip (pc) or betterzip (mac) create a file structure that matches the one on the phone. for example, if you wanted a boot animation to be put in system/customize/resource, make a folder system, customize in that, resource in that, and the bootanimation.zip inside that. now you have the main part. next, make a folder in the root of the zip called META-INF (caps counts) inside that, com, inside that, google, and inside that, android. thats /META-INF/com/google/android/. inside android, you need to place in an update-script. i'd reccomend taking one from another zip and just editing it becasue i still have not figured out a way to make that type of file (unix exec) from scratch. open it up in a .txt editor like notepad++ (pc) or coda (mac) and write your script. here is the baisic script for copying the directory system on the zip to system on the phone (like flashing a boot animation).
copy_dir PACKAGE:system SYSTEM:
CAPS COUNT AND MAKE SURE YOU HAVE AN ENTER AT THE END. IF YOU DO NOT HAVE AN ENTER AT THE END (TO MAKE IT TWO LINES INSTEAD OF ONE, LIKE ISSUEING A COMMAND) THEN IT WILL NOT WORK AT ALL ( E:SYNTAX ERROR IN UPDATE-SCRIPT IS THE ERROR YOU WILL GET)
so put this file into the folder android, and zip it. make sure it is in store only, compatibility mode, if you have such options. then, use an auto signer (or just say zip is not signed and make sure to put sig verification off) to sign the zip. flash, and watch your work magically appear.
the update-script i showed is written in amend. i have no idea how to write in edify bcuz it is much more complicated with the binary and stuff. so dont flash with cwm 3.0+.
good luck. ask if you have any questions.
hello will this methed work on like adding some personal apps you want to be on your rom?
On my rooted Defy - how do I install a zip-file??
Like this one;
http://forum.xda-developers.com/showpost.php?p=12426274&postcount=24
install the 2ndinit apk 1.4.2 newer ones wont work with some files
then reboot 2 times.
third reboot: press volume down, when the led is blue.
now choose recovery by pressin vol up or down and power to accept.
then choose costum recovery, and apply zip from sd. choose your file and confirm.
done
hope this answers your question
Thanks, seems simple enough
uh, where do I find 2ndinit.apk
You can find it here.
I know how to install .zip but I have a question. CWM3.1 does not flash some .zip like a baseband or a theme. It says "aborted". I think that the problem is that the file is not signed or something. In CWM2.5.1.8 works but the problem is that CM7 or MIUI changes it to CWM3. So, what should I do?
Thanks!
Works fine, even the mentioned zip-file!
The "issue" is that the latest CWM3.x no longer support "amend scripting" (stored in update-script) and won't apply zip's created with such scripts. Therefore all .zip which where written using the old method should be converted to edify scripting (which use different statements - more details here-).
is there an way to downgrade the 2ndinit? an how-to would be very nice
You can replace the recovery file from /system/bootmenu/recovery/sbin with the one from 2nd init 1.4.2 . The file persimmon should be rwxr-xr-x (755).
nepotu said:
You can replace the recovery file from /system/bootmenu/recovery/sbin with the one from 2nd init 1.4.2 . The file persimmon should be rwxr-xr-x (755).
Click to expand...
Click to collapse
and how do i do that? with rootexplorer? what for do i need the file permission? to change it or to set it after changing the files?
Yup. You can replace it using an app like root explorer. And the file permission should be set up after you copy the file (if you have the wrong file permission it won't work).
EDIT: I haven't tried yet to downgrade it this way but that's what I've read on the forum, therefore I cannot guarantee you it will work.
sry for me being a noob. i found the file named recovery in the folder you mentioned. but have got only the file 2ndinit.apk..... where do i get the recovery file from 2ndinit.apk ?
thank you for your time!
You can unpack it using a tool like Apk Manager 4.9 or simply by using 7zip to extract the files from the apk which is in fact some sort of archive. However as I've mentioned in the previous post I didn't tried to downgrade using this method. All I can say is that I've read here on xda about this method, therefore I cannot guarantee you this will work. I think is better to wait someone with more experience to answer.
As an unexperienced user i think i'll wait for a better solution.
As i read, this problem appears quite often, how come that nobody tried to make a solution for this problem?
I'd like to start learning how to create .zip CWM compatible files so I can start creating some scripts I'd like to test out. Are there any resources on how to do this from scratch, I don't want to use a tool that does most of the work for you, as I wont learn anything about the workings of CWM. I have unzipped a couple of the zip files I have, and I get the relationship between the manifest and update scripts, however I'm unsure on the update binary script, and the signatures for the files in the manifest file. Is there a tool that generates the update binary and these hash codes( if they are hash codes ) in the manifest?
EDIT: Would also like to know where I can find a list of 'acceptable' commands that can be run from an update script in the zip, or are these just any exec bin in your android path?
Hi all,
Can someone point out what is wrong with this updater script?
vaibhavknockout said:
Hi all,
Can someone point out what is wrong with this updater script?
Click to expand...
Click to collapse
I can tell you what is wrong with this thread, it belongs in Q&A.
Luckily, I took care of that for you.
Secondly, I don't know if there are more mistakes, but this line:
Code:
package_extract_file("boot.img", "/tmp/boot.img");write_raw_image("/tmp/boot.img", "boot");
is for flashing kernel via recovery which is not possible with Xperia phones.
What are you trying to do and what error does recovery give?
iridaki said:
I can tell you what is wrong with this thread, it belongs in Q&A.
Click to expand...
Click to collapse
LOLMAX!
iridaki said:
I can tell you what is wrong with this thread, it belongs in Q&A.
Luckily, I took care of that for you.
Secondly, I don't know if there are more mistakes, but this line:
Code:
package_extract_file("boot.img", "/tmp/boot.img");write_raw_image("/tmp/boot.img", "boot");
is for flashing kernel via recovery which is not possible with Xperia phones.
What are you trying to do and what error does recovery give?
Click to expand...
Click to collapse
Sorry madam for posting this in wrong thread. How stupid of me........I am trying to learn writing updater scripts and I am modifying CM9's script to do that. Recovery gives me Error 6. I am modifying this in notepad++, I had already checked for newline characters. Since I am a newbie in porting and stuff, I don't even know whether I need to make a new update-binary for every change I make in updater-script. I searched for hours on google about this problem but with no sucess. I never felt this miserable...
Sorry again for the wrong section.
vaibhavknockout said:
Sorry madam for posting this in wrong thread. How stupid of me........I am trying to learn writing updater scripts and I am modifying CM9's script to do that. Recovery gives me Error 6. I am modifying this in notepad++, I had already checked for newline characters. Since I am a newbie in porting and stuff, I don't even know whether I need to make a new update-binary for every change I make in updater-script. I searched for hours on google about this problem but with no sucess. I never felt this miserable...
Sorry again for the wrong section.
Click to expand...
Click to collapse
First of all, there is much more to updater-script than you appear to have knowledge of, and I am only saying this to point you to the right direction.
You need to do a little reading in order to really understand what each line does.
Otherwise, chances are, you will not be able to make a bootable ROM.
Update-binary does not need any changing though.
You should not feel miserable, just search and look in the right places.
iridaki said:
First of all, there is much more to updater-script than you appear to have knowledge of, and I am only saying this to point you to the right direction.
You need to do a little reading in order to really understand what each line does.
Otherwise, chances are, you will not be able to make a bootable ROM.
Update-binary does not need any changing though.
You should not feel miserable, just search and look in the right places.
Click to expand...
Click to collapse
I read the link you gave, it is informative indeed. But still doesn't solve my problem. The link is for syntax used in update-scripts. Since I am a Perl programmer by hobby, I do understand quite a lot of those commands in both update-script and updater-script and correct syntax associated with them (mostly based on linux). My questions are -
1. Do we have to write an update-script or an updater-script to flash a zip?
2. Updater-script is associated with an update-binary. What is it's role? Can we copy it from anywhere? If yes, then why is this binary encoded file of different size?
3. Can I write an update-script and use kitchen to convert it to updater-script? If yes, then why is kitchen giving me padded zeroes at the end of updater script?
4. If my build.prop has "ro.product.device="anzu"" and if my updater-script asserts for it using correct syntax, then why on earth is recovery giving me error 6 at the assert step?
5. If I don't have a file (say /system/lib/hw/abc) and if my updater-script calls it (say symlink toolbox /system/lib/hw/abc), then will the updater-script execution fail completely or does it skip it and move forward?
6. How would I know whether I can write boot image in xperia phones or not? Is there any list?
So in sum, I know and have found many guides to write syntax in updater-script and update-script but I couldn't find any guide which could explain all the above question clearly. Since android community (especially at xda) believes in helping out each other, I am astonished by the fact that what is the purpose of keeping this secrecy in instructions on how to make a proper bootable zip or port a ROM. I wanted to learn all this so that I could bridge this gap of knowledge like I did with my Namaste guide.
PS: You have something with colors. You have an elegant way of choosing colors in things as complex as themes and as trivial as fonts. I am a fan.
Ciao,
Vaibhav
vaibhavknockout said:
1. Do we have to write an update-script or an updater-script to flash a zip?
Click to expand...
Click to collapse
update-script is for "Amend Scripting" used in CWM prior to 3.0. update-script (and binary associated) is for "Edify Scripting" used in CWM 3.0 +. Both have different syntax. Basically use updater-script as it is latest.
vaibhavknockout said:
2. Updater-script is associated with an update-binary. What is it's role? Can we copy it from anywhere? If yes, then why is this binary encoded file of different size?
Click to expand...
Click to collapse
As mentioned above! updater script requires update-binary to work as all functions are defined in the binary.
vaibhavknockout said:
3. Can I write an update-script and use kitchen to convert it to updater-script? If yes, then why is kitchen giving me padded zeroes at the end of updater script?
Click to expand...
Click to collapse
Yes, you can! Probably kitchen's converter is messed-up. You can manually remove the zeroes.
vaibhavknockout said:
4. If my build.prop has "ro.product.device="anzu"" and if my updater-script asserts for it using correct syntax, then why on earth is recovery giving me error 6 at the assert step?
Click to expand...
Click to collapse
What error is it giving? Also, make sure to use the correct update-binary as there are different versions floating around.
vaibhavknockout said:
5. If I don't have a file (say /system/lib/hw/abc) and if my updater-script calls it (say symlink toolbox /system/lib/hw/abc), then will the updater-script execution fail completely or does it skip it and move forward?
Click to expand...
Click to collapse
Yet to try!
vaibhavknockout said:
6. How would I know whether I can write boot image in xperia phones or not? Is there any list?
Click to expand...
Click to collapse
boot image cannot be written in recovery for all Xperia phones. Basically boot partition is locked when phone is turned on, in all Xperia phones.
ameer1234567890 said:
update-script is for "Amend Scripting" used in CWM prior to 3.0. update-script (and binary associated) is for "Edify Scripting" used in CWM 3.0 +. Both have different syntax. Basically use updater-script as it is latest.
As mentioned above! updater script requires update-binary to work as all functions are defined in the binary.
Yes, you can! Probably kitchen's converter is messed-up. You can manually remove the zeroes.
What error is it giving? Also, make sure to use the correct update-binary as there are different versions floating around.
Yet to try!
boot image cannot be written in recovery for all Xperia phones. Basically boot partition is locked when phone is turned on, in all Xperia phones.
Click to expand...
Click to collapse
Thanks for answering some of my doubts and clearing the difference between update-script and updater-script. Your pointing my attention towards update-binary and it's importance caused me to read in that direction and ultimately solving it. It turns out that update-binaries are made chipset specific and if we don't use mogami specific update-binary (e.g. from CM9 for xperia arc), then assert check will fail. Hope this will help a lot of people.
PS: And this time I will try and compile another guide (like Namaste guide) to explain making flashable update.zip's, avoiding the commonly followed syntax part and focusing more on importance and functions of each component in the process.
Cheers,
Vaibhav