yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] Daneshm90:
Em, k. Try playing around with the *heap size* option of the script. Try lowering it (if ur pc ram is small) try increasing it (if the zip ur creating is very large). Let me know if that helps.
[G1 Android Development] alfa156v:
It works great!

I am sorry for wasting your time. I tried to create update file on my working laptop, and i think there are some security program that stops the .zip creation.

Now i did it on my pc at home and it just works!

Thanks!
[G1 Android Development] Izkata:
Okay, so.... Doing something unrelated to this thread, I screwed up my phone, and it will no longer finish booting. I think I can fix it with update-script, but I'm not sure. Can't seem to get the right location...

Simply, I have to set permissions on /dbdata/databases/com.android.providers.settings/settings.db to 0777 - can this be done with an update script, or is this location inaccessible during recovery operations?

What is the syntax if it can work? I've tried all of these, but am not sure entirely about what the syntax means:

set_perm 0 0 0777 DATA:dbdata/databases/com.android.providers.settings/settings.db

set_perm 0 0 0777 DBDATA:databases/com.android.providers.settings/settings.db

set_perm 0 0 0777 SYSTEM:dbdata/databases/com.android.providers.settings/settings.db

EDIT: Ah, got to this thread from a Google search. My phone is the Samsung Captivate on AT&T, so this probably doesn't apply..
[G1 Android Development] Daneshm90:
Well the commands u posted above can be created with this script. Im not sure wht u are asking. The phones not booting due to permissions on those databases ? ive never heard of that :confused:
[G1 Android Development] Izkata:
I followed instruction to re-enable sideloading on the Captivate (AT&T disables it), and one of them is returning ownership of the file to "system". Missing that one, the file ends up owned by "root", not read/writeable by "system". And apparently when that happens, the phone can't finish booting...

I figure making it read/writeable to all would work...
[G1 Android Development] Daneshm90:
Ah i c, yea owning a dream/magic im totally new to this lol.
[G1 Android Development] s_dimaio:
I've changed the file framewirk-res.apk with your script to do some additions:

- decompile

- made the changes

- compile

Then I made a file ".zip" and I've pushed the file from recovery. everything worked perfectly.

after that I've tried to create a Rom with the mod framework-res.apk: I've put all the file of the rom in the folder "placehere" ... replace the file framework-res.apk...create the update.zip with your script ... and till now no problem!

after that I've flashed the update.zip ... boot ...and after black screen! I have to remove the battery to restart the phone!

Why? something wrong?
[G1 Android Development] Daneshm90:
Are u wiping and flashing the rom ?

Also what changes did u make to the framework-res.apk ? did u modify the manifest.xml ? If so i think the only way is to flash the original rom, let it create the dex's, then flash ur modified on top.
[G1 Android Development] s_dimaio:
no no! i modify only strings.xml in the folder values
[G1 Android Development] Daneshm90:
Can u post ur log when it fails to boot?
[G1 Android Development] sisterchick:
THANK YOU!

This Update.zip creator is just what I was looking for! Seems much easier than trying to figure out a Metamorph for my personal use. I'm going to give it a go. THANK YOU!
[G1 Android Development] s_dimaio:
I have attached the file with the log! thanks for your support!
[G1 Android Development] Daneshm90:
Do u have a meta-inf folder in ur framework-res.apk?
[G1 Android Development] s_dimaio:
no! no meta-inf folder in my framework-res.apk. I need it???
[G1 Android Development] Daneshm90:
Yea. can't believe i didn't notice that before lol. When u decompile with apk-tool, it gets rid of the signatures (meta-inf). Yea so u need to back it up, modify ur apk, then re-insert it.
[G1 Android Development] s_dimaio:
I have to use the same "meta-inf" folder of the original framewok-res.apk??? I haven't to delete the three file in meta-inf and resign, right???
[G1 Android Development] Daneshm90:
Yup, just bring over the old meta-inf folder.
[G1 Android Development] s_dimaio:
then...I added the original META-INF folder inside the changed framework-res.apk simply opening the file with 7zip and copy the folder.

then I added the framework-res.apk to the ROM... I signed the rom ... but I have the same problem!

black screen after the boot

I attach the logcat
[G1 Android Development] Daneshm90:
The thing is, im not sure if u can flash a modified framework-res for the first time. U either have to flash the rom with the original framework-res and then flash ur modified on top, or resign the framework-res but then u gotta resign every other apk that shares the same uid

