[Q] Make an update.zip for a system app? - Samsung Galaxy Nexus

Hey, just wondering if there was any way to create a update.zip that i can flash in recovery of my Mms.apk? I am running jellybro CM10 and I use the CM9 mms apk as emoji works on it (sending and receiving). Everytime I flash a nightly I have to manually move it to system/app and reboot so making an update zip would be much easier.

XfrostX said:
Hey, just wondering if there was any way to create a update.zip that i can flash in recovery of my Mms.apk? I am running jellybro CM10 and I use the CM9 mms apk as emoji works on it (sending and receiving). Everytime I flash a nightly I have to manually move it to system/app and reboot so making an update zip would be much easier.
Click to expand...
Click to collapse
Here you go add it to the correct folder and flash it
Or for future reference you could just make an updater-script with something like this
Code:
show_progress(0.500000, 0);
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("system", "/system");
unmount("/system");

Related

[WIP] Xoom Update Script

In the IRC channel, bigrushdog and myself have created an update script for the xoom. Its a WIP, but we have used it to install themes, apps, and even the current tiamat kernel. Just put the files/folders into the /data or /system folders inside the zip. Flash in recovery. Thanks to bigrushdog we now have a script that does not require busybox. This one will wipe cache and push whatever you put in data or system.
Wipes Cache and Dalvik Cache
Awesome, thanks!
Sorry but what can I do with this
Sent from my Xoom using XDA App
ui_print("This is a generic Xoom Recovery Flasher");
ui_print("Developed by BWCorvus");
ui_print(" ");
run_program("/sbin/busybox", "mount", "/data");
ui_print("Wiping Cache and Dalvik Cache in case you forgot.. ");
format("MTD", "cache");
delete_recursive("/data/dalvik-cache/");
delete_recursive("/data/boot-cache/");
ui_print("Extracting Data Files...");
package_extract_dir("data", "/data");
run_program("/sbin/busybox", "umount", "/data");
ui_print("Extracting System Files...");
show_progress(0.1, 0);
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("system", "/system");
show_progress(0.1, 10);
show_progress(0.2, 0);
show_progress(0.2, 10);
run_program("/sbin/busybox", "umount", "/system");
ui_print("All done. Enjoy!");
Click to expand...
Click to collapse
Suggest adding the bolded just for convenience..
This would DEF help those who are not ADB savvy, cool!
fsunoles157 said:
Sorry but what can I do with this
Sent from my Xoom using XDA App
Click to expand...
Click to collapse
Basically this allows you to flash files, instead of pushing them. Good for kernels, themes, apps and one day roms.
do i just flash this zip in recovery? and then what?
fsunoles157 said:
do i just flash this zip in recovery? and then what?
Click to expand...
Click to collapse
You add the files you want to flash, like say BIGDX theme files (framework and bootanimation). Then you flash this in recovery, and it will install the files, over writing the originals. You just need to make sure you put it in the right directory.
sorry and what directory would that be? trying to learn here and if i get you right i will be adding files to this zip?
bwcorvus said:
You add the files you want to flash, like say BIGDX theme files (framework and bootanimation). Then you flash this in recovery, and it will install the files, over writing the originals. You just need to make sure you put it in the right directory.
Click to expand...
Click to collapse
fsunoles157 said:
sorry and what directory would that be? trying to learn here and if i get you right i will be adding files to this zip?
Click to expand...
Click to collapse
Well it would depend on where you want the file to go, that is the directory you put it in. Yes inside the zip. Best thing i can do, is if you wanna pop by the irc channel #xoom on freenode, i could walk you through one.
ok definately how do i get there? i just use xoomforums and xda :-/
bwcorvus said:
Well it would depend on where you want the file to go, that is the directory you put it in. Yes inside the zip. Best thing i can do, is if you wanna pop by the irc channel #xoom on freenode, i could walk you through one.
Click to expand...
Click to collapse
I guess this refer to:
http://webchat.freenode.net/
where it's self explanatory?
bwcorvus said:
In the IRC channel, bigrushdog and myself have created an update script for the xoom. Its a WIP, but we have used it to install themes, apps, and even the current tiamat kernel. Just put the files/folders into the /data or /system folders inside the zip. Flash in recovery. For this to work, you MUST have busybox installed on the xoom.
Original
Added stiffspliff data wipes
Click to expand...
Click to collapse
which zip should we be using? Is the only difference is that the wipe.zip will erase the original file during the flash process? So I need to place an apk file into the system folder within the update.zip to get it to flash.
TheBurgh said:
which zip should we be using? Is the only difference is that the wipe.zip will erase the original file during the flash process? So I need to place an apk file into the system folder within the update.zip to get it to flash.
Click to expand...
Click to collapse
The wipe just has cache wipes, so you can use either. I'll edit it when I get home.
Sent from my PC36100
bwcorvus said:
The wipe just has cache wipes, so you can use either. I'll edit it when I get home.
Sent from my PC36100
Click to expand...
Click to collapse
just copy files/folders you want to install to the correct folders in the update.zip and flash?
TheBurgh said:
just copy files/folders you want to install to the correct folders in the update.zip and flash?
Click to expand...
Click to collapse
That's it man.
Sent from my PC36100
bwcorvus said:
That's it man.
Sent from my PC36100
Click to expand...
Click to collapse
Give it a shot. Thanks
Bump for update
so if your file is within a subfolder in system would you make the same subfolder in the update script (in the appropriate folder of course)? My guess is yes.
EDIT
Yes I got it. But what is the best way to zip it back up. I used winzip and my first try caused the install to abort? The 2nd time I tried it I just moved stuff around in the original update script using winrar and it worked. My guess is winzip f'd it up somehow.
Thanks
kev0153 said:
so if your file is within a subfolder in system would you make the same subfolder in the update script (in the appropriate folder of course)? My guess is yes.
EDIT
Yes I got it. But what is the best way to zip it back up. I used winzip and my first try caused the install to abort? The 2nd time I tried it I just moved stuff around in the original update script using winrar and it worked. My guess is winzip f'd it up somehow.
Thanks
Click to expand...
Click to collapse
I usually just add stuff to the zip. Never actually unzip it. Do not try to rename stuff inside the zip though, always makes it fail.
Sent From My Evo

