Advertisement
sifat3d

pa cm liberty port updater script

Feb 25th, 2013
3,403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. assert(getprop("ro.product.device") == "liberty" || getprop("ro.build.product") == "liberty");
  2. mount("yaffs2", "MTD", "system", "/system");
  3. package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
  4. package_extract_file("system/bin/backuptool.functions", "/tmp/backuptool.functions");
  5. set_perm(0, 0, 0777, "/tmp/backuptool.sh");
  6. set_perm(0, 0, 0644, "/tmp/backuptool.functions");
  7. run_program("/tmp/backuptool.sh", "backup");
  8. unmount("/system");
  9. show_progress(0.500000, 0);
  10. format("yaffs2", "MTD", "system", "0", "/system");
  11. mount("yaffs2", "MTD", "system", "/system");
  12. package_extract_dir("system", "/system");
  13. symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
  14. symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
  15. symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
  16.         "/system/xbin/adjtimex", "/system/xbin/arp", "/system/xbin/ash",
  17.         "/system/xbin/awk", "/system/xbin/base64", "/system/xbin/basename",
  18.         "/system/xbin/bbconfig", "/system/xbin/blkid", "/system/xbin/blockdev",
  19.         "/system/xbin/brctl", "/system/xbin/bunzip2", "/system/xbin/bzcat",
  20.         "/system/xbin/bzip2", "/system/xbin/cal", "/system/xbin/cat",
  21.         "/system/xbin/catv", "/system/xbin/chattr", "/system/xbin/chgrp",
  22.         "/system/xbin/chmod", "/system/xbin/chown", "/system/xbin/chroot",
  23.         "/system/xbin/clear", "/system/xbin/cmp", "/system/xbin/comm",
  24.         "/system/xbin/cp", "/system/xbin/cpio", "/system/xbin/crond",
  25.         "/system/xbin/crontab", "/system/xbin/cut", "/system/xbin/date",
  26.         "/system/xbin/dc", "/system/xbin/dd", "/system/xbin/depmod",
  27.         "/system/xbin/devmem", "/system/xbin/df", "/system/xbin/diff",
  28.         "/system/xbin/dirname", "/system/xbin/dmesg", "/system/xbin/dnsd",
  29.         "/system/xbin/dos2unix", "/system/xbin/du", "/system/xbin/echo",
  30.         "/system/xbin/ed", "/system/xbin/egrep", "/system/xbin/env",
  31.         "/system/xbin/expand", "/system/xbin/expr", "/system/xbin/false",
  32.         "/system/xbin/fdisk", "/system/xbin/fgrep", "/system/xbin/find",
  33.         "/system/xbin/flash_lock", "/system/xbin/flash_unlock",
  34.         "/system/xbin/flashcp", "/system/xbin/flock", "/system/xbin/fold",
  35.         "/system/xbin/free", "/system/xbin/freeramdisk", "/system/xbin/fsync",
  36.         "/system/xbin/ftpget", "/system/xbin/ftpput", "/system/xbin/fuser",
  37.         "/system/xbin/getopt", "/system/xbin/grep", "/system/xbin/groups",
  38.         "/system/xbin/gunzip", "/system/xbin/gzip", "/system/xbin/halt",
  39.         "/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/id",
  40.         "/system/xbin/ifconfig", "/system/xbin/inetd", "/system/xbin/insmod",
  41.         "/system/xbin/install", "/system/xbin/iostat", "/system/xbin/ip",
  42.         "/system/xbin/kill", "/system/xbin/killall", "/system/xbin/killall5",
  43.         "/system/xbin/length", "/system/xbin/less", "/system/xbin/ln",
  44.         "/system/xbin/losetup", "/system/xbin/ls", "/system/xbin/lsattr",
  45.         "/system/xbin/lsmod", "/system/xbin/lsusb", "/system/xbin/lzcat",
  46.         "/system/xbin/lzma", "/system/xbin/lzop", "/system/xbin/lzopcat",
  47.         "/system/xbin/man", "/system/xbin/md5sum", "/system/xbin/mesg",
  48.         "/system/xbin/mkdir", "/system/xbin/mke2fs", "/system/xbin/mkfifo",
  49.         "/system/xbin/mkfs.ext2", "/system/xbin/mkfs.vfat",
  50.         "/system/xbin/mknod", "/system/xbin/mkswap", "/system/xbin/mktemp",
  51.         "/system/xbin/modinfo", "/system/xbin/modprobe", "/system/xbin/more",
  52.         "/system/xbin/mount", "/system/xbin/mountpoint", "/system/xbin/mpstat",
  53.         "/system/xbin/mv", "/system/xbin/nanddump", "/system/xbin/nandwrite",
  54.         "/system/xbin/netstat", "/system/xbin/nice", "/system/xbin/nohup",
  55.         "/system/xbin/nslookup", "/system/xbin/ntpd", "/system/xbin/od",
  56.         "/system/xbin/patch", "/system/xbin/pgrep", "/system/xbin/pidof",
  57.         "/system/xbin/ping", "/system/xbin/pkill", "/system/xbin/pmap",
  58.         "/system/xbin/poweroff", "/system/xbin/printenv", "/system/xbin/printf",
  59.         "/system/xbin/ps", "/system/xbin/pstree", "/system/xbin/pwd",
  60.         "/system/xbin/pwdx", "/system/xbin/rdev", "/system/xbin/readlink",
  61.         "/system/xbin/realpath", "/system/xbin/renice", "/system/xbin/reset",
  62.         "/system/xbin/resize", "/system/xbin/rev", "/system/xbin/rm",
  63.         "/system/xbin/rmdir", "/system/xbin/rmmod", "/system/xbin/route",
  64.         "/system/xbin/run-parts", "/system/xbin/rx", "/system/xbin/sed",
  65.         "/system/xbin/seq", "/system/xbin/setconsole", "/system/xbin/setserial",
  66.         "/system/xbin/setsid", "/system/xbin/sh", "/system/xbin/sha1sum",
  67.         "/system/xbin/sha256sum", "/system/xbin/sha512sum",
  68.         "/system/xbin/sleep", "/system/xbin/sort", "/system/xbin/split",
  69.         "/system/xbin/stat", "/system/xbin/strings", "/system/xbin/stty",
  70.         "/system/xbin/sum", "/system/xbin/swapoff", "/system/xbin/swapon",
  71.         "/system/xbin/sync", "/system/xbin/sysctl", "/system/xbin/tac",
  72.         "/system/xbin/tail", "/system/xbin/tar", "/system/xbin/taskset",
  73.         "/system/xbin/tee", "/system/xbin/telnet", "/system/xbin/telnetd",
  74.         "/system/xbin/test", "/system/xbin/tftp", "/system/xbin/tftpd",
  75.         "/system/xbin/time", "/system/xbin/timeout", "/system/xbin/top",
  76.         "/system/xbin/touch", "/system/xbin/tr", "/system/xbin/traceroute",
  77.         "/system/xbin/true", "/system/xbin/ttysize", "/system/xbin/tune2fs",
  78.         "/system/xbin/umount", "/system/xbin/uname", "/system/xbin/uncompress",
  79.         "/system/xbin/unexpand", "/system/xbin/uniq", "/system/xbin/unix2dos",
  80.         "/system/xbin/unlzma", "/system/xbin/unlzop", "/system/xbin/unxz",
  81.         "/system/xbin/unzip", "/system/xbin/uptime", "/system/xbin/usleep",
  82.         "/system/xbin/uudecode", "/system/xbin/uuencode", "/system/xbin/vi",
  83.         "/system/xbin/watch", "/system/xbin/wc", "/system/xbin/wget",
  84.         "/system/xbin/which", "/system/xbin/whoami", "/system/xbin/xargs",
  85.         "/system/xbin/xz", "/system/xbin/xzcat", "/system/xbin/yes",
  86.         "/system/xbin/zcat");
  87. symlink("mksh", "/system/bin/sh");
  88. symlink("toolbox", "/system/bin/cat", "/system/bin/chmod",
  89.         "/system/bin/chown", "/system/bin/cmp", "/system/bin/date",
  90.         "/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
  91.         "/system/bin/getevent", "/system/bin/getprop", "/system/bin/hd",
  92.         "/system/bin/id", "/system/bin/ifconfig", "/system/bin/iftop",
  93.         "/system/bin/insmod", "/system/bin/ioctl", "/system/bin/ionice",
  94.         "/system/bin/kill", "/system/bin/ln", "/system/bin/log",
  95.         "/system/bin/ls", "/system/bin/lsmod", "/system/bin/lsof",
  96.         "/system/bin/md5", "/system/bin/mkdir", "/system/bin/mount",
  97.         "/system/bin/mv", "/system/bin/nandread", "/system/bin/netstat",
  98.         "/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
  99.         "/system/bin/ps", "/system/bin/r", "/system/bin/reboot",
  100.         "/system/bin/renice", "/system/bin/rm", "/system/bin/rmdir",
  101.         "/system/bin/rmmod", "/system/bin/route", "/system/bin/schedtop",
  102.         "/system/bin/sendevent", "/system/bin/setconsole",
  103.         "/system/bin/setprop", "/system/bin/sleep", "/system/bin/smd",
  104.         "/system/bin/start", "/system/bin/stop", "/system/bin/sync",
  105.         "/system/bin/top", "/system/bin/touch", "/system/bin/umount",
  106.         "/system/bin/uptime", "/system/bin/vmstat", "/system/bin/watchprops",
  107.         "/system/bin/wipe");
  108. set_perm_recursive(0, 0, 0755, 0644, "/system");
  109. set_perm_recursive(0, 0, 0755, 0755, "/system/addon.d");
  110. set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
  111. set_perm(0, 3003, 02750, "/system/bin/netcfg");
  112. set_perm(0, 3004, 02755, "/system/bin/ping");
  113. set_perm(0, 2000, 06750, "/system/bin/run-as");
  114. set_perm(1001, 1005, 0444, "/system/etc/AudioPara4.csv");
  115. set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
  116. set_perm(0, 0, 0755, "/system/etc/bluetooth");
  117. set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
  118. set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
  119. set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
  120. set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
  121. set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");
  122. set_perm(0, 0, 0755, "/system/etc/init.d");
  123. set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
  124. set_perm(1000, 1000, 0644, "/system/etc/paranoid/properties.conf");
  125. set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
  126. set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
  127. set_perm(0, 0, 0644, "/system/vendor/etc/audio_effects.conf");
  128. set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
  129. set_perm(0, 2000, 0755, "/system/vendor/firmware");
  130. set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
  131. set_perm(0, 0, 06755, "/system/xbin/librank");
  132. set_perm(0, 0, 06755, "/system/xbin/procmem");
  133. set_perm(0, 0, 06755, "/system/xbin/procrank");
  134. set_perm(0, 0, 06755, "/system/xbin/su");
  135. show_progress(0.200000, 0);
  136. show_progress(0.200000, 10);
  137. package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
  138. package_extract_file("system/bin/backuptool.functions", "/tmp/backuptool.functions");
  139. set_perm(0, 0, 0777, "/tmp/backuptool.sh");
  140. set_perm(0, 0, 0644, "/tmp/backuptool.functions");
  141. run_program("/tmp/backuptool.sh", "restore");
  142. delete("/system/bin/backuptool.sh");
  143. delete("/system/bin/backuptool.functions");
  144. package_extract_file("system/bin/modelid_cfg.sh", "/tmp/modelid_cfg.sh");
  145. set_perm(0, 0, 0777, "/tmp/modelid_cfg.sh");
  146. run_program("/tmp/modelid_cfg.sh", "");
  147. show_progress(0.200000, 10);
  148. package_extract_file("boot.img", "/tmp/boot.img");write_raw_image("/tmp/boot.img", "boot");
  149. show_progress(0.100000, 0);
  150. unmount("/system");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement