[ZIP] Empty Flashable Zip Template - UPDATED for Android 5.0 and up -- 1/23/15

Search This thread

andybones

Retired Forum Moderator / Inactive RD
May 18, 2010
15,092
15,480
Google Pixel 5
Some people aren't sure how to create a flash-able zip. So here is a template zip file.
If you want to edit the updater-script (what shows up in recovery when you choose the .zip to flash. It it's in META-INF\com\google\android\updater-script, edit with notepad++, and edit in between the parentheses ui_print("Put Your Text Here");

add your .apk/.jar files to the appropriate directory within the zip.

for example, SystemUI.apk would go into system/priv-app
android.policy.jar would go into system/framework
and so-on

https://dl.dropboxusercontent.com/u/26383143/HTC/HTC One M8/Empty_Flashable_Zip.zip
OR
https://www.androidfilehost.com/?fid=313042859668275619

No need to seek permission for this or give any credits. Just something for those who need it.


------------------------------------------------------------------------------------------------------------------------------------------------------------

NEW - ANDROID 5.0 AND UP

I tried to include as many folders as possible but I think you guys will get the idea.

Basically, as above and for Android up until KitKat 4.4.4 that was how it was.

Now EVERY application hosts it's own FOLDER.

so.

now instead of adding say Prism to system/priv-app
you add it to
system/priv/app/Prism

https://dl.dropboxusercontent.com/u/26383143/HTC/HTC One M8/Empty_Flashable-Android5.0.zip

OR
https://www.androidfilehost.com/?fid=313042859668275619
 
Last edited:

droidkevlar

Senior Member
Mar 27, 2010
3,206
1,065
Thanks for this. Question. What line would we need to add to the updater-script to lets say remove a file? And when to add it. Thanks for n00b questions, just trying to learn this stuff.
 

andybones

Retired Forum Moderator / Inactive RD
May 18, 2010
15,092
15,480
Google Pixel 5
Thanks for this. Question. What line would we need to add to the updater-script to lets say remove a file? And when to add it. Thanks for n00b questions, just trying to learn this stuff.

Very welcome.
If you want to delete a file, the command is this:
delete("/system/app/choiceofapp.apk");

and you insert between mount and un-mount of system (unless you are wanting to remove a data app in that case in-between mount and un-mount of data)
Here is an example of my script with addition of removing SystemUI.apk

ui_print("Universal Updater Script - by Andybones");
set_progress(0.1);
ui_print("Mount /System Folder...");
run_program("/sbin/busybox", "mount", "/system");

set_progress(0.2);
ui_print("Deleting SystemUI.apk...");
delete("/system/priv-app/SystemUI.apk");


set_progress(0.3);
ui_print("Extracting /System Files...");
package_extract_dir("system", "/system");

set_progress(0.4);
ui_print("Setting /System Permissions...");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
set_perm_recursive(0, 0, 0755, 0644, "/system/priv-app");

set_progress(0.5);
ui_print("UnMounting /System Folder...");
unmount("/system");

set_progress(0.6);
ui_print("Mount /Data Folder...");
run_program("/sbin/busybox", "mount", "/data");

set_progress(0.8);
ui_print("Extracting /Data Files...");
package_extract_dir("data", "/data");

set_progress(0.9);
ui_print("Setting /Data Permissions...");
set_perm_recursive(0, 0, 0755, 0644, "/data/app");

set_progress(1.0);
ui_print("UnMounting /Data Folder...");
unmount("/data");
ui_print("Done.");


great thread here has good info I believe you will find useful

http://xdaforums.com/showthread.php?t=2290009
 
Last edited:

vampir4997

Senior Member
Jul 18, 2010
1,505
248
Any chance you could make an empty vr zip?

Sent from my HTC6525LVW using XDA Premium 4 mobile app
 

andybones

Retired Forum Moderator / Inactive RD
May 18, 2010
15,092
15,480
Google Pixel 5
How many times? Tried about 4

until it matches the md5 given on the site.. do you even compare them?
if they don't match your download is bad, i just downloaded it, it works fine. k?
calab your a cool cat but I waste a lot of time explaining things to you.


ohh and let me guess your not on a computer your on your phone?
yea.. thatd be it..
I made this fool proof bud...
90+ downloads will attest to that.
 
Last edited:
  • Like
Reactions: calebcabob

calebcabob

Senior Member
Jul 14, 2013
1,477
2,251
Massachusetts
until it matches the md5 given on the site.. do you even compare them?
if they don't match your download is bad, i just downloaded it, it works fine. k?
calab your a cool cat but I waste a lot of time explaining things to you.


ohh and let me guess your not on a computer your on your phone?
yea.. thatd be it..
I made this fool proof bud...
90+ downloads will attest to that.

Well, I am on my phone. If u say it worked for u, then I won't bug u about it anymore. Just wasn't sure if there was an issue with the file. I download things all the time from my phone so I figured after the 4th try, maybe it wasn't just me. Thanks for the response Andy.

Yes, ever since u told me to check MD5s, I do it anytime I download a rom now:D Thanks!;)
 