[1st try]Create a CWM flashable zip to place apk file in /data/app

i try to make a cwm flashable zip today
see some xda post and finally flashed apk in /data/app
but i don't the script is actually right or not, just know it work
i follow this
http://forum.xda-developers.com/showthread.php?t=1545165
and this
sign+ v1.2.2
http://forum.xda-developers.com/showthread.php?t=997180
1. download the data.zip
2. unzip it and place the apk you want to flash into /data/app
3. edit update-binary file
in META-INF\com\google\android
i add following script
ui_print is the words you want to show in cwm
ui_print(" PLACE YOUR TEXT HERE ");
ui_print("----------------------");
run_program("/sbin/busybox", "mount", "/data");
show_progress(1, 15);
ui_print("Copying files...");
package_extract_dir("data", "/data");
unmount("/data");
ui_print("Unmounting system...");
run_program("/sbin/busybox", "umount", "/data");
ui_print("Installation complete!");
refer [] AL [] (http://forum.xda-developers.com/showthread.php?t=1545165
)
2 important notes here though in order to avoid problems:
* Each line of the updater-script MUST end with a ";" (no " ") ;
* There HAS TO BE at least one blank line after the last ( ; ) line of code.
4. zip META-INF and data folder to zip file as storage(no compression)
5. use sign+ v1.2.2, it will sign the zip file
6. then you can put it on you phone and flash it
if you want to flash the apk in system/app/
just change the name of folder from data to system
and the script also change "data" to "system"
i don't know the script is 100% correct or not
if it is not please correct me
You know, it would be much easier to simply place the apk in /data/app using a root file explorer... it would save you all the fuss. Unless you're trying to automate something/make a CWM package for release...
Hi,
Like as said FredFS456 it's the simply way.
Or use a "generic" CMW.zip like this:https://rapidshare.com/files/1752806149/CMW_data_app.zip
Put your app in /data/app inside the zip file (with winrar for example) and it's good to flash it...For you,you ask for a CMW.zip just for /data/app...
With right permissions.
In any case you can take another CMW.zip file for another apps or files,in the theme and apps or dev section there is a bunch of CMW.zip that you can take for your use (/system/app-/data/app-/system/framework-etc...),just erase/remplace your files...
I also need a generic CMW zip to replace the framework-res.apk for my gradient mapping fix Anyone got one?
arzbhatia said:
I also need a generic CMW zip to replace the framework-res.apk for my gradient mapping fix Anyone got one?
Click to expand...
Click to collapse
Hi,
Here:https://rapidshare.com/files/288220955/CMW_Framework.zip
According it's just for your request.
But guys...It's so difficult to take any CMW zip file?As I said above there are around depending on what you want...
Just take a zip and modify it what you want...unless you take a zip for /system/app and you want a /system/framework..
At worst take a complete ROM,delete all files in each folder (keep folders) and add what you want in each folders (like system/app-System/framework-etc) and erase all except the "META-INF" folder!
CREDITS:A thanks goes to all those who I took these CMW zip files...
FredFS456 said:
You know, it would be much easier to simply place the apk in /data/app using a root file explorer... it would save you all the fuss. Unless you're trying to automate something/make a CWM package for release...
Click to expand...
Click to collapse
i have a sc-04d galaxy nexus which have a sim lock
after full wipe and flash a new rom (sim lock again) it have not any file explorer
if i have not wifi connection , no PC, i have no way to use the ****domoco apk to unlock sim card
so i make this flashable zip, flash the ****domoco apk and file explorer in the phone
and get the 3g signal
viking37 said:
Hi,
Like as said FredFS456 it's the simply way.
Or use a "generic" CMW.zip like this:https://rapidshare.com/files/1752806149/CMW_data_app.zip
Put your app in /data/app inside the zip file (with winrar for example) and it's good to flash it...For you,you ask for a CMW.zip just for /data/app...
With right permissions.
In any case you can take another CMW.zip file for another apps or files,in the theme and apps or dev section there is a bunch of CMW.zip that you can take for your use (/system/app-/data/app-/system/framework-etc...),just erase/remplace your files...
Click to expand...
Click to collapse
no need to sign the zip again if change the content?
why something need signed a flashable zip?
ygvuhb said:
no need to sign the zip again if change the content?
why something need signed a flashable zip?
Click to expand...
Click to collapse
Hi,
No,I do this when I want a CWM.zip,I never signed the zip and everything is good.
Just be careful what you put in the zip file and what it is intended...
Second question...I don't know...
viking37 said:
Hi,
No,I do this when I want a CWM.zip,I never signed the zip and everything is good.
Just be careful what you put in the zip file and what it is intended...
Second question...I don't know...
Click to expand...
Click to collapse
Hey, sorry to hijack this thread, but could someone make a CWM flashable zip with superuser in the system/app folder? I installed a beta rom, and root doesn't seem to be working properly :/
EDIT: Nevermind, I installed AOKP, gonna play it safe for a while.
hi
if i want to change the file premission
any script i have to add?
Hi guys, im trying to find/create a cwm zip that will install IO file manager, i've downloaded several here on xda but they dont work because their not compatible with edify.
I tried using this application http://forum.xda-developers.com/showthread.php?t=903598 to convert the zip to edify but now when i flash cwm gives me a "status 0" error.
Can any of you guys help me with this?
Thanks in advance.
The script of magic
or you can use this really easy script my friend
try it on it works! plus you can write more staff than apks cause copy everything that is at main system
ui_print("Test Script");
ui_print("By ~:Infeno:~");
show_progress(0.500000, 0);
ui_print("Writing System");
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("system", "/system");
unmount("/system");
ui_print("Finishing of copying Apks and etc...");
show_progress(0.100000, 0);

