Combine various flashable zips. - Android Q&A, Help & Troubleshooting

Hey guys.
I am trying to combine a few flashable zips.
For the main system , modem and my tweaks this was no problem since all three zips use normal updater-script.
I'd like to add gapps and magisk as well as a custom kernel as well. problem: those don't use updater-script but 'misuse' update-binary as shell script.
How can i merge those ?
i tried putting the unzipped folders in the root directory of the flashable zip and added this to the updater-script but the outcome wasn't what i wanted..
Code:
...
ui_print("Installing Gapps... You wont see this....");
package_extract_dir("gapps", "/tmp/gapps");
run_program("/sbin/busybox","sh", "/tmp/gapps/META-INF/com/google/android/updater-binary");
ui_print("Installing custom Kernel... You wont see this....");
package_extract_dir("kernel", "/tmp/kernel");
run_program("/sbin/busybox","sh", "/tmp/kernel/META-INF/com/google/android/updater-binary");
ui_print("Installing Magisk... You wont see this....");
package_extract_dir("magisk", "/tmp/magisk");
run_program("/sbin/busybox","sh", "/tmp/magisk/META-INF/com/google/android/updater-binary");
...
something happens... takes about as long as the gapps/kernel/magisk install should take, however afterward no gapps/kernel/magisk available in the booted os.
If anyone can give me a hint how to merge those into one zip that'll be great
Cheers,
dreadkopp

Related

[Q] Remove full wipe command on a rom

