Updater Script problem - Android

Good morning guys, my device is a MTD Device.
I followed the instructions on Writing an Updater Script.
Here is the content of my updater script.
show_progress(0.1, 0);
format("MTD", "system");
mount("MTD", "system", "/system");
format("MTD", "userdata");
mount("MTD", "userdata", "/data");
package_extract_file("check_data_app", "/tmp/check_data_app");
set_perm(0, 0, 0777, "/tmp/check_data_app");
run_program("/tmp/check_data_app");
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
package_extract_dir("system", "/system");
symlink("dumpstate", "/system/bin/dumpcrash");
symlink("debuggerd", "/system/bin/csview");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/chcon");
symlink("toolbox", "/system/bin/setenforce");
symlink("toolbox", "/system/bin/runcon");
symlink("toolbox", "/system/bin/touchinput");
symlink("toolbox", "/system/bin/getsebool");
symlink("toolbox", "/system/bin/setsebool");
symlink("toolbox", "/system/bin/restorecon");
symlink("toolbox", "/system/bin/getenforce");
symlink("toolbox", "/system/bin/load_policy");
symlink("toolbox", "/system/bin/playback");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 06755, "/system/bin/ip");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 0, 0544, "/system/etc/install-recovery.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/su");
symlink("/system/xbin/su", "/system/bin/su");
show_progress(0.1, 10);
show_progress(0.2, 0);
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
show_progress(0.2, 10);
unmount("/system");
unmount("/data");
​
But then it gave me a status 0 problem.
I tried changing the binary update from the one provided in the Android Kitchen Guide then it gave me error
format() expects 3 args got 2.
mount() expects 4 args got 3.
Should i change it the format similar to this one format("yaffs2", "MTD", "userdata"); // mount("yaffs2", "MTD", "system", "/system"); ?
What should i do?

Related

[Q] updater-script

