[Q][SOLVED] Need some assistance with a broken edify script. - Android Q&A, Help & Troubleshooting

EDIT2: So it turns out that I'm an idiot, I hadn't noticed that the basketbuild GApps script I was using had been using the set_perm function rather than set_metadata, since set_perm no longer exists in the latest update-binary it kept failing. I'm solved.
I've been working on a script that takes an OTA zip file, adds GApps and some other modifications (including those to the updater-script) and then zips the ROM back up so that I could provide an easy OTA solution for my home devices that won't take me 45 minutes waiting on them to finish flashing. (in total, the script is supposed to cut down my update time by cutting out the copy/paste).
That part of my script seems to work perfectly, however update-binary throws a syntax error on the automatically compiled updater-script. Can anyone tell me what I'm doing wrong based on the update script below? I've wracked my brain for hours trying to figure out what's wrong here and have played around with line endings in case that was the cause but nothing.
Code:
assert(getprop("ro.product.device") == "x5" || getprop("ro.build.product") == "x5" || getprop("ro.product.device") == "ls740" || getprop("ro.build.product") == "ls740" || abort("This package is for device: x5,ls740; this device is " + getprop("ro.product.device") + "."););
ifelse(is_mounted("/system"), unmount("/system"));
package_extract_dir("install", "/tmp/install");
set_metadata_recursive("/tmp/install", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644);
set_metadata_recursive("/tmp/install/bin", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755);
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "backup");
unmount("/system");
if is_mounted("/data") then
run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
else
mount("f2fs", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data", "");
run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
unmount("/data");
endif;
show_progress(0.750000, 0);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/platform/msm_sdcc.1/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");
show_progress(0.020000, 10);
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "restore");
unmount("/system");
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
show_progress(0.200000, 10);
ui_print("***********************************************");
ui_print(" Google Apps for Android 5.0");
ui_print("***********************************************");
ui_print("Installing files...");
run_program("/sbin/busybox", "mount", "/system");
show_progress(1, 15);
delete("/system/app/Provision.apk","/system/app/QuickSearchBox.apk","/system/app/priv-app/SetupWizard.apk","/system/app/priv-app/Velvet.apk","/system/app/Vending.apk","/system/app/BrowserProviderProxy.apk","/system/app/PartnerBookmarksProvider.apk");
package_extract_dir("system", "/system");
set_perm(0, 0, 0755, "/system/addon.d/70-gapps.sh");
package_extract_dir("optional", "/tmp");
package_extract_file("install-optional.sh", "/tmp/install-optional.sh");
set_perm(0, 0, 0777, "/tmp/install-optional.sh");
run_program("/tmp/install-optional.sh", "");
show_progress(1, 15);
ui_print("Cleaning up and setting metadata...");
set_metadata_recursive("/system/addon.d", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/app", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/priv-app", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/etc/permissions", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/etc/preferred-apps", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/etc/g.prop", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/framework", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/lib", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/usr/srec/en-US", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/vendor/pittpatt", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
run_program("/sbin/busybox", "umount", "/system");
ui_print("Installation complete!");
The above only has one modification to it since I was toying around trying to fix this. The line break before the Google Apps was something I was inserting for a delineation of where the scripts combine at. That said, both ZIPs unmodified flash correctly and I have removed the signature from the ZIP file before re-compressing with modifications as well. I've written an edify script by hand before, but hadn't had this problem then, only when programatically creating an updater-script am I running into this.
EDIT: Sorry about the weird code block if you saw this before my update, that's what I get from copy/pasting from PuTTY.

Related

[Q] how to integrate SuperSU into Custom ROM

Hi Guys,
Is there any DETAILED instructions/How-TO to embed SuperSu 2.46 into a custom rom?
I put files into /system/xbin /system/app, copied some lines from updater-binary file into custom rom's updater-script,
but it doesn't work.
SuperSU version: 2.01, here's my modified updater-script
Code:
(!less_than_int(1426845577, getprop("ro.build.date.utc"))) || abort("Can't install this package (Fri Mar 20 17:59:37 CST 2015) over newer build (" + getprop("ro.build.date") + ").");
getprop("ro.product.device") == "msm8974" || abort("This package is for \"msm8974\" devices; this is a \"" + getprop("ro.product.device") + "\".");
show_progress(0.500000, 0);
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
package_extract_dir("recovery", "/system");
package_extract_dir("system", "/system");
symlink("/data/misc/audio/mbhc.bin", "/system/etc/firmware/wcd9320/wcd9320_mbhc.bin");
symlink("/data/misc/audio/wcd9320_anc.bin", "/system/etc/firmware/wcd9320/wcd9320_anc.bin");
symlink("/data/misc/audio/wcd9320_mad_audio.bin", "/system/etc/firmware/wcd9320/wcd9320_mad_audio.bin");
symlink("/data/misc/wifi/WCNSS_qcom_cfg.ini", "/system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini");
symlink("/persist/WCNSS_qcom_wlan_nv.bin", "/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin");
symlink("/system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin_usb", "/system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin");
symlink("/system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin_usb", "/system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin");
symlink("/system/etc/firmware/ath6k/AR6004/hw3.0/bdata.bin_usb", "/system/etc/firmware/ath6k/AR6004/hw3.0/bdata.bin");
symlink("/system/lib/modules/pronto/pronto_wlan.ko", "/system/lib/modules/wlan.ko");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/cat", "/system/bin/chcon",
"/system/bin/chmod", "/system/bin/chown", "/system/bin/clear",
"/system/bin/cmp", "/system/bin/cp", "/system/bin/date",
"/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
"/system/bin/du", "/system/bin/getenforce", "/system/bin/getevent",
"/system/bin/getprop", "/system/bin/getsebool", "/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/load_policy", "/system/bin/log", "/system/bin/ls",
"/system/bin/lsmod", "/system/bin/lsof", "/system/bin/md5",
"/system/bin/mkdir", "/system/bin/mkswap", "/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/readlink",
"/system/bin/renice", "/system/bin/restorecon", "/system/bin/rm",
"/system/bin/rmdir", "/system/bin/rmmod", "/system/bin/route",
"/system/bin/runcon", "/system/bin/schedtop", "/system/bin/sendevent",
"/system/bin/setconsole", "/system/bin/setenforce",
"/system/bin/setprop", "/system/bin/setsebool", "/system/bin/sleep",
"/system/bin/smd", "/system/bin/start", "/system/bin/stop",
"/system/bin/swapoff", "/system/bin/swapon", "/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_metadata_recursive("/system", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/app_process", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
set_metadata("/system/bin/clatd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:clatd_exec:s0");
set_metadata("/system/bin/debuggerd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:debuggerd_exec:s0");
set_metadata("/system/bin/dhcpcd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dhcp_exec:s0");
set_metadata("/system/bin/dnsmasq", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dnsmasq_exec:s0");
set_metadata("/system/bin/drmserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drmserver_exec:s0");
set_metadata("/system/bin/hostapd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:hostapd_exec:s0");
set_metadata("/system/bin/installd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:installd_exec:s0");
set_metadata("/system/bin/keystore", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:keystore_exec:s0");
set_metadata("/system/bin/mediaserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mediaserver_exec:s0");
set_metadata("/system/bin/mksh", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:shell_exec:s0");
set_metadata("/system/bin/mtpd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtp_exec:s0");
set_metadata("/system/bin/netcfg", "uid", 0, "gid", 3003, "mode", 02750, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/netd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netd_exec:s0");
set_metadata("/system/bin/ping", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ping_exec:s0");
set_metadata("/system/bin/pppd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ppp_exec:s0");
set_metadata("/system/bin/racoon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:racoon_exec:s0");
set_metadata("/system/bin/rild", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:rild_exec:s0");
set_metadata("/system/bin/run-as", "uid", 0, "gid", 2000, "mode", 0750, "capabilities", 0xc0, "selabel", "u:object_r:runas_exec:s0");
set_metadata("/system/bin/sdcard", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sdcardd_exec:s0");
set_metadata("/system/bin/servicemanager", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:servicemanager_exec:s0");
set_metadata("/system/bin/surfaceflinger", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:surfaceflinger_exec:s0");
set_metadata("/system/bin/vold", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vold_exec:s0");
set_metadata("/system/bin/wpa_supplicant", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wpa_exec:s0");
set_metadata_recursive("/system/etc/dhcpcd", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:dhcp_system_file:s0");
set_metadata("/system/etc/dhcpcd/dhcpcd-run-hooks", "uid", 1014, "gid", 2000, "mode", 0550, "capabilities", 0x0, "selabel", "u:object_r:dhcp_system_file:s0");
set_metadata("/system/etc/install-recovery.sh", "uid", 0, "gid", 0, "mode", 0544, "capabilities", 0x0);
set_metadata_recursive("/system/etc/ppp", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0555, "capabilities", 0x0, "selabel", "u:object_r:ppp_system_file:s0");
set_metadata("/system/recovery-from-boot.p", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0);
set_metadata("/system/vendor", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/vendor/etc", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/etc/audio_effects.conf", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/vendor/lib/drm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/drm/libdrmprplugin.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/egl", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/hw", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/rfsa", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/rfsa/adsp", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/soundfx", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/xbin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/xbin/librank", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/xbin/procmem", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/xbin/procrank", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/xbin/su", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
set_metadata("/system/xbin/tcpdump", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
show_progress(0.200000, 0);
show_progress(0.200000, 10);
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
show_progress(0.100000, 0);
chmod 0755 /system/xbin/chattr
chmod 0755 /system/xbin/chattr.pie
/system/xbin/chattr -i /system/xbin/su
/system/xbin/chattr.pie -i /system/xbin/su
/system/xbin/chattr -i /system/bin/.ext/.su
/system/xbin/chattr.pie -i /system/bin/.ext/.su
/system/xbin/chattr -i /system/xbin/daemonsu
/system/xbin/chattr.pie -i /system/xbin/daemonsu
/system/xbin/chattr -i /system/etc/install-recovery.sh
/system/xbin/chattr.pie -i /system/etc/install-recovery.sh
rm -f /system/xbin/chattr
rm -f /system/xbin/chattr.pie
ln -s /system/etc/install-recovery.sh /system/bin/install-recovery.sh
set_perm(0, 0, 0777, "/system/bin/.ext");
set_perm(0, 0, 06755, "/system/bin/.ext/.su");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 0755, "/system/xbin/daemonsu");
set_perm(0, 0, 0755, "/system/etc/install-recovery.sh");
set_perm(0, 0, 0755, "/system/etc/init.d/99SuperSUDaemon");
set_perm(0, 0, 0644, "/system/etc/.installed_su_daemon");
set_perm(0, 0, 0644, "/system/app/Superuser.apk");
chcon u:object_r:system_file:s0 /system/bin/.ext/.su
chcon u:object_r:system_file:s0 /system/xbin/su
chcon u:object_r:system_file:s0 /system/xbin/daemonsu
chcon u:object_r:system_file:s0 /system/etc/install-recovery.sh
chcon u:object_r:system_file:s0 /system/etc/init.d/99SuperSUDaemon
chcon u:object_r:system_file:s0 /system/etc/.installed_su_daemon
chcon u:object_r:system_file:s0 /system/app/Superuser.apk
/system/xbin/su --install
unmount("/system");

[Q] SuperSU flashed (TWRP), SU binaries missing, soft bricked: how to get SU working?

Hello. My Asus Zenfone 5 is (soft) bricked and I am trying to solve it (see related thread here), but all possible solutions require me to use su to elevate commands. The device was rooted (SuperSU) and after bricking I flashed TWRP and through it I flashed SuperSU again, but there are still no su binaries installed (I get the "su: not found" error).
My first doubt is: does SuperSU flashing process require the device to be successfully rebooted into a working system?
Because that's exactly what I CANNOT do now (in fact, that is what I am TRYING TO do).
Based on your answers, two other questions follow:
If no, why aren't su binaries installed and working and what can I do to have it working?
If yes, what alternative, bootloader-based and/or recovery-based only (i.e., requiring no regular system access, which I don't have) method could I use?
BTW, it's running lollipop (it was on 3.23.40.52 version, when I mistakenly accepted an OTA update for the 3.24.40.78 version, which seems to be "running", in fact bootlooping version).
Help me save my phone guys, please...
:crying: :crying: :crying:
SuperSU flashing is recovery-based only. if I meet this question I will double wipe in recovery mode or replace my rom directly, because I guess some files in /system/fodder bricked the writing process
Depending on your version of Android, the version TWRP injects may not work at all. The best option is to download the SuperSU zip from it's thread here on XDA and flash that through TWRP. That will get you back up and rooted. However, if you're bootlooping, you may need to go back to do a factory reset first. I seem to need to do this with my G2 and CM12 everytime I accept a CM12 update.
That's precisely what I did, @ShadowEO. I flashed SuperSU v2.46's zip. But, contrary to what @Lost Smoch said, when I reboot the only way I can (reboot from recovery to recovery again), I do not have su working, neither through adb from my PC nor through TWRP "terminal". And I am not able to make a factory reset because it does not solve bootlooping/bricked state, so I need su precisely to solve it... Any ideas?
alainsr said:
That's precisely what I did, @ShadowEO. I flashed SuperSU v2.46's zip. But, contrary to what @Lost Smoch said, when I reboot the only way I can (reboot from recovery to recovery again), I do not have su working, neither through adb from my PC nor through TWRP "terminal". And I am not able to make a factory reset because it does not solve bootlooping/bricked state, so I need su precisely to solve it... Any ideas?
Click to expand...
Click to collapse
You should not need su from TWRP's terminal. However the terminal is very limited, you may wish to get a full ADB terminal up and running inside of TWRP, to do this, start the ADB Sideload function and then go back to the main menu after stopping the sideload process. You should be able to adb shell in. From there, if your prompt has a # on it, you are already root and do not need to su. you will however need to mount /system and /data to preform any operations on them.
You may wish to check /var/last_kmsg after a failed boot to see what's going on during the boot process, Android's init process will log information there (sadly, you won't get any logcatting to see what's going on in there.)
get your latest stock firmware and reflash itvia bootloader with adb. some lollipop roms need to have sepolicy pated in the boot.img to achieve root see dull tutorial here http://forum.xda-developers.com/gal...patching-sepolicy-ramdisk-to-achieve-t3237097
http://forum.xda-developers.com/apps/supersu/wip-android-6-0-marshmellow-t3219344
also when flashing supersu you would want to flash the supersu.zip in recovery, upon reboot, do not select option in twrp that says su not installed do you want twrp to install select no.
ShadowEO said:
You should not need su from TWRP's terminal. However the terminal is very limited, you may wish to get a full ADB terminal up and running inside of TWRP, to do this, start the ADB Sideload function and then go back to the main menu after stopping the sideload process. You should be able to adb shell in. From there, if your prompt has a # on it, you are already root and do not need to su. you will however need to mount /system and /data to preform any operations on them.
Click to expand...
Click to collapse
Thank you. I didn't know TWRP's terminal was already elevated. That solved my first issue.
The tutorial I followed for unbricking didn't work (I followed this one: http://forum.xda-developers.com/showpost.php?p=54451457&postcount=21), but the su issue is now irrelevant as I have TWRP working. My issue now is actually unbricking my phone (Zenfone 5, in which I mistakenly accepted an OTA when I was rooted and should know it wouldn't work), which seems very hard, because when rooting my device "locale" ("SKU" as Asus says) apparently changed, so I can't flash any stock ROM (they all say the installed version is too high or too low, or the SKU is wrong). I really don't know how to get out of this one...
But this might not be the thread to discuss it (although I would really love some help).
alainsr said:
Thank you. I didn't know TWRP's terminal was already elevated. That solved my first issue.
The tutorial I followed for unbricking didn't work (I followed this one: http://forum.xda-developers.com/showpost.php?p=54451457&postcount=21), but the su issue is now irrelevant as I have TWRP working. My issue now is actually unbricking my phone (Zenfone 5, in which I mistakenly accepted an OTA when I was rooted and should know it wouldn't work), which seems very hard, because when rooting my device "locale" ("SKU" as Asus says) apparently changed, so I can't flash any stock ROM (they all say the installed version is too high or too low, or the SKU is wrong). I really don't know how to get out of this one...
But this might not be the thread to discuss it (although I would really love some help).
Click to expand...
Click to collapse
You may be able to get away with formatting /system and then attempting to apply a stock ROM. There wouldn't be any build.prop to check against. The other option is to remove the device assert() strings from META-INF/com/google/android/updater-script inside the ROM update ZIP, I would only do this if you are absolutely sure that the ROM is meant for your exact device. If you do this to apply a ROM that isn't supposed to be for your device, there's the possibility of it repartitioning the NAND which would be a real bad problem, probably worse than it is now.
I unfortunately do not know much about how the Zenfone does it's updates, so I'm afraid I can only offer the most generic help possible
ShadowEO said:
You may be able to get away with formatting /system and then attempting to apply a stock ROM. There wouldn't be any build.prop to check against. The other option is to remove the device assert() strings from META-INF/com/google/android/updater-script inside the ROM update ZIP, I would only do this if you are absolutely sure that the ROM is meant for your exact device. If you do this to apply a ROM that isn't supposed to be for your device, there's the possibility of it repartitioning the NAND which would be a real bad problem, probably worse than it is now.
I unfortunately do not know much about how the Zenfone does it's updates, so I'm afraid I can only offer the most generic help possible
Click to expand...
Click to collapse
@ShadowEO, that's the kind of advice I was hoping for, thank you.
Before I go and try what you already suggested, is the first suggestion is as dangerous as the second one?
Also, if you could be patient and kind, I would like to tell a bit more about my situation and ask for your advice, even if you are not familiar with this specific device. It came with Kitkat installed and it's "SKU" (locale, I think) is WW (which probably stands for "worldwide", as opposed to what appear to be Chinese and Taiwanese markets specific version) and later upgraded to Lollipop (Asus version "3.23.40.52", SKU still = WW). Then I rooted it. Months pass, and I mistakenly authorize an OTA to the latest version ("3.24.40.78"), entering a bootloop state. To solve it I installed TWRP and tried to flash several official zip files provided by Asus, but none of them work. Either I get a wrong SKU or a wrong pre-installed version (too high or too low). It seems that when the updater script checks the installed version the result is the latest one ("3.24.40.78"), but the SKU is blank.
Now, having said all that, I would like to know your opinion: what version would you install (after formatting /system, for example)? The sucessfully rooted one ("3.23.40.52") or the latest and apparently currently installed one ("3.24.40.78")?
In case you can easily/readily identify issues that my prevent your previous suggestions to work, I will paste the full contents of the updater-script file of both these two lollipop versions below.
I will also paste the updater-script of the latest Kitkat version ("2.22.40.54"), if you think it's a good idea to downgrade or at least to downgrade first (and later raise it to lollipop again).
Sorry if posting all the code below is abusive (if so, please forgive me), but I don't who who else to talk to. Again, I appreciate your help a lot!
v3.23.40.52's (lollipop) updater-script
v3.23.40.52's (lollipop) updater-script:
Code:
(greater_than_int(getprop("ro.build.date.utc"), 35798400)) || abort("Only higher than Android 4.4.2 20150409 image version can upgrade to Android 5.0");
ui_print("Device image SKU:");
ui_print(getprop("ro.build.asus.sku"));
ui_print("OTA image SKU: WW");
getprop("ro.build.asus.sku") == "WW" || abort("Please use the right SKU for updating...");
ui_print("Device image Version:");
ui_print(getprop("ro.build.version.release"));
ui_print("OTA image Version: 5.0");
getprop("ro.build.version.release") == "4.4.2" || abort("Only with Android 4.4.2 that you can upgrade to Android 5.0.");
getprop("ro.product.device") == "ASUS_T00F" || abort("This package is for \"ASUS_T00F\" devices; this is a \"" + getprop("ro.product.device") + "\".");
show_progress(0.750000, 0);
format("ext4", "EMMC", "/dev/block/mmcblk0p9", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system", "max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc");
package_extract_dir("system", "/system");
symlink("/system/lib/libbluetooth_jni.so", "/system/app/Bluetooth/lib/x86/libbluetooth_jni.so");
symlink("/system/lib/libdefcontainer_jni.so", "/system/priv-app/DefaultContainerService/lib/x86/libdefcontainer_jni.so");
symlink("/system/lib/libjni_pacprocessor.so", "/system/app/PacProcessor/lib/x86/libjni_pacprocessor.so");
symlink("/system/lib/libprintspooler_jni.so", "/system/app/PrintSpooler/lib/x86/libprintspooler_jni.so");
symlink("/system/lib/libthermalJNI.so", "/system/priv-app/ituxd/lib/x86/libthermalJNI.so");
symlink("/system/lib/libttscompat.so", "/system/app/PicoTts/lib/x86/libttscompat.so");
symlink("/system/lib/libttspico.so", "/system/app/PicoTts/lib/x86/libttspico.so");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("app_process32", "/system/bin/app_process");
symlink("dalvikvm32", "/system/bin/dalvikvm");
symlink("gralloc.redhookbay.so.1.12.3197934", "/system/vendor/lib/hw/gralloc.redhookbay.so",
"/system/vendor/lib/hw/gralloc.redhookbay.so.1");
symlink("libEGL_POWERVR_SGX544_115.so.1.12.3197934", "/system/vendor/lib/egl/libEGL_POWERVR_SGX544_115.so",
"/system/vendor/lib/egl/libEGL_POWERVR_SGX544_115.so.1");
symlink("libGLESv1_CM_POWERVR_SGX544_115.so.1.12.3197934", "/system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX544_115.so",
"/system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX544_115.so.1");
symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
symlink("libGLESv2_POWERVR_SGX544_115.so.1.12.3197934", "/system/vendor/lib/egl/libGLESv2_POWERVR_SGX544_115.so",
"/system/vendor/lib/egl/libGLESv2_POWERVR_SGX544_115.so.1");
symlink("libIMGegl.so.1.12.3197934", "/system/vendor/lib/libIMGegl.so",
"/system/vendor/lib/libIMGegl.so.1");
symlink("libPVROCL.so.1.12.3197934", "/system/vendor/lib/libPVROCL.so",
"/system/vendor/lib/libPVROCL.so.1");
symlink("libPVRScopeServices.so.1.12.3197934", "/system/vendor/lib/libPVRScopeServices.so",
"/system/vendor/lib/libPVRScopeServices.so.1");
symlink("libglslcompiler.so.1.12.3197934", "/system/vendor/lib/libglslcompiler.so",
"/system/vendor/lib/libglslcompiler.so.1");
symlink("liboclcompiler.so.1.12.3197934", "/system/vendor/lib/liboclcompiler.so",
"/system/vendor/lib/liboclcompiler.so.1");
symlink("libpvr2d.so.1.12.3197934", "/system/vendor/lib/libpvr2d.so",
"/system/vendor/lib/libpvr2d.so.1");
symlink("libpvrANDROID_WSEGL.so.1.12.3197934", "/system/vendor/lib/libpvrANDROID_WSEGL.so",
"/system/vendor/lib/libpvrANDROID_WSEGL.so.1");
symlink("libsrv_init.so.1.12.3197934", "/system/vendor/lib/libsrv_init.so",
"/system/vendor/lib/libsrv_init.so.1");
symlink("libsrv_um.so.1.12.3197934", "/system/vendor/lib/libsrv_um.so",
"/system/vendor/lib/libsrv_um.so.1");
symlink("libusc.so.1.12.3197934", "/system/vendor/lib/libusc.so",
"/system/vendor/lib/libusc.so.1");
symlink("memtrack.redhookbay.so.1.12.3197934", "/system/vendor/lib/hw/memtrack.redhookbay.so",
"/system/vendor/lib/hw/memtrack.redhookbay.so.1");
symlink("toolbox", "/system/bin/cat", "/system/bin/chcon",
"/system/bin/chmod", "/system/bin/chown", "/system/bin/clear",
"/system/bin/cmp", "/system/bin/cp", "/system/bin/date",
"/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
"/system/bin/du", "/system/bin/getenforce", "/system/bin/getevent",
"/system/bin/getprop", "/system/bin/getsebool", "/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/load_policy", "/system/bin/log", "/system/bin/ls",
"/system/bin/lsmod", "/system/bin/lsof", "/system/bin/md5",
"/system/bin/mkdir", "/system/bin/mknod", "/system/bin/mkswap",
"/system/bin/mount", "/system/bin/mv", "/system/bin/nandread",
"/system/bin/netstat", "/system/bin/newfs_msdos", "/system/bin/nohup",
"/system/bin/notify", "/system/bin/printenv", "/system/bin/ps",
"/system/bin/readlink", "/system/bin/renice", "/system/bin/restorecon",
"/system/bin/rm", "/system/bin/rmdir", "/system/bin/rmmod",
"/system/bin/route", "/system/bin/runcon", "/system/bin/schedtop",
"/system/bin/sendevent", "/system/bin/setenforce",
"/system/bin/setprop", "/system/bin/setsebool", "/system/bin/sleep",
"/system/bin/smd", "/system/bin/start", "/system/bin/stop",
"/system/bin/swapoff", "/system/bin/swapon", "/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_metadata_recursive("/system", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/a600cg_akmd09911", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sensors_exec:s0");
set_metadata("/system/bin/akmd09911", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sensors_exec:s0");
set_metadata("/system/bin/app_process32", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
set_metadata("/system/bin/asuslogcat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logtoold_exec:s0");
set_metadata("/system/bin/bcu_cpufreqrel", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bcu_cpufreqrel_exec:s0");
set_metadata("/system/bin/bootanimation", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bootanim_exec:s0");
set_metadata("/system/bin/clatd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:clatd_exec:s0");
set_metadata("/system/bin/crashlogd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:crashlogd_exec:s0");
set_metadata("/system/bin/debuggerd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:debuggerd_exec:s0");
set_metadata("/system/bin/dex2oat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dex2oat_exec:s0");
set_metadata("/system/bin/dhcpcd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dhcp_exec:s0");
set_metadata("/system/bin/dnsmasq", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dnsmasq_exec:s0");
set_metadata("/system/bin/dpstmgr", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dpstmgr_exec:s0");
set_metadata("/system/bin/drmserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drmserver_exec:s0");
set_metadata("/system/bin/dumpstate", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dumpstate_exec:s0");
set_metadata("/system/bin/fdcmts", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logtoold_exec:s0");
set_metadata("/system/bin/fg_conf", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fg_conf_exec:s0");
set_metadata("/system/bin/gpsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:gpsd_exec:s0");
set_metadata("/system/bin/gpslogd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:gpsd_exec:s0");
set_metadata("/system/bin/hostapd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:hostapd_exec:s0");
set_metadata("/system/bin/install-recovery.sh", "uid", 0, "gid", 0, "mode", 0750, "capabilities", 0x0, "selabel", "u:object_r:install_recovery_exec:s0");
set_metadata("/system/bin/installd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:installd_exec:s0");
set_metadata("/system/bin/keystore", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:keystore_exec:s0");
set_metadata("/system/bin/lmkd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:lmkd_exec:s0");
set_metadata("/system/bin/logcat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logcat_exec:s0");
set_metadata("/system/bin/logcommand", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logtoold_exec:s0");
set_metadata("/system/bin/logcontrol", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logtoold_exec:s0");
set_metadata("/system/bin/logd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logd_exec:s0");
set_metadata("/system/bin/logkmsg", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logtoold_exec:s0");
set_metadata("/system/bin/mdnsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mdnsd_exec:s0");
set_metadata("/system/bin/mediaserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mediaserver_exec:s0");
set_metadata("/system/bin/mmgr", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mmgr_exec:s0");
set_metadata("/system/bin/mtpd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtp_exec:s0");
set_metadata("/system/bin/netcfg", "uid", 0, "gid", 3003, "mode", 02750, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/netd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netd_exec:s0");
set_metadata("/system/bin/nvm_server", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:nvm_server_exec:s0");
set_metadata("/system/bin/patchoat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dex2oat_exec:s0");
set_metadata("/system/bin/ping", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/pppd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ppp_exec:s0");
set_metadata("/system/bin/racoon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:racoon_exec:s0");
set_metadata("/system/bin/rild", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:rild_exec:s0");
set_metadata("/system/bin/run-as", "uid", 0, "gid", 2000, "mode", 0750, "capabilities", 0xc0, "selabel", "u:object_r:runas_exec:s0");
set_metadata("/system/bin/sdcard", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sdcardd_exec:s0");
set_metadata("/system/bin/servicemanager", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:servicemanager_exec:s0");
set_metadata("/system/bin/sh", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:shell_exec:s0");
set_metadata("/system/bin/surfaceflinger", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:surfaceflinger_exec:s0");
set_metadata("/system/bin/toolcommand", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fdctool_exec:s0");
set_metadata("/system/bin/toolconnect", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logtoold_exec:s0");
set_metadata("/system/bin/uncrypt", "uid", 0, "gid", 0, "mode", 0750, "capabilities", 0x0, "selabel", "u:object_r:uncrypt_exec:s0");
set_metadata("/system/bin/upi_ug31xx", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:gauge_exec:s0");
set_metadata("/system/bin/vdc", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vdc_exec:s0");
set_metadata("/system/bin/vold", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vold_exec:s0");
set_metadata("/system/bin/wpa_supplicant", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wpa_exec:s0");
set_metadata("/system/etc/dhcpcd/dhcpcd-run-hooks", "uid", 1014, "gid", 2000, "mode", 0550, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/etc/ppp", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0555, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/recovery-from-boot.p", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0);
set_metadata("/system/vendor", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/vendor/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:pvrsrvctl_exec:s0");
set_metadata("/system/vendor/bin", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/etc", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/firmware", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/firmware/telephony", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/vendor/lib/drm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/drm/libdrmwvmplugin.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/egl", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/hw", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/mediadrm", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/media", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/xbin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
show_progress(0.050000, 5);
write_osip_image(package_extract_file("boot.img"), "/dev/block/by-name/boot");
show_progress(0.200000, 10);
write_osip_image(package_extract_file("droidboot.img"), "/dev/block/by-name/fastboot");
package_extract_file("ifwi.zip", "/tmp/ifwi.zip");
flash_ifwi("/tmp/ifwi.zip");
restore_os("boot");
unmount("/system");
v3.24.40.78's (lollipop) updater-script
v3.24.40.78's (lollipop) updater-script:
Code:
(greater_than_int(getprop("ro.build.date.utc"), 39545800)) && (less_than_int(getprop("ro.build.date.utc"), 50933800)) || abort("Only Android 4.4.2/Android 5.0 20150522~20151001 image version could upgrade with this package");
ui_print("Device image SKU:");
ui_print(getprop("ro.build.asus.sku"));
ui_print("OTA image SKU: WW");
getprop("ro.build.asus.sku") == "WW" || abort("Please use the right SKU for updating...");
ui_print("Device image Version:");
ui_print(getprop("ro.build.version.release"));
ui_print("OTA image Android Version: 5.0");
getprop("ro.build.version.release") == "4.4.2" || "5.0"|| abort("Only with Android 4.4.2 or Android 5.0 that you can upgrade to Android 5.0.");
getprop("ro.product.device") == "ASUS_T00F" || abort("This package is for \"ASUS_T00F\" devices; this is a \"" + getprop("ro.product.device") + "\".");
getprop("ro.build.version.release") == "5.0"|| set_stage("/dev/block/mmcblk0p4", "3/3");
if get_stage("/dev/block/mmcblk0p4") == "2/3" then
write_osip_image(package_extract_file("recovery.img"), "/dev/block/by-name/recovery");
set_stage("/dev/block/mmcblk0p4", "3/3");
reboot_now("/dev/block/mmcblk0p4", "recovery");
else if get_stage("/dev/block/mmcblk0p4") == "3/3" then
show_progress(0.750000, 0);
format("ext4", "EMMC", "/dev/block/mmcblk0p9", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system", "max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc");
package_extract_dir("system", "/system");
symlink("/system/lib/libbluetooth_jni.so", "/system/app/Bluetooth/lib/x86/libbluetooth_jni.so");
symlink("/system/lib/libdefcontainer_jni.so", "/system/priv-app/DefaultContainerService/lib/x86/libdefcontainer_jni.so");
symlink("/system/lib/libjni_pacprocessor.so", "/system/app/PacProcessor/lib/x86/libjni_pacprocessor.so");
symlink("/system/lib/libprintspooler_jni.so", "/system/app/PrintSpooler/lib/x86/libprintspooler_jni.so");
symlink("/system/lib/libthermalJNI.so", "/system/priv-app/ituxd/lib/x86/libthermalJNI.so");
symlink("/system/lib/libttscompat.so", "/system/app/PicoTts/lib/x86/libttscompat.so");
symlink("/system/lib/libttspico.so", "/system/app/PicoTts/lib/x86/libttspico.so");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("app_process32", "/system/bin/app_process");
symlink("dalvikvm32", "/system/bin/dalvikvm");
symlink("gralloc.redhookbay.so.1.12.3197934", "/system/vendor/lib/hw/gralloc.redhookbay.so",
"/system/vendor/lib/hw/gralloc.redhookbay.so.1");
symlink("libEGL_POWERVR_SGX544_115.so.1.12.3197934", "/system/vendor/lib/egl/libEGL_POWERVR_SGX544_115.so",
"/system/vendor/lib/egl/libEGL_POWERVR_SGX544_115.so.1");
symlink("libGLESv1_CM_POWERVR_SGX544_115.so.1.12.3197934", "/system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX544_115.so",
"/system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX544_115.so.1");
symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
symlink("libGLESv2_POWERVR_SGX544_115.so.1.12.3197934", "/system/vendor/lib/egl/libGLESv2_POWERVR_SGX544_115.so",
"/system/vendor/lib/egl/libGLESv2_POWERVR_SGX544_115.so.1");
symlink("libIMGegl.so.1.12.3197934", "/system/vendor/lib/libIMGegl.so",
"/system/vendor/lib/libIMGegl.so.1");
symlink("libPVROCL.so.1.12.3197934", "/system/vendor/lib/libPVROCL.so",
"/system/vendor/lib/libPVROCL.so.1");
symlink("libPVRScopeServices.so.1.12.3197934", "/system/vendor/lib/libPVRScopeServices.so",
"/system/vendor/lib/libPVRScopeServices.so.1");
symlink("libglslcompiler.so.1.12.3197934", "/system/vendor/lib/libglslcompiler.so",
"/system/vendor/lib/libglslcompiler.so.1");
symlink("liboclcompiler.so.1.12.3197934", "/system/vendor/lib/liboclcompiler.so",
"/system/vendor/lib/liboclcompiler.so.1");
symlink("libpvr2d.so.1.12.3197934", "/system/vendor/lib/libpvr2d.so",
"/system/vendor/lib/libpvr2d.so.1");
symlink("libpvrANDROID_WSEGL.so.1.12.3197934", "/system/vendor/lib/libpvrANDROID_WSEGL.so",
"/system/vendor/lib/libpvrANDROID_WSEGL.so.1");
symlink("libsrv_init.so.1.12.3197934", "/system/vendor/lib/libsrv_init.so",
"/system/vendor/lib/libsrv_init.so.1");
symlink("libsrv_um.so.1.12.3197934", "/system/vendor/lib/libsrv_um.so",
"/system/vendor/lib/libsrv_um.so.1");
symlink("libusc.so.1.12.3197934", "/system/vendor/lib/libusc.so",
"/system/vendor/lib/libusc.so.1");
symlink("memtrack.redhookbay.so.1.12.3197934", "/system/vendor/lib/hw/memtrack.redhookbay.so",
"/system/vendor/lib/hw/memtrack.redhookbay.so.1");
symlink("toolbox", "/system/bin/cat", "/system/bin/chcon",
"/system/bin/chmod", "/system/bin/chown", "/system/bin/clear",
"/system/bin/cmp", "/system/bin/cp", "/system/bin/date",
"/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
"/system/bin/du", "/system/bin/getenforce", "/system/bin/getevent",
"/system/bin/getprop", "/system/bin/getsebool", "/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/load_policy", "/system/bin/log", "/system/bin/ls",
"/system/bin/lsmod", "/system/bin/lsof", "/system/bin/md5",
"/system/bin/mkdir", "/system/bin/mknod", "/system/bin/mkswap",
"/system/bin/mount", "/system/bin/mv", "/system/bin/nandread",
"/system/bin/netstat", "/system/bin/newfs_msdos", "/system/bin/nohup",
"/system/bin/notify", "/system/bin/printenv", "/system/bin/ps",
"/system/bin/readlink", "/system/bin/renice", "/system/bin/restorecon",
"/system/bin/rm", "/system/bin/rmdir", "/system/bin/rmmod",
"/system/bin/route", "/system/bin/runcon", "/system/bin/schedtop",
"/system/bin/sendevent", "/system/bin/setenforce",
"/system/bin/setprop", "/system/bin/setsebool", "/system/bin/sleep",
"/system/bin/smd", "/system/bin/start", "/system/bin/stop",
"/system/bin/swapoff", "/system/bin/swapon", "/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_metadata_recursive("/system", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/a600cg_akmd09911", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sensors_exec:s0");
set_metadata("/system/bin/akmd09911", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sensors_exec:s0");
set_metadata("/system/bin/app_process32", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
set_metadata("/system/bin/asuslogcat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dumpstate_exec:s0");
set_metadata("/system/bin/bcu_cpufreqrel", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bcu_cpufreqrel_exec:s0");
set_metadata("/system/bin/bootanimation", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bootanim_exec:s0");
set_metadata("/system/bin/clatd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:clatd_exec:s0");
set_metadata("/system/bin/crashlogd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:crashlogd_exec:s0");
set_metadata("/system/bin/debuggerd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:debuggerd_exec:s0");
set_metadata("/system/bin/dex2oat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dex2oat_exec:s0");
set_metadata("/system/bin/dhcpcd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dhcp_exec:s0");
set_metadata("/system/bin/dnsmasq", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dnsmasq_exec:s0");
set_metadata("/system/bin/dpstmgr", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dpstmgr_exec:s0");
set_metadata("/system/bin/drmserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drmserver_exec:s0");
set_metadata("/system/bin/dumpstate", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dumpstate_exec:s0");
set_metadata("/system/bin/fdcmts", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logtoold_exec:s0");
set_metadata("/system/bin/fg_conf", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fg_conf_exec:s0");
set_metadata("/system/bin/gpsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:gpsd_exec:s0");
set_metadata("/system/bin/gpslogd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:gpsd_exec:s0");
set_metadata("/system/bin/hostapd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:hostapd_exec:s0");
set_metadata("/system/bin/install-recovery.sh", "uid", 0, "gid", 0, "mode", 0750, "capabilities", 0x0, "selabel", "u:object_r:install_recovery_exec:s0");
set_metadata("/system/bin/installd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:installd_exec:s0");
set_metadata("/system/bin/keystore", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:keystore_exec:s0");
set_metadata("/system/bin/lmkd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:lmkd_exec:s0");
set_metadata("/system/bin/logcat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logcat_exec:s0");
set_metadata("/system/bin/logcommand", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logtoold_exec:s0");
set_metadata("/system/bin/logcontrol", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dumpstate_exec:s0");
set_metadata("/system/bin/logd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logd_exec:s0");
set_metadata("/system/bin/logkmsg", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dumpstate_exec:s0");
set_metadata("/system/bin/mdnsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mdnsd_exec:s0");
set_metadata("/system/bin/mediaserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mediaserver_exec:s0");
set_metadata("/system/bin/mmgr", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mmgr_exec:s0");
set_metadata("/system/bin/mtpd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtp_exec:s0");
set_metadata("/system/bin/netcfg", "uid", 0, "gid", 3003, "mode", 02750, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/netd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netd_exec:s0");
set_metadata("/system/bin/nvm_server", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:nvm_server_exec:s0");
set_metadata("/system/bin/patchoat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dex2oat_exec:s0");
set_metadata("/system/bin/ping", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/pppd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ppp_exec:s0");
set_metadata("/system/bin/racoon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:racoon_exec:s0");
set_metadata("/system/bin/rild", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:rild_exec:s0");
set_metadata("/system/bin/run-as", "uid", 0, "gid", 2000, "mode", 0750, "capabilities", 0xc0, "selabel", "u:object_r:runas_exec:s0");
set_metadata("/system/bin/sdcard", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sdcardd_exec:s0");
set_metadata("/system/bin/servicemanager", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:servicemanager_exec:s0");
set_metadata("/system/bin/sh", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:shell_exec:s0");
set_metadata("/system/bin/surfaceflinger", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:surfaceflinger_exec:s0");
set_metadata("/system/bin/toolcommand", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fdctool_exec:s0");
set_metadata("/system/bin/toolconnect", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logtoold_exec:s0");
set_metadata("/system/bin/uncrypt", "uid", 0, "gid", 0, "mode", 0750, "capabilities", 0x0, "selabel", "u:object_r:uncrypt_exec:s0");
set_metadata("/system/bin/upi_ug31xx", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:gauge_exec:s0");
set_metadata("/system/bin/vdc", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vdc_exec:s0");
set_metadata("/system/bin/vold", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vold_exec:s0");
set_metadata("/system/bin/wpa_supplicant", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wpa_exec:s0");
set_metadata("/system/etc/dhcpcd/dhcpcd-run-hooks", "uid", 1014, "gid", 2000, "mode", 0550, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/etc/ppp", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0555, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/recovery-from-boot.p", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0);
set_metadata("/system/vendor", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/vendor/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:pvrsrvctl_exec:s0");
set_metadata("/system/vendor/bin", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/etc", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/firmware", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/firmware/telephony", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/vendor/lib/drm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/drm/libdrmwvmplugin.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/egl", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/hw", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/mediadrm", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/media", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/xbin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
show_progress(0.050000, 5);
write_osip_image(package_extract_file("boot.img"), "/dev/block/by-name/boot");
show_progress(0.200000, 10);
write_osip_image(package_extract_file("droidboot.img"), "/dev/block/by-name/fastboot");
package_extract_file("ifwi.zip", "/tmp/ifwi.zip");
flash_ifwi("/tmp/ifwi.zip");
restore_os("boot");
unmount("/system");
set_stage("/dev/block/mmcblk0p4", "");
else
write_osip_image(package_extract_file("recovery.img"), "/dev/block/by-name/boot");
set_stage("/dev/block/mmcblk0p4", "2/3");
reboot_now("/dev/block/mmcblk0p4", "");
endif;
endif;
v2.22.40.54's (kitkat) updater-script
v2.22.40.54's (kitkat) updater-script:
Code:
assert(!less_than_int(39991534, getprop("ro.build.date.utc")) || greater_than_int(getprop("ro.build.date.utc"), 1392739200));
ui_print("Device image SKU:");
ui_print(getprop("ro.build.asus.sku"));
ui_print("OTA image SKU: WW");
assert(getprop("ro.build.asus.sku") == "WW");
ui_print("Please upgrade to newest 4.3 image first...");
assert(getprop("ro.build.version.release") == "4.4.2");
assert(getprop("ro.product.device") == "ASUS_T00F" ||
getprop("ro.build.product") == "ASUS_T00F");
show_progress(0.500000, 0);
invalidate_os("boot");
ui_print("Erasing old dictionary...");
mount("ext4", "EMMC", "/dev/block/platform/intel/by-label/data", "/data");
delete("/data/data/com.android.providers.userdictionary/databases/user_dict.db");
delete("/data/fota_tmp");
format("ext4", "EMMC", "/dev/block/platform/intel/by-label/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/intel/by-label/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("gralloc.redhookbay.so.1.12.2701748", "/system/vendor/lib/hw/gralloc.redhookbay.so",
"/system/vendor/lib/hw/gralloc.redhookbay.so.1");
symlink("libEGL_POWERVR_SGX544_115.so.1.12.2701748", "/system/vendor/lib/egl/libEGL_POWERVR_SGX544_115.so",
"/system/vendor/lib/egl/libEGL_POWERVR_SGX544_115.so.1");
symlink("libGLESv1_CM_POWERVR_SGX544_115.so.1.12.2701748", "/system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX544_115.so",
"/system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX544_115.so.1");
symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
symlink("libGLESv2_POWERVR_SGX544_115.so.1.12.2701748", "/system/vendor/lib/egl/libGLESv2_POWERVR_SGX544_115.so",
"/system/vendor/lib/egl/libGLESv2_POWERVR_SGX544_115.so.1");
symlink("libIMGegl.so.1.12.2701748", "/system/vendor/lib/libIMGegl.so",
"/system/vendor/lib/libIMGegl.so.1");
symlink("libPVROCL.so.1.12.2701748", "/system/vendor/lib/libPVROCL.so",
"/system/vendor/lib/libPVROCL.so.1");
symlink("libPVRRS.so.1.12.2701748", "/system/vendor/lib/libPVRRS.so",
"/system/vendor/lib/libPVRRS.so.1");
symlink("libPVRScopeServices.so.1.12.2701748", "/system/vendor/lib/libPVRScopeServices.so",
"/system/vendor/lib/libPVRScopeServices.so.1");
symlink("libglslcompiler.so.1.12.2701748", "/system/vendor/lib/libglslcompiler.so",
"/system/vendor/lib/libglslcompiler.so.1");
symlink("libhoudini.so.4.0.8.45720", "/system/lib/libhoudini.so");
symlink("liboclcompiler.so.1.12.2701748", "/system/vendor/lib/liboclcompiler.so",
"/system/vendor/lib/liboclcompiler.so.1");
symlink("libpvr2d.so.1.12.2701748", "/system/vendor/lib/libpvr2d.so",
"/system/vendor/lib/libpvr2d.so.1");
symlink("libpvrANDROID_WSEGL.so.1.12.2701748", "/system/vendor/lib/libpvrANDROID_WSEGL.so",
"/system/vendor/lib/libpvrANDROID_WSEGL.so.1");
symlink("librsccompiler.so.1.12.2701748", "/system/vendor/lib/librsccompiler.so",
"/system/vendor/lib/librsccompiler.so.1");
symlink("librsccore.bc.1.12.2701748", "/system/vendor/lib/librsccore.bc",
"/system/vendor/lib/librsccore.bc.1");
symlink("libsrv_init.so.1.12.2701748", "/system/vendor/lib/libsrv_init.so",
"/system/vendor/lib/libsrv_init.so.1");
symlink("libsrv_um.so.1.12.2701748", "/system/vendor/lib/libsrv_um.so",
"/system/vendor/lib/libsrv_um.so.1");
symlink("libusc.so.1.12.2701748", "/system/vendor/lib/libusc.so",
"/system/vendor/lib/libusc.so.1");
symlink("memtrack.redhookbay.so.1.12.2701748", "/system/vendor/lib/hw/memtrack.redhookbay.so",
"/system/vendor/lib/hw/memtrack.redhookbay.so.1");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/cat", "/system/bin/chcon",
"/system/bin/chmod", "/system/bin/chown", "/system/bin/clear",
"/system/bin/cmp", "/system/bin/cp", "/system/bin/date",
"/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
"/system/bin/du", "/system/bin/getenforce", "/system/bin/getevent",
"/system/bin/getprop", "/system/bin/getsebool", "/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/load_policy", "/system/bin/log", "/system/bin/ls",
"/system/bin/lsmod", "/system/bin/lsof", "/system/bin/md5",
"/system/bin/mkdir", "/system/bin/mkswap", "/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/readlink", "/system/bin/renice",
"/system/bin/restorecon", "/system/bin/rm", "/system/bin/rmdir",
"/system/bin/rmmod", "/system/bin/route", "/system/bin/runcon",
"/system/bin/schedtop", "/system/bin/sendevent",
"/system/bin/setconsole", "/system/bin/setenforce",
"/system/bin/setprop", "/system/bin/setsebool", "/system/bin/sleep",
"/system/bin/smd", "/system/bin/start", "/system/bin/stop",
"/system/bin/swapoff", "/system/bin/swapon", "/system/bin/sync",
"/system/bin/top", "/system/bin/touch", "/system/bin/umount",
"/system/bin/uptime", "/system/bin/vmstat", "/system/bin/watchprops",
"/system/bin/wipe");
show_progress(0.080000, 0);
package_extract_file("splash.bin", "/tmp/splash.bin");
ui_print("Updating Splash image...");
flash_splash("/tmp/splash.bin");
show_progress(0.080000, 0);
package_extract_file("boot.img", "/tmp/boot.img");
flash_osip("/tmp/boot.img", "boot");
delete("/tmp/boot.img");
show_progress(0.080000, 0);
package_extract_file("recovery.img", "/tmp/recovery.img");
flash_osip("/tmp/recovery.img", "recovery");
delete("/tmp/recovery.img");
show_progress(0.080000, 0);
package_extract_file("fastboot.img", "/tmp/fastboot.img");
flash_osip("/tmp/fastboot.img", "fastboot");
delete("/tmp/fastboot.img");
show_progress(0.080000, 0);
package_extract_file("ifwi.zip", "/tmp/ifwi.zip");
ui_print("Updating IFWI image...");
flash_ifwi("/tmp/ifwi.zip");
set_metadata_recursive("/system", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/app_process", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
set_metadata("/system/bin/clatd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:clatd_exec:s0");
set_metadata("/system/bin/dbus-daemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dbusd_exec:s0");
set_metadata("/system/bin/debuggerd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:debuggerd_exec:s0");
set_metadata("/system/bin/dhcpcd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dhcp_exec:s0");
set_metadata("/system/bin/dnsmasq", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dnsmasq_exec:s0");
set_metadata("/system/bin/drmserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drmserver_exec:s0");
set_metadata("/system/bin/hostapd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:hostapd_exec:s0");
set_metadata("/system/bin/installd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:installd_exec:s0");
set_metadata("/system/bin/keystore", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:keystore_exec:s0");
set_metadata("/system/bin/mediaserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mediaserver_exec:s0");
set_metadata("/system/bin/mksh", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:shell_exec:s0");
set_metadata("/system/bin/mtpd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtp_exec:s0");
set_metadata("/system/bin/netcfg", "uid", 0, "gid", 3003, "mode", 02750, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/netd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netd_exec:s0");
set_metadata("/system/bin/ping", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ping_exec:s0");
set_metadata("/system/bin/pppd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ppp_exec:s0");
set_metadata("/system/bin/racoon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:racoon_exec:s0");
set_metadata("/system/bin/rild", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:rild_exec:s0");
set_metadata("/system/bin/run-as", "uid", 0, "gid", 2000, "mode", 0750, "capabilities", 0xc0, "selabel", "u:object_r:runas_exec:s0");
set_metadata("/system/bin/sdcard", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sdcardd_exec:s0");
set_metadata("/system/bin/servicemanager", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:servicemanager_exec:s0");
set_metadata("/system/bin/surfaceflinger", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:surfaceflinger_exec:s0");
set_metadata("/system/bin/vold", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vold_exec:s0");
set_metadata("/system/bin/wpa_supplicant", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wpa_exec:s0");
set_metadata_recursive("/system/etc/dhcpcd", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:dhcp_system_file:s0");
set_metadata("/system/etc/dhcpcd/dhcpcd-run-hooks", "uid", 1014, "gid", 2000, "mode", 0550, "capabilities", 0x0, "selabel", "u:object_r:dhcp_system_file:s0");
set_metadata_recursive("/system/etc/ppp", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0555, "capabilities", 0x0, "selabel", "u:object_r:ppp_system_file:s0");
set_metadata("/system/vendor", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/vendor/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/etc", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/vendor/lib/drm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/drm/libdrmwvmplugin.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/egl", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/hw", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/vendor/lib/mediadrm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/mediadrm/libwvdrmengine.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/media", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/xbin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
show_progress(0.100000, 0);
mount("ext4", "EMMC", "/dev/block/platform/intel/by-label/config", "/config");
ui_print("(SKIP) Updating 3G Modem firmware image...");
ui_print("(SKIP) Updating 3G Modem nvm...");
unmount("/config");
unmount("/data");
unmount("/system");
restore_os("boot");
To remove the SKU check: remove this line
Code:
getprop("ro.build.asus.sku") == "WW" || abort("Please use the right SKU for updating...");
alainsr said:
v3.23.40.52's (lollipop) updater-script:
Code:
(greater_than_int(getprop("ro.build.date.utc"), 35798400)) || abort("Only higher than Android 4.4.2 20150409 image version can upgrade to Android 5.0");
ui_print("Device image SKU:");
ui_print(getprop("ro.build.asus.sku"));
ui_print("OTA image SKU: WW");
getprop("ro.build.asus.sku") == "WW" || abort("Please use the right SKU for updating...");
ui_print("Device image Version:");
ui_print(getprop("ro.build.version.release"));
ui_print("OTA image Version: 5.0");
getprop("ro.build.version.release") == "4.4.2" || abort("Only with Android 4.4.2 that you can upgrade to Android 5.0.");
getprop("ro.product.device") == "ASUS_T00F" || abort("This package is for \"ASUS_T00F\" devices; this is a \"" + getprop("ro.product.device") + "\".");
show_progress(0.750000, 0);
format("ext4", "EMMC", "/dev/block/mmcblk0p9", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system", "max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc");
package_extract_dir("system", "/system");
symlink("/system/lib/libbluetooth_jni.so", "/system/app/Bluetooth/lib/x86/libbluetooth_jni.so");
symlink("/system/lib/libdefcontainer_jni.so", "/system/priv-app/DefaultContainerService/lib/x86/libdefcontainer_jni.so");
symlink("/system/lib/libjni_pacprocessor.so", "/system/app/PacProcessor/lib/x86/libjni_pacprocessor.so");
symlink("/system/lib/libprintspooler_jni.so", "/system/app/PrintSpooler/lib/x86/libprintspooler_jni.so");
symlink("/system/lib/libthermalJNI.so", "/system/priv-app/ituxd/lib/x86/libthermalJNI.so");
symlink("/system/lib/libttscompat.so", "/system/app/PicoTts/lib/x86/libttscompat.so");
symlink("/system/lib/libttspico.so", "/system/app/PicoTts/lib/x86/libttspico.so");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("app_process32", "/system/bin/app_process");
symlink("dalvikvm32", "/system/bin/dalvikvm");
symlink("gralloc.redhookbay.so.1.12.3197934", "/system/vendor/lib/hw/gralloc.redhookbay.so",
"/system/vendor/lib/hw/gralloc.redhookbay.so.1");
symlink("libEGL_POWERVR_SGX544_115.so.1.12.3197934", "/system/vendor/lib/egl/libEGL_POWERVR_SGX544_115.so",
"/system/vendor/lib/egl/libEGL_POWERVR_SGX544_115.so.1");
symlink("libGLESv1_CM_POWERVR_SGX544_115.so.1.12.3197934", "/system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX544_115.so",
"/system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX544_115.so.1");
symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
symlink("libGLESv2_POWERVR_SGX544_115.so.1.12.3197934", "/system/vendor/lib/egl/libGLESv2_POWERVR_SGX544_115.so",
"/system/vendor/lib/egl/libGLESv2_POWERVR_SGX544_115.so.1");
symlink("libIMGegl.so.1.12.3197934", "/system/vendor/lib/libIMGegl.so",
"/system/vendor/lib/libIMGegl.so.1");
symlink("libPVROCL.so.1.12.3197934", "/system/vendor/lib/libPVROCL.so",
"/system/vendor/lib/libPVROCL.so.1");
symlink("libPVRScopeServices.so.1.12.3197934", "/system/vendor/lib/libPVRScopeServices.so",
"/system/vendor/lib/libPVRScopeServices.so.1");
symlink("libglslcompiler.so.1.12.3197934", "/system/vendor/lib/libglslcompiler.so",
"/system/vendor/lib/libglslcompiler.so.1");
symlink("liboclcompiler.so.1.12.3197934", "/system/vendor/lib/liboclcompiler.so",
"/system/vendor/lib/liboclcompiler.so.1");
symlink("libpvr2d.so.1.12.3197934", "/system/vendor/lib/libpvr2d.so",
"/system/vendor/lib/libpvr2d.so.1");
symlink("libpvrANDROID_WSEGL.so.1.12.3197934", "/system/vendor/lib/libpvrANDROID_WSEGL.so",
"/system/vendor/lib/libpvrANDROID_WSEGL.so.1");
symlink("libsrv_init.so.1.12.3197934", "/system/vendor/lib/libsrv_init.so",
"/system/vendor/lib/libsrv_init.so.1");
symlink("libsrv_um.so.1.12.3197934", "/system/vendor/lib/libsrv_um.so",
"/system/vendor/lib/libsrv_um.so.1");
symlink("libusc.so.1.12.3197934", "/system/vendor/lib/libusc.so",
"/system/vendor/lib/libusc.so.1");
symlink("memtrack.redhookbay.so.1.12.3197934", "/system/vendor/lib/hw/memtrack.redhookbay.so",
"/system/vendor/lib/hw/memtrack.redhookbay.so.1");
symlink("toolbox", "/system/bin/cat", "/system/bin/chcon",
"/system/bin/chmod", "/system/bin/chown", "/system/bin/clear",
"/system/bin/cmp", "/system/bin/cp", "/system/bin/date",
"/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
"/system/bin/du", "/system/bin/getenforce", "/system/bin/getevent",
"/system/bin/getprop", "/system/bin/getsebool", "/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/load_policy", "/system/bin/log", "/system/bin/ls",
"/system/bin/lsmod", "/system/bin/lsof", "/system/bin/md5",
"/system/bin/mkdir", "/system/bin/mknod", "/system/bin/mkswap",
"/system/bin/mount", "/system/bin/mv", "/system/bin/nandread",
"/system/bin/netstat", "/system/bin/newfs_msdos", "/system/bin/nohup",
"/system/bin/notify", "/system/bin/printenv", "/system/bin/ps",
"/system/bin/readlink", "/system/bin/renice", "/system/bin/restorecon",
"/system/bin/rm", "/system/bin/rmdir", "/system/bin/rmmod",
"/system/bin/route", "/system/bin/runcon", "/system/bin/schedtop",
"/system/bin/sendevent", "/system/bin/setenforce",
"/system/bin/setprop", "/system/bin/setsebool", "/system/bin/sleep",
"/system/bin/smd", "/system/bin/start", "/system/bin/stop",
"/system/bin/swapoff", "/system/bin/swapon", "/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_metadata_recursive("/system", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/a600cg_akmd09911", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sensors_exec:s0");
set_metadata("/system/bin/akmd09911", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sensors_exec:s0");
set_metadata("/system/bin/app_process32", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
set_metadata("/system/bin/asuslogcat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logtoold_exec:s0");
set_metadata("/system/bin/bcu_cpufreqrel", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bcu_cpufreqrel_exec:s0");
set_metadata("/system/bin/bootanimation", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bootanim_exec:s0");
set_metadata("/system/bin/clatd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:clatd_exec:s0");
set_metadata("/system/bin/crashlogd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:crashlogd_exec:s0");
set_metadata("/system/bin/debuggerd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:debuggerd_exec:s0");
set_metadata("/system/bin/dex2oat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dex2oat_exec:s0");
set_metadata("/system/bin/dhcpcd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dhcp_exec:s0");
set_metadata("/system/bin/dnsmasq", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dnsmasq_exec:s0");
set_metadata("/system/bin/dpstmgr", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dpstmgr_exec:s0");
set_metadata("/system/bin/drmserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drmserver_exec:s0");
set_metadata("/system/bin/dumpstate", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dumpstate_exec:s0");
set_metadata("/system/bin/fdcmts", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logtoold_exec:s0");
set_metadata("/system/bin/fg_conf", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fg_conf_exec:s0");
set_metadata("/system/bin/gpsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:gpsd_exec:s0");
set_metadata("/system/bin/gpslogd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:gpsd_exec:s0");
set_metadata("/system/bin/hostapd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:hostapd_exec:s0");
set_metadata("/system/bin/install-recovery.sh", "uid", 0, "gid", 0, "mode", 0750, "capabilities", 0x0, "selabel", "u:object_r:install_recovery_exec:s0");
set_metadata("/system/bin/installd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:installd_exec:s0");
set_metadata("/system/bin/keystore", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:keystore_exec:s0");
set_metadata("/system/bin/lmkd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:lmkd_exec:s0");
set_metadata("/system/bin/logcat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logcat_exec:s0");
set_metadata("/system/bin/logcommand", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logtoold_exec:s0");
set_metadata("/system/bin/logcontrol", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logtoold_exec:s0");
set_metadata("/system/bin/logd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logd_exec:s0");
set_metadata("/system/bin/logkmsg", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logtoold_exec:s0");
set_metadata("/system/bin/mdnsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mdnsd_exec:s0");
set_metadata("/system/bin/mediaserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mediaserver_exec:s0");
set_metadata("/system/bin/mmgr", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mmgr_exec:s0");
set_metadata("/system/bin/mtpd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtp_exec:s0");
set_metadata("/system/bin/netcfg", "uid", 0, "gid", 3003, "mode", 02750, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/netd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netd_exec:s0");
set_metadata("/system/bin/nvm_server", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:nvm_server_exec:s0");
set_metadata("/system/bin/patchoat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dex2oat_exec:s0");
set_metadata("/system/bin/ping", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/pppd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ppp_exec:s0");
set_metadata("/system/bin/racoon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:racoon_exec:s0");
set_metadata("/system/bin/rild", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:rild_exec:s0");
set_metadata("/system/bin/run-as", "uid", 0, "gid", 2000, "mode", 0750, "capabilities", 0xc0, "selabel", "u:object_r:runas_exec:s0");
set_metadata("/system/bin/sdcard", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sdcardd_exec:s0");
set_metadata("/system/bin/servicemanager", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:servicemanager_exec:s0");
set_metadata("/system/bin/sh", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:shell_exec:s0");
set_metadata("/system/bin/surfaceflinger", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:surfaceflinger_exec:s0");
set_metadata("/system/bin/toolcommand", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fdctool_exec:s0");
set_metadata("/system/bin/toolconnect", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logtoold_exec:s0");
set_metadata("/system/bin/uncrypt", "uid", 0, "gid", 0, "mode", 0750, "capabilities", 0x0, "selabel", "u:object_r:uncrypt_exec:s0");
set_metadata("/system/bin/upi_ug31xx", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:gauge_exec:s0");
set_metadata("/system/bin/vdc", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vdc_exec:s0");
set_metadata("/system/bin/vold", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vold_exec:s0");
set_metadata("/system/bin/wpa_supplicant", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wpa_exec:s0");
set_metadata("/system/etc/dhcpcd/dhcpcd-run-hooks", "uid", 1014, "gid", 2000, "mode", 0550, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/etc/ppp", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0555, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/recovery-from-boot.p", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0);
set_metadata("/system/vendor", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/vendor/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:pvrsrvctl_exec:s0");
set_metadata("/system/vendor/bin", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/etc", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/firmware", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/firmware/telephony", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/vendor/lib/drm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/drm/libdrmwvmplugin.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/egl", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/hw", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/mediadrm", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/media", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/xbin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
show_progress(0.050000, 5);
write_osip_image(package_extract_file("boot.img"), "/dev/block/by-name/boot");
show_progress(0.200000, 10);
write_osip_image(package_extract_file("droidboot.img"), "/dev/block/by-name/fastboot");
package_extract_file("ifwi.zip", "/tmp/ifwi.zip");
flash_ifwi("/tmp/ifwi.zip");
restore_os("boot");
unmount("/system");
Click to expand...
Click to collapse
With all luck, you should be booting again on the correct SKU. I would be sure to format the /system partition. If you'd like to play around with that some more. It looks like all of the getprop() statements are for checking device hardware in this script.
Make sure to remove META-INF/manifest.* files or resign the ZIP.
ShadowEO said:
To remove the SKU check: remove this line
Code:
getprop("ro.build.asus.sku") == "WW" || abort("Please use the right SKU for updating...");
With all luck, you should be booting again on the correct SKU. I would be sure to format the /system partition. If you'd like to play around with that some more. It looks like all of the getprop() statements are for checking device hardware in this script.
Make sure to remove META-INF/manifest.* files or resign the ZIP.
Click to expand...
Click to collapse
@ShadowEO, I think this could work, in fact I'm confident it will. But I realized that my previous attempt messed with the bootloader and recovery. My computer still recognizes my device, but I can't boot to bootloader nor recovery! Is there any way I can try to flash TWRP again without fastboot access? I have access to adb when I plug the device in and get it charging, but I don't think I can execute elevated commands (su). This is worse than I ever tought...
alainsr said:
@ShadowEO, I think this could work, in fact I'm confident it will. But I realized that my previous attempt messed with the bootloader and recovery. My computer still recognizes my device, but I can't boot to bootloader nor recovery! Is there any way I can try to flash TWRP again without fastboot access? I have access to adb when I plug the device in and get it charging, but I don't think I can execute elevated commands (su). This is worse than I ever tought...
Click to expand...
Click to collapse
Uhh... Well.. you could try a download mode, but at that point you may be screwed. You may need to see if you can get a replacement. Fastboot is the only thing I could think of bit you say you can't get bootloader access. At this point, I'd say it is no longer a softbrick.

[Developer Discussion] flashing vendor.img in cooked rom

Ok, so as there is no developer discussion thread in this forum, I thought I'd start a thread here.
Now with the Nexus 6P Google have changed things a bit from the Nexus 6. The vendor folder has been moved from /system/vendor to /vendor This poses a few issues with DEV's who are trying to build ROM's, On the Nexus 6 it was easy to include with the rom, you just simply added the symlink's and set_metadata tags in your updater-script.
Now that we have the vendor folder moved out of system and put into its own root partition, we have to do things a bit differently. The current method of thinking is to get users to flash the vendor.img separately using fastboot. This is not overly ideal as users do not always have access to a PC to flash the image using fastboot.
There are two ways I can see to include the vendor.img in a cooked ROM.
Solution #1 Extract the vendor image the same way as you do with the system.img and use package_extract_dir("vendor", "/vendor"); This does work, I have tested this. The problem is there are issues IE camera crashes etc. If you flash the vendor.img using fastboot, without making any other changes the camera works.
So I thought that dedicated symlink's and set_metadata tags would need to be added to the updater-script to set the permissions. Problem is, currently I do not know how to do this.
Solution #2 include the vendor.img in the ROM and use the updater-script to extract it during boot, theory is you do not need to then worry about creating the symlink's and set_metadata tags. So far I can not get the ROM to boot when I try this. So far I have tried:
format("ext4", "EMMC", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor", "0", "/vendor");
mount("ext4", "EMMC", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor", "/vendor");
package_extract_file("vendor.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor");
I have also tried:
format("ext4", "EMMC", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor", "0", "/vendor");
mount("ext4", "EMMC", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor", "/vendor");
package_extract_file("vendor.img", "/dev/block/mmcblk0p37");
Neither of these two scripts work. Results in the phone stuck at Google screen, if I go into TWRP, I can't even mount the vendor partition. I have to flash the vendor.img via fastboot to fix it.
Pining some of the devs on the forum to see if we can try and get this issue resolved: @mrjaydee82 @zephiK @fhem @BeansTown106 @vomer
Reserved
On aosp roms we can just create a vendor. IMG and have it flash with the rom but it's cumbersome making a second proprietary vendor.. I have been debating taking the task and just doing it.
An easier way I think would be like you are saying just make a flashable of the vendor. IMG do we have access to any ota update.zips? I'm curious if they ship with a full vendor or are just patching the vendor
Sent from my Nexus 6P using Tapatalk
I haven't seen any ota's yet. I could downgrade my phone and see if I can get the ota. If anybody has it, would you mind positing a link here.? I would assume it would have to be included. The vendor folder has to match the ROM version, or you get system is corrupted message.
@BeansTown106 Hey got an updater-script from an OTA and found the following:
ui_print("Patching vendor image after verification.");
show_progress(0.100000, 0);
block_image_update("/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor", package_extract_file("vendor.transfer.list"), "vendor.new.dat", "vendor.patch.dat");
As you can see they are using block_image_update("/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor" so in theory package_extract_file("vendor.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor"); should be working. I dont understand why it isnt!
Ok so I have gone down the route of using package_extract_dir("vendor", "/vendor"); this at least works and phone boots. I have noticed two problems with it so far.
1: If I try to un-install any app, the phone simply reboots.
2: Camera FC
I have started to create the metadata script for this and making good progress. I was wondering if somebody would mind having a look and seeing if I am missing anything.
Code:
ui_print(" ");
ui_print("Test Script");
assert(getprop("ro.product.device") == "angler" || getprop("ro.build.product") == "angler" ||
abort("This package is for "angler" devices; this is a "" + getprop("ro.product.device") + "".");
unmount("/system");
unmount("/data");
mount("ext4", "EMMC", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor", "/vendor");
show_progress(0.500000, 0);
set_progress(0.05);
package_extract_dir("vendor", "/vendor");
ui_print("Setting metadata tags");
set_metadata_recursive("/vendor", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata("/vendor/app", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata("/vendor/app/ims", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata("/vendor/app/ims.apk", "uid", 0, "gid", 2000, "dmode", 0644, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata("/vendor/app/ims/lib", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata_recursive("/vendor/app/ims/lib/arm64", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata_recursive("/vendor/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata_recursive("/vendor/etc", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata_recursive("/vendor/firmware", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata_recursive("/vendor/lib", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata_recursive("/vendor/lib/egl", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata_recursive("/vendor/lib/hw/", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata_recursive("/vendor/lib/mediadrm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata_recursive("/vendor/lib64", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata_recursive("/vendor/lib64/egl", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata_recursive("/vendor/lib64/hw/", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata_recursive("/vendor/lib64/mediadrm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata_recursive("/vendor/lost+found", "uid", 0, "gid", 2000, "dmode", 0770, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata_recursive("/vendor/media", "uid", 0, "gid", 2000, "dmode", 0770, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata("/vendor/pittpatt", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata("/vendor/pittpatt/models", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata("/vendor/pittpatt/models/detection", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata_recursive("/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.8", "uid", 0, "gid", 2000, "dmode", 0770, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata_recursive("/vendor/pittpatt/models/detection/yaw_roll_face_detectors.7.1", "uid", 0, "gid", 2000, "dmode", 0770, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
unmount("/system");
ui_print("Test Completed");
ui_print(" ");
show_progress(1, 0);
Click to expand...
Click to collapse
I have uploaded a test script:
https://www.androidfilehost.com/?fid=24269982086995317
7a50ae497a676e5f075e65ef0e2bd52e
Note this will break functionality on your phone. Please only install if you are willing to help me get the vendor folder setup.
I am no developer but using flashify from the playstore to flash .img works great.
anglerstock said:
I am no developer but using flashify from the playstore to flash .img works great.
Click to expand...
Click to collapse
Do I flash it to boot or recovery with flashify?
holic_2 said:
Do I flash it to boot or recovery with flashify?
Click to expand...
Click to collapse
You flash vendor.img to the vendor partition. I do not think flashify flashes to that partition. The OP is trying to get the vendor.img to flash along with a ROM so it is easier on everyone.
nrage23 said:
You flash vendor.img to the vendor partition. I do not think flashify flashes to that partition. The OP is trying to get the vendor.img to flash along with a ROM so it is easier on everyone.
Click to expand...
Click to collapse
Yes this is exactly the idea. I am not looking for other ways to flash the vendor image, I am looking to include it into a cooked rom, so users don't have to flash it separately.
Stephen said:
Yes this is exactly the idea. I am not looking for other ways to flash the vendor image, I am looking to include it into a cooked rom, so users don't have to flash it separately.
Click to expand...
Click to collapse
i have successfully been able to trick my aosp environment into making a vendor image and vendor.dat by including all the files from the stock vendor in it. however no matter what time i include the files during the build.process it still overwrites the stock build.prop in the vendor.img and like 3 of the other proprietary files with source built versions. i do however have an idea how to solve this and should at least be able to make a flashable vendor zip for all of us. gonna play with it more tonight also flashing said zip retained permissions and worked fine but no matter what would give the vendor out of date error(manufacturer error) i also changed the text of this error to make it more descriptive on the end user https://github.com/PureNexus/android_frameworks_base/commit/6f98a63a83d01c88ddeaa3a6e86846eef8d36b6b
once i get this done, i know you want to include in your rom zip that should be fine just take the files from my zip and the extraction part of the script and add to yours
ok figured out the vendor build.prop issue, now i just need to get it to stop building drmclearkeyplugin.so and libbt-vendor.so and i will have a 100% flashable stock vendor.img
got it will be uploading shortly :good:
BeansTown106 said:
got it will be uploading shortly :good:
Click to expand...
Click to collapse
Beans:laugh::laugh: You are definately the best:good::good::good: You think the same approach will work on the N9??
Nexus 6P angler vendor make files
Hi,
I am trying to make a build for Nexus 6P. What make files do I need . How can I see the lunch option to build angler image.
what does the vendor img contain? what is it used for?
theone_s_me said:
what does the vendor img contain? what is it used for?
Click to expand...
Click to collapse
i am curious to know the answer to this question as well..
lazarus2297 said:
i am curious to know the answer to this question as well..
Click to expand...
Click to collapse
I guess nobody knows
@Stephen could we not just skip building the vendor.img in the ROM build, so as to not overwrite the existing /vendor? Or would this cause incompatibilities with build fingerprint etc?
The vendor image was the old system/vendor folder found in previous phones. For some odd reason, they moved it to its own partition /vendor. If you want to build a rom which includes the vendor partition I would really recommend looking at [KITCHEN][LINUX] SuperR's Kitchen (v0.9.7.7 - 12/23/15) All you have to do is, extract the system.img and vendor.img from the factory image, it will then decompress and create a flashable zip with both. It works perfectly.
However, I have seen the light and moved from android and bought the Microsoft Lumia 950xl, this is a killer phone that runs Windows 10. It works brilliantly with my Windows 10 PC! I can even send text messages from my PC with out having any 3rd party software installed on PC or phone! You guys should really check it out.
In case anyone runs into this question in the future, or is just curious how it's done, you simply have aosp make you a vendor from the stock vendor imgs decompiled decompiled files. You can also make it flash with your rom zip (as how I chose to do it) or make it it's own flashable. I didn't have any issues with the prop files or system and vendor symlinks, but I can't say that will always be the case.
The trick Is to make the build system move the files to $(TARGET_OUT_ROOT)/vendor and then have the tools given in the releasetools dir do the rest.
It's a not the most elaborate trick, but it gets the job done.

ERROR 6 at TWRP 3.0.2

hi guys. im have a problem in the update-script. i test the script and it is working before i edit some of the lines. here is the original contents of the updater-script:
Code:
ui_print(" **********************************");
ui_print(" * SAMSUNG GALAXY S8 ROM V1 *");
ui_print(" * PORTED TO: AURII SECRET LITE *");
ui_print(" * PORTED BY: DIBON JOHN H. SERON *");
ui_print(" * *");
ui_print(" * For more ROMS visit my website *");
ui_print(" * @baabebiboobu.blogspot.com *");
ui_print(" * *");
ui_print(" * Android Development Guides: *");
ui_print(" * mtksupport *");
ui_print(" * droidpeepz *");
ui_print(" * xda-developers *");
ui_print(" **********************************");
ui_print("");
ifelse(is_mounted("/system"), unmount("/system"));
package_extract_dir("install", "/tmp/install");
set_metadata_recursive("/tmp/install", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644);
set_metadata_recursive("/tmp/install/bin", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755);
mount("ext4", "EMMC", "/dev/block/mmcblk0p18", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "backup");
unmount("/system");
if is_mounted("/data") then
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
else
mount("ext4", "EMMC", "/dev/block/mmcblk0p20", "/data", "");
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
unmount("/data");
endif;
show_progress(0.750000, 0);
ui_print(" **********************************");
ui_print(" * Wiping System Data *");
ui_print(" **********************************");
ui_print("");
format("ext4", "EMMC", "/dev/block/mmcblk0p18", "0", "/system");
ui_print(" **********************************");
ui_print(" * Mounting System *");
ui_print(" **********************************");
ui_print("");
mount("ext4", "EMMC", "/dev/block/mmcblk0p18", "/system", "max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc");
ui_print(" **********************************");
ui_print(" *Installing Samsung Galaxy S8 ROM*");
ui_print(" **********************************");
ui_print("");
package_extract_dir("system", "/system");
symlink("../xbin/su", "/system/bin/su");
symlink("/system/bin/toybox", "/system/xbin/ls",
"/system/xbin/ps");
symlink("/system/lib/libbluetooth_jni.so", "/system/app/Bluetooth/lib/arm/libbluetooth_jni.so");
symlink("/system/lib/libcmaudio_jni.so", "/system/priv-app/CMAudioService/lib/arm/libcmaudio_jni.so");
symlink("/system/lib/libdefcontainer_jni.so", "/system/priv-app/DefaultContainerService/lib/arm/libdefcontainer_jni.so");
symlink("/system/lib/libfmjni.so", "/system/priv-app/FMRadio/lib/arm/libfmjni.so");
symlink("/system/lib/libjni_eglfence.so", "/system/app/Gallery2/lib/arm/libjni_eglfence.so");
symlink("/system/lib/libjni_filtershow_filters.so", "/system/app/Gallery2/lib/arm/libjni_filtershow_filters.so");
symlink("/system/lib/libjni_jpegstream.so", "/system/app/Gallery2/lib/arm/libjni_jpegstream.so");
symlink("/system/lib/libjni_latinime.so", "/system/app/LatinIME/lib/arm/libjni_latinime.so");
symlink("/system/lib/libjni_pacprocessor.so", "/system/app/PacProcessor/lib/arm/libjni_pacprocessor.so");
symlink("/system/lib/libjni_terminal.so", "/system/app/Terminal/lib/arm/libjni_terminal.so");
symlink("/system/lib/libprintspooler_jni.so", "/system/app/PrintSpooler/lib/arm/libprintspooler_jni.so");
symlink("/system/lib/librsjni.so", "/system/app/Gallery2/lib/arm/librsjni.so");
symlink("/system/lib/libttscompat.so", "/system/app/PicoTts/lib/arm/libttscompat.so");
symlink("/system/lib/libttspico.so", "/system/app/PicoTts/lib/arm/libttspico.so");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("app_process32", "/system/bin/app_process");
symlink("dalvikvm32", "/system/bin/dalvikvm");
symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
symlink("logpersist.start", "/system/bin/logpersist.cat",
"/system/bin/logpersist.stop");
symlink("pigz", "/system/xbin/gunzip", "/system/xbin/gzip",
"/system/xbin/unpigz",
"/system/xbin/zcat");
symlink("toolbox", "/system/bin/getevent", "/system/bin/iftop",
"/system/bin/ioctl", "/system/bin/log", "/system/bin/ls",
"/system/bin/nandread", "/system/bin/newfs_msdos",
"/system/bin/prlimit", "/system/bin/ps", "/system/bin/restart",
"/system/bin/sendevent", "/system/bin/start",
"/system/bin/stop");
symlink("toybox", "/system/bin/acpi", "/system/bin/arp",
"/system/bin/base64", "/system/bin/basename", "/system/bin/blockdev",
"/system/bin/bzcat", "/system/bin/cal", "/system/bin/cat",
"/system/bin/chattr", "/system/bin/chcon", "/system/bin/chgrp",
"/system/bin/chmod", "/system/bin/chown", "/system/bin/chroot",
"/system/bin/cksum", "/system/bin/clear", "/system/bin/cmp",
"/system/bin/comm", "/system/bin/cp", "/system/bin/cpio",
"/system/bin/cut", "/system/bin/date", "/system/bin/dd",
"/system/bin/df", "/system/bin/diff", "/system/bin/dirname",
"/system/bin/dmesg", "/system/bin/dos2unix", "/system/bin/du",
"/system/bin/echo", "/system/bin/egrep", "/system/bin/env",
"/system/bin/expand", "/system/bin/expr", "/system/bin/fallocate",
"/system/bin/false", "/system/bin/fdisk", "/system/bin/fgrep",
"/system/bin/file", "/system/bin/find", "/system/bin/flock",
"/system/bin/free", "/system/bin/freeramdisk", "/system/bin/fsfreeze",
"/system/bin/fstype", "/system/bin/ftpget", "/system/bin/ftpput",
"/system/bin/getenforce", "/system/bin/getprop", "/system/bin/grep",
"/system/bin/groups", "/system/bin/head", "/system/bin/help",
"/system/bin/host", "/system/bin/hostname", "/system/bin/hwclock",
"/system/bin/id", "/system/bin/ifconfig", "/system/bin/inotifyd",
"/system/bin/insmod", "/system/bin/install", "/system/bin/ionice",
"/system/bin/iorenice", "/system/bin/iotop", "/system/bin/kill",
"/system/bin/killall", "/system/bin/ln", "/system/bin/load_policy",
"/system/bin/logname", "/system/bin/losetup", "/system/bin/lsattr",
"/system/bin/lsmod", "/system/bin/lsof", "/system/bin/lspci",
"/system/bin/lsusb", "/system/bin/makedevs", "/system/bin/md5sum",
"/system/bin/mkdir", "/system/bin/mkfifo", "/system/bin/mknod",
"/system/bin/mkswap", "/system/bin/mktemp", "/system/bin/modinfo",
"/system/bin/more", "/system/bin/mount", "/system/bin/mountpoint",
"/system/bin/mv", "/system/bin/nbd-client", "/system/bin/nc",
"/system/bin/netcat", "/system/bin/netstat", "/system/bin/nice",
"/system/bin/nl", "/system/bin/nohup", "/system/bin/nproc",
"/system/bin/od", "/system/bin/partprobe", "/system/bin/paste",
"/system/bin/patch", "/system/bin/pgrep", "/system/bin/pidof",
"/system/bin/pivot_root", "/system/bin/pkill", "/system/bin/pmap",
"/system/bin/printenv", "/system/bin/printf", "/system/bin/pwd",
"/system/bin/pwdx", "/system/bin/readahead", "/system/bin/readlink",
"/system/bin/realpath", "/system/bin/renice", "/system/bin/reset",
"/system/bin/resize", "/system/bin/restorecon", "/system/bin/rev",
"/system/bin/rfkill", "/system/bin/rm", "/system/bin/rmdir",
"/system/bin/rmmod", "/system/bin/route", "/system/bin/runcon",
"/system/bin/sed", "/system/bin/seq", "/system/bin/setenforce",
"/system/bin/setprop", "/system/bin/setsid", "/system/bin/sha1sum",
"/system/bin/sleep", "/system/bin/sort", "/system/bin/split",
"/system/bin/stat", "/system/bin/strings", "/system/bin/swapoff",
"/system/bin/swapon", "/system/bin/sync", "/system/bin/sysctl",
"/system/bin/tac", "/system/bin/tail", "/system/bin/tar",
"/system/bin/taskset", "/system/bin/tee", "/system/bin/telnet",
"/system/bin/test", "/system/bin/time", "/system/bin/timeout",
"/system/bin/top", "/system/bin/touch", "/system/bin/tr",
"/system/bin/traceroute", "/system/bin/true", "/system/bin/truncate",
"/system/bin/tty", "/system/bin/ulimit", "/system/bin/umount",
"/system/bin/uname", "/system/bin/uniq", "/system/bin/unix2dos",
"/system/bin/uptime", "/system/bin/usleep", "/system/bin/vconfig",
"/system/bin/vmstat", "/system/bin/watch", "/system/bin/wc",
"/system/bin/which", "/system/bin/whoami", "/system/bin/xargs",
"/system/bin/xxd", "/system/bin/xzcat",
"/system/bin/yes");
set_metadata_recursive("/system", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", "0x0", "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", "0x0", "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/6620_launcher", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtk_6620_launcher_exec:s0");
set_metadata("/system/bin/MtkCodecService", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:MtkCodecService_exec:s0");
set_metadata("/system/bin/akmd8963", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:akmd8963_exec:s0");
set_metadata("/system/bin/akmd8975", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:akmd8975_exec:s0");
set_metadata("/system/bin/ami304d", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ami304d_exec:s0");
set_metadata("/system/bin/app_process32", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
set_metadata("/system/bin/atci_service", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:atci_service_exec:s0");
set_metadata("/system/bin/atcid", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:atcid_exec:s0");
set_metadata("/system/bin/audiocmdservice_atci", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:audiocmdservice_atci_exec:s0");
set_metadata("/system/bin/autokd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:autokd_exec:s0");
set_metadata("/system/bin/batterywarning", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:batterywarning_exec:s0");
set_metadata("/system/bin/blkid", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:blkid_exec:s0");
set_metadata("/system/bin/bmm050d", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bmm050d_exec:s0");
set_metadata("/system/bin/boot_logo_updater", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:boot_logo_updater_exec:s0");
set_metadata("/system/bin/bootanimation", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bootanim_exec:s0");
set_metadata("/system/bin/ccci_fsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ccci_fsd_exec:s0");
set_metadata("/system/bin/ccci_mdinit", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ccci_mdinit_exec:s0");
set_metadata("/system/bin/clatd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:clatd_exec:s0");
set_metadata("/system/bin/debuggerd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:debuggerd_exec:s0");
set_metadata("/system/bin/dex2oat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dex2oat_exec:s0");
set_metadata("/system/bin/dhcp6c", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dhcp6c_exec:s0");
set_metadata("/system/bin/dhcpcd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dhcp_exec:s0");
set_metadata("/system/bin/dm_agent_binder", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dm_agent_binder_exec:s0");
set_metadata("/system/bin/dmlog", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dmlog_exec:s0");
set_metadata("/system/bin/dnsmasq", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dnsmasq_exec:s0");
set_metadata("/system/bin/drmserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drmserver_exec:s0");
set_metadata("/system/bin/dumpstate", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dumpstate_exec:s0");
set_metadata("/system/bin/e2fsck", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fsck_exec:s0");
set_metadata("/system/bin/em_svr", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:em_svr_exec:s0");
set_metadata("/system/bin/emdlogger1", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:emdlogger_exec:s0");
set_metadata("/system/bin/factory", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:factory_exec:s0");
set_metadata("/system/bin/fsck.exfat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fsck_exec:s0");
set_metadata("/system/bin/fsck.f2fs", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fsck_exec:s0");
set_metadata("/system/bin/fsck.ntfs", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fsck_exec:s0");
set_metadata("/system/bin/fsck_msdos", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fsck_exec:s0");
set_metadata("/system/bin/fuelgauged", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fuelgauged_exec:s0");
set_metadata("/system/bin/gatekeeperd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:gatekeeperd_exec:s0");
set_metadata("/system/bin/geomagneticd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:geomagneticd_exec:s0");
set_metadata("/system/bin/gsm0710muxd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:gsm0710muxd_exec:s0");
set_metadata("/system/bin/gsm0710muxdmd2", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:gsm0710muxdmd2_exec:s0");
set_metadata("/system/bin/guiext-server", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:guiext-server_exec:s0");
set_metadata("/system/bin/hostapd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:hostapd_exec:s0");
set_metadata("/system/bin/install-recovery.sh", "uid", 0, "gid", 0, "mode", 0750, "capabilities", 0x0, "selabel", "u:object_r:install_recovery_exec:s0");
set_metadata("/system/bin/installd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:installd_exec:s0");
set_metadata("/system/bin/keystore", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:keystore_exec:s0");
set_metadata("/system/bin/lmkd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:lmkd_exec:s0");
set_metadata("/system/bin/logcat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logcat_exec:s0");
set_metadata("/system/bin/logd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logd_exec:s0");
set_metadata("/system/bin/matv", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:matv_exec:s0");
set_metadata("/system/bin/mc6420d", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mc6420d_exec:s0");
set_metadata("/system/bin/md_ctrl", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:md_ctrl_exec:s0");
set_metadata("/system/bin/mdlogger", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mdlogger_exec:s0");
set_metadata("/system/bin/mdnsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mdnsd_exec:s0");
set_metadata("/system/bin/mediaserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mediaserver_exec:s0");
set_metadata("/system/bin/memsicd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:memsicd_exec:s0");
set_metadata("/system/bin/memsicd3416x", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:memsicd3416x_exec:s0");
set_metadata("/system/bin/meta_tst", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:meta_tst_exec:s0");
set_metadata("/system/bin/mkfs.exfat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mkfs_exec:s0");
set_metadata("/system/bin/mkfs.f2fs", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mkfs_exec:s0");
set_metadata("/system/bin/mkfs.ntfs", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mkfs_exec:s0");
set_metadata("/system/bin/mmp", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mmp_exec:s0");
set_metadata("/system/bin/mobile_log_d", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mobile_log_d_exec:s0");
set_metadata("/system/bin/msensord", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:msensord_exec:s0");
set_metadata("/system/bin/mtk_agpsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtk_agpsd_exec:s0");
set_metadata("/system/bin/mtkrild", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtkrild_exec:s0");
set_metadata("/system/bin/mtkrildmd2", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtkrildmd2_exec:s0");
set_metadata("/system/bin/mtpd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtp_exec:s0");
set_metadata("/system/bin/muxreport", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:muxreport_exec:s0");
set_metadata("/system/bin/netd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netd_exec:s0");
set_metadata("/system/bin/netdiag", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netdiag_exec:s0");
set_metadata("/system/bin/nvram_agent_binder", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:nvram_agent_binder_exec:s0");
set_metadata("/system/bin/nvram_daemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:nvram_daemon_exec:s0");
set_metadata("/system/bin/orientationd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:orientationd_exec:s0");
set_metadata("/system/bin/patchoat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dex2oat_exec:s0");
set_metadata("/system/bin/ppl_agent", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ppl_agent_exec:s0");
set_metadata("/system/bin/pppd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ppp_exec:s0");
set_metadata("/system/bin/pppd_dt", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:pppd_dt_exec:s0");
set_metadata("/system/bin/pq", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:pq_exec:s0");
set_metadata("/system/bin/racoon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:racoon_exec:s0");
set_metadata("/system/bin/rild", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:rild_exec:s0");
set_metadata("/system/bin/run-as", "uid", 0, "gid", 2000, "mode", 0750, "capabilities", 0xc0, "selabel", "u:object_r:runas_exec:s0");
set_metadata("/system/bin/s62xd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:s62xd_exec:s0");
set_metadata("/system/bin/sdcard", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sdcardd_exec:s0");
set_metadata("/system/bin/servicemanager", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:servicemanager_exec:s0");
set_metadata("/system/bin/sgdisk", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sgdisk_exec:s0");
set_metadata("/system/bin/sh", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:shell_exec:s0");
set_metadata("/system/bin/sn", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sn_exec:s0");
set_metadata("/system/bin/surfaceflinger", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:surfaceflinger_exec:s0");
set_metadata("/system/bin/sysinit", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sysinit_exec:s0");
set_metadata("/system/bin/terservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:terservice_exec:s0");
set_metadata("/system/bin/thermal", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:thermal_exec:s0");
set_metadata("/system/bin/thermal_manager", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:thermal_manager_exec:s0");
set_metadata("/system/bin/thermald", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:thermald_exec:s0");
set_metadata("/system/bin/tiny_mkswap", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:tiny_mkswap_exec:s0");
set_metadata("/system/bin/tiny_swapon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:tiny_swapon_exec:s0");
set_metadata("/system/bin/toolbox", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:toolbox_exec:s0");
set_metadata("/system/bin/toybox", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:toolbox_exec:s0");
set_metadata("/system/bin/tzdatacheck", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:tzdatacheck_exec:s0");
set_metadata("/system/bin/uncrypt", "uid", 0, "gid", 0, "mode", 0750, "capabilities", 0x0, "selabel", "u:object_r:uncrypt_exec:s0");
set_metadata("/system/bin/vdc", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vdc_exec:s0");
set_metadata("/system/bin/vold", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vold_exec:s0");
set_metadata("/system/bin/vtservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vtservice_exec:s0");
set_metadata("/system/bin/wifi2agps", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wifi2agps_exec:s0");
set_metadata("/system/bin/wmt_loader", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wmt_loader_exec:s0");
set_metadata("/system/bin/wpa_supplicant", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wpa_exec:s0");
set_metadata("/system/bin/xlog", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:xlog_exec:s0");
set_metadata("/system/etc/dhcpcd/dhcpcd-run-hooks", "uid", 1014, "gid", 2000, "mode", 0550, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/etc/init.d", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", "0x0", "selabel", "u:object_r:userinit_exec:s0");
set_metadata("/system/etc/init.d", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/etc/init.d/00banner", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/etc/ppp", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0555, "capabilities", "0x0", "selabel", "u:object_r:system_file:s0");
set_metadata("/system/recovery-from-boot.p", "uid", 0, "gid", 0, "mode", 0644);
set_metadata("/system/vendor", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/vendor/lib/drm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", "0x0", "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/drm/libdrmwvmplugin.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/mediadrm", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/xbin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", "0x0", "selabel", "u:object_r:system_file:s0");
set_metadata("/system/xbin/BGW", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:BGW_exec:s0");
set_metadata("/system/xbin/bash", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:shell_exec:s0");
set_metadata("/system/xbin/librank", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/xbin/mnld", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mnld_exec:s0");
set_metadata("/system/xbin/perfprofd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:perfprofd_exec:s0");
set_metadata("/system/xbin/procmem", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/xbin/procrank", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:procrank_exec:s0");
set_metadata("/system/xbin/su", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
show_progress(0.020000, 10);
run_program("/tmp/install/bin/backuptool.sh", "restore");
show_progress(0.050000, 5);
ui_print(" **********************************");
ui_print(" * Initializing Device Kernel *");
ui_print(" **********************************");
ui_print("");
package_extract_file("boot.img", "/dev/block/mmcblk0p7");
package_extract_file("logo.bin", "/dev/block/mmcblk0p10");
ui_print(" **********************************");
ui_print(" * Aurii - Samsung Galaxy S8 *");
ui_print(" **********************************");
ui_print("");
show_progress(0.200000, 10);
unmount("/system");
ui_print("");
ui_print(" **********************************");
ui_print(" * Done *");
ui_print(" * Install Complete *");
ui_print(" * Reboot Now *");
ui_print(" **********************************");
ui_print("");
and the edited script
Code:
ui_print(" **********************************");
ui_print(" * *");
ui_print(" * SAMSUNG GALAXY S8 ROM V1 *");
ui_print(" * CHERRY MOBILE SPIN MAX *");
ui_print(" * *");
ui_print(" * ORIGINALLY FROM *");
ui_print(" * DIBON JOHN H. SERON *");
ui_print(" * *");
ui_print(" * *");
ui_print(" * *");
ui_print(" **********************************");
ui_print("");
ifelse(is_mounted("/system"), unmount("/system"));
package_extract_dir("install", "/tmp/install");
set_metadata_recursive("/tmp/install", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644);
set_metadata_recursive("/tmp/install/bin", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755);
mount("ext4", "EMMC", "/dev/block/mmcblk0p18", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "backup");
unmount("/system");
if is_mounted("/data") then
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
else
mount("ext4", "EMMC", "/dev/block/mmcblk0p20", "/data", "");
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
unmount("/data");
endif;
show_progress(0.750000, 0);
ui_print(" **********************************");
ui_print(" * Wiping System Data *");
ui_print(" **********************************");
ui_print("");
format("ext4", "EMMC", "/dev/block/mmcblk0p18", "0", "/system");
ui_print(" **********************************");
ui_print(" * Mounting System *");
ui_print(" **********************************");
ui_print("");
mount("ext4", "EMMC", "/dev/block/mmcblk0p18", "/system", "max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc");
ui_print(" **********************************");
ui_print(" *Installing Samsung Galaxy S8 ROM*");
ui_print(" **********************************");
ui_print("");
package_extract_dir("system", "/system");
symlink("../xbin/su", "/system/bin/su");
symlink("/system/bin/toybox", "/system/xbin/ls",
"/system/xbin/ps");
symlink("/system/lib/libbluetooth_jni.so", "/system/app/Bluetooth/lib/arm/libbluetooth_jni.so");
symlink("/system/lib/libcmaudio_jni.so", "/system/priv-app/CMAudioService/lib/arm/libcmaudio_jni.so");
symlink("/system/lib/libdefcontainer_jni.so", "/system/priv-app/DefaultContainerService/lib/arm/libdefcontainer_jni.so");
symlink("/system/lib/libfmjni.so", "/system/priv-app/FMRadio/lib/arm/libfmjni.so");
symlink("/system/lib/libjni_eglfence.so", "/system/app/Gallery2/lib/arm/libjni_eglfence.so");
symlink("/system/lib/libjni_filtershow_filters.so", "/system/app/Gallery2/lib/arm/libjni_filtershow_filters.so");
symlink("/system/lib/libjni_jpegstream.so", "/system/app/Gallery2/lib/arm/libjni_jpegstream.so");
symlink("/system/lib/libjni_latinime.so", "/system/app/LatinIME/lib/arm/libjni_latinime.so");
symlink("/system/lib/libjni_pacprocessor.so", "/system/app/PacProcessor/lib/arm/libjni_pacprocessor.so");
symlink("/system/lib/libjni_terminal.so", "/system/app/Terminal/lib/arm/libjni_terminal.so");
symlink("/system/lib/libprintspooler_jni.so", "/system/app/PrintSpooler/lib/arm/libprintspooler_jni.so");
symlink("/system/lib/librsjni.so", "/system/app/Gallery2/lib/arm/librsjni.so");
symlink("/system/lib/libttscompat.so", "/system/app/PicoTts/lib/arm/libttscompat.so");
symlink("/system/lib/libttspico.so", "/system/app/PicoTts/lib/arm/libttspico.so");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("app_process32", "/system/bin/app_process");
symlink("dalvikvm32", "/system/bin/dalvikvm");
symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
symlink("logpersist.start", "/system/bin/logpersist.cat",
"/system/bin/logpersist.stop");
symlink("pigz", "/system/xbin/gunzip", "/system/xbin/gzip",
"/system/xbin/unpigz",
"/system/xbin/zcat");
symlink("toolbox", "/system/bin/getevent", "/system/bin/iftop",
"/system/bin/ioctl", "/system/bin/log", "/system/bin/ls",
"/system/bin/nandread", "/system/bin/newfs_msdos",
"/system/bin/prlimit", "/system/bin/ps", "/system/bin/restart",
"/system/bin/sendevent", "/system/bin/start",
"/system/bin/stop");
symlink("toybox", "/system/bin/acpi", "/system/bin/arp",
"/system/bin/base64", "/system/bin/basename", "/system/bin/blockdev",
"/system/bin/bzcat", "/system/bin/cal", "/system/bin/cat",
"/system/bin/chattr", "/system/bin/chcon", "/system/bin/chgrp",
"/system/bin/chmod", "/system/bin/chown", "/system/bin/chroot",
"/system/bin/cksum", "/system/bin/clear", "/system/bin/cmp",
"/system/bin/comm", "/system/bin/cp", "/system/bin/cpio",
"/system/bin/cut", "/system/bin/date", "/system/bin/dd",
"/system/bin/df", "/system/bin/diff", "/system/bin/dirname",
"/system/bin/dmesg", "/system/bin/dos2unix", "/system/bin/du",
"/system/bin/echo", "/system/bin/egrep", "/system/bin/env",
"/system/bin/expand", "/system/bin/expr", "/system/bin/fallocate",
"/system/bin/false", "/system/bin/fdisk", "/system/bin/fgrep",
"/system/bin/file", "/system/bin/find", "/system/bin/flock",
"/system/bin/free", "/system/bin/freeramdisk", "/system/bin/fsfreeze",
"/system/bin/fstype", "/system/bin/ftpget", "/system/bin/ftpput",
"/system/bin/getenforce", "/system/bin/getprop", "/system/bin/grep",
"/system/bin/groups", "/system/bin/head", "/system/bin/help",
"/system/bin/host", "/system/bin/hostname", "/system/bin/hwclock",
"/system/bin/id", "/system/bin/ifconfig", "/system/bin/inotifyd",
"/system/bin/insmod", "/system/bin/install", "/system/bin/ionice",
"/system/bin/iorenice", "/system/bin/iotop", "/system/bin/kill",
"/system/bin/killall", "/system/bin/ln", "/system/bin/load_policy",
"/system/bin/logname", "/system/bin/losetup", "/system/bin/lsattr",
"/system/bin/lsmod", "/system/bin/lsof", "/system/bin/lspci",
"/system/bin/lsusb", "/system/bin/makedevs", "/system/bin/md5sum",
"/system/bin/mkdir", "/system/bin/mkfifo", "/system/bin/mknod",
"/system/bin/mkswap", "/system/bin/mktemp", "/system/bin/modinfo",
"/system/bin/more", "/system/bin/mount", "/system/bin/mountpoint",
"/system/bin/mv", "/system/bin/nbd-client", "/system/bin/nc",
"/system/bin/netcat", "/system/bin/netstat", "/system/bin/nice",
"/system/bin/nl", "/system/bin/nohup", "/system/bin/nproc",
"/system/bin/od", "/system/bin/partprobe", "/system/bin/paste",
"/system/bin/patch", "/system/bin/pgrep", "/system/bin/pidof",
"/system/bin/pivot_root", "/system/bin/pkill", "/system/bin/pmap",
"/system/bin/printenv", "/system/bin/printf", "/system/bin/pwd",
"/system/bin/pwdx", "/system/bin/readahead", "/system/bin/readlink",
"/system/bin/realpath", "/system/bin/renice", "/system/bin/reset",
"/system/bin/resize", "/system/bin/restorecon", "/system/bin/rev",
"/system/bin/rfkill", "/system/bin/rm", "/system/bin/rmdir",
"/system/bin/rmmod", "/system/bin/route", "/system/bin/runcon",
"/system/bin/sed", "/system/bin/seq", "/system/bin/setenforce",
"/system/bin/setprop", "/system/bin/setsid", "/system/bin/sha1sum",
"/system/bin/sleep", "/system/bin/sort", "/system/bin/split",
"/system/bin/stat", "/system/bin/strings", "/system/bin/swapoff",
"/system/bin/swapon", "/system/bin/sync", "/system/bin/sysctl",
"/system/bin/tac", "/system/bin/tail", "/system/bin/tar",
"/system/bin/taskset", "/system/bin/tee", "/system/bin/telnet",
"/system/bin/test", "/system/bin/time", "/system/bin/timeout",
"/system/bin/top", "/system/bin/touch", "/system/bin/tr",
"/system/bin/traceroute", "/system/bin/true", "/system/bin/truncate",
"/system/bin/tty", "/system/bin/ulimit", "/system/bin/umount",
"/system/bin/uname", "/system/bin/uniq", "/system/bin/unix2dos",
"/system/bin/uptime", "/system/bin/usleep", "/system/bin/vconfig",
"/system/bin/vmstat", "/system/bin/watch", "/system/bin/wc",
"/system/bin/which", "/system/bin/whoami", "/system/bin/xargs",
"/system/bin/xxd", "/system/bin/xzcat",
"/system/bin/yes");
set_metadata_recursive("/system", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", "0x0", "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", "0x0", "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/6620_launcher", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtk_6620_launcher_exec:s0");
set_metadata("/system/bin/MtkCodecService", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:MtkCodecService_exec:s0");
set_metadata("/system/bin/akmd8963", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:akmd8963_exec:s0");
set_metadata("/system/bin/akmd8975", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:akmd8975_exec:s0");
set_metadata("/system/bin/ami304d", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ami304d_exec:s0");
set_metadata("/system/bin/app_process32", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
set_metadata("/system/bin/atci_service", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:atci_service_exec:s0");
set_metadata("/system/bin/atcid", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:atcid_exec:s0");
set_metadata("/system/bin/audiocmdservice_atci", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:audiocmdservice_atci_exec:s0");
set_metadata("/system/bin/autokd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:autokd_exec:s0");
set_metadata("/system/bin/batterywarning", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:batterywarning_exec:s0");
set_metadata("/system/bin/blkid", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:blkid_exec:s0");
set_metadata("/system/bin/bmm050d", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bmm050d_exec:s0");
set_metadata("/system/bin/boot_logo_updater", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:boot_logo_updater_exec:s0");
set_metadata("/system/bin/bootanimation", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bootanim_exec:s0");
set_metadata("/system/bin/ccci_fsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ccci_fsd_exec:s0");
set_metadata("/system/bin/ccci_mdinit", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ccci_mdinit_exec:s0");
set_metadata("/system/bin/clatd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:clatd_exec:s0");
set_metadata("/system/bin/debuggerd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:debuggerd_exec:s0");
set_metadata("/system/bin/dex2oat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dex2oat_exec:s0");
set_metadata("/system/bin/dhcp6c", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dhcp6c_exec:s0");
set_metadata("/system/bin/dhcpcd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dhcp_exec:s0");
set_metadata("/system/bin/dm_agent_binder", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dm_agent_binder_exec:s0");
set_metadata("/system/bin/dmlog", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dmlog_exec:s0");
set_metadata("/system/bin/dnsmasq", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dnsmasq_exec:s0");
set_metadata("/system/bin/drmserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drmserver_exec:s0");
set_metadata("/system/bin/dumpstate", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dumpstate_exec:s0");
set_metadata("/system/bin/e2fsck", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fsck_exec:s0");
set_metadata("/system/bin/em_svr", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:em_svr_exec:s0");
set_metadata("/system/bin/emdlogger1", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:emdlogger_exec:s0");
set_metadata("/system/bin/factory", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:factory_exec:s0");
set_metadata("/system/bin/fsck.exfat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fsck_exec:s0");
set_metadata("/system/bin/fsck.f2fs", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fsck_exec:s0");
set_metadata("/system/bin/fsck.ntfs", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fsck_exec:s0");
set_metadata("/system/bin/fsck_msdos", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fsck_exec:s0");
set_metadata("/system/bin/fuelgauged", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fuelgauged_exec:s0");
set_metadata("/system/bin/gatekeeperd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:gatekeeperd_exec:s0");
set_metadata("/system/bin/geomagneticd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:geomagneticd_exec:s0");
set_metadata("/system/bin/gsm0710muxd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:gsm0710muxd_exec:s0");
set_metadata("/system/bin/gsm0710muxdmd2", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:gsm0710muxdmd2_exec:s0");
set_metadata("/system/bin/guiext-server", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:guiext-server_exec:s0");
set_metadata("/system/bin/hostapd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:hostapd_exec:s0");
set_metadata("/system/bin/install-recovery.sh", "uid", 0, "gid", 0, "mode", 0750, "capabilities", 0x0, "selabel", "u:object_r:install_recovery_exec:s0");
set_metadata("/system/bin/installd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:installd_exec:s0");
set_metadata("/system/bin/keystore", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:keystore_exec:s0");
set_metadata("/system/bin/lmkd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:lmkd_exec:s0");
set_metadata("/system/bin/logcat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logcat_exec:s0");
set_metadata("/system/bin/logd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logd_exec:s0");
set_metadata("/system/bin/matv", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:matv_exec:s0");
set_metadata("/system/bin/mc6420d", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mc6420d_exec:s0");
set_metadata("/system/bin/md_ctrl", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:md_ctrl_exec:s0");
set_metadata("/system/bin/mdlogger", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mdlogger_exec:s0");
set_metadata("/system/bin/mdnsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mdnsd_exec:s0");
set_metadata("/system/bin/mediaserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mediaserver_exec:s0");
set_metadata("/system/bin/memsicd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:memsicd_exec:s0");
set_metadata("/system/bin/memsicd3416x", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:memsicd3416x_exec:s0");
set_metadata("/system/bin/meta_tst", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:meta_tst_exec:s0");
set_metadata("/system/bin/mkfs.exfat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mkfs_exec:s0");
set_metadata("/system/bin/mkfs.f2fs", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mkfs_exec:s0");
set_metadata("/system/bin/mkfs.ntfs", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mkfs_exec:s0");
set_metadata("/system/bin/mmp", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mmp_exec:s0");
set_metadata("/system/bin/mobile_log_d", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mobile_log_d_exec:s0");
set_metadata("/system/bin/msensord", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:msensord_exec:s0");
set_metadata("/system/bin/mtk_agpsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtk_agpsd_exec:s0");
set_metadata("/system/bin/mtkrild", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtkrild_exec:s0");
set_metadata("/system/bin/mtkrildmd2", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtkrildmd2_exec:s0");
set_metadata("/system/bin/mtpd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtp_exec:s0");
set_metadata("/system/bin/muxreport", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:muxreport_exec:s0");
set_metadata("/system/bin/netd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netd_exec:s0");
set_metadata("/system/bin/netdiag", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netdiag_exec:s0");
set_metadata("/system/bin/nvram_agent_binder", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:nvram_agent_binder_exec:s0");
set_metadata("/system/bin/nvram_daemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:nvram_daemon_exec:s0");
set_metadata("/system/bin/orientationd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:orientationd_exec:s0");
set_metadata("/system/bin/patchoat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dex2oat_exec:s0");
set_metadata("/system/bin/ppl_agent", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ppl_agent_exec:s0");
set_metadata("/system/bin/pppd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ppp_exec:s0");
set_metadata("/system/bin/pppd_dt", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:pppd_dt_exec:s0");
set_metadata("/system/bin/pq", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:pq_exec:s0");
set_metadata("/system/bin/racoon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:racoon_exec:s0");
set_metadata("/system/bin/rild", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:rild_exec:s0");
set_metadata("/system/bin/run-as", "uid", 0, "gid", 2000, "mode", 0750, "capabilities", 0xc0, "selabel", "u:object_r:runas_exec:s0");
set_metadata("/system/bin/s62xd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:s62xd_exec:s0");
set_metadata("/system/bin/sdcard", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sdcardd_exec:s0");
set_metadata("/system/bin/servicemanager", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:servicemanager_exec:s0");
set_metadata("/system/bin/sgdisk", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sgdisk_exec:s0");
set_metadata("/system/bin/sh", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:shell_exec:s0");
set_metadata("/system/bin/sn", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sn_exec:s0");
set_metadata("/system/bin/surfaceflinger", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:surfaceflinger_exec:s0");
set_metadata("/system/bin/sysinit", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sysinit_exec:s0");
set_metadata("/system/bin/terservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:terservice_exec:s0");
set_metadata("/system/bin/thermal", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:thermal_exec:s0");
set_metadata("/system/bin/thermal_manager", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:thermal_manager_exec:s0");
set_metadata("/system/bin/thermald", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:thermald_exec:s0");
set_metadata("/system/bin/tiny_mkswap", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:tiny_mkswap_exec:s0");
set_metadata("/system/bin/tiny_swapon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:tiny_swapon_exec:s0");
set_metadata("/system/bin/toolbox", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:toolbox_exec:s0");
set_metadata("/system/bin/toybox", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:toolbox_exec:s0");
set_metadata("/system/bin/tzdatacheck", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:tzdatacheck_exec:s0");
set_metadata("/system/bin/uncrypt", "uid", 0, "gid", 0, "mode", 0750, "capabilities", 0x0, "selabel", "u:object_r:uncrypt_exec:s0");
set_metadata("/system/bin/vdc", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vdc_exec:s0");
set_metadata("/system/bin/vold", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vold_exec:s0");
set_metadata("/system/bin/vtservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vtservice_exec:s0");
set_metadata("/system/bin/wifi2agps", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wifi2agps_exec:s0");
set_metadata("/system/bin/wmt_loader", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wmt_loader_exec:s0");
set_metadata("/system/bin/wpa_supplicant", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wpa_exec:s0");
set_metadata("/system/bin/xlog", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:xlog_exec:s0");
set_metadata("/system/etc/dhcpcd/dhcpcd-run-hooks", "uid", 1014, "gid", 2000, "mode", 0550, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/etc/init.d", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", "0x0", "selabel", "u:object_r:userinit_exec:s0");
set_metadata("/system/etc/init.d", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/etc/init.d/00banner", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/etc/ppp", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0555, "capabilities", "0x0", "selabel", "u:object_r:system_file:s0");
set_metadata("/system/recovery-from-boot.p", "uid", 0, "gid", 0, "mode", 0644);
set_metadata("/system/vendor", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/vendor/lib/drm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", "0x0", "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/drm/libdrmwvmplugin.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/mediadrm", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/xbin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", "0x0", "selabel", "u:object_r:system_file:s0");
set_metadata("/system/xbin/BGW", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:BGW_exec:s0");
set_metadata("/system/xbin/bash", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:shell_exec:s0");
set_metadata("/system/xbin/librank", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/xbin/mnld", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mnld_exec:s0");
set_metadata("/system/xbin/perfprofd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:perfprofd_exec:s0");
set_metadata("/system/xbin/procmem", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/xbin/procrank", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:procrank_exec:s0");
set_metadata("/system/xbin/su", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
show_progress(0.020000, 10);
run_program("/tmp/install/bin/backuptool.sh", "restore");
show_progress(0.050000, 5);
ui_print(" **********************************");
ui_print(" * Initializing Device Kernel *");
ui_print(" **********************************");
ui_print("");
package_extract_file("boot.img", "/dev/block/mmcblk0p7");
package_extract_file("logo.bin", "/dev/block/mmcblk0p10");
ui_print(" **********************************");
ui_print(" * Aurii - Samsung Galaxy S8 *");
ui_print(" **********************************");
ui_print("");
show_progress(0.200000, 10);
unmount("/system");
ui_print("");
ui_print(" **********************************");
ui_print(" * Done *");
ui_print(" * Install Complete *");
ui_print(" * Reboot Now *");
ui_print(" **********************************");
ui_print("");
Log:
Code:
I:operation_start: 'Flashing'
Installing zip file '/external_sd/S8.zip'
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
I:Zip does not contain SELinux file_contexts file in its root.
line 1 col 52: syntax error, unexpected BAD
1 parse errors
Updater process ended with ERROR: 6
Error installing zip file '/external_sd/S8.zip'
Updating partition details...
I:Data backup size is 2249MB, free: 668MB.
...done
I:Set page: 'flash_done'
I:operation_end - status=1
please help... thanks in advance.

VoLte Patch

I just Made Vo patch From My Stock Redmi 8a , for GSi Roms , just Somebody Try Who Using GSi . Then Say Does This Working or Not
#backup everything before doing this
I have 7A with the same CPU ... i'm dev and I know what I do . You make simple script :
Code:
ui_print("volte patch redmi 8a");
ui_print("test #1");
ui_print("by Vinay Durva");
ui_print("Mounting system and vendor...");
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/vendor", "/vendor");
ui_print("Extracting Files...");
package_extract_dir("system", "/system");
ui_print("Unmounting system and vendor...");
unmount("/system");
show_progress(0.2, 10);
Where is chmod ???? If you don't add chmod's system have 3 options: 1.Not boot 2.Bootloop 3.total crash
I make patche's to some system's variants and my script maybe help you some :
Code:
ui_print("------------HALF GSI PATCHER-------------");
ui_print("------------XDA: MAREK10747--------------");
ui_print("------------Installing Updates-----------");
ui_print("------------Mounting System--------------");
run_program("/sbin/busybox", "mount", "/system");
ui_print("------------Updating system-----------");
ui_print("-----------------------------------------");
ui_print("------------Deleting files---------------");
ui_print("-------Deleting app and priv-app---------");
delete_recursive("/system/app");
delete_recursive("/system/priv-app");
delete_recursive("/system/framework");
ui_print("---------Repleacing build.prop-----------");
ui_print("-----------------------------------------");
ui_print("----Extracting and Installing updates----");
ui_print("-----------------------------------------");
ui_print("--------Extracting deodexed files--------");
ui_print("-----------------------------------------");
package_extract_dir("system", "/system");
ui_print("-----------------------------------------");
ui_print("------------Setting Permissions----------");
ui_print("-----------------------------------------");
ui_print(" Restoreing Permissions for deodexed files");
set_metadata_recursive("/system/framework", "uid", 0, "gid", 0, "dmode", 0777, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/app", "uid", 0, "gid", 2000, "dmode", 0777, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/priv-app", "uid", 0, "gid", 2000, "dmode", 0777, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/build.prop", "uid", 0, "gid", 0, "dmode", 0777, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
ui_print("-----------------------------------------");
ui_print(" Updates and deodex installed sucess !! ");
ui_print("-----------------------------------------");
ui_print("-----------------------------------------");
ui_print("----------------Please wipe--------------");
ui_print("-------------cache and dalvik------------");
ui_print("------------and reboot device ;)---------");
ui_print("-----------------------------------------");
ui_print("-------------Unmounting System-----------");
unmount("/system");
Please add chmod if your patch must work without any bugs or bricks . My script is for you only sample for do that correct . If you have problem's with do a correct zip write to me pm .

Categories

Resources