hello there! i think this is my first post here but ive been lurking since my evo 4g days. But my question is, is there anyway to remove the full wipe that comes with some roms? sometimes ill flash a kernel that hates my rom or my phone or more likely me. Or some other error happens and i would like to just flash the same rom over top to repair and be on my way. ive been running meanrom gb and it works no problem. but i tried running mikrunny 1.13 and i tried flashing rcmix kernel on it and apparently it wasnt for gingerbread i guess. but since it had full wipe built in i lost all my stuff and had to start fresh. sorry for the drawn out post but just trying to explain what my reasonings are. thanks everyone for being awesome here!
You can always do a advance backup of your data in 4ext recovery, cwm recovery I believe also has that option
(Don't ask me for help as I couldn't care if your phone explodes, eh!
It's a command in the install script. Now where and how to remove, I'm not sure.
jump454 said:
hello there! i think this is my first post here but ive been lurking since my evo 4g days. But my question is, is there anyway to remove the full wipe that comes with some roms? sometimes ill flash a kernel that hates my rom or my phone or more likely me. Or some other error happens and i would like to just flash the same rom over top to repair and be on my way. ive been running meanrom gb and it works no problem. but i tried running mikrunny 1.13 and i tried flashing rcmix kernel on it and apparently it wasnt for gingerbread i guess. but since it had full wipe built in i lost all my stuff and had to start fresh. sorry for the drawn out post but just trying to explain what my reasonings are. thanks everyone for being awesome here!
Click to expand...
Click to collapse
Look at the updater-script in the meta-inf folder you will see something that looks like this at the top of the script
Code:
format("ext4", "EMMC", "/dev/block/mmcblk0p24");
Remove any line that references formatting a partition. I wanna say that's all you'd need to do. If that doesn't work PM me a link to the ROM and I'll play with it and get it how you want it.
Editing the updater-script file
This might be more than you are interested in trying, but maybe not if you've been lurking since Evo 4G days.
All Android ROM and kernel installation scripts ultimately perform the installation using a scripting language called Edify, but some of them also have an Aroma script included as a preprocessor. Here's a good description of the relationship between Edify and Aroma explained by the Aroma developer.
To do what you are asking requires editing the /META-INF/com/google/android/updater-script file within the zip file you are going to flash. I use WinZip and UltraEdit on my PC but there are a number of editors and archiving programs that will work. You have to use an editor that will leave the Unix/Linux end-of-line characters and Notepad++ is a free editor that can do that.
Once you have the updater-script file open, look for lines like this:
Code:
ui_print("Formatting DATA Partition...");
unmount("/data");
run_program("/sbin/erase_image", "userdata");
format("ext4", "EMMC", "/dev/block/mmcblk0p24");
and change them to this:
Code:
# ui_print("Formatting DATA Partition...");
# unmount("/data");
# run_program("/sbin/erase_image", "userdata");
# format("ext4", "EMMC", "/dev/block/mmcblk0p24");
The lines above are from the updater-script file in the MikVirgin 1.01 zip file.
That will prevent your data partition from being formatted, although flashallthetime's suggestion to do an advanced backup of the data partition before flashing and advanced restore afterwards is effectively the same as the above script change. However, you may find other things you want to change in updater-script files if you become more familiar with them.
For more help with editing scripts just do a Google search for "edify script". If it's more than you want to tackle, PM ItzCrooK2UxD and ask him to make the changes for you.
ramjet73
thanks guys for the fast reply. i dont wanna do a backup everytime because the backup alone takes up more time then flashing the rom over itself plus then youd have to reflash the backup after the fact. i will try some suggestions and see if they work.
Not a full back up, just an advance data back up which takes no time at all
(Don't ask me for help as I couldn't care if your phone explodes, eh!
advance databackup? ive never heard of that. im gonna see if i can locate it in 4ext right now!
When you go into recovery you'll see backup/restore and you'll see advance restore
Sent from my PG86100 using Tapatalk 2

[Q] Help needed for merging of different MODs

Hello all,
does somebody have a instruction/faq how to merge different MODs into onw ZIP.
Why? Because i am flashing round about 4 MODs after a Custom firmware update.
I want to Merge the following MODs:
- 12_headphone_shortcuts_mod_v0.1.zip
- Camera_HX-MOD_1.52_CWM.zip
- CWM_SecLauncher2_Mixed_5x5_5x6_SCR_on.ELKC.zip
- XXELLA SystemUI.zip
- SGS_3.zip (Picture for XXELLA SystemUI.zip
- Sihay Kernel
I have already taken a look into the ZIPs, but have a problem in understanding the structure of the ZIPs.
In some zips i have a different update-binary file.
The updater script is different to each other. Seems for me that this is the file with the commands which have to be used for updating process.
The Manifest.MF and CERT.SF file seams to have hashs of the files (SHA1-Digest). These differ from Zip to Zip even when the same filename is used.
Read here something about a signing of the Zip.
Is this need for/after merging the Zips?
Could somebody help me with the steps which have to be done to merge the Zips.
I want to learn how it has to be done. I donĀ“t want a ready to use Zip file.
I already searched for instructions but have not found a concrete instruction/faq for the merging of ZIPs.
Best regards
Jake555
PUSH

How to generate update-binary for flashable zip?

Hi all, almost always after installing new CFW i have to delete annoying stock apps, so i think, that with flashable .zip that would be easier. I have created updater-script, but i need update-binary for it's work, right? So, anybody knows, how to generate it or smth? Thank you

[GUIDE] dsixda's Android Kitchen now on P760!!

Hi all guys, finally i've found the way to use this very nice tool on our device!!
I've tested it on my P760 with v20b stock ROM and with some little addon it runs fine
First of all i want to clarify that this guide uses a tool made for the xda comunity by dsixda, so the major credit goes to him.
Dont ask me if it works on other variants, i have the P760 only, so try by yourself and let us know.
What you need:
dsixda's Android Kitchen
dsixda Android Kitchen P760 addon
KDZ file or CWM backup of your stock ROM
...a bit of knowledge on what you are doing
_______
Download and install dsixda Android Kitchen from original thread
Download dsixda_Android_Kitchen_P760_addon and extract the contents somewhere to your pc.
You can see two folder "dsixda_edify_defs" and "brocken_sys_files", copy dsixda_edify_defs content to "\Cygwin\home\YourUserName\Kitchen\tools\edify_defs" folder.
Now we need system and boot from our rom. If you have a CWM backup just copy system.ext4.tar.a and boot.img to "original_update" folder of dsixda kitchen and rename "system.ext4.tar.a" to "system.ext4.tar"
If you want to use KDZ stock ROM please refer to this guide provided by kuma82 on how to extract system.img and boot.img
Now run dsixda Android Kitchen and setup your working folder (detailed info on hawto in the original thread).
When setup completed than copy the "brocken_sys_files" contents located in dsixda_Android_Kitchen_P760_addon.zip to the locations specified in the included readme file. I dont know why but dsixda kitchen doesnt process these files correctly so we have to add them manually. They are taken from V20b but should work on other version too.
Ok,now we are ready to apply our mods and cook!!
I've cooked my own ROM from KDZ file and tested some feature, root, deodex, zipalign, init.d, /data/app, all works fine. I've found only one issue releted to deodexing LG keyboard, just replace it with another one and all should be fine.
NOT tested with CM rom.
I'm NOT responsable of any kind of demage caused by using this method, so use it at your own risk.
@moderators
I dont know if this is the right section where to post this guide, if no than feel free to move it to the right one.
Credits:
dsixda (for Android kitchen)
kuma82 and cmahendra (for KDZ extraction)
___
Thanks for sharing the info, Android kitchen was already working but I had to change the updater-script and update-binary manually.
Lol, I didn't think about changing the CWM backup system .tar.a file to .tar I just used the dd command to extract (my current) system.img to my sdcard
Code:
dd if=/dev/block/mmcblk0p10 of=/sdcard/system.img
Note: my internal and external or swapped, so change accordingly
Another thing, thanks for giving me credit for my guide
@- shifu - thanks man! you have two pm!
@kuma82 how you change it?
format("MTD", "system");
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
....
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
Click to expand...
Click to collapse
with:
format("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.1/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.1/by-name/system", "/system");
...
package_extract_file("boot.img", "/dev/block/platform/omap/omap_hsmmc.1/by-name/boot");
Yup, to tell you the truth I haven't tried it yet, been to busy, to actually flash it, but if I'm not mistaken @Kid_Ding used it (android kitchen) to port pac rom to the P769
Sent from my LGMS769 using xda app-developers app
kuma82 said:
Thanks for sharing the info, Android kitchen was already working but I had to change the updater-script and update-binary manually.
Click to expand...
Click to collapse
for me it never worked, even changing updater-script.. but i've tried with stock ROM only, maybe with CM just made the changhes you've mentioned.
Anyway with my addon it works out of the box, no need to modify updater-script
Lol, I didn't think about changing the CWM backup system .tar.a file to .tar I just used the dd command to extract (my current) system.img to my sdcard
Code:
dd if=/dev/block/mmcblk0p10 of=/sdcard/system.img
Note: my internal and external or swapped, so change accordingly
Click to expand...
Click to collapse
yep, i've tried and it worked
Another thing, thanks for giving me credit for my guide
Click to expand...
Click to collapse
of nothing colleague
Very Useful.
Very useful Thread. Saved lot of time. Thanks

[CAN FLASH EVERYTHING] Clockworkmod Recovery 6.0.4.6 Galaxy 5

CWM Recovery 6.0.4.6 capable of flashing all the zip files....
recovery-clockwork-6.0.4.6-galaxy5.zip (Mediafire)(5.25 mb)
I made this cwm recovery 6.0.4.6 with the help of Jenkins.
Features...
->Fully functional. (Still no option for partition sdcard)
->This recovery can flash all the roms and also older recoveries and all the valid zip files. (even cm7)
->Use this until psyke officially release a properly working cwm.
How to use?
->Flash recovery-clockwork-6.0.1.2-galaxy5.tar (or any older) using Odin.
->Flash this zip file provided by me in the above link.
->After that boot into this new recovery and perform a cache wipe (NOT dalvik-cache). Then you're done....!!! Now, start flashing everything or reboot to system back...
Acknowledgements:-
-> First and very important fact I want you all to know is that from CM11 (CWM 6.0.4.5 onwards), a major security step has been taken up by Koush (CWM creator) by introducing SElinux and so one more security enhancement that came with it is: That...now you need to keep your updater-script as precise as possible. For e.g :- Not giving permission command for such files that doesn't even exist.
-> Another thing I saw was that now, format command in updater-script requires 5 args instead of 4 or 3.
-> Psyke83's cm7 can be flashed using this recovery but there were some mistakes in few of the updater-script lines. I removed those Mistakes (not added a single word more) and now...cm7 can be flashed right away using this recovery 6.0.4.6.
Corrected updater-script file for cm7 (for latest v3.0):-
updater-script (9 KB)
(If after download, your file is named like this- "updater-script.bin", please rename it to "updater-script".)
Where to replace this file?
->Those who don't know where to replace this updater-script file:- Open psyke83's latest v3.0 cm7 zip file. Go to META-INF/com/google/android and there in 'android' folder you'll see updater-script file. Just replace that file with mine (given above).
->Now, your cm7 zip file is ready to be flashed with cwm 6.0.4.6 provided above.
ENJOY.....!!!!
PROJECT Closed: Use PhilZ Touch Recovery which is based on CWM. It can flash everything.
Wanna know what were the mistakes in cm7 script according to new rules of cwm 6.0.4.5 (or newer)?...Here you go...
->First one: Format requires five args instead of three or four or lesser.
So, it is the line in original updater-script:-
format("ext4", "EMMC", "/dev/block/stl12");
But, it has to be like this according to new pattern of cwm 6.0.4.5 (or newer):-
format("ext4", "EMMC", "/dev/block/stl12", "0", "/system");
So, I corrected it.
->Second one & the last one is that not giving permissions to the file that doesn't exist.
Line in original file:-
set_perm(0, 0, 0544, "/system/etc/install-recovery.sh");
But, the file 'install-recovery.sh' doesn't exist. So, I removed this line.
And so finally tried flashing CM7 and it was successfully flashed with the new recovery and booted up very fast...
Is it 100% safe?
Sent from my GT-I5500 [CM11]
Vagelis1608 said:
Is it 100% safe?
Sent from my GT-I5500 [CM11]
Click to expand...
Click to collapse
Yupp bro...
I myself use this since a long time..You can see madteam's "Clockworkmod Recovery for Galaxy 5" topic to see user replies confirming the recovery to be working.
bhattbhargav60 said:
Yupp bro...
I myself use this since a long time..You can see madteam's "Clockworkmod Recovery for Galaxy 5" topic to see user replies confirming the recovery to be working.
Click to expand...
Click to collapse
Ok.I just wanted to be sure.
Downloading now.
Thanks for it :good:

Categories

Resources