Hi
What command to change to updater-script, so that SuperSu that is activated after the flash.
In my compiles to S3, once flashed, the system puts me superSU canceled !
everything is in the zip, boot.img, recovery.img, ann to APPS, Superuser.apk, CWMManager-SGS3-v3.55.apk, ti xbin, su.
****************************************
My updater-script section superuser:
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 0, 06755, "/system/xbin/su");
symlink("/system/bin/su", "/system/xbin/su");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
show_progress(0.200000, 10);
assert(package_extract_file("ADD/recovery.img", "/tmp/recovery.img"),
write_raw_image("/tmp/recovery.img", "/dev/block/mmcblk0p6"),
delete("/tmp/boot.img"));
assert(package_extract_file("ADD/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "/dev/block/mmcblk0p5"),
delete("/tmp/boot.img"));
unmount("/system");
unmount("/cache");
unmount("/data");
**********************************
what changes must be ?
thank you in advance...
NB: also where is the wallpaper by déffault? it is not in the Framework!

[Q] forcing a cwm zip rom file to skip modem flashing

i want to install RGUI rom but i need it to skip the modem flashing so my current modem will remain untouched
when i flashed Omega for example i just deleted the modem.bin file from inside the zip file and the installation completed anyway
i tried the same method on RGUI but when it got to the modem installlation i get some error "assert extracting failed modem.bin" or something and then i get installation aborted
how can i make it skip the modem.bin installation ? do i need to edit updater-script inside meta-inf ?
AzurA86 said:
do i need to edit updater-script inside meta-inf ?
Click to expand...
Click to collapse
Yes
qwerty12 said:
Yes
Click to expand...
Click to collapse
thanks for replying
what do i need to delete from it ?
this is whats inside the updater-script file
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print("************************************************");
ui_print(" RGUI S3 ICS DEVELOPMENT ");
ui_print(" http://forum.xda-developers.com ");
ui_print("************************************************");
ui_print("* Phone : SAMSUNG GALAXY S III *");
ui_print("* MIUI VERSION : 2.9.28 *");
ui_print("* RGUI VERSION : V12 *");
ui_print("* Developed By : gh.rohit *");
ui_print("************************************************");
show_progress(0.500000, 0);
ui_print("Formatting system...");
unmount("/system");
format("ext4", "EMMC", "/dev/block/mmcblk0p9", "0");
ui_print("Installing system files...");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
package_extract_dir("system", "/system");
ui_print("Creating system links...");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("debuggerd", "/system/bin/csview");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/cat", "/system/bin/chmod",
"/system/bin/chown", "/system/bin/cmp", "/system/bin/date",
"/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
"/system/bin/getevent", "/system/bin/getprop", "/system/bin/hd",
"/system/bin/id", "/system/bin/ifconfig", "/system/bin/iftop",
"/system/bin/insmod", "/system/bin/ioctl", "/system/bin/ionice",
"/system/bin/kill", "/system/bin/ln", "/system/bin/log",
"/system/bin/ls", "/system/bin/lsmod", "/system/bin/lsof",
"/system/bin/mkdir", "/system/bin/mount", "/system/bin/mv",
"/system/bin/nandread", "/system/bin/netstat",
"/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
"/system/bin/ps", "/system/bin/reboot", "/system/bin/renice",
"/system/bin/rm", "/system/bin/rmdir", "/system/bin/rmmod",
"/system/bin/route", "/system/bin/schedtop", "/system/bin/sendevent",
"/system/bin/setconsole", "/system/bin/setprop", "/system/bin/sleep",
"/system/bin/smd", "/system/bin/start", "/system/bin/stop",
"/system/bin/sync", "/system/bin/top", "/system/bin/touch",
"/system/bin/umount", "/system/bin/uptime", "/system/bin/vmstat",
"/system/bin/watchprops",
"/system/bin/wipe");
ui_print("Set permission...");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 0, 0711, 0644, "/system/bin/.ext");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm(0, 0, 0644, "/system/vendor/lib/drm/libdrmwvmplugin.so");
set_perm(0, 0, 0644, "/system/vendor/lib/libwvm.so");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.3/left_eye-y0-yi45-p0-pi45-r0-ri20.2d_n2/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.3/left_eye-y0-yi45-p0-pi45-rn7-ri20.2d_n2/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.3/left_eye-y0-yi45-p0-pi45-rp7-ri20.2d_n2/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.3/nose_base-y0-yi45-p0-pi45-r0-ri20.2d_n2/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.3/nose_base-y0-yi45-p0-pi45-rn7-ri20.2d_n2/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.3/nose_base-y0-yi45-p0-pi45-rp7-ri20.2d_n2/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.3/right_eye-y0-yi45-p0-pi45-r0-ri20.2d_n2/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.3/right_eye-y0-yi45-p0-pi45-rn7-ri20.2d_n2/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.3/right_eye-y0-yi45-p0-pi45-rp7-ri20.2d_n2/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.3/head-y0-yi45-p0-pi45-r0-ri30.4a/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.3/head-y0-yi45-p0-pi45-rn30-ri30.5/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.3/head-y0-yi45-p0-pi45-rp30-ri30.5/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/recognition/face.face.y0-y0-22-b-N/full_model.bin");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/busybox");
set_perm(0, 2000, 06755, "/system/xbin/insecure");
set_perm(0, 0, 06755, "/system/xbin/invoke-as");
set_perm(0, 0, 06755, "/system/xbin/su");
ui_print("Update Boot image...");
show_progress(0.200000, 0);
show_progress(0.200000, 10);
package_extract_file("boot.img", "/dev/block/mmcblk0p5");
package_extract_file("flash_image", "/tmp/flash_image");
set_perm(0, 0, 0777, "/tmp/flash_image");
assert(package_extract_file("modem.bin", "/tmp/modem.bin"),
run_program("/tmp/flash_image", "/dev/block/mmcblk0p7", "/tmp/modem.bin"),
delete("/tmp/modem.bin"));
delete("/tmp/flash_image");
show_progress(0.100000, 0);
unmount("/system");
Removing this should be enough:
Code:
package_extract_file("flash_image", "/tmp/flash_image");
set_perm(0, 0, 0777, "/tmp/flash_image");
assert(package_extract_file("modem.bin", "/tmp/modem.bin"),
run_program("/tmp/flash_image", "/dev/block/mmcblk0p7", "/tmp/modem.bin"),
delete("/tmp/modem.bin"));
delete("/tmp/flash_image");
In addition, you can also remove the line "package_extract_file("boot.img", "/dev/block/mmcblk0p5");" if you don't want your kernel being replaced
thank you very much, il give it a try
i get an error when trying to flash it through cwm
e:error in /emmc/rgui_miui......zip (status 6)
installation aborted
Use an editor that understands UNIX line endings like Notepad2, not Wordpad or Windows Notepad
qwerty12 said:
Use an editor that understands UNIX line endings like Notepad2, not Wordpad or Windows Notepad
Click to expand...
Click to collapse
ah alright
now its working flawlessly thank you for your help !
Just replace the modem in the zip file with the one you want .
Then flash .
jje
i could do that but the last time i touched my modem my SN ressetted and could only be repaired with NSPRO
and reverting back to my original modem didnt work
since then ive decided to just avoid from changing my current modem.

