Updating system apks (Making a zip file) - Desire General

I've been reading through but not been able to find the way of creating the zip file that everyone distributes. What should the file structure be? Can someone point me in the location of this please?
e.g. I want to update framework-res.apk in /system/framework. Do I just create /system/framework in a zip? Do I need to have anything in META-INF/com/google/android/update-script? I've tried just editing existing zips and replacing with my file but when I apply the zip it fails. I've even tried signing the zips too.
It's probably me just missing something! Thanks.

Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.2 10

Thanks, I have this in the update-script already. It just doesn't seem to apply the zip though. Am I going about the process wrong?

What recovery are you using? Is your zip signed?

I signed the zip with Desire Tools and the sign rom process. Using clockwork mod recovery to flash the zip.

Should be fine. What is the error your getting? Are you sure your update-script doesn't have an extention?

I got it to work by using windows zip in the end. It seems OS X zip utilities weren't working properly. Thanks for your help!

Related

[NEED HELP] Help with update-script

I need to copy a single file using an update-script (update.zip's script)
I know that command to copy a dir is
Code:
copy_dir
But if i want to copy only a single file how can i do?
Exit93 said:
I need to copy a single file using an update-script (update.zip's script)
I know that command to copy a dir is
Code:
copy_dir
But if i want to copy only a single file how can i do?
Click to expand...
Click to collapse
put only a single file in the dir? not sure i get your problem, the script should copy everything from the update.zip to the flash memory, why would there be a need to copy a single file?
Kendon is right. Just
Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
is needed to copy a single file into the system directory. That script is from one to install WaveSecure to ROM. All it does is copy the contents of the system folder (which is a folder called app, to that location on the system partition of the phone. As there is only one file in the folder app, that file is added or overwritten. Nothing else is changed.
No, i need to copy only one file form SYSTEM to DATA
Then format SYSTEM and recopy that file from DATA to SYSTEM
How can i do?
Exit93 said:
No, i need to copy only one file form SYSTEM to DATA
Then format SYSTEM and recopy that file from DATA to SYSTEM
How can i do?
Click to expand...
Click to collapse
i don't think this is possible with update-script, as it wasn't made for this purpose. care to elaborate what your main goal is, maybe we can find other ways?
kendong2 said:
i don't think this is possible with update-script, as it wasn't made for this purpose. care to elaborate what your main goal is, maybe we can find other ways?
Click to expand...
Click to collapse
I have to format system partition but i have to preserve /system/init.rc file
Deleting all system's subdirs doesn't work

Adding apps to System?

I have been looking at some of the zips of the ROMS that are floating around on this site, and it seems like /system/app is where all the apps that are on the system partition are.
Is it just as easy as unzipping the zip file, putting the .apk file in the /system/app folder, rezipping and flashing using fake-flash?
Or would I need to re-sign the zip, and if so, is there a tutorial for doing this?
Could this cause any problems further down the line?

Removing apps/ringtones from customized ROMs...

I've been trying to customize for myself an already customized ROM in ZIP container. I deleted some files from folders:
\data\app
\system\app
\system\media\audio\ringtones
and then the corresponding to them lines in META-INF\CERT.SF and META-INF\MANIFEST.MF files. I figured out that this could work, but the installation in Clockwork Recovery was aborted at some point with error:
E:Can't chown/mod /data/app
(No such file or directory)
set_perm 1000 1000 0771 DATA:app
Installation aborted
Could some1 advise me what can I do to make this work?
Maybe you should sign the edited file. (search for sign apk or sign update.zip there is a script that does it on the forum)
You don't need to edit those .SF & .MF files.
You need to edit the "update-script" OR "updater-script".
You mean signing the whole ZIP file which contains the customized ROM?
I found a way to sign apk files but I only deleted some apps and ringtones so what else besides ROM file have to be signed?
Darkyy said:
You don't need to edit those .SF & .MF files.
You need to edit the "update-script" OR "updater-script".
Click to expand...
Click to collapse
And do what in the update-script?

create flashable zip question

I have 4 computers that I use and 2 of them have adb drivers installed, the other 2(work computers that i am not really allowed to install much on) does not. To be able to push files to my htc desire on the computers that i do not have adb drivers installed I need a flashable zip. I only want to push files such as ringtones, /system apps, bootanimation.zip files and such, i have no intention of changing the framework or the theme and so on. So could anyone point me in the direction of where could i find a ready empty zip file like this or a tutorial in how to make one?
P.S. one of the uses for this is when i am out on a business trip i do not have my personal computer with me, so if brut-maps gets updated i want to be able to push it to the phone without adb.
Hello.
I only have basic knowledge on the subject, so i'm just gonna explain what i do when i need to flash something via flashable .zip.
1) Get a simple flashable .zip used to flash files anywhere on the /system partition.
2) Open it with WinRAR or 7zip or whatever. Navigate to META-INF/com/google/android/. There you will find two files: update-binary and updater-script. You need not touch the binary, because it's the same for all flashable .zips. What you need to do is extract then edit the updater-script, as that tells the recovery what to do with the flashable .zip's contents.
3) Editing the updater-script: let's say we need to create a .zip to flash a new Mail.apk to /system/app. The updater-script's content would need to be:
Code:
show_progress(0.1, 0);
mount("MTD", "system", "/system");
delete("/system/app/Mail.apk");
package_extract_dir("system", "/system");
show_progress(0.1, 10);
unmount("/system");
The "show_progress" lines are self-explanatory. The "mount" command tells the system to mount the /system partition. We then delete the old Mail.apk and tell the recovery where we want to extract the contents of the .zip. After everything's done, we unmount /system.
Add the edited updater-script to the archive, overwriting the original one. Be sure to set your archiver to "Normal" compression level.
4) Creating the proper directory structure: again, let's say we need to flash Mail.apk to /system/app and that we have properly configured the updater-script for this task. We now need to create a folder named "system" (anywhere on the PC), place a subfolder named "app" inside it, then place the new Mail.apk inside the "app" subfolder. We then add the whole structure to the flashable .zip (making sure that there are no other folders in it than "META-INF") and that's that! Again, make sure you use "Normal" compression.
5) Copy the .zip to your SD card, reboot into Recovery and flash the .zip.
6) Enjoy!
thank you very much, that was exactly the kind of information i was looking for.
You're welcome.
Here's a simple flashable .zip i used to replace media_profiles.xml in the /system/etc folder when i didn't have a PC handy and my phone wouldn't boot. You can edit it and use it for your own purpose.