Help: Busybox updater script

Hey guys.
Ive been making recovery zips ever since my HD2 days. But recently, they haven't been working. I usually would mount things like /system and /data with the updater-script mount but have started using busybox. Well i was successfull in using it, but now when i wanted to edit the zip to change the contents it doesnt apply the update. Like for instance, the second i open up an updater-zip using 7-Zip, it doesnt install anything. no errors come up but nothing gets installed. Like my modded market zip, if i open it up and replace it with say the stock market, then flash it. Nothing gets coppied. No system files are changed. Do i need to mount as rw in my updater script? I'll give that a try but i never recall having to have that. Or am i missing a simple annoying step? I never zipalign or sign them as i never recall ever having to. Well im up for any ideas. Thanks XDA
It's impossible to troubleshoot without seeing the file, but maybe this can help you? This is taken from my Superuser zip. If it doesn't help you, I need to see your script.
Code:
ui_print("");
ui_print("Superuser 3.2");
ui_print("Mounting /system...");
run_program("/sbin/busybox", "mount", "/system");
ui_print("Mounting /data...");
run_program("/sbin/busybox", "mount", "/data");
ui_print("Removing old root access...");
delete("/system/bin/su");
delete("/system/xbin/su");
ui_print("Removing old superuser apps...");
delete("/system/app/Superuser.apk");
delete_recursive("/data/data/com.noshufou.android.su");
delete_recursive("/data/data/com.noshufou.android.su.elite");
delete("/system/app/eu.chainfire.supersu-1.apk");
delete("/data/eu.chainfire.supersu-1.apk");
delete_recursive("/data/data/eu.chainfire.supersu");
delete_recursive("/data/data/eu.chainfire.supersu.pro");
ui_print("Extracting archive...");
package_extract_dir("system", "/system");
ui_print("Setting permissions...");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 0644, "/system/app/Superuser.apk");
ui_print("Unmounting /data...");
run_program("/sbin/busybox", "umount", "/data");
ui_print("Unmounting /system...");
run_program("/sbin/busybox", "umount", "/system");
I thought i attached it -.- sorry lol.
But here it is. its quite simple.
Code:
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("system", "/system");
unmount("/system");
This has never failed before
elesbb said:
I thought i attached it -.- sorry lol.
But here it is. its quite simple.
Code:
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("system", "/system");
unmount("/system");
This has never failed before
Click to expand...
Click to collapse
Which update-binary are you using? Did you change it recently? Are you using TWRP? If you mount with busybox, why don't you unmount with it?
Aerowinder said:
Which update-binary are you using? Did you change it recently? Are you using TWRP? If you mount with busybox, why don't you unmount with it?
Click to expand...
Click to collapse
Never had to. Im lazy so typing unmount("/system"); is easier. And no i am using the one ive always used never changed it.
elesbb said:
Never had to. Im lazy so typing unmount("/system"); is easier. And no i am using the one ive always used never changed it.
Click to expand...
Click to collapse
The new TWRP update requires an updated binary, I thought? I read that on their website. And I seem to recall you using TWRP?
If you go back to using the old mount commands for the system partition, does it work?
Aerowinder said:
The new TWRP update requires an updated binary, I thought? I read that on their website. And I seem to recall you using TWRP?
If you go back to using the old mount commands for the system partition, does it work?
Click to expand...
Click to collapse
Oh no I use cwm.
Sent from my SGH-T999 using Tapatalk 2
elesbb said:
And I didn't try the old method of mounting so I'm not sure.. But I think there was something wrong with the structure of the zip file because manually mounting system didn't work either.
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
The zip isn't being extracted at all?
It would be wise to use this command, I think: set_perm_recursive(0, 0, 0755, 0644, "/system/app"); after you extract.
If that doesn't work, direct me to the app you are building the zip file from, and I will test it.
Edit: what are your 7zip settings?
Aerowinder said:
The zip isn't being extracted at all?
It would be wise to use this command, I think: set_perm_recursive(0, 0, 0755, 0644, "/system/app"); after you extract.
If that doesn't work, direct me to the app you are building the zip file from, and I will test it.
Edit: what are your 7zip settings?
Click to expand...
Click to collapse
7 zip settings are stock. And I managed to get it working by using another zip and copying the updater-script into that zip as well as moving the files. And I have a separate zip that sets my permissions. I created that after manually trying to replace framework-Res.apk which made it reboot before I could change permission :3
Sent from my SGH-T999 using Tapatalk 2
Default settings worked for me: normal compression level with deflate compression. Glad you got it fixed.
Aerowinder said:
Default settings worked for me: normal compression level with deflate compression. Glad you got it fixed.
Click to expand...
Click to collapse
Yes but I'd like to know what borked it -.-
Sent from my SGH-T999 using Tapatalk 2

