[Q] Need help preparing a flashable zip file - ONE Q&A, Help & Troubleshooting

Hi,
i currently had some issues with my GPS, and i found this thread with an attached gps.conf file which fixed them.
However, i want to create a flashable zip file for TWRP to ease and automate the installation of the custom file.
I used the cacert-installation zip from http://android.opensomething.org/ as a starting point for my creation. This zip was created by some people i know and they automate the installation of the CaCert.org root certs on android.
However, i set up my own commands in the update-binary (which is essentially a shell script in this zip) and copied the gps.conf as the payload of the zip. But now i have the problem that the flashing fails, and i don't know why.
I would be very happy if someone could look at the zip and my commands in there, and maybe has an idea, why the installation fails.
Thank you very much.

Use a root file explorer and copy that file to etc folder and check permissions,(rw-r-r) though generally this isn't an issue..
Sent from my A0001 using XDA Premium 4 mobile app

The zip file is in the same folder where my other flashable zip files are. It has also the same permissions. I double-checked the directory on my desktop where i created the zip file from, and its contents had exactly the same permissions that the contents of the cacert zip file have.
The syntax of the update-binary file should be correct.
Is there some sort of verbose mode i can activate in TWRP? Some errors like "Extracting zip... ERROR could not open update-binary FAILED" could be very helpful for me.

simonszu said:
The zip file is in the same folder where my other flashable zip files are. It has also the same permissions. I double-checked the directory on my desktop where i created the zip file from, and its contents had exactly the same permissions that the contents of the cacert zip file have.
The syntax of the update-binary file should be correct.
Is there some sort of verbose mode i can activate in TWRP? Some errors like "Extracting zip... ERROR could not open update-binary FAILED" could be very helpful for me.
Click to expand...
Click to collapse
The .zip you provided above is empty.. No files other than meta and system.. I'll build one and upload it..
Sent from my A0001 using XDA Premium 4 mobile app

Here you go..

Thank you very much. How did you create the zip? Just for the records, and for me to learn. I have my android phone for 10 days (was used to iOS before) and i like such actions very much.

Related

[Q] How to flash NAND ROM with no DAF

I downloaded the "CoreDroid_Desire_HD_GB_2.3.3_V4.5". I tried flashing the zip file using clockwordmod however it fails. When i extract the Zip file i find only boot.image, installbusybox file, data folder, META-INF folder & system folder... Can you please advise how can i flash this rom where there is no DAF.exe or any installer?
Thanks,
mohamed_baher said:
I downloaded the "CoreDroid_Desire_HD_GB_2.3.3_V4.5". I tried flashing the zip file using clockwordmod however it fails. When i extract the Zip file i find only boot.image, installbusybox file, data folder, META-INF folder & system folder... Can you please advise how can i flash this rom where there is no DAF.exe or any installer?
Thanks,
Click to expand...
Click to collapse
What phone do you have?
Sorry forget to mention. HTC HD2.

How to make a CWM file