andybones

Retired Forum Moderator / Inactive RD
May 18, 2010
15,092
15,480
Google Pixel 5
Well, I am on my phone. If u say it worked for u, then I won't bug u about it anymore. Just wasn't sure if there was an issue with the file. I download things all the time from my phone so I figured after the 4th try, maybe it wasn't just me. Thanks for the response Andy.

Yes, ever since u told me to check MD5s, I do it anytime I download a rom now:D Thanks!;)

if on phone download a root explorer app it will open...
but this was mainy for those on use of a computer
:)

like I said awesome guy bro, just ur keeping me busy with all the questions! lol
all good my brother
 
  • Like
Reactions: calebcabob

calebcabob

Senior Member
Jul 14, 2013
1,477
2,251
Massachusetts
if on phone download a root explorer app it will open...
but this was mainy for those on use of a computer
:)

like I said awesome guy bro, just ur keeping me busy with all the questions! lol
all good my brother

Hey, what the hell are you doing over here!? You have a new rom posted today!?:D I just saw that.

Hmm...so, so tempting. Thanks! Right when I get my setup exactly where I want it! ;)

I'll see you on the other side. I'll try helping out some of the newer folks over there, in attempt to take the pressure off;)
 

andybones

Retired Forum Moderator / Inactive RD
May 18, 2010
15,092
15,480
Google Pixel 5
Hey, what the hell are you doing over here!? You have a new rom posted today!?:D I just saw that.

Hmm...so, so tempting. Thanks! Right when I get my setup exactly where I want it! ;)

I'll see you on the other side. I'll try helping out some of the newer folks over there, in attempt to take the pressure off;)

Haha you're good my friend! If can help and have time, I always will. :)
 
Last edited:

Pneuma1985

Senior Member
Jan 5, 2011
903
1,069
Around
First and foremost thx for the template just wanted to share a tid bit of information i figured out when downloading your template. And to be clear im talking about the dev-host server not your .zip, the .zip is clean...

Be aware about dev-host just an FYI for the community I'll probably share this in general but i only noticed it today downloading your vr-template.
I could show you all the nitty-gritty firewall details and how the phising attack works but yeah thats to much time I'll just show you what button NOT to push on dev-host:
389c05eee64a17cfa32e6175657548a3.png

Clicking the orange download button results in an instant phishing attack. For those of you who dont know what a phising attack is let me explain:
Essentially it's a way of tricking you into thinking your browser is going somewhere its not. Which can result in many things ie: theft of data/malware/viruses/network attacks/trojan droppers and many many other nasty's most people really hate. I have tested where it goes and its completely random and its not this specific zip or this specific page its just the first one I tested it on. So one or more of the dev-hosts servers are infected. PFSense has blocked the crap out of it every time along with module watchers and even some very low lvl malware software may block it. Figured I'd share this information.
Oh and Id also like to say I use every adblocker and adblocker+ and several other ad blocking extensions and the button you need to click is right below it. So its definitely something to keep an eye out for. I'm usually very careful about what button I click. So I usually never even run into these situations but yeah. Figured I'd share :D
 
Last edited:

andybones

Retired Forum Moderator / Inactive RD
May 18, 2010
15,092
15,480
Google Pixel 5
First and foremost thx for the template just wanted to share a tid bit of information i figured out when downloading your template. And to be clear im talking about the dev-host server not your .zip, the .zip is clean...

Be aware about dev-host just an FYI for the community I'll probably share this in general but i only noticed it today downloading your vr-template.
I could show you all the nitty-gritty firewall details and how the phising attack works but yeah thats to much time I'll just show you what button NOT to push on dev-host:
389c05eee64a17cfa32e6175657548a3.png

Clicking the orange download button results in an instant phishing attack. For those of you who dont know what a phising attack is let me explain:
Essentially it's a way of tricking you into thinking your browser is going somewhere its not. Which can result in many things ie: theft of data/malware/viruses/network attacks/trojan droppers and many many other nasty's most people really hate. I have tested where it goes and its completely random and its not this specific zip or this specific page its just the first one I tested it on. So one or more of the dev-hosts servers are infected. PFSense has blocked the crap out of it every time along with module watchers and even some very low lvl malware software may block it. Figured I'd share this information.
Oh and Id also like to say I use every adblocker and adblocker+ and several other ad blocking extensions and the button you need to click is right below it. So its definitely something to keep an eye out for. I'm usually very careful about what button I click. So I usually never even run into these situations but yeah. Figured I'd share :D

