I'm attempting to make an install script for a couple of mods just as before on the Droid X. Unfortunately I'm getting different errors at different times. One of the errors is (Status 0)... and the other is (Status 6).
Also, Mount says that it expects 4 args, got 3.
What changed?
nitro66215 said:
I'm attempting to make an install script for a couple of mods just as before on the Droid X. Unfortunately I'm getting different errors at different times. One of the errors is (Status 0)... and the other is (Status 6).
Also, Mount says that it expects 4 args, got 3.
What changed?
Click to expand...
Click to collapse
You need to use the right Syntax to mount /system . Best way... Busybox.
run program("/sbin/busybox" , "mount", "/system");
DroidTh3ory said:
You need to use the right Syntax to mount /system . Best way... Busybox.
run program("/sbin/busybox" , "mount", "/system");
Click to expand...
Click to collapse
So... I've tried this.... and I get....
Error in /sdcard/update.zip
(Status 6)
For Shi*s and giggles... I just did a test script.
ui_print(" ");
ui_print("Mount Bionic Script...");
run_program("/sbin/busybox", "mount", "/system");
ui_print("Doing Something.......");
ui_print("Installing Files");
ui_print(" ");
ui_print("** Unmounting System **");
unmount("/system");
This errors out. I have the META-INF folder from another Bionic update that someone else created, so I'm assuming that the files within (other than the script) will work as is.
Here is my mod script and update-binary. Make the appropriate folders for your mod and give it a go.
Case and spacing is essential as I am sure you know.
3G ICON VISUAL FIX
DroidTh3ory said:
Here is my mod script and update-binary. Make the appropriate folders for your mod and give it a go.
Case and spacing is essential as I am sure you know.
3G ICON VISUAL FIX
Click to expand...
Click to collapse
ui_print(" ");
show_progress(0.800000, 35);
ui_print(" ");
ui_print("** Mounting this ***** **");
run_program("/sbin/busybox", "mount", "/system");
ui_print(" ");
ui_print("** Installing Your MOD **");
ui_print(" ");
ui_print("** Unmounting System, Rock Out!! **");
unmount("/system");
show_progress(0.050000,0);
Ugh... same error. I only deleted your package extract. I'm using 7-zip and just doing store. Is that still the preferred method?
nitro66215 said:
ui_print(" ");
show_progress(0.800000, 35);
ui_print(" ");
ui_print("** Mounting this ***** **");
run_program("/sbin/busybox", "mount", "/system");
ui_print(" ");
ui_print("** Installing Your MOD **");
ui_print(" ");
ui_print("** Unmounting System, Rock Out!! **");
unmount("/system");
show_progress(0.050000,0);
Ugh... same error. I only deleted your package extract. I'm using 7-zip and just doing store. Is that still the preferred method?
Click to expand...
Click to collapse
What is it installing if there is no package extract?
I don't use 7zip, I just compress in linux... Couldn't really say in that.
DroidTh3ory said:
What is it installing if there is no package extract?
I don't use 7zip, I just compress in linux... Couldn't really say in that.
Click to expand...
Click to collapse
I plan on doing the install later, but I just wanted to do a test script without install. Just some "Hello World" text to make sure I got something going on.
I even just did that....
ui_print("Hello World");
Gave me the same error!
Ok.... so.... It is now working after a reboot of Recovery. Don't ask me why. And I am using standard windows zipping.
creating simple update.zip is very easy if you know all the basics
some basics are as follows
1. folder structure
*META-INF (compulsory)
*system
*data
many folders can be added but for simple update.zip these three are required.
Click to expand...
Click to collapse
2. META-INF folder structure
META-INF> com (certificates lies here)
META-INF> com> google
META-INF> com> google> android (updater-script and update-binary lies here)
Click to expand...
Click to collapse
3. update-binary:-
created in C language cannot be created by anyone, it handles every command which is written in updater-script and do everything from extraction to writing image files
Click to expand...
Click to collapse
4. updater-script:-
this file contains all the commands which are needed to do the work, basic commands are provided below
Click to expand...
Click to collapse
5. update-script common commands:-
Code:
ui_print("");
# put the lines in between "" what you want cwmr to show while flashing
e.g ui_print("text by DHLALIT11");
-------------------------
Code:
show_progress(0, 0);
# before comma is the number by which you want to increase the progress, 1 is complete 0.20 is 20%, after comma is the time until which progress bar will keep progressing when time will be completed progress bar will show 20%
e.g:- show_progress(.50, 5);
-------------------------
Code:
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
# command is used to mount system without mounting nothing can be copied to system (will not work on rfs file system
-------------------------
Code:
package_extract_dir("folder name", "/path");
# this command is used to extract the files which you have copied to system folder of the package to the system folder of the phone
(e.g:- package_extract_dir("system", "/system");
-------------------------
Code:
run_program("/sbin/busybox", "mount", "/dev/block/mmcblk0p2", "/data");
# command is used to mount data without mounting nothing can be copied to data (may not work on rfs file system )
-------------------------
Code:
package_extract_dir("data", "/data");
# this command is used to extract the files which you have copied to data folder of the package to the data folder of the phone
-------------------------
package_extract_file("path/to/file", "/path/to/extract");
# command is used to extract the script or any other file to temp folder.
e.g:-
Code:
package_extract_file("script/tool.sh", "/tmp/tool.sh");
-------------------------
Code:
delete_recursive("folder name");
# use to delete a complete folder that can be system, data, cache etc.
e.g:- delete_recursive("/system/media");
# will delete media folder from /system
-------------------------
Code:
delete("file with complete patch");
# use to delete a single file
e.g:- delete("/system/app/app.apk");
# app.apk will be deleted from /system/app
-------------------------
Code:
set_perm(0, 0, 06755, "/system/xbin/su");
# this command is used to give permission to a file, in this scenario we are giving permission to su file to make it work properly.
-------------------------
Code:
set_perm_recursive (1000, 1000, 0771, 0644, "data/app");
# this command is used to give permission to the whole folder, in this scenario we are giving permission to app folder to make it work properly.
Click to expand...
Click to collapse
6. ";" sign must be written after the completion of every command if a single one is missing package will not flash
Click to expand...
Click to collapse
7. adding "#" before any command will tell system not to read that line
Click to expand...
Click to collapse
8. /tmp folder:- a folder where all temporary files like boot.img, updater.sh, modem.bin are extracted
Click to expand...
Click to collapse
9. updater script is very sensitive about line break code if you edit the updater script with any windows editor without changing line break code it will give error so to edit updater script use jota text editor(android) or notepad++(windows)
Click to expand...
Click to collapse
------------------------------------
the file you want copy to system or data through update.zip must be placed in the system or data folder of update.zip along with the folder structure
suppose you want to install busybox then the file must be placed like this:- update.zip> system> xbin> busybox
want to install YouTube as system app then the app must be placed like this:- update.zip> system> app> YouTube.apk
want to install YouTube as data app then the app must be placed like this:- update.zip> data> app> YouTube.apk
Helpful tut !
Good tut but why not just install java and that batch file programme made buy someone here at xda..
freakyfriday said:
Good tut but why not just install java and that batch file programme made buy someone here at xda..
Click to expand...
Click to collapse
you must be talking about d4 update.zip maker
this tut is only to give info
and suppose you are not near to your PC and you want to make a cwm zip then if you know all this you can easily create the package with you android smartphone or tab
please guys reply if you like and if you get something from this tut
dhlalit11 said:
please guys reply if you like and if you get something from this tut
Click to expand...
Click to collapse
OK, Thank you very much for this quick tutorial. It's so useful for me
I think you should add it to your signature to point out it (I didn't notice it untill you had mentioned it in my topic).
I think also you may add some more commands for Updater-Script.
Q: Can I get input from user via CWM? ^_^
I don't like to update my sig with my mobile and am away from my computer from about 1 week don't know when I will update it
Nice.
It should give noobs a guide to modify roms to their liking instead of asking rom devs to remove this and add that,now they can edit the rom themselves and with rootexplorer do it all from your phone.
updated op, there was a mistake in show progress command please read it again
thank.. i found what i need
I finally found this tutorial, as I suspect, like copy-paste it in the same directory.
*sorry for my bad english*
what you want to copy and paste in the same directory
Very well written tutorial !!!. Was very easy to understand.
...
@dheeraj (dhlalit11)
This script is called "edify" script. This is just a suggestion because you have not mentioned it in your tutorial.
...
...
Is it possible to set properties of "build.prop" file from updater-script?. From terminal we can use "setprop" command, is there similar command that can be used in the updater-script. Or may be some busybox command i.e "run_program(...)" ???
you will need to create a script then create its flashable zip in updater-script first extract it to /tmp, make it executable then run it through run program command
awesome............
done editing
guys any fixing needed please reply
What is the difference between mount("yaffs2", "MTD", "system", "/system"); and run_program("/sbin/busybox", "mount", "/dev/block/mmcblk0p2", "/data"); ??
I am getting an error - mount() expects 3 args. got 4
Code:
assert(getprop("ro.product.device") == "beni" || getprop("ro.build.product") == "beni" || getprop("ro.product.board") == "beni" ||
getprop("ro.product.device") == "GT-S5670" || getprop("ro.build.product") == "GT-S5670" || getprop("ro.product.board") == "GT-S5670");
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
ui_print("Root for AOSP by harryhades");
ui_print("--------------------------------");
show_progress(0.100000, 0);
show_progress(0.500000, 0);
package_extract_dir("system", "/system");
set_perm(0, 0, 06755, "/system/xbin/sqlite3");
set_perm(0, 0, 06755, "/system/xbin/su-v1");
set_perm(0, 0, 06755, "/system/xbin/su-v2");
set_perm(0, 0, 06755, "/system/xbin/su-v3");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 06755, "/system/xbin/sh");
set_perm(0, 0, 06755, "/system/xbin/busybox");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
#unmount("/system");
P.S: what permssion should be set for the superuser binaries?? i am confused between 06755 and 04755
Harryhades said:
What is the difference between mount("yaffs2", "MTD", "system", "/system"); and run_program("/sbin/busybox", "mount", "/dev/block/mmcblk0p2", "/data"); ??
I am getting an error - mount() expects 3 args. got 4
Code:
assert(getprop("ro.product.device") == "beni" || getprop("ro.build.product") == "beni" || getprop("ro.product.board") == "beni" ||
getprop("ro.product.device") == "GT-S5670" || getprop("ro.build.product") == "GT-S5670" || getprop("ro.product.board") == "GT-S5670");
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
ui_print("Root for AOSP by harryhades");
ui_print("--------------------------------");
show_progress(0.100000, 0);
show_progress(0.500000, 0);
package_extract_dir("system", "/system");
set_perm(0, 0, 06755, "/system/xbin/sqlite3");
set_perm(0, 0, 06755, "/system/xbin/su-v1");
set_perm(0, 0, 06755, "/system/xbin/su-v2");
set_perm(0, 0, 06755, "/system/xbin/su-v3");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 06755, "/system/xbin/sh");
set_perm(0, 0, 06755, "/system/xbin/busybox");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
#unmount("/system");
P.S: what permssion should be set for the superuser binaries?? i am confused between 06755 and 04755
Click to expand...
Click to collapse
Just remove it n at last '#' is used for command line!!
from the first command remove the yaffs2
that busybox mount command will mount /data
the permission should be 06755
and also remove those getprop lines they are useless
Please tell permissions for frameworkres.apk
Sent from my GT-S5570 using xda premium
Hi guys.
I've been trying to install the mighty HoloBlur but I'm unable to. I get error:
set_perm: some changes failed (status 7)
Now, I readed the updater-script and noticed a reference to a file named fixperm.sh. The line says the following:
package_extract_file("system/etc/releasetools/fixperm.sh", "/tmp/fixperm.sh");
set_perm(0, 0, 0777, "/tmp/fixperm.sh");
I looked at that directory on the .zip but didn't find the releasetools folder. Neither the fixperm.sh file.
I deleted that line and another reference to that file, and it advanced. Next I had to modify this line:
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
It said that I needed 5 parameters and was only giving 4. I modified it to this:
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
And it advanced. But then, error on symlinks:
symlink: some symlinks failed
And because that error didn't specified which ones, I couldn't continue with my quest.
Anybody has an idea how to fix this? Or has a past version of HoloBlur? Original links in the thread don't work. BTW, I'm using Philz Touch 6 with CWM v6.0.4.7
Aloha community,
after 3 years of using an iphone i switched back to android with a new shiny z3 compact aka aries.
while staying in touch with android by developing apps and rooting/flashing a few phone from friends i am a bit out of ideas when it comes to my new phone...
what i did so far:
rooted phone,
backed up ta-partition
opened bootloader
installed cwm-recoverey by doomlord
tried to flash cm 12 (edited update-script to allow 'aries') -> install aborts without error message
tried to flash cm 11 -> black screen after reboot need to refresh boot.img in fast boot and restore android from backup
tried aosp 5.0.2 -> works fine but no detection of SIM, Camera, no root... i will wait for the official release from sony.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Since i want to get rid of the whole sony bloatware (which is a pain to remove manually on the phone) and also don't want to do it every time i need to reboot + want to offer the opportunity to others to install a relatively clean rom i tried to make my own rom based on the cwm backup...
therefore i copied the boot.img from the backup + the extracted system.ext4.tar folder in a new folder.
I removed all apps i didn't want / added others
I copied the META-Inf from the DRM-resoter zip and edited the updates-script.
it now reads:
Code:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
ui_print(" ");
ui_print(" Deleting /system ");
ui_print(" ");
delete("/system/*");
ui_print(" ");
ui_print(" Extracting Files ");
ui_print(" ");
package_extract_dir("system", "/system");
ui_print(" ");
ui_print(" Setting Permissions ");
ui_print(" ");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
set_perm_recursive(0, 0, 0755, 0644, "/system/framework");
set_perm_recursive(0, 0, 0755, 0644, "/system/priv-app");
ui_print(" ");
ui_print(" Unmounting System ");
ui_print(" ");
unmount("/system");
ui_print("------------------------------------------");
ui_print(" Finished ");
ui_print("------------------------------------------");
i stored the folder as a zip and signed it. Now it should be a flashable rom...
when i try to install it with cwm recovery the installation aborts.
the Log says:
Code:
-- Installing: /storage/sdcard1/custom-signed.zip
Finding update package...
I: Update location: /storage/sdcard1/custom-signed.zip
Opening update package...
Installing update...
Installation aborted.
I: using /data/media for /sdacrd/0/clockworkmod/.last_install_path.
I:Can't partition non mmcblk device: /devices/msn_sdcc.2/mmc_host
can someone tell me where i did something wrong?
if anyone likes to have a look at the rom:
Code:
archy.no-ip.org/owncloud/public.php?service=files&t=bf55a79f9d9660641b115db5da352f5f
I hope you guys can help me!
Greetings
i think i could describe my problem better, updated the start post