Boot class path not found: /system/framework/com.htc.fr
amework.jar

W/PackageParser( 347): java.lang.SecurityException: META-INF/MANIFEST.MF has in
valid digest for AndroidManifest.xml in /system/framework/framework-res.apk

There u can see that its complaining about mismatched digest and that ur missing com.htc.framework.jar.
[G1 Android Development] s_dimaio:
what a pity! will mean that I will flash my framework-res.apk over the original. thanks for the help!
[G1 Android Development] Daneshm90:
Yea so u flash the rom. boot into it once, then go and flash ur modded apk on top.
[G1 Android Development] Fnorder:
ORLY?

-That- explains the issues I've been having when trying some themes. I think I'll make a fixer script.
[G1 Android Development] Jedis:
I can't get this to work correctly.

Does it automatically create the update script? Because I'm not and I keep getting an error:

Can't mount:

failure at line 1

Also, is it not creating the sigs? Seems to be broken.
[G1 Android Development] Daneshm90:
U have 2 methods as mentioned in OP. Either extract ur zip to "placehere" folder. Then run script and select option 2. Or Extract ur zip to a folder anywhere on ur pc, then drag that folder into Script.bat and once done u'll find a signed .zip in the same location as the folder u dragged into the script.

What exactly are u trying to do ? U wan to modify an update.zip or create ur own from scratch ?
[G1 Android Development] Jedis:
Maybe I'm just misunderstanding how this works. I previously used a kitchen that I removed the meta folder, and it recreated it automatically.

So with this, I have to leave the meta-inf folder and this just adds an update script?
[G1 Android Development] Daneshm90:
No u should not delete the meta-inf folder as it contains the update-script, this script automatically creates/replaces the signatures while keeping the update-script intact.
[G1 Android Development] madnlooney:
i got the exact same problem about line 1.

i had an empty placehere folder. i made a folder in there called framework and placed the apk in there.

I then opened the script and chose option one to update-script then selected option 1 and followed what step 3 says here

http://xdaforums.com/showthread.php?t=722993

it made the update.zip but when i flash it i got the error.

I had to get a working update.zip which was for framework, extract that to the placehere folder and just edit the framework-res.apk. This time when i created the update.zip it flashed fine.

Is there something the script doesnt create when doing a fresh update-script?
[G1 Android Development] Daneshm90:
Can u upload the update.zip my script creates ? it'll help tremendously in resolving ur issue ;)

Btw, if ur on amonra, u can do adb shell cat /cache/recovery/log

and that'll tell u where in the update-script the error occured.
[G1 Android Development] uoY_redruM:
Mediafire will not allow me to download this.

I just keep getting "processing download" then nothing. Tired with Mozilla and IE. Doesn't work anymore!
[G1 Android Development] Daneshm90:
Try this

Link
[G1 Android Development] sharky34:
Great idea, thanks.

But in fact, I fail to use it, shame on me.

I want to create an update.zip that restores build.prop, defalut.prop, apns-conf.xml and gps.conf.

I made 2 dir, copied (system and systemetc) them into placehere. Good.

I asked the script to copy the directories. Good, I have 2 copy instruction into the script.

After that, I want to set permissions. I select option 6 for each file and enter 0 0 0511. No Good, I still have

Nothing about set permission.
[G1 Android Development] Daneshm90:
Oops, yes u are correct, i forgot a "echo" statement in the script. I'll fix and upload shortly. Thanks. Btw, u can simply have one folder called "system" and place ur files/subfolders within it and tell the script to just copy that to SYSTEM.

Fixed and uploaded. Download from OP.
[G1 Android Development] sharky34:
Oh, great. Thank you for the answer.

I'll look for the upgrade of your script ;)
[G1 Android Development] Daneshm90:
It's up. Try it out and let me know. Thnx
[G1 Android Development] sharky34:
It looks better

What do you think?

Also, do you think my update is a good idea?
[G1 Android Development] Daneshm90:
Yea seems good. Only way to find out is to press the "Flash the update.zip " button ;)
[G1 Android Development] s_dimaio:
Framework-res.apk modified

Now it works!!! within the modified framework-res.apk you have to copy both the folder META-INF original that the original file androidmanifest.xml!

Now I can put my framework file in the rom directly and flash it without having to add it later!

Thanks!
[G1 Android Development] sharky34:
Well, it actually failed :confused:

2 or 3 messages in orange (normal ones)

and installation failed in red
[G1 Android Development] Daneshm90:
Check /cache/recovery/log

See wht it says, is it a syntax error ?
[G1 Android Development] sharky34:
I found cache/log/recovery.log. It tells nothing.

I have the log for root update (for XDA) and the log for my personal update.

I don't see error message in there

but obviously the update has not been applied.
[G1 Android Development] madnlooney:
hi, sorry for the long time in replying, ive just done another update.zip and flashed it. This time it flashed ok. Im really confused now as the other night i did try about 10 times and kept getting the error when flashing :confused:

Thankyou for making a great script which does work :D although im still confused :p
[G1 Android Development] sisterchick:
Installing apps to data

I'm trying to install apps such as Titanium, etc via the script and failing. What syntax are you using exactly? DATA/apps/xxxx.apk?

Love this update script modifier by the way. Two questions: Can you revise an existing update script/zip - like to add or remove steps in current script? Is there a way to go back or undo while creating a script?
[G1 Android Development] madnlooney:
last night after all worked i did another framework update

here

http://www.megaupload.com/?d=DCAXA4E5

i couldnt test it as im on a different rom but some of the users have said nothing changed when flashed. im unsure how to test the update.zip to see if its this thats causes no change.

i had a look at the update-script in the .zip it created and i think its correct

copy_dir PACKAGE:framework SYSTEM:framework
[G1 Android Development] tnpapadakos:
link is no good
[G1 Android Development] madnlooney:
works for me, they might of had problems before
[G1 Android Development] wayferer:
Hi,

I'm making changes to my framework-res.apk using another of your awesome scripts (APK Manager) but when I create the update.zip it flashes fine but the changes are not applied. I'm sure it's something simple but any thoughts?
[G1 Android Development] Daneshm90:
u sure ur framework-res is modified ? first just try pushing it to ur phone. i doubt its this script ;)
[G1 Android Development] wayferer:
Sorry I wasn't implying that it was :) Yea I just pushed the file and it updated. I re-tried and the problem was that i had the framework folder inside a system folder and it would either not generate the update-script or it would but i guess it would copy into the wrong place. I also changed the compression setting to 0. Not sure if that had anything to do with it?

Either way it's working now :)
[G1 Android Development] Daneshm90:
cool if u have the old .zip u can upload and i can take a look ;)
[G1 Android Development] wayferer:
no i don't sorry. but from memory when it did create the update-script instead of being

copy_dir PACKAGE:framework SYSTEM:framework

it was

copy_dir PACKAGE:SYSTEM SYSTEM:framework

because i had the extra system folder maybe?
[G1 Android Development] Daneshm90:
Ah see when u have

copy_dir PACKAGE:SYSTEM SYSTEM:framework

ur copying the system folder from ur zip to /system/framework

Can u check n see if on ur phone now u have a /system/framework/framework folder ?
[G1 Android Development] wayferer:
yup it sure does lol
[G1 Android Development] Daneshm90:
Yup so that was the problem. U can either create a "framework" folder in "placehere" and tell it to

copy_dir PACKAGE:framework SYSTEM:framework

or create a system/framework folder in "placehere" and tell it to

copy_dir PACKAGE:SYSTEM SYSTEM:

Hope that clears the confusion ;)
[G1 Android Development] wayferer:
Thanks mate!
[G1 Android Development] Android-Jeck:
Is there a possibility, to "open" an apk by using a command in the updater script, so that you can change images or something else in existing apk, as with "Metamorph"?

EDIT: I want to change only some files of the apk, not replace the complete apk ...
[G1 Android Development] Daneshm90:
Not to my knowledge, but considering they have complex things like packing a boot-image on ur phone through the updater-script, id assume u just need a binary that allows zip/unzip (if one doesnt already exist). Applying a meta-morph would be extremely difficult if not impossible. And this method would only work for /system apps, for data/apps after repacking, u wud have to run that signing script someone posted on this forum to sign the apk before pushing back.
[G1 Android Development] sisterchick:
Install apk for Dummies

Is it possible to install apk to data using Update.zip? I know you can push files to Data/app, but that doesn't install them, correct? What am I missing?
[G1 Android Development] Daneshm90:
Honestly im not sure about this, if u push and monitor log, u do see it create a /data/data folder and the proper dex. But i dont think it follows the proper protocols such as (including checking permissions,registering supported intent filters, etc...). So id avoid it.
[G1 Android Development] Toisan:
Hey, i hope u can help me...

