assert(getprop("ro.product.device") == "A66" || getprop("ro.build.product") == "PadFone"); ui_print("Installing stock ROM (WW)"); 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("system", "/system"); symlink("/data/asusdata/wifi.nv", "/system/etc/firmware/wlan/prima/wifi.nv"); symlink("/data/misc/audio/mbhc.bin", "/system/etc/firmware/wcd9310/wcd9310_mbhc.bin"); symlink("/data/misc/audio/wcd9310_anc.bin", "/system/etc/firmware/wcd9310/wcd9310_anc.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/lib/modules/prima/cfg80211.ko", "/system/lib/modules/cfg80211.ko"); symlink("/system/lib/modules/prima/prima_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("libxt_v02.so", "/system/lib/libxt_native.so"); symlink("mksh", "/system/bin/sh"); symlink("toolbox", "/system/bin/cat", "/system/bin/chmod", "/system/bin/chown", "/system/bin/cmp", "/system/bin/date", "/system/bin/dd", "/system/bin/df", "/system/bin/dmesg", "/system/bin/getevent", "/system/bin/getprop", "/system/bin/hd", "/system/bin/id", "/system/bin/ifconfig", "/system/bin/iftop", "/system/bin/insmod", "/system/bin/ioctl", "/system/bin/ionice", "/system/bin/kill", "/system/bin/ln", "/system/bin/log", "/system/bin/ls", "/system/bin/lsmod", "/system/bin/lsof", "/system/bin/md5", "/system/bin/mkdir", "/system/bin/mount", "/system/bin/mv", "/system/bin/nandread", "/system/bin/netstat", "/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv", "/system/bin/ps", "/system/bin/reboot", "/system/bin/renice", "/system/bin/rm", "/system/bin/rmdir", "/system/bin/rmmod", "/system/bin/route", "/system/bin/schedtop", "/system/bin/sendevent", "/system/bin/setconsole", "/system/bin/setprop", "/system/bin/sleep", "/system/bin/smd", "/system/bin/start", "/system/bin/stop", "/system/bin/sync", "/system/bin/top", "/system/bin/touch", "/system/bin/umount", "/system/bin/uptime", "/system/bin/vmstat", "/system/bin/watchprops", "/system/bin/wipe"); set_perm_recursive(0, 0, 0755, 0644, "/system"); set_perm_recursive(0, 2000, 0755, 0755, "/system/bin"); set_perm(0, 1000, 0750, "/system/bin/iptables"); set_perm(0, 3003, 02750, "/system/bin/netcfg"); set_perm(0, 3004, 02755, "/system/bin/ping"); set_perm(0, 2000, 06750, "/system/bin/run-as"); set_perm(0, 1000, 0750, "/system/bin/tc"); set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth"); set_perm(0, 0, 0755, "/system/etc/bluetooth"); set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf"); set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf"); set_perm(0, 0, 0644, "/system/etc/bluetooth/iop_device_list.conf"); set_perm(1002, 1002, 0440, "/system/etc/dbus.conf"); set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks"); set_perm(0, 0, 0770, "/system/etc/init.asus.acl.sh"); set_perm(0, 0, 0770, "/system/etc/init.asus.audbg.sh"); set_perm(0, 0, 0770, "/system/etc/init.asus.checkdatalog.sh"); set_perm(0, 0, 0770, "/system/etc/init.asus.kernelmessage.sh"); set_perm(0, 0, 0770, "/system/etc/init.asus.p01dbg.sh"); set_perm(0, 0, 0770, "/system/etc/init.asus.ramdump.sh"); set_perm(0, 0, 0770, "/system/etc/init.asus.rwctest.sh"); set_perm(0, 0, 0770, "/system/etc/init.asus.vibrator_voltage.sh"); set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh"); set_perm(0, 1000, 0550, "/system/etc/init.qcom.sdio.sh"); set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp"); set_perm(0, 0, 0770, "/system/etc/prepare_asusdebug.sh"); set_perm(0, 0, 0770, "/system/etc/savelog.sh"); set_perm(0, 0, 0770, "/system/etc/savelogmtp.sh"); set_perm(0, 0, 0770, "/system/etc/saveramdump.sh"); set_perm(0, 0, 0770, "/system/etc/write_emmc.sh"); set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor"); set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/lib"); set_perm(0, 2000, 0755, "/system/vendor/lib"); set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/lib/drm"); set_perm(0, 0, 0644, "/system/vendor/lib/drm/libdrmwvmplugin.so"); set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/lib/hw"); set_perm(0, 0, 0644, "/system/vendor/lib/hw/power.qcom.so"); set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/left_eye-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin"); set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/nose_base-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin"); set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/right_eye-y0-yi45-p0-pi45-r0-ri20.lg_32-2/full_model.bin"); set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-r0-ri30.4a-v24/full_model.bin"); set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-rn30-ri30.5-v24/full_model.bin"); set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-rp30-ri30.5-v24/full_model.bin"); set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/recognition/face.face.y0-y0-22-b-N/full_model.bin"); set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin"); set_perm(0, 0, 0755, "/system/xbin/tcpdump"); 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); unmount("/system"); ui_print("Writing modem image..."); package_extract_s_file("NON-HLOS.bin", "/dev/block/platform/msm_sdcc.1/by-name/modem"); ui_print("Writing sbl2 image..."); package_extract_s_file("sbl2.mbn", "/dev/block/platform/msm_sdcc.1/by-name/sbl2"); ui_print("Writing aboot image..."); package_extract_s_file("emmc_appsboot.mbn", "/dev/block/platform/msm_sdcc.1/by-name/aboot"); ui_print("Writing rpm image..."); package_extract_s_file("rpm.mbn", "/dev/block/platform/msm_sdcc.1/by-name/rpm"); ui_print("Writing sbl1 image..."); package_extract_s_file("sbl1.mbn", "/dev/block/platform/msm_sdcc.1/by-name/sbl1"); ui_print("Writing tz image..."); package_extract_s_file("tz.mbn", "/dev/block/platform/msm_sdcc.1/by-name/tz"); ui_print("Writing sbl3 image..."); package_extract_s_file("sbl3.mbn", "/dev/block/platform/msm_sdcc.1/by-name/sbl3"); ui_print("You're back on the latest stock WW ROM"); ui_print("By SparkyRih @ htp://www.padfoneclub.com"); ui_print("Have fun! :)");