many thanks for this, changing to dropbox now!
 
  • Like
Reactions: Pneuma1985

Top Liked Posts

  • There are no posts matching your filters.
  • 26
    Some people aren't sure how to create a flash-able zip. So here is a template zip file.
    If you want to edit the updater-script (what shows up in recovery when you choose the .zip to flash. It it's in META-INF\com\google\android\updater-script, edit with notepad++, and edit in between the parentheses ui_print("Put Your Text Here");

    add your .apk/.jar files to the appropriate directory within the zip.

    for example, SystemUI.apk would go into system/priv-app
    android.policy.jar would go into system/framework
    and so-on

    https://dl.dropboxusercontent.com/u/26383143/HTC/HTC One M8/Empty_Flashable_Zip.zip
    OR
    https://www.androidfilehost.com/?fid=313042859668275619

    No need to seek permission for this or give any credits. Just something for those who need it.


    ------------------------------------------------------------------------------------------------------------------------------------------------------------

    NEW - ANDROID 5.0 AND UP

    I tried to include as many folders as possible but I think you guys will get the idea.

    Basically, as above and for Android up until KitKat 4.4.4 that was how it was.

    Now EVERY application hosts it's own FOLDER.

    so.

    now instead of adding say Prism to system/priv-app
    you add it to
    system/priv/app/Prism

    https://dl.dropboxusercontent.com/u/26383143/HTC/HTC One M8/Empty_Flashable-Android5.0.zip

    OR
    https://www.androidfilehost.com/?fid=313042859668275619
    3
    Thanks for this. Question. What line would we need to add to the updater-script to lets say remove a file? And when to add it. Thanks for n00b questions, just trying to learn this stuff.

    Very welcome.
    If you want to delete a file, the command is this:
    delete("/system/app/choiceofapp.apk");

    and you insert between mount and un-mount of system (unless you are wanting to remove a data app in that case in-between mount and un-mount of data)
    Here is an example of my script with addition of removing SystemUI.apk

    ui_print("Universal Updater Script - by Andybones");
    set_progress(0.1);
    ui_print("Mount /System Folder...");
    run_program("/sbin/busybox", "mount", "/system");

    set_progress(0.2);
    ui_print("Deleting SystemUI.apk...");
    delete("/system/priv-app/SystemUI.apk");


    set_progress(0.3);
    ui_print("Extracting /System Files...");
    package_extract_dir("system", "/system");

    set_progress(0.4);
    ui_print("Setting /System Permissions...");
    set_perm_recursive(0, 0, 0755, 0644, "/system/app");
    set_perm_recursive(0, 0, 0755, 0644, "/system/priv-app");

    set_progress(0.5);
    ui_print("UnMounting /System Folder...");
    unmount("/system");

    set_progress(0.6);
    ui_print("Mount /Data Folder...");
    run_program("/sbin/busybox", "mount", "/data");

    set_progress(0.8);
    ui_print("Extracting /Data Files...");
    package_extract_dir("data", "/data");

    set_progress(0.9);
    ui_print("Setting /Data Permissions...");
    set_perm_recursive(0, 0, 0755, 0644, "/data/app");

    set_progress(1.0);
    ui_print("UnMounting /Data Folder...");
    unmount("/data");
    ui_print("Done.");


    great thread here has good info I believe you will find useful

    http://xdaforums.com/showthread.php?t=2290009
    2
    Used this on m9 to flash app to test this an it did work.
    2
    First and foremost thx for the template just wanted to share a tid bit of information i figured out when downloading your template. And to be clear im talking about the dev-host server not your .zip, the .zip is clean...

    Be aware about dev-host just an FYI for the community I'll probably share this in general but i only noticed it today downloading your vr-template.
    I could show you all the nitty-gritty firewall details and how the phising attack works but yeah thats to much time I'll just show you what button NOT to push on dev-host:
    389c05eee64a17cfa32e6175657548a3.png

    Clicking the orange download button results in an instant phishing attack. For those of you who dont know what a phising attack is let me explain:
    Essentially it's a way of tricking you into thinking your browser is going somewhere its not. Which can result in many things ie: theft of data/malware/viruses/network attacks/trojan droppers and many many other nasty's most people really hate. I have tested where it goes and its completely random and its not this specific zip or this specific page its just the first one I tested it on. So one or more of the dev-hosts servers are infected. PFSense has blocked the crap out of it every time along with module watchers and even some very low lvl malware software may block it. Figured I'd share this information.
    Oh and Id also like to say I use every adblocker and adblocker+ and several other ad blocking extensions and the button you need to click is right below it. So its definitely something to keep an eye out for. I'm usually very careful about what button I click. So I usually never even run into these situations but yeah. Figured I'd share :D