Hello, I have searched everywhere and cant find the answer to my question. I wanted to replace a file using CWM .zip how in the heck do I do that? Most of all I just wanted to learn how to do it as well...
Thanks,
Chad
Well to begin with you can take an existing zip with the file path you need, delete everything in the folders not touching the META-inf folder at all, those are the install instructions, and put the file you want to flash in the correct folder. I think thats how everyone starts out.
studacris said:
Well to begin with you can take an existing zip with the file path you need, delete everything in the folders not touching the META-inf folder at all, those are the install instructions, and put the file you want to flash in the correct folder. I think thats how everyone starts out.
Click to expand...
Click to collapse
but your update-script has to match what you are flashing via cwm. if you take a rom zip and just pop in a few files in place of the whole rom structures, your flash will fail because your update-script is looking for specific structures.
Oxicottin said:
Hello, I have searched everywhere and cant find the answer to my question. I wanted to replace a file using CWM .zip how in the heck do I do that? Most of all I just wanted to learn how to do it as well...
Thanks,
Chad
Click to expand...
Click to collapse
One way would be to use: Update Zip creator/modifier (Requires Windows)
yeah it would be bad mojo if you used a wipe rom zips META INFO to make an update zip.....
Thanks a million everyone......
Sorry for being late to the party again.. Here goes my attempt at an explanation though:
Essentially, a CWM flashable zip is just a zip file with the file system replicated in it. So for example, if you wanted to add swype, and you know Swype.apk would regularly go in /system/app, then you would create a blank folder called 'system', and another folder inside system called 'app', and put your Swype.apk inside that. (/system/app/Swype.apk)
After that, all that's left is to build an update script. So, from your root directory (where your system folder is), you would make another directory called META-INF, with a folder inside called 'com', another one inside that called 'google', and finally one called 'android' inside that (/META-INF/com/google/android), you put a text file in there called 'update-script' that tells recovery what you want to do (in this case, copy swype over to the corresponding directory on the file system).
http://forum.xda-developers.com/showthread.php?t=641223
^There's a guide for how to make those. You can also pick apart any rom you find in the dev section and check out the update script for reference.
After that, it's just a matter of zipping up all the contents in your root directory, then signing the zip with testsign.jar
modest_mandroid said:
Sorry for being late to the party again.. Here goes my attempt at an explanation though:
Essentially, a CWM flashable zip is just a zip file with the file system replicated in it. So for example, if you wanted to add swype, and you know Swype.apk would regularly go in /system/app, then you would create a blank folder called 'system', and another folder inside system called 'app', and put your Swype.apk inside that. (/system/app/Swype.apk)
After that, all that's left is to build an update script. So, from your root directory (where your system folder is), you would make another directory called META-INF, with a folder inside called 'com', another one inside that called 'google', and finally one called 'android' inside that (/META-INF/com/google/android), you put a text file in there called 'update-script' that tells recovery what you want to do (in this case, copy swype over to the corresponding directory on the file system).
http://forum.xda-developers.com/showthread.php?t=641223
^There's a guide for how to make those. You can also pick apart any rom you find in the dev section and check out the update script for reference.
After that, it's just a matter of zipping up all the contents in your root directory, then signing the zip with testsign.jar
Click to expand...
Click to collapse
Is there a way from the CWM interface to do the same with a backup you create? I noticed backups are not in the same format, they are usually .img, .tar, and an md5 file?

[Q] Problem in installing my custom rom made through android kitchen