i modified a framework-res.apk and now i created a update.zip to flash it.

but in ClockworkMod Recovery:

Syntax Error in updatescript...

my Work:

placeholder/framework/framework-res.apk

than start ur .bath, creat update script, i want to flash into "SYSTEM", than framework

done

than i want to creat an update.zip from the placeholder folder, finished, flashed, ERROR, whats wrong? Can u help me?

regards! :)
[G1 Android Development] Daneshm90:
can u post ur update.zip ? ill take a look.
[G1 Android Development] Toisan:
yes sure =)

here u go...

regards
[G1 Android Development] Daneshm90:
Lol i see ur error. When it asks for which folder from "placehere" folder, im not asking for the windows path, just the folder name. So in ur case these are the steps ud perform.

1. Create update-script

2. Copy folders

3. Enter SYSTEM, then enter framework, then enter framework

4. Then select option 8 (done)

5. Then select option 2 (create update.zip)

6. Done
[G1 Android Development] Toisan:
ehm, ok, i try is again, i let u know if its work =)

give me 5 minutes xD

regards and thanks for ur fast Support =)

Edit: IT WORKS ;D year ;D thank u :)
[G1 Android Development] g00ndu:
Hi, I have a problem regarding the installation of the update.zip. It can create both the updater script and the update.zip, but when I reboot to recovery and applied sdcard:update.zip, the installation was aborted.

Manually, I use Root Explorer to replace the file, it works, but if I were to use adb command to push the apk to the /system/app/ folder, it has permission denied.

Ok, what I have done:

Extract the Settings.apk and Settings.odex files.

De-odexed this and output is Settings.apk. (Check that the classes.dex is in the apk file)