Help-Dev / How to cook Rom

Hi there!
I cook a rom for p760, deodex, zipallign, init.d support...
i make all with kitchen and cygwin, and change updater-script in this:
assert(getprop("ro.product.device") == "p760" || getprop("ro.build.product") == "p760");
format("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.1/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.1/by-name/system", "/system");
package_extract_dir("system", "/system");
symlink("toolbox", "/system/bin/cat", "/system/bin/chmod",
"/system/bin/chown", "/system/bin/cmp", "/system/bin/date",
"/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
"/system/bin/getevent", "/system/bin/getprop", "/system/bin/hd",
"/system/bin/id", "/system/bin/ifconfig", "/system/bin/iftop",
"/system/bin/insmod", "/system/bin/ioctl", "/system/bin/ionice",
"/system/bin/kill", "/system/bin/ln", "/system/bin/log",
"/system/bin/ls", "/system/bin/lsmod", "/system/bin/lsof",
"/system/bin/md5", "/system/bin/mkdir", "/system/bin/mount",
"/system/bin/mv", "/system/bin/nandread", "/system/bin/netstat",
"/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
"/system/bin/ps", "/system/bin/reboot", "/system/bin/renice",
"/system/bin/rm", "/system/bin/rmdir", "/system/bin/rmmod",
"/system/bin/route", "/system/bin/schedtop", "/system/bin/sendevent",
"/system/bin/setconsole",
"/system/bin/setprop");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/sleep", "/system/bin/smd", "/system/bin/start",
"/system/bin/stop", "/system/bin/sync", "/system/bin/top",
"/system/bin/touch", "/system/bin/umount", "/system/bin/uptime",
"/system/bin/vmstat",
"/system/bin/watchprops",
"/system/bin/wipe");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 06755, "/system/bin/ip");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm_recursive(0, 2000, 0755, 0755, "/system/vendor/bin");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/etc");
set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm(0, 2000, 0755, "/system/vendor/lib/egl");
set_perm(0, 2000, 0755, "/system/vendor/lib/hw");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/su");
symlink("/system/xbin/su", "/system/bin/su");
show_progress(0.1, 10);
show_progress(0.2, 0);
package_extract_file("boot.img", "/dev/block/platform/omap/omap_hsmmc.1/by-name/boot");
show_progress(0.2, 10);
unmount("/system");
Click to expand...
Click to collapse
flash not have status problem, but after flash, screen up LG logo, vibration, and after this, black luminiscent screen and anything else
?????????
Dragusdrake said:
Hi there!
I cook a rom for p760, deodex, zipallign, init.d support...
i make all with kitchen and cygwin, and change updater-script in this:
flash not have status problem, but after flash, screen up LG logo, vibration, and after this, black luminiscent screen and anything else
?????????
Click to expand...
Click to collapse
What about logcat ? Does it give you any messages ?

[Q] An other updater-script ...

