yashsingh1/xdaforums huggingface dataset:
[Android Software Development] wesf90:
I'm having a lot of problems with this for some reason. I'm getting stuck on "Installing update...", then it freezes!

My file structure:

/META-INF/com/google/android/updater-script
/system/framework/framework-res.apk

My updater-script:

show_progress(1.000000, 0);
mount("yaffs2", "MTD", "system", "/system");

set_progress(0.200000);
package_extract_dir("system", "/system");

set_progress(0.400000);
set_perm(0,0,0644,"/system/framework/framework-res.apk");

set_progress(0.500000);
unmount("/system");

set_progress(0.900000);
ui_print("Update complete. FINALLY");

set_progress(1.000000);

Please help!. When I try to install the .zip in bootstrap recovery, I get the following message before it completely freezes and I have to remove my battery:

Finding update package...
Opening update package...
Installing update...

Any ideas? I'm using Droid X2 and Eclipse 2.0.2. I'm not sure what "update-binary" is supposed to be. Please either respond in this topic, or my separate topic (linked below). Thanks!

Separate topic is here: http://xdaforums.com/showthread.php?t=1424925
[Android Software Development] mallman:
anyone have a working example of an updater script that deletes files or renames files in /system?
[Android Software Development] Gene Poole:
you can always use the edify `run_program' command to run a shell script to do anything you want:

Just create a script to do what you want like:

#!/sbin/sh
mv /system/app/mypkg.apk /system/app/myrenamedpkg.apk

then zip it up in your update.zip with a path in "tmp", then extract it and run it:

ui_print("Copying files...");
package_extract_file("tmp/myscript.sh","/tmp/myscript.sh");
set_perm(0,0,0755,"/tmp/myscript.sh");
run_program("/tmp/myscript.sh","Rename");
[Android Software Development] HackitZ:
(Strike)Hi everyone, I'm struggling to figure this out and when i run

java C:/android-sdk/platform-tools/sign/testsign.jar" testsign Simple_Blue_v1.zip Simple_Blue_v1-signed.zip

This is my output

C:\android-sdk\platform-tools>java C:/android-sdk/platform-tools/sign/testsign.jar" testsign Simple_Blue_v1.zip Simple_B
lue_v1-signed.zip
Exception in thread "main" java.lang.NoClassDefFoundError: C:/android-sdk/platform-tools/sign/testsign/jar testsign Simp
le_Blue_v1/zip Simple_Blue_v1-signed/zip
Caused by: java.lang.ClassNotFoundException: C:.android-sdk.platform-tools.sign.testsign.jar testsign Simple_Blue_v1.zip
Simple_Blue_v1-signed.zip
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: C:/android-sdk/platform-tools/sign/testsign.jar testsign Simple_Blue_v1.zip Simple_Blue_v
1-signed.zip. Program will exit.

I'm sure it's a simple error, can someone with more experince then me lend me a hand.

thanks :)(/strike)

Sorted it out, used the zip update I found on xda
[Android Software Development] agent205:
if you come from here [ C:\android-sdk\platform-tools> ]

then type these

cd ..
cd tools/sign
java -classpath testsign.jar testsign Simple_Blue_v1.zip Simple_Blue_v1-signed.zip
[Android Software Development] :
Alright, I think this is the right place.

For some time now, I can make basic flashable zips to remove/add some files and give them permissions.

Now it's time for something more difficult.

I want to make one patch of 3, which are the same but carrier specific.

It basically needs to look at the device type, so build.prop and then extract an according file to the device.

So I need some code to look for the build.prop, and then there are 3 options (carriers). Each option needs to extract the right folder.

Is this possible or do I need to use aroma (which I don't want to do :p)
[Android Software Development] Kratz17:
How can I create a flashable.zip for a boot.img
[Android Software Development] cj chitwood:
Henry, look for "Gene Poole"'s post, about 3 or 4 posts above this one, and you'll see where he shows an example of making the edify installer run whatever script you can throw at it. So with that in mind, you would want to make a script that checks the build.prop and greps out what you're looking for. I know there is a more elegant way to do it, but since I'm not a developer, my script would pseudocode something like this:

for i in (t-mobile sprint at&t verizon orange blue green yellow telco1 telco2 telco3) do {
grep "build.prop" for i$
if i$ found {
run subroutine called i$()
}

# ...move on to next i$
}
if i$ never found, run generic subroutine() or error out
end main

// subroutines below
void t-mobile(void){
do t-mo-specific commands here
}

void sprint(void){
do sprint stuff here
}

void telco abcxyz123(void){
:P
}

Of course I realize that looks a little more like c++ than sh script but I think it gets the point across

Of course, I think shell allows for subroutines but if not just simply have a diff script for each carrier and call it out specifically. A little less elegant but should work.

I'm not the best person to answer this, obviously. I only answer cus it seems the devs aren't reading this particular thread. Since your question isn't specifically about making a flashable package (like the OP) but rather about the scripts within... IDK, may be better to break it out into its own thread (assuming you haven't already by now -- I'm a little late to the post as I've been ignoring this thread for some time, sorry).

HIH
[Android Software Development] iLingaraj:
How to create a flashable zip with frequently used apps?

Hi All,

This is very interesting and I want to learn the basics so that I get it right. I have a Samsung GS 2, I keep switching between 2.3.7 & 4.0.3 Android roms mostly MIUI roms. But whenever I want to install a new rom i have to go thru the process of installing whole bunch of apps that I use all the time.

I know I know you will be thinking why dont I use titanium backup right?

Well for me it has not worked once right without freezing either while backing up or restoring. So just want to know if I can create a update.zip with all my fav apps without the data as this can cause problems. Just flash it on a new rom. May be I can create 2 update.zip files one for GB & other for ICS.

Guys any help on this would be great. Also if someone can post a sample code with may be one app would be enough.

I am not a programmer so kindly bear with me until I get upto speed. I am a very fast learner.
[Android Software Development] Волк:
Well, you could zip data/app and I think data/data, include a permission fix/set script to avoid fc's, and you would just use package_extract_dir (or what ever the exact command is). I tried an app which did all that but about 75% of the apps wouldn't work right.
[Android Software Development] ParrotSquawk:
Simple instructions please!

This is all confusing.

All I want to do is have a zip file that checks to see if the free versions are installed and if so, remove then install my paid versions (or install the paid versions if they don't exist)

1: how do I create the update-binary?

2: how do I create the update-script?

3: what directories do I install the programs into? system/app ? is that why they go into that folder?

Thanks
[Android Software Development] Волк:
One does not create an update-binary you use one that already exists, you write the updater-script with programs like notepad++, regular windows notepad, or other standard programs like that don't work. To write it, you first swear a few times because of the lack of widespread and or detailed info on the commands and their args (some stuff,like busybox commands, you can get that info from Linux man pages), then you spend a bunch of time learing about proper sintax, which is accompanied by more swearing, at that point you should be able to write a script, but I recomend looking at some existing scripts/zips so you get an idea and examples. As for what you want it to do, you could just tell of to delete the free app by name versus "search" for it.
[Android Software Development] chitose_ndy:
Thankyou for sharing ;)
[Android Software Development] matanp:
can i add files other then "apk" to the flashable?

i want to make flashable zip that copy some apks to system/app and also copy the file gps.conf to /etc

can i make both of the copies in one file?
[Android Software Development] cj chitwood:
Sure. I had a flashable zip with a few ringtones I loved. The zip would remove all the media and replace them with the rings, notes, and alarms I like.

Of course, that was on old ROMs for the G1. Not sure it's still the same, but I see no reason it wouldn't be.

---------- Post added at 04:21 PM ---------- Previous post was at 04:21 PM ----------

You just have to make sure you follow the right syntax for the script.
[Android Software Development] matanp:
can you tell me how to do it?

so far i've made 2 flashable files, one for system apks and one for the gps.conf file

thanks ahead
[Android Software Development] cj chitwood:
I'm assuming you read the first post, yes? Perhaps if you state what exactly you're stumbling on, maybe I or someone else can help... basically, I don't remember the process, but the first post here looks pretty close to what I did. I found a different way of signing, but I just used the TestKeys cert.

You need your zip file to have the structure mentioned in OP, and beside that directory tree you also need the complete tree of the files you want to add (or APKs or... or...).

You then edit the update-script file as specified (this is another process which you can find in Google if you want something other than the generic updater shown).

These three things done, you should be able to sign the zip and flash it. It's been a while since I've done it though so I'm afraid aside from pointing to the OP I'm not sure how much help I'd be.

Lemme see if I can find that zip... Found it, see attached. It's "pre-signed" with testkeys. I recall that once upon a day you used to only need edit the files inside the zip and it would stay "signed" but I really don't know if that's still the case.

Honestly, I don't even really know if this Zip is still flashable with today's recoveries. If nothing else, pop it open and look at the folder structure. META-INF and everything in it has to be there. The updater-script is in here, and you'll need to edit it. The other folder(s) in the zip are just what you're adding to the phone.

HIH. Let us know what's holding you back and we can maybe help better but it's been so long for me I don't remember all the details.

Oh, one last edit: If you use this file, understand that "delete-recursive" means "wipe out the folder by this name and everything in and under it" so that my media/audio folder is completely wiped. It's not necessary to delete-recursive; I only did so because this file was all the ringtones I didn't particularly dislike, so there was no reason -- when space was a premium on my G1 -- to keep the ones I didn't like around. YMMV.
[Android Software Development] ramzidjoudi:
thank you for this great tuto
[Android Software Development] mingolianbeef:
Thank u :)
[Android Software Development] dark_prince:
How about adding a wallpaper and then set it to default throw update.zip or a theme.apk and set up the theme as default? Moreover, same as launcher.apk and make it default homescreen replacement?
[Android Software Development] cj chitwood:
I'm certain that can be done but I suspect it would have to be ROM specific. I'm not sure what file in the ROM sets defaults for stuff like that but it's probably a monolithic thing like the Windows Registry where you can't replace just one or two items in it without overwriting the whole file.

Registry's not the best example, because of course you can make specific changes to it with regedit.exe, but that requires a fully running and loaded OS, which you don't have in recovery, which is where you'd be making this kind of update happen. Simply put, I doubt it can be done, at least not easily or safely.
[Android Software Development] livesourav:
i think it goes into media
[Android Software Development] masterleron:
Hi could anyone help me compile this: http://xdaforums.com/showthread.php?t=1859390 into a zip file please. The instructions are on the first page. I am new to this stuff, so I would be very grateful if someone could do it.

Thanks
[Android Software Development] marty331:
Great tut, thanks for sharing.
[Android Software Development] gavster26:
Having Trouble

Hi i'm having trouble making my update script could you please tell me where i'm going wrong please here's my zip

https://dl.dropbox.com/u/90938124/deodex_xj-signed.zip
[Android Software Development] s.ashok206:
Please tel me how to uninstall flashed zips
[Android Software Development] kperry1911:
Just flash over whatever you're trying to get rid of.
[Android Software Development] cj chitwood:
Depends. If the zip installed an apk, just uninstall through settings, applications, manage.

If something else, make A copy of the zip, open it, and edit the lines where files are copied. You can google how to delete files through an update.zip, and just put that command here (be cautious of wildcards). Save to sd, flash as with any other.

Alternatively, see in what folder the files were installed and simply remove them with the file manager of your choosing.

--

Sent from my Bulletproof HTC Swiss Army Doubleshot with XDA-Dev app
[Android Software Development] kazzot17:
E:signature verification failed

i'm trying to add launcher to an alcatel and i get signature failed
[Android Software Development] TheByteSmasher:
There's a few problems with your zip which I think I've already fixed. The only one I don't know is: what directory does the framework apk go into?

Sent from my Nexus 4
[Android Software Development] spc_hicks09:
Have to register at another site to get the AutoSigner??? Anyone have a different link?
[Android Software Development] maestrobarako:
Pre built Update

Pre built update is outdated..when i try to flash it, android doesnt allow it.. can you please give me an updated one? i wanna flash an MMS.apk on my phone.. TIA
[Android Software Development] Underscan:
Flashable zip that give specific OS access to specific App?

Hey daktah

Thanks a lot for the Guide,

I have quick question:

is it possible to Create a flashable zip which :

- install an app on the tablet

- Give a specific user rights (could be root right) to this app

the purpose is to have a unrooted devices but 1 App with root access

thanks
[Android Software Development] jo15765:
I know I am hitting an older thread, but I thought I would give it a twirl.

When I go to zip my apps, I get an error every time, as I am trying to zip The Simpsons - Tapped out and the filename is actually The Simpsons™ - Tapped Out v4.4.0.apk and it says invalid filename "TM".

What can I do to get around that zip error?
[Android Software Development] androidfr33k:
Can you make a template for this APK file. I would be able to use that template for any other APK file I need from now on. I do not believe this is a system but rather app file. I grabbed this from my /data/app/ from android.

Hope you can help. I have the signing tool I grabbed from the app store. Can I just use Mac's built in compression zip tool once I am done then sign with the android signer tool?

As you can see this APK already has a META-INF and certs do I remove the certs and resign?

Here is the file Thanks

EDITED:

Found help o another post. Removed attachment!!
[Android Software Development] PochiMak:
It is possible to sign a update.zip for stock recovery?

I have tried and got

E:footer is wrong

E:signature verification failed

:crying:
[Android Software Development] Vagelis1608:
+1

I really want to know this as well.

Sent from my D620r [Stock 4.4.2]
[Android Software Development] efrant:
No, it is not possible. (Unless of course, you have access to Google's signing keys...)
[Android Software Development] istiak007:
you will find it in system>media

you will find it in system>media
[Android Software Development] francwalter:
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.
[Android Software Development] insalen:
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.
[Android Software Development] Smil3yWulf:
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..
[Android Software Development] je2854:
So if I want to flash an entire OS, how would it look like??

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

OR

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
[Android Software Development] AbA2L:
thinks, this is a good tutorial :)
[Android Software Development] HemanthJabalpuri:
Someone who dont have pc can able to sign the zips by using this guide https://xdaforums.com/t/app-android-no-pc-sign-apk-zip-within-android.3835975/post-81324327

I know that this thread is obsolete for newer recoveries...

amend is replaced by edify
[Android Software Development] Le X626 USA:
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.
[Android Software Development] dandyfarid:
thanks for tutorial :)
[Android Software Development] Littlemether:
is there any way I could get some tipe to make my update.zip flash to the other slot from twrp or magisk-iether full .imgs files or files, sed. any help much appritated ty. if anyone wants to look heres a cloud drive of oxygenoas12-modded to dualboot,twrped,ect but I i have it not aimed like a OTA. TY https://mega.nz/folder/zv5VgRiC#g1ihRwbPmylVVeE_qvhOUw
[Android Software Development] Littlemether:
need help https://t.me/OP7PRO_OXYGENOSmoddedROM
[Vibrant General] dublued:
I was unable to find any setting to allow the screen to remain on while the phone is charging.

It would be nice to have for the Home and Car apps
[Vibrant General] DesignDawg:
It's under "development" where you turn on and off usb debugging.
[Vibrant General] t1h5ta3:
on a side note, as slow as the phone charges, it will barely keep up with screen on running a live wallpaper.... i was watching voltages and temps this morning...

CM needs to up charge voltage like he did on the g1
[Vibrant General] oresama1:
Now that it's updated to Froyo, how do you keep the screen on while charging? Especially hate it wen on G-maps and it keeps shutting off.

I think there are widgets but I thought you had to enable them first before running any other app.

Thanks guys for all the knowledge.
[Vibrant General] Vytor:
I am running into this also, I know that there was an option to keep the display on always while charging but that option is gone the way of the dodo...

Currently running

2.2

Kernel 2.6.32.9

Build is FROYO.UVKB5

If you can list a widget or even a change to the build.prod that could be changed or added that would be great.

Any change of getting a build.prod from an eclair build maybe there is a difference that could be found, maybe this functionality could be added back in or made accessible.
[Vibrant General] LoGiK915:
try screebl from the market.
[Vibrant General] peiqijiang@qq.com:
mine is under development
[Vibrant General] xxxman999:
On my phone, it's under development also.
[Vibrant General] Phrack:
This option is not available on some roms. I had it in eclair.ji6. I'm running stock froyo.uvka6, not there anymore.

I now use Widgetsoid ($1.46) which has a widget to toggle screen always on.

https://market.android.com/details?id=com.jim2&feature=search_result

I searched the market and there appears to be a utility just for keeping the screen always on. I haven't tried it, just posting it in case you want to try it.

Screen On (free)

https://market.android.com/details?id=gr.androiddev.ScreenOn&feature=search_result

Screen Suite Lockscreen also has an option to keep screen always on.

Screen Suite Lockscreen ($1.99)

https://market.android.com/details?id=com.appsbeyond.android.screensuite&feature=search_result
[Hero CDMA Q&A, Help & Troubleshooting] Vvh:
Hello all,

I was wondering what causes a rooted Android phone to not use custom contact ringtones?

The ringtones I've assigned to my contacts have been pushed ( with adb push command ) to the phone's system memory, and I can see them in there using Root Explorer ( File Manager ). This only seems to happen when I use a task manager like Advanced Task Manager to End All.. uh... stuff running, I guess.

Is there a process or something that I can put on the exclude list to stop it from cutting off my custom ringers if that's the problem?

Oddly enough, even if I do End All of anything, my microSD card still uses my default ringtone on the phone, though, just the default ringtone, not even the custom contacts set from there work.

Here's a bit more info on what apps I normally use and phone info:

Advanced Task Manager

CacheMate

Firmware: 2.1-update1

Software: 2.27.651.5 ( Rooted )