Replace some of the dull icons with some colored ones. (By the way, APK Manager doesn't work when I tried to decompile the deodexed Settings.apk, but that is another different issue altogether).

Place the modified deodexed file into a folder (named as app).

Run Script.bat.

Select option 1 (Create update-script)

Select option 1 (Copy directories)

Key in SYSTEM

Key in app

Key in app

Press 8 to go back to the main menu

Select option 2 (Create update.zip)

update.zip generated.

Push update.zip to /sdcard folder

Reboot to recovery

Select: Apply sdcard:update.zip

Installation aborted.

Next I tried pushing the Settings.apk to the /system/app folder, using the following:

adb shell stop

adb push Settings.apk /system/app/Settings.apk -> Permission denied

adb shell start

To get my modified Settings.apk, I use Root explorer to transfer the file to the /system/app folder. Then rebooted and it works.

By the way, I'm on Samsung Galaxy S, but i believe your app should be able to work for this phone as well.

I suspect that the installation aborted might be due to setting of permission.

I would very much like to use update.zip to push through the apps this way.

Can you help?

Edit: I tried it with the stock framework-res.apk (I did a backup of the original framework-res.apk), creating first the update script and then the update.zip, push it to the sdcard and try to apply the update.zip. The installation also aborted as well.

:(
[G1 Android Development] kryer12:
Thanks

I have just begun playing with this utility and can I say that being a noobie to this stuff, this is so far a very simple but powerful tool. Thanks for your work on this.
[G1 Android Development] Corey@rabbit:
Is this app device specific? anyone know what other devices it can create an update for?
[G1 Android Development] Daneshm90:
Considering it uses update-script and not updater-script (which i think the binary must be compiled for the device, not sure though) it should work on any android device with a recovery that accepts testkeys.
[G1 Android Development] LexusBrian400:
The link in the OP is dead. Anyone else have it?
[G1 Android Development] Daneshm90:
K i'll upload it from my pc and update OP.
[G1 Android Development] Daneshm90:
K update OP, i just used multiupload. Will switch back to mediafire when it comes back up i guess.
[G1 Android Development] tnpapadakos:
Daneshm90:

Im trying to make this update zip include some pngs to replace in framework, settings, and mms

can you take a look at this and tell me what im missing...the other stuff i think i have right
[G1 Android Development] Daneshm90:
Im confused a little, why do u have folders you want to push to these directories ? You should use metamorph for this task of replacing images within the apk.
[G1 Android Development] tnpapadakos:
ok, was just trying to do it without metamorph, and i thought the folders was wrong, so any idea how i would do it with this tool without just plain adding the whole settings apk, or mms apk with my replaced images in them?

till now, i just take the rom and change everything i want changed on my pc, then sign and then i flash the zip...was just trying to make an update.zip that would "mod" the rom in one step
[G1 Android Development] Daneshm90:
It wouldn't be possible using this batch script as its limited to what syntax it can insert into ur update-script. Perhaps what one could do, is have a .sh file which allows for the extraction of .apk's (essentially .zip's). Im not sure but doesn't the recovery support "unzip" command ? U cud just write urself a update-script which extracts, inserts, repacks.
[G1 Android Development] tnpapadakos:
alrighty then...thanx
[G1 Android Development] Toisan:
Hallo,

one short question, are these steps right if i want to flash a .apk into system/app

Steps:

creat a folder called "app" in "placehere" folder

open .bat, wrote "y" -> enter

creat a update-script -> copy directories -> to SYSTEM -> app -> again app (for "app" folder in "placehere" folder)

wrote 8 -> enter

create update.zip

flash it

thats all cause i got this error in Clockwork recovery with the .zip:

"E:Can't open /cache/update.zip
(bad)
Installation aborted."

so if u can, here is it, than u can have a look at it:

Download

thank u for ur help!
[G1 Android Development] Daneshm90:
Hey,

Ur steps are correct. Just a question, can u try flashing another "proven to work" update.zip and see if it flashes ? Also can u check how much space you got left on ur /cache partition ? do

adb shell df /cache

Thanks
[G1 Android Development] Toisan:
Sry for this, rebuild the update.zip and now its works :)

best tool to do this :)

Maybe u can add some finished update-scripts to this like for framework, app...

and how to add to thins to flash, e.g. framework and apps?

regards and Thanks!
[G1 Android Development] Daneshm90:
I guess lol so sort of a guide for different scenarios.

I'll see when i get the time.
[G1 Android Development] deprecate:
I took a rom that I have already flashed so I know it flashes fine to see how things actually worked.

I extracted it to placehere (META-INF, system, boot.img)

I replaced a few apks essentially changing the default language

I used option 2 per the video demo that you posted

I noticed that once it tells me that the update.zip is created and all is OK, the META-INF folder found in placehere vanishes. Is this normal?

I toss the update on my sdcard and attempt to flash it; it fails with "no update script found".

Out of curiousity, I open up the update.zip that was created and there is a META-INF folder present so it placed it correctly...for some reason though, when flashing, it assumes there is no update script found.

For testing purposes, I took the rom that flashes fine, placed it in placehere and did not alter a single thing. I created a fresh update.zip with it and attempted to flash it as well. The same result, "Can't find update script".

What am I missing?

update: So for some reason it is not carrying the com folder in META-INF when creating the update.zip, nor updating the updater script found within. I suppose I can simply drop the previous one in there, but for all new apks I add, or for any I remove, things will not go as planned when flashing.

No bueno :)
[G1 Android Development] Stoney 666:
i really want to start using this with your porting tool, but when i run this, it says "java was not found, you will not be able to sign apks or use apktools" any help please!! i just updated my java right before i tried running this...
[G1 Android Development] sisterchick:
Fix Permissions???

Is it possible to fire off fix_permissions (Amon RA recovery) via this scripting tool? I tried just adding "fix_permissions" to the script and it returned a syntax error.
[G1 Android Development] stevendeb25:
great tool bud :)

i tried this tool at first apk wasnt being copied when flashing update.

i had folder in placehere called app with apk file inside

then used 1,1,SYSTEM,app,app,8,2

but that didnt work

i had to use 1,2,SYSTEM,app,app,8,2 then it worked :)

this right?

yep META-INF is failing :(

ok only had to do 1,2,SYSTEM,system,system,8 coz it was copying a folder of the same name my bad :(
[G1 Android Development] droidman101:
heh, would love this to be combined with apk manager :D
[G1 Android Development] rudim:
updated.zip

@Daneshm90

I am completed noob i try to follow the video but is too fast for me

i want to make several apk onto updated.zip into the system/app

my device is SGS mod samdroid v2

can describe here the step

i read that ppl has problem too

sorry to bothering you

sorry my bad english

Thanks
[G1 Android Development] jpcastedo:
OP should add this to the main post hehe

Thanks for the script :)
[G1 Android Development] fisha21:
Perfect, making this addition worked a treat. Thanks Danesh, for both the utility and the Java suggestion!