Hi everyone,
I recently bought a tablet (this one) because I would like to learn how to make a custom rom.
I read many topics, and I was able to prepare all my tools.
I also was able to set up CWM Recovery into the tablet : it works perfectly.
Now, I'm trying to create a custom rom based on an original update.zip (full stock), and I'm meeting some difficulties with updater-script.
In fact, Android Kitchen is having problems with this file :
Code:
assert(!less_than_int(1373619244, 0));
assert(getprop("ro.product.device") == "AN101G4" ||
getprop("ro.build.product") == "AN101G4");
show_progress(0.500000, 0);
format("ext4", "EMMC", "/dev/block/mtd/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mtd/by-name/system", "/system");
package_extract_dir("recovery", "/system");
package_extract_dir("system", "/system");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/cat", "/system/bin/chmod",
"/system/bin/chown", "/system/bin/cmp", "/system/bin/cp",
"/system/bin/date", "/system/bin/dd", "/system/bin/df",
"/system/bin/dmesg", "/system/bin/du", "/system/bin/getevent",
"/system/bin/getprop", "/system/bin/grep", "/system/bin/hd",
"/system/bin/id", "/system/bin/ifconfig", "/system/bin/iftop",
"/system/bin/insmod", "/system/bin/ioctl", "/system/bin/ionice",
"/system/bin/kill", "/system/bin/ln", "/system/bin/log",
"/system/bin/ls", "/system/bin/lsmod", "/system/bin/lsof",
"/system/bin/md5", "/system/bin/mkdir", "/system/bin/mount",
"/system/bin/mv", "/system/bin/nandread", "/system/bin/netstat",
"/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
"/system/bin/ps", "/system/bin/r", "/system/bin/reboot",
"/system/bin/renice", "/system/bin/rm", "/system/bin/rmdir",
"/system/bin/rmmod", "/system/bin/route", "/system/bin/schedtop",
"/system/bin/sendevent", "/system/bin/setconsole",
"/system/bin/setprop", "/system/bin/sleep", "/system/bin/smd",
"/system/bin/start", "/system/bin/stop", "/system/bin/sync",
"/system/bin/top", "/system/bin/touch", "/system/bin/umount",
"/system/bin/uptime", "/system/bin/vmstat", "/system/bin/watchprops",
"/system/bin/wipe");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 0, 0544, "/system/etc/install-recovery.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm(0, 2000, 0755, "/system/vendor");
set_perm_recursive(0, 2000, 0755, 0755, "/system/vendor/bin");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm(0, 2000, 0755, "/system/vendor/lib/egl");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/lib/hw");
set_perm(0, 0, 0644, "/system/vendor/lib/hw/gralloc.rk30xxb.so");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/pittpatt");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/left_eye-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/nose_base-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/right_eye-y0-yi45-p0-pi45-r0-ri20.lg_32-2/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-r0-ri30.4a-v24/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-rn30-ri30.5-v24/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-rp30-ri30.5-v24/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/recognition/face.face.y0-y0-22-b-N/full_model.bin");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/librank");
set_perm(0, 0, 06755, "/system/xbin/procmem");
set_perm(0, 0, 06755, "/system/xbin/procrank");
show_progress(0.200000, 0);
show_progress(0.200000, 10);
write_raw_image(package_extract_file("boot.img"), "boot");
show_progress(0.100000, 0);
clear_misc_command();
mount("ext4", "EMMC", "/dev/block/mtd/by-name/userdata", "/data");
ifelse(less_than_int(getprop("ro.build.date.utc"), 1373619244), run_program("/sbin/busybox", "find", "/data/media", "-maxdepth", "1", "-regex", "/data/media/.*", "-exec", "busybox", "mv", "{}", "/data/media/0/", ";"));
unmount("/data");
unmount("/system");
If I don't modify the file, Android Kitchen is blocked (assert process ...).
But, if I remove the first line, Android Kitchen is able to create an update.zip ... Unfortunately, CWM refuse it : Error : Status 6
So, maybe it's a syntax error, but I'm not able to find it.
I hope someone will be able to give me some hints !
I will finish this topic with a famous sentence ... I'm sorry if you can't read me, but I'm not English :victory:
Thank you !
Like you were doing ro.product.device or to.build.product aren't needed and if these have changed at all in new ROM it will fail so just get rid of the lines like you did or change them accordingly
I'm assuming you're using windows to edit this script as you're getting status 6, if my memory serves me right this is due to improper end of line as you get with not using Unix language
Either do this in Linux or use notepad ++ to change eol
See here if you need more help, or ask in this thread
http://forum.xda-developers.com/showthread.php?t=2290009
Sent from my Nexus 4 using XDA Premium 4 mobile app
Thank you demkantor for your answer !
I'll try your idea later today.
To edit this script, I tried with Windows with Notepad++, and I also tried with Debian 7.1 !
By the way, I'll now only work with Debian.
Thank you for the link. I'll read it right now !