[Q] HTC Locations' App. on other Custom ROMs

Hi,
I need to install HTC's Locations app on any custom ROM (ie: MyOneV or CM9/CM10)
So any1 can help me with this ?
(i tried it though, by moving these files (from MyOneV5.0FX Removed apks) htclocation.apk,locationpicker.apk,locatiooninstaller.apk in System/app folder bt it didn't worked)
When you move those files to system app manually, you need to put right permission rw-r--r-- then reboot.
Or the simplest way is, open the Removed_Apks_RC5.x.zip with 7-zip (not extract), delete all apks that you don't need and leave those location files in zip.
Then flash the zip in recovery.
And these files will not work on a CM rom.
ckpv5 said:
When you move those files to system app manually, you need to put right permission rw-r--r-- then reboot.
Or the simplest way is, open the Removed_Apks_RC5.x.zip with 7-zip (not extract), delete all apks that you don't need and leave those location files in zip.
Then flash the zip in recovery.
And these files will not work on a CM rom.
Click to expand...
Click to collapse
:good:
Thankz
I tried that too, by removing all apks from zip keeping the said three files & flash it in recovery, still it doesn't appeared in apps!
Though i'll try again may b missed something or some file..
I just tried it, it works.
Your filename looks different, attached here the files from the Removed_Apks_RC5.x.zip, I named it to location.zip. Flash in recovery.
It Worked: Thanx

Categories

Resources