How to make a simple Installer.zip?

I just want to make a "simple" installer zip so that each time i want to install a new ROM i can install my .zip file after the first boot and have all my old familiar ring tones and other system files installed to the device system folders.
I tried using another apps installation file as a "wrapper" for my files but getting an error message when trying to install it via Recovery. this is the updater-script file that i'm using:
ui_print("***************************");
ui_print("Personal Files installer ZIP");
ui_print("***************************");
ui_print("- Mounting /system");
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/data");
ui_print("- Extracting files");
package_extract_dir("system", "/system");
ui_print("- Unmounting /system");
unmount("/system");
ui_print("- Done !");
Does anyone know what i'm doing wrong here?
Look for the aroma automatic app installer. It wraps your selected apps that belongs in the right directory into one flashable zip.....maybe its helpful ? Don't know if its exactly what you are looking for but maybe a pointer in the right way
1+
Check aroma thread, it has a link in OP to aroma apk maker
SkyDragon© New concept Rom coming, stay tuned with SD Team
Thanx, I checked out the aroma app maker but these only seem to allow you to make packages to install .apk files. I want to install some system files like ring tones and weather data base.
I guess that I need to play some more with the config files and installer scripts to suss them out more.
Sent witH desire from One X

[Q] how do I make a rom GB rom install optional apps to data partition