[HELP] Creating/Modifying a ROM based on stock, is it as easy as it sounds?

I've been searching for a way to create a debloated ROM based on stock, since there are no developers working on any type of custom ROM based on AOSP or any type of ports.
It's too complicated for me to understand really (port a custom ROM based on AOSP/Lineage OS) since I have no knowledge of any type of code.
What I have been able to learn, however, is to modify a flashable zip to add/remove/delete anything you want by modifying the "updater-script" file and flashing it via TWRP (a custom recovery)
With this, I have been able to remove bloatware that really slowed down the device and I am loving it
But now, what I want to do is to create a flashable zip, debloated ROM based on stock, not just have a flashable zip to remove apps that you add via an Odin flash (I have a Samsung device)
Is it as easy as extracting all the contents of system.img (done), removing the folder of the apps you don't want and add the following commands in the updater-script?
Code:
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("system", "/system");
run_program("/sbin/busybox", "umount", "/system");
Or is there more to it than that? I feel like it's way too easy to be the case.
I know there's ASSAYYED's KITCHEN to ease up on making a debloated stock ROM, but the PC I use detects it as malware and eliminates the exe file, I do not have administrator rights on this PC.
Everywhere I search all point towards ASSAYYED's Kitchen, unfortunately and I really want to learn a bit more and maybe create a flashable ROM based on stock
Went ahead and tried it...
Sooo... I've been downloading various debloated ROMs based on stock from various Samsung devices and I've gotten a general idea of how to edit my code... a little bit.
I'm having a bit of trouble getting it to run and I think it has to do with permissions... because when I remove the ones I have added it doesn't boot at all it just stays on the initial screen but when I add them I atleast get to the Samsung logo.
Would anyone take a look at my updater-script and let me know if I'm missing something?
Code:
unmount("/system");
ui_print("Let's beggin!");
sleep(1);
ui_print("Formatting /system...");
format("ext4", "EMMC", "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/system", "0", "/system");
sleep(1);
ui_print("Mounting /system...");
mount("ext4", "EMMC", "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/system", "/system");
sleep(1);
ui_print("Installing debloated ROM!");
package_extract_dir("system", "/system");
ui_print("Done!...");
sleep(1);
ui_print("Setting permissions...");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 0, 0755, "/system/bin/install-recovery.sh");
set_perm(0, 3003, 06755, "/system/bin/ip");
set_perm(0, 1000, 0750, "/system/bin/iptables");
set_perm(0, 3003, 02750, "/system/bin/netdiag");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm(0, 1000, 0750, "/system/bin/tc");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pair_devlist.conf");
set_perm(0, 0, 0644, "/system/etc/bluetooth/iop_device_list.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.sec.boot.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm(0, 0, 0555, "/system/etc/ppp/ip-up-vpn");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/lib");
set_perm(0, 2000, 0755, "/system/vendor/media");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
ui_print("Extracting boot image...");
package_extract_file("boot.img", "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/BOOT");
ui_print("Installation complete!");
sleep(1);
unmount("/system");
It must be noted that the only thing I have in the system folder is everything I extracted from system.img from the stock ROM I downloaded from Sammobile. I also added the boot.img

Categories

Resources