I am getting and error when flashing my custom rom which i made through android kitchen. i am a beginner to this.
Error is like:
Error in update.zip
(status 0)
Installation aborted
Can anyone help me on this?
I'm not 100% sure, but I have a feeling that may be related to an incorrect update-binary in the ZIP. Try downloading another Explorer ROM and copying the update-binary from it into your ZIP, replacing the one that's there already. It's located like this within the ZIP: META-INF/com/google/android/update-binary
EDIT: You don't have to download a full ROM btw, any recovery flashable ZIP should do, e.g. one of the custom kernels such as Cranium (smaller download than a full ROM)
Thanks
SifJar said:
I'm not 100% sure, but I have a feeling that may be related to an incorrect update-binary in the ZIP. Try downloading another Explorer ROM and copying the update-binary from it into your ZIP, replacing the one that's there already. It's located like this within the ZIP: META-INF/com/google/android/update-binary
EDIT: You don't have to download a full ROM btw, any recovery flashable ZIP should do, e.g. one of the custom kernels such as Cranium (smaller download than a full ROM)
Click to expand...
Click to collapse
Hey Thanks for your support.
shekhutanwar said:
Hey Thanks for your support.
Click to expand...
Click to collapse
Did it work?
SifJar said:
Did it work?
Click to expand...
Click to collapse
There is a problem, i use my htc explorer for calling and other works, so whenever i want to check my rom, i have make nandroid backup which takes 15-20 minutes bcoz of lots of apps installed. and after checking the rom i need to restore my previous system which is very time consuming. Is there any other way to check the rom working or not without using it in my explorer, maybe using an emulator in windows 7? if there is an easy way then pls help me on this.
Let me explain you clearly what i am doing.
1. I extraced rom.zip file from HTC Explorer RUU.
2. I placed it in original_update folder in android kitchen.
3. I set up a working folder from android kitchen menu and i got these files and folders in WORKING folder
boot.img
system
META-INF
4. I selected the option 99 in kitchen menu that is Building a ROM.
5. After successful completion i got a zip file in OUTPUT folder.
6.Then, i copied that update.zip file from OUTPUT folder to my sd card.
7. Now, i boot into recovery, and try to install zip from sd card but it shows an error like this
Error in sd-card/update.zip
(Status 0)
Installation Aborted.
Now i dont understand why it is giving me an error even i have not touched any file from the working folder.
am i doing it wrong? pls help me.
shekhutanwar said:
1. I extraced rom.zip file from HTC Explorer RUU.
2. I placed it in original_update folder in android kitchen.
3. I set up a working folder from android kitchen menu and i got these files and folders in WORKING folder
boot.img
system
META-INF
4. I selected the option 99 in kitchen menu that is Building a ROM.
5. After successful completion i got a zip file in OUTPUT folder.
6.Then, i copied that update.zip file from OUTPUT folder to my sd card.
7. Now, i boot into recovery, and try to install zip from sd card but it shows an error like this
Error in sd-card/update.zip
(Status 0)
Installation Aborted.
Now i dont understand why it is giving me an error even i have not touched any file from the working folder.
am i doing it wrong? pls help me.
Click to expand...
Click to collapse
I have no idea what you're doing wrong. But I don't think you have tried my suggestion from earlier in the thread.
Take the final update.zip file you have (the one you put on the SD card and try to install), and open it using an archive manager such as 7zip. Navigate into META-INF/com/google/android and delete the file "update-binary" that is located there. Then replace it with this one: http://d.pr/f/VHF1
Close 7zip, copy the ZIP to your SD card and try to install it in recovery.
SifJar said:
I have no idea what you're doing wrong. But I don't think you have tried my suggestion from earlier in the thread.
Take the final update.zip file you have (the one you put on the SD card and try to install), and open it using an archive manager such as 7zip. Navigate into META-INF/com/google/android and delete the file "update-binary" that is located there. Then replace it with this one: http://d.pr/f/VHF1
Close 7zip, copy the ZIP to your SD card and try to install it in recovery.
Click to expand...
Click to collapse
Ok, i am trying this then will let you know.
I didn't worked friend, this time it gave me (Status 7) error.
shekhutanwar said:
There is a problem, i use my htc explorer for calling and other works, so whenever i want to check my rom, i have make nandroid backup which takes 15-20 minutes bcoz of lots of apps installed. and after checking the rom i need to restore my previous system which is very time consuming. Is there any other way to check the rom working or not without using it in my explorer, maybe using an emulator in windows 7? if there is an easy way then pls help me on this.
Click to expand...
Click to collapse
No. And you can't emulate real hardware on emulators.
shekhutanwar said:
I didn't worked friend, this time it gave me (Status 7) error.
Click to expand...
Click to collapse
Well, 7 > 0, therefore it's better
In all seriousness, I think this means it's probably getting further than before, but there's some other problem with the ROM. I don't know the various status error codes, I just recognized 0 as one I'd come across before. I'm afraid I can't be of any further assistance I don't think.
EDIT: From here: http://forum.xda-developers.com/showthread.php?p=30415128#post30415128
Solution:- One or some of the prerequisite requirement for the needed upgrade is missing or corrupted . So you may need to identify and replace that requirement for the installation to continue. Most likely could be due to wrong bootloader, wrong CWM, Wrong IMEI, Wrong Radio etc
Click to expand...
Click to collapse
Ok thank u fr ur help again. I learnt abt the edify script and i corrected some mistakes but still its not working. I will try to find out the solution myself.
Sent from my HTC Explorer A310e using xda app-developers app
Here is my edited updater script
Pls anyone check this updater script, its giving me status 0 error while installing rom.View attachment updater-script.txt
invalid filetipe of rom in cwm
shekhutanwar said:
1. I extraced rom.zip file from htc explorer ruu.
2. I placed it in original_update folder in android kitchen.
3. I set up a working folder from android kitchen menu and i got these files and folders in working folder
boot.img
system
meta-inf
4. I selected the option 99 in kitchen menu that is building a rom.
5. After successful completion i got a zip file in output folder.
6.then, i copied that update.zip file from output folder to my sd card.
7. Now, i boot into recovery, and try to install zip from sd card but it shows an error like this
error in sd-card/update.zip
(status 0)
installation aborted.
now i dont understand why it is giving me an error even i have not touched any file from the working folder.
Am i doing it wrong? Pls help me.
Click to expand...
Click to collapse
i did same steps but i recieved another error. After checking the cwm log i saw error 304 with text invalid file like zipminizip but i see in explorer the file is zip tipe, i dont know why my cwm see zipminizip filetype. If anyone know what to do please help. Maybe i should change my cwm but til now was no problem with my cwm. I have zte blade. Thx.ko
I think this is the error....
When you setup a working folder then change your updater-script to update script... ( search for the option to change it) if you want to make some changes in update-script Do so and then build your rom... the update-script will automatically be changed to updater-script .. now place the rom and flash.. If any problem feel free to ask :thumbup:
Sent from my HTC Explorer A310e using xda app-developers app

