set_perm give me ERROR 6 - Android Q&A, Help & Troubleshooting

I'm running a zip flashable file in twrp in my Galaxy 8s, for some reason the set_perm line give me ERROR6, what's worng?
Code:
if is_mounted("/system") then
unmount("/system");
endif;
mount("ext4", "EMMC", "/dev/block/platform/11120000.ufs/by-name/SYSTEM", "/system", "");
package_extract_dir("script", "/system");
[B]set_perm(0, 0, 0000, "/system/app/Chrome/Chrome.apk");[/B]
unmount("/system");
show_progress(0.050000, 5);
ui_print("Success!");

anyone

Related

[Q] Any problems in this updater-script?

This:
Code:
mount("yaffs2", "MTD", "system", "/system");
package_extract_dir("framework", "/system/framework");
package_extract_dir("apps", "/system/app");
ui_print("Done?");
unmount("/system");
Didn't work
Trying to replace the framework-res.apk
It's fine.
Worked this time.

UpdateScript

Can anybody check my code?
Code:
ui_print("UltraRock for ARHD 9.0.0");
ui_print("");
ui_print("");
ui_print("Mounting /system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
ui_print("");
ui_print("Installing applications");
ui_print("");
package_extract_dir("system", "/system");
ui_print("");
ui_print("Setting permissions");
ui_print("");
run_program("chmod 0644 /system/app/FmRadio.apk");
run_program("chmod 0644 /system/app/SecLauncher2.apk");
ui_print("");
ui_print("Unmounting");
ui_print("");
unmount("/system");
ui_print("Looks we're done");
by some reason it tells me: status 0;
GR0S said:
Can anybody check my code?
Code:
ui_print("UltraRock for ARHD 9.0.0");
ui_print("");
ui_print("");
ui_print("Mounting /system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
ui_print("");
ui_print("Installing applications");
ui_print("");
package_extract_dir("system", "/system");
ui_print("");
ui_print("Setting permissions");
ui_print("");
run_program("chmod 0644 /system/app/FmRadio.apk");
run_program("chmod 0644 /system/app/SecLauncher2.apk");
ui_print("");
ui_print("Unmounting");
ui_print("");
unmount("/system");
ui_print("Looks we're done");
by some reason it tells me: status 0;
Click to expand...
Click to collapse
I have never seen
Code:
run_program("chmod 0644 /system/app/SecLauncher2.apk");
used for setting permissions..
use this instead
Code:
set_perm(0, 0, 0755, 0644, "/system/app/SecLauncher2.apk");
or
Code:
set_perm_recursive(0, 0, 0755, 0644, "/system/app");

Setting permissions to file after flashing .zip

I am trying to make my first custom ROM, but I have a problem with permissions.. this is my updater-script:
Code:
ui_print(" ");
ui_print("________________________________");
ui_print(" MADE BY FECHE ");
ui_print(" ** ONLY FOR CRYSTAL QUADCORE ** ");
ui_print("________________________________");
show_progress(0.200000, 10);
ui_print("Mounting..");
mount("ext4", "EMMC", "/dev/block/actc", "/system");
mount("ext4", "EMMC", "/dev/block/acte", "/cache");
mount("ext4", "EMMC", "/dev/block/actd", "/data");
show_progress(0.200000, 20);
delete_recursive("/system");
ui_print("Formatting /system..");
delete_recursive("/cache");
ui_print("Formatting /cache..");
delete_recursive("/data");
ui_print("Formatting /data..");
show_progress(0.200000, 35);
#Install system
ui_print("Installing /system.. (this will take a while)");
package_extract_dir("system", "/system");
show_progress(0.200000, 45);
symlink("/system/xbin/su", "/system/bin/su");
ui_print("Setting permissions..");
set_perm_recursive(0, 0, 0755, 0755, "/system");
show_progress(0.200000, 65);
#Finish_installation
ui_print("Unmouting..");
unmount("/system");
show_progress(0.200000, 80);
unmount("/data");
show_progress(1.000000, 90);
unmount("/cache");
ui_print(" ");
show_progress(1.000000, 0);
ui_print("Done, enjoy! :)");
But when I press on reboot on recovery, it says that the ROOT may have been lost, then it says, repair root? I press on 'no', the device restarts but it gets a black screen right after the device logo.. thanks.
take a look at:
set_perm() or set_perm_recursive()
link: http://forum.xda-developers.com/wiki/Edify_script_language

[EDIFY] Problem with updater-script files

Hi guys..
I'm cooking a custom rom, and i'm testing the updater-script files for flashing..
If i flash my updater-script i will get always:
"Updater process ended with segnal: 11
Error installing zip file '/external_sd/test/test.zip'"
This is my test updater-script:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/hidden", "/preload");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/cache", "/cache");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data");
package_extract_dir("system", "/system");
unmount("/system");
unmount("/data");
unmount("/preload");
unmount("/cache");
Anyone have an idea on where is my error??
Thanks a lot,
BoGnY

[EDIFY] Problem with updater-script files [SOLVED]

Hi guys..
I'm cooking a custom rom, and i'm testing the updater-script files for flashing..
If i flash my updater-script i will get always:
"Updater process ended with segnal: 11
Error installing zip file '/external_sd/test/test.zip'"
This is my test updater-script:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/hidden", "/preload");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/cache", "/cache");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data");
package_extract_dir("system", "/system");
unmount("/system");
unmount("/data");
unmount("/preload");
unmount("/cache");
Anyone have an idea on where is my error??
Thanks a lot,
BoGnY
EDIT: The problem is caused by a wrong/corrupted/unknown problem with update-binary file!!
I attached the working update-binary file for anyone have the same problem in future

Categories

Resources