i was wondering how to make a app install to the data partition that makes it a removable app if not wanted by user. Also some apps dont work correctly if installed to the system partition. i remember in ICS xperia play the directory was rom.zip-> data/app or in rom.zip-> /system/etc/product/applications/ but will any of these methods work on GB?
xdarkmario said:
i was wondering how to make a app install to the data partition that makes it a removable app if not wanted by user. Also some apps dont work correctly if installed to the system partition. i remember in ICS xperia play the directory was rom.zip-> data/app or in rom.zip-> /system/etc/product/applications/ but will any of these methods work on GB?
Click to expand...
Click to collapse
Put your apps in zip=>/data/app
and add to updater-script:
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
That should work on any rom ( gb,ics or jb)
You can name folders differently, but you must maintain path
example:
zip=>/myapps/ -all your apk here-
line in updater script should be:
package_extract_dir("myapps", "/data/app");
First name is name of the folder in zip (and it will extract all the subfolders too), second name where it is extracted (subfolders will be copied too)...
Bakisha said:
Put your apps in zip=>/data/app
and add to updater-script:
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
That should work on any rom ( gb,ics or jb)
You can name folders differently, but you must maintain path
example:
zip=>/myapps/ -all your apk here-
line in updater script should be:
package_extract_dir("myapps", "/data/app");
First name is name of the folder in zip (and it will extract all the subfolders too), second name where it is extracted (subfolders will be copied too)...
Click to expand...
Click to collapse
thanks it worked you forgot the run_program("/sbin/busybox", "mount", "/data"); btw
and some if not all to the apps i install using this method force closes but one when i use them, is the 1000, 1000, 0771, 0644 some kind of permission code?
xdarkmario said:
thanks it worked you forgot the run_program("/sbin/busybox", "mount", "/data"); btw
and some if not all to the apps i install using this method force closes but one when i use them, is the 1000, 1000, 0771, 0644 some kind of permission code?
Click to expand...
Click to collapse
Oh yeah, that and
unmount("/data");
at the end of updater-script
Permission is to give ownership to system (1000 is for system), 771 is permission for folder and 644 are for apps in folder
Don't ask me why and how. it's a linux thing... and i'm a windows user
Maybe a picture can explain it better
Btw, i didn't understand, you mean when you install it from zip (in recovery), those apps FC?
i was saying that after i install the rom and boot up the rom and try to launch the apps i installed using the method the apps are installed but when i click on them they FC
xdarkmario said:
i was saying that after i install the rom and boot up the rom and try to launch the apps i installed using the method the apps are installed but when i click on them they FC
Click to expand...
Click to collapse
It should work.
Did you do factory reset (wipe data partition from recovery)?
I mean, on clean install it should work.
Check folder structure. If in zip there are data/app folder and if you are extracting them to data/app , final result will be files extracted to /data/data/app and not data/app
Sent from my R800i using xda app-developers app
Bakisha said:
It should work.
Did you do factory reset (wipe data partition from recovery)?
I mean, on clean install it should work.
Check folder structure. If in zip there are data/app folder and if you are extracting them to data/app , final result will be files extracted to /data/data/app and not data/app
Sent from my R800i using xda app-developers app
Click to expand...
Click to collapse
i found out that it was the apps, some of them like touchpal do not like being installed automatically and miui borwser cannot be installed as a data app. So pretty much it worked thanks.
xdarkmario said:
i found out that it was the apps, some of them like touchpal do not like being installed automatically and miui borwser cannot be installed as a data app. So pretty much it worked thanks.
Click to expand...
Click to collapse
Ok, good to know. YW
Sent from my R800i using xda app-developers app

Categories

Resources