Question about flashing

I was curious if there is a way to extract a zip file instead of using CWM to flash it, for instance let's say I have a different keyboard that can be flashed through CWM but I don't want to flash it I'd rather just extract files and put them somewhere using root explorer, can this be done? And if so could someone tell me how to do it and where to put the files? Thank you
Sent from my LG-E980 using XDA Premium 4 mobile app
MrKite4 said:
I was curious if there is a way to extract a zip file instead of using CWM to flash it, for instance let's say I have a different keyboard that can be flashed through CWM but I don't want to flash it I'd rather just extract files and put them somewhere using root explorer, can this be done? And if so could someone tell me how to do it and where to put the files? Thank you
Sent from my LG-E980 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
If you unzip the file to flash, you will notice a file hierarchy in the zip. Follow that hierarchy to the file(s) you want and then use a root explorer to paste the file(s) in the same location. Then reboot and if you pasted everything correctly, it should make that change.
cmendonc2 said:
If you unzip the file to flash, you will notice a file hierarchy in the zip. Follow that hierarchy to the file(s) you want and then use a root explorer to paste the file(s) in the same location. Then reboot and if you pasted everything correctly, it should make that change.
Click to expand...
Click to collapse
Okay, so what I have are 2 folders in the unzipped file in root explorer, one is labeled META-INF and the other is System. In the system there is an app and a lib folder, the app folder contains apps and the lib contains files with the extension .so, so I'm assuming paste the app files in the system/app folder and the .so files in the system/lib folder, correct? Now the META-INF folder contains files a com folder and three files, CERT.RSA, CERT.SF, and MANIFEST.MF. the com folder turns into a Google folder, then an Android folder which contains 2 files, update-binary and update-script. I pretty much have no idea what to do with everything in the META-INF folder. Could you possibly help with that I'd greatly appreciate it.
Sent from my LG-E980 using XDA Premium 4 mobile app
MrKite4 said:
Okay, so what I have are 2 folders in the unzipped file in root explorer, one is labeled META-INF and the other is System. In the system there is an app and a lib folder, the app folder contains apps and the lib contains files with the extension .so, so I'm assuming paste the app files in the system/app folder and the .so files in the system/lib folder, correct? Now the META-INF folder contains files a com folder and three files, CERT.RSA, CERT.SF, and MANIFEST.MF. the com folder turns into a Google folder, then an Android folder which contains 2 files, update-binary and update-script. I pretty much have no idea what to do with everything in the META-INF folder. Could you possibly help with that I'd greatly appreciate it.
Sent from my LG-E980 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Ignore the META-INF folder, that is used for the actual flashing procedure. Most apps can be installed without the certificate and manifest.
The app files would go in
Code:
/system/app
The library files (.so) would go in
Code:
/system/lib
cmendonc2 said:
Ignore the META-INF folder, that is used for the actual flashing procedure. Most apps can be installed without the certificate and manifest.
The app files would go in
Code:
/system/app
The library files (.so) would go in
Code:
/system/lib
Click to expand...
Click to collapse
Awesome, it worked! Thank you so much
Sent from my LG-E980 using XDA Premium 4 mobile app

Help with updater-script

How to extract a tar archive to a specific location using updater script.
For example, I have a file named sample.tgz in /sdcard. Now I want to extract the contents of it to /system dir. Sample.tgz is not in the zip file of the flashable zip. Is there any way to do it? If yes, let me know!

Categories

Resources