[GUIDE] how to make a flashable package (update.zip)

Search This thread

francwalter

Senior Member
Nov 13, 2011
610
108
I just dont get it!
I try and try but get an error when flashing.
I just want to flash some alarm sounds, maybe only one at least, but it doesnt work.
First I though this is easy easy and followed this thread, but this is unsigned, I don't know how this should be possible at all.
So I followed this thread, but even with this ZipSigner the flashing doesn't work.
The process seems so easy but I have just no success with it, only time loosing :(
I guess the problem is the signing.

I attached my last attempt where I get an error in TWRP recovery.
I have a SGS4 (GT-I9505) with CM12

Help please.

frank

EDIT 2015-04-22: this is just another abandoned and not (anymore?) working project of (un)flashable zip-files. At least I found a way to do it, but not on xda, on droidviews.com where I first tried one more time their sample.zip, not working, but then the Flashable Zip Creator did work! At least :)
It is a java application and should work on any system.
 

Attachments

  • franc-sounds-signed.zip
    36.6 KB · Views: 301
Last edited:

insalen

Member
Dec 22, 2015
34
5
honestly, i couldnt tell you for sure but i dont see why you couldnt



thanks :)
daktah

this is how to flash apps, wallpaper etc

would you tell me how to copy some stock rom files which is missing in my custom rom framework, etc, bin and lib directories. i tried like the above way but getting the error msg 'error flashing zip'.
i tried by including updater-binary in /META-INF/......./android/ directory but getting this msg 'error executing updater binary in zip.'

i tried another way of editing update-script with and without the updater-binary of custom rom

update-script is given below:-
ui_print("+=============================+");
ui_print("+ +");
ui_print("+ +");
ui_print("+ IN.SAlen +");
ui_print("+ +");
ui_print("+ +");
ui_print("+=============================+");
ui_print(" 10% Update Started ");
ui_print(" 30% Reading Apps ");
ui_print(" 60% Mounting filesystem ");
run_program("/sbin/busybox", "mount", "/system");
ui_print("| 80% Pushing files |");
cp_perm 0 0 0644/system/framework/com.qrd.wappush.jar /system/framework
run_program("/sbin/busybox", "umount", "/system");
ui_print("| 100% Update complete |");
ui_print(" <<<<<<IN.SAlen>>>>> ");

my device is lenovo A6000 plus
custom rom is CM13 6.00 (unofficial)

the bugs in this cm13 rom are:- portable device storage and adb drivers are not showing in my pc which was showed in stock rom and other cm 12.1 based roms

proximity sensor issue during in call is fixed by copying the file in cm13 from stock rom using es file explorer. but cannot copy in the same way in system framework folder.
 

Smil3yWulf

Senior Member
Jan 25, 2015
91
5
Verizon Samsung Galaxy S4
How do I pulled out stock ROM out the phone and make it into update.zip for instance if one of devices doesn't have firmware to flash it because they dont provided, and someone needs aN stock firmware to unbricking it..
 

je2854

Senior Member
Oct 3, 2010
1,013
324
Houston, TX
what was the whole code in the update-script?
did you use the example i posted?

show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:media
show_progress 0.1 10

So if I want to flash an entire OS, how would it look like??

Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:
show_progress 0.1 10

OR

Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
copy_dir PACKAGE:system SYSTEM/app:
copy_dir PACKAGE:system SYSTEM/bin:
copy_dir PACKAGE:system SYSTEM/etc:
copy_dir PACKAGE:system SYSTEM/fonts:
""
""
""
""
set_perm_recursive 0 0 0755 0644 SYSTEM:
show_progress 0.1 10

My phone only supports FlashFire as a flashing method so the less tries the better lol
 

Le X626 USA

Member
Apr 14, 2019
5
1
save META-INFO as UTF8, Unicode, or ANSI..?

Great Article.!!! However earlier you say about editing META-INFO file to save as .txt file then remove the .txt extension. What Format do I save the .txt file in.? There are options for ANSI, unicode, UTF8.

Other question when compressing to a .zip file. My program 7-zip offers types of compression Normal etc for zip.

Thanks for this additional information.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 97
    thanks to this page for teaching me: http://www.robmcghee.com/android/creating-an-android-update-zip-package/
    note: although i am copying this from the page, this isnt a straight ctrl+c, ctrl+p from it. ive rewritten it with slightly more english. ok alot more.

    before we start, grab ppcgeeks auto signer here, or nothing will flash anyway. its the easiest method since its drag, drop, and click.
    also i recommend 7-zip but its not necessarily needed.

    first step, make the folder structure.
    ive included prebuilt updates to make it a little faster for you. they contain no actual files, just the appropriate folder structure and update script. they must be resigned if you add files and expect to flash them.

    if what your looking for isnt included, make a folder and name it "workdir". this will contain your work.
    this is just to make it easier to organize all your stuff. if you feel so inclined you can name it whatever you want, it doesnt really matter.
    next youll need to make folders inside the workdir according to where your flashing stuff, ie if your flashing wallpapers youd need to make a structure that looks like this: "workdir/system/customize/resource"

    next to make the update-script. this tells the system what to do.
    first make this folder structure: "workdir/META-INF/com/google/android"
    make sure you capitalize "META-INF"
    now put a text file into the "android" folder and call it "update-script"
    the easiest way to code it would be to copy this into it:
    Code:
    show_progress 0.1 0
    copy_dir PACKAGE:(x) (X):
    set_perm_recursive 0 0 0755 0644 (X):(y)
    show_progress 0.1 10
    replace the (x) with the directory in the root your flashing to in lowercase, ie system or data or sdcard.
    replace the (X)'s with the same thing as (x) except in UPPERCASE such as SYSTEM or DATA or SDCARD.
    replace the (y) with the next directory in lowercase like media or app or customize.
    note: if your adding to the root of (X) folder then leave this blank, no spaces or anything.

    if your flashing an app it should look something like this:
    Code:
    show_progress 0.1 0
    copy_dir PACKAGE:system SYSTEM:
    set_perm_recursive 0 0 0755 0644 SYSTEM:app
    show_progress 0.1 10
    after youve done that, save and close the file. now you need to take the extension off of the text file. simply delete the .txt at the end of the file.
    if there is no extension showing, make sure you have "hide extensions for known file types" unchecked in tools> folder options> "view" tab.

    second to last step! compress the workdir contents into a zip file, not the actual workdir though. it should look like this inside the zip: "update.zip/(folders)" not "update.zip/workdir/(folders)"

    finally, sign the zip with the auto signer and put it into the root of the sd card.
    boot into recovery and flash it up! with a bit of luck, it should work.

    if you have any questions, problems, or concerns just post them. i have instant subscription to this thread and will be notified every 30 min when my evo fetches my mail.
    2
    Thanx for this thread!

    Ok, my app should be installed in /system/app/
    but is it possible to include in the same (app)update-script: delete /data/app/xxx.apk?
    2
    What directories do boot animations go into?

    Awesome thread and thanks btw.
    2
    Ok, my app should be installed in /system/app/
    but is it possible to include in the same (app)update-script: delete /data/app/xxx.apk?

    honestly, i couldnt tell you for sure but i dont see why you couldnt

    Awesome thread and thanks btw.

    thanks :)
    2
    I keep getting a syntax error. I am trying to flash silent.mp3 so i can select that in my notifications, because for some reason it does not have that option :/

    can you let me know where I went wrong?

    have tried both
    set_perm_recursive 0 0 0755 0644 SYSTEM:media
    set_perm_recursive 0 0 0755 0644 SYSTEM:notifications
    but to no avail