How to make a simple Installer.zip? - HTC One X

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

Related

[Q] [Help] CWR Updater-script ( Error 6 )

Okay so Im trying to write a update script to bring my phone from a stock rom / custom rom and remove carrier / system bloatware and unwanted apps and install some apps from the .zip this file comes from and then run a permissions fix.
I can get the system to remove the bloatware and install the apps i tell it to, but the second i add in the fix permissions script, I get an error in CWR ( error 6 ), i know this is to do with the encoding into UNEX but im using NOTEPAD in windows & Jedit and saving them in a UNEX friendly format.
Every time i get a error 6 no matter how i encode the raw file. . . any ideas do i have some formatting wrong in my code ?
ui_print("**************************************************************");
show_progress(0.800000, 0);
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
ui_print("Extracting /system");
package_extract_dir("system", "/system");
ui_print("Setting Permissions");
set_perm_recursive(0, 0, 0755, 0644, "/system/app")
;
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/cache");
mount("ext4", "EMMC", "/dev/block/mmcblk0p10", "/data");
ui_print("Deleting Bloatware");
delete("/system/app/Zinio.apk");
delete("/system/app/Stk.apk");
delete("/system/app/SocialHub.apk");
delete("/system/app/SnsProvider.apk");
delete("/system/app/SnsDisclaimer.apk");
delete("/system/app/SnsAccountTw.apk");
delete("/system/app/SnsAccountMs.apk");
delete("/system/app/SnsAccountLi.apk");
delete("/system/app/syncmldm.apk");
delete("/system/app/SecretWallpaper1.apk");
delete("/system/app/SecretWallpaper2.apk");
delete("/system/app/SamsungWidget_WeatherClock.apk");
delete("/system/app/SamsungWidget_News.apk");
delete("/system/app/SamsungApps.apk");
delete("/system/app/ReadersHub.apk");
delete("/system/app/PressReader.apk");
delete("/system/app/Kobo.apk");
delete("/system/app/GenieWidget.apk");
delete("/system/app/FTM.apk");
delete("/system/app/FTS.apk");
delete("/system/app/Dlna.apk");
delete("/system/app/Days.apk");
delete("/system/app/SamsungWidget_News.apk");
delete("/system/app/Emailwidget.apk");
delete("/system/app/Emailwidget.odex");
ui_print("Installed Samsung Apps & Removed Un-wanted apps from /system/app");
run_program("/sbin/mount", "/dev/block/stl9", "/system");
ui_print("Running Script...");
package_extract_dir("system", "/system");
ui_print("Fixing Permissions");
ui_print("3");
ui_print("2");
ui_print("1");
set_perm(0, 0, 0755, "/system/bin/fix_permissions");
Click to expand...
Click to collapse
I can provide the whole .zip if needed
Thanks
at times when u edit the file it does save in the unix\linux format..
what editor are you using..
try using notepad++
open the original unmodified file in notepad++ and the modify and save it in that..
should work
xinfinityoO said:
at times when u edit the file it does save in the unix\linux format..
what editor are you using..
try using notepad++
open the original unmodified file in notepad++ and the modify and save it in that..
should work
Click to expand...
Click to collapse
Im using "JEdit"
[EDIT] whats the best file format to save it as in notepad++ ? i tried unex and all files (*.*) pure unex game me status 4 error and *.* gives me error 6 again, any ideas ?
I have uploaded the full .Zip if someone could test to see if it works for them ?
hutzdani said:
Im using "JEdit"
[EDIT] whats the best file format to save it as in notepad++ ? i tried unex and all files (*.*) pure unex game me status 4 error and *.* gives me error 6 again, any ideas ?
I have uploaded the full .Zip if someone could test to see if it works for them ?
Click to expand...
Click to collapse
i never changed the file format..
just find a script from one of the mods etc.. modify it in notepad++ and just click save.. dont choose any file formats..well it worked for me..
best of luck
Problem
Please Delete
Hi,
You can generate a remove and restore script here:
http://forum.xda-developers.com/showthread.php?t=1308447
You can use it as an example

[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);

[Q] Make an update.zip for a system app?

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");

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

[REQ/Help] Empty Flashable Zip (Template)

I upgraded from my GS3 to the N4.
I had a template for a flashable zip for the GS3 but dont think it applies to the N4.
Not only do I hope that someone can provide a template, but also hope that I can be taught to make a template for myself, for when the N5 comes out.
When exploring through the zip template for the GS3 (using Notepad++), inside META-INF > com > google > android > updater-script I see:
ui_print("Universal Updater Script - by Andybones");
unmount("/system");
show_progress(0.1, 0);
mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/data");
show_progress(0.500000, 80);
package_extract_dir("data", "/data");
package_extract_dir("system", "/system");
show_progress(0.2, 10);
show_progress(0.1, 0);
ui_print("Done!");
show_progress(0.1, 0);
ui_print("Enjoy!!");
show_progress(0.1, 0);
unmount("/data");
unmount("/cache");
unmount("/system");
My main concerns are 1. What differentiates each devices zips from eachother?, and 2. Does it make a difference that the GS3 was CDMA and now I am GSM (Verizon - T-Mobile)?
I attached the Template I use, complements to andybones at this thread: http://forum.xda-developers.com/showthread.php?t=2136746
Thanks in advance for any insight.
Wow..someone actually wants to learn around here...nice job!
1. The way it mounts the partitions and what it extracts where. Also the stuff it prints while flashing.
2. No it doesn't make a difference whether a phone is CDMA or GSM.
3. If you had a Verizon gs3, the way the bootloader was unlocked required some messing with the partitions so some flashable zips will mount partitions differently.
I can make a template for the nexus 4, but that wouldn't be much help to you. So I'll just explain what everything does.
BTW: This template will probably work on the nexus 4.
Code:
ui_print("Universal Updater Script - by Andybones");
"ui_print" is basically what you see when the user flashes the zip in recovery.
Code:
unmount("/system");
It unmounts the system partition. Duh. This is just precautionary incase it was mounted already.
Code:
show_progress(0.1, 0);
This moves the progress bar in TWRP or CWM. Some zips don't have this so you never know how far along the install is. Its not really needed for small zips because they finish so fast.
Code:
mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/data");
This says what type of partition it is and where to mount it. Its needed to copy the files from the zip into the phone. The /dev/block/.... is where the partition is located on the phone. It sometimes changes when people mess with the partitions to root/unlock the bootloader.
Code:
package_extract_dir("data", "/data");
package_extract_dir("system", "/system");
This extracts the contents of the folders "data" and "system" from the zip into the partitions that were mounted earlier.
Code:
unmount("/data");
unmount("/cache");
unmount("/system");
This unmounts all the partitions before exiting the script. Always a good idea even though it usually doesn't cause problems if you don't.
NOTE: I don't know why this is unmounting "/cache" when it never mounted it but...okay?
I thanked a while back but just wanted to reply and let you know that I have a much better understanding of how these work now.
Thanks again.
Sent from my Nexus 4 using xda app-developers app

Categories

Resources