Edify Custom Updater Script Failing run_program - Android General

Hi all,
Trying to run an updater script from the recovery, I have created the flashable zip and included a script that should run.
All is good except when I try to execute the script it gives a permission denied error.
Here is my updater script code
Code:
ui_print("+--------BUILD-PROP-FIX-ADB----------+");
mount("ext4", "EMMC", "/dev/block/by-name/system", "/system");
ui_print(is_mounted("/system"));
show_progress(8.800000, 5);
package_extract_file("system/buildfix.sh", "/tmp/buildfix.sh");
set_perm(0, 0, 0777, "/tmp/buildfix.sh")
ui_print("***Permissions Set***");
ui_print("***Program Running***");
run_program("/tmp/buildfix.sh");
ui_print("Program Completed");
ui_print(getprop("ro.adb.secure"));
show_progress(8.800000, 5);
delete_recursive(
"/tmp/buildfix.sh"
);
ui_print(" ");
ui_print("Completed.");
And here is the error
Code:
about to run program [/tmp/buildfix.sh] with 1 args
run_program: execv failed: permission denied
run_program: child exited with status 1
I am a noob with edify and would appreciate any help!

Related

[DEV Q] updater-script and edify

can someone smarter than me help me or point me in the right direction to convert my updater-scripts to edify. i think im sort of getting it but i want to make sure because i'm not a programmer. for instance, is the update-binary file required or just updater-script? also, the code posted below, it what i've come up with for flashing my themes, is it correct? and will it work with the new recoveries?
Code:
ui_print("Preparing system for istallation...");
ui_print("Wiping Cache / Dalvik...");
delete_recursive("/cache");
delete_recursive("/data/dalvik-cache");
ui_print("Installing Project_Bliss HD...");
show_progress(0.100000, 60);
package_extract_dir("system", "/system");
show_progress(1.000000, 0);
i am unsure whether or not i will have to mount the specific partitions for data and cache for this to work. i can always leave that part out but the less the person flashing needs to do the better. if i do have to mount in the script will the code below work for just a simple theme flash.
Code:
ui_print("Preparing system for installation...");
run_program("/sbin/mount", "/dev/block/mtdblock4", "/system");
ui_print("Installing Project_Bliss HD...");
show_progress(0.100000, 60);
package_extract_dir("system", "/system");
show_progress(1.000000, 0);
Anyone?
10 char
No one? Hmmmm?
I'm also interested in the same topic..
trying to build rom with dsixida kitchen and converting it from update to updater scripts remove all ui_print functions...
If I add them manually then clockwork refuses to boot that image...
Ditto... same issue about the ui_print... don't get it, because after the update-script gets created to the updater-script/update-binary cant be changed.
try this
show_progress(0.500000, 20);
run_program("/sbin/mount", "/system");
package_extract_dir("system", "/system");
unmount("/system");
show_progress(0.500000, 30);
ui_print("All done!");

Creation flashable zip sys-part CM10

Hi the crazy flash,
I open this topic for help creating a fix
CM10 ROM is Divided into 2 parts and some of the applications are installed on the / data partition due to Lack of space for full Jellybean installation.
Hence you will Have to reflash the rom you factory reset or Effective wipe / data partition.
Click to expand...
Click to collapse
After a restart install CM10 patch to system/app did not effect ?ยง!
Here is the solution I use busybox to inject App
I take this opportunity to fix some permission
If you have time of need flashable zip of this topic and for you!
Kernel or gapps or questions to ask permission
FixSysPartCM10
Code:
assert(getprop("ro.product.device") == "galaxysl" || getprop("ro.build.product") == "galaxysl" ||
getprop("ro.product.device") == "GT-I9003" || getprop("ro.build.product") == "GT-I9003");
ui_print(" ");
ui_print(" ********************************************** ");
ui_print(" * Fix reboot sys-parts/app by LoLaTiOn * ");
ui_print(" ********************************************** ");
show_progress(0.500000, 0);
mount("ext4", "EMMC", "/dev/block/stl9", "/system");
run_program("/sbin/busybox", "mount", "/dev/block/mmcblk0p3", "/data");
package_extract_dir("data", "/data");
symlink("/data/sys-parts/app","/system/app");
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system/framework");
set_perm_recursive(0, 0, 0755, 0644, "/data/app");
unmount("system");
run_program("/sbin/reboot");
instruction
Open zip with winrar
Add your app in \data\sys-parts\app
Create other folder in the system if time of need
Made you happy to share your patch and help the community
Enjoy...
my rom do not need this fix
Worked perfectly for me! Thanks
This is needed because CM10 with gapps does not fit our NAND aka ROM size.
Hence, the system apps are pushed into /data/sys-apps so that the entire ROM can work properly.. else full /system of jellybean does not fit on our small partition.

[Q] DPI??

So i have my dpi set manually to 440 in build.prop. Is there a way to retain my dpi settings after flashing nightly. I know it's possible with a script but can't find any for nexus 5. Maybe someone here knows how and can kindly guide me. I don't want to use an app. I am running cyanogenmod.
Yeah easy.
Create a flashable zip and in the system folder create a text file called "build_prop.sh"
The contents of which being
Code:
#!/sbin/sh
sed -i 's/density=480/density=440/g' /system/build.prop;
Then in your updater-script, do this
Code:
show_progress(0.500000, 0);
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("system", "/system");
set_perm(0, 0, 0777, "/system/build_prop.sh");
run_program("sbin/sh", "/system/build_prop.sh");
delete("/system/build_prop.sh");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/sdcard");
ui_print("");
ui_print("...and we're done!");
Sent from my Nexus 5 using Tapatalk

Recovery Flashable ZIP Error

Hi All,
I am trying to create a flash-able zip to remove some apps and I am getting this error
E: error executing updater binary in zip
Now here comes me question: is there a universal update-binary that I can use with CM11 / CM12 and is there a sample how to use it.
This is the updater-script I have written so far
Code:
ui_print("");
ui_print("Moutings Partitions");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "mount", "/system");
ui_print(" ");
ui_print("Cleaning System Apps");
delete("/system/app/BasicDreams/");
ui_print("Adding Codename Lungo Sounds & Apex Launcher")
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system");
ui_print(" ");
ui_print("Unmounting partitions");
ui_print(" ");
ui_print("Finish");
I am using a Mac if that makes a difference..

updater-script and data ?

Hi,
which command to put in updater-script? for the data to install, the standard command does not install them.
******
ui_print("@-> Extraction Data");
run_program("/sbin/mount", "-t", "ext4", "/dev/block/bootdevice/by-name/userdata", "/data");
package_extract_dir("data", "/data");
*****
This command does not work with OREO!
An idea ?

Categories

Resources