Advertisement
wilmans2m

updater-script

Feb 2nd, 2016
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.66 KB | None | 0 0
  1. set_progress(0.0);
  2. ui_print(" ");
  3. ui_print("************************************");
  4. ui_print("S5 Neo NeoLite Lollipop Rom 1.0");
  5. ui_print("Made by wilmans2m");
  6. ui_print("************************************");
  7. ifelse(is_mounted("/system") == "/system", unmount("/system"));
  8. ifelse(is_mounted("/cache") == "/cache", unmount("/cache"));
  9. ifelse(is_mounted("/data") == "/data", unmount("/data"));
  10.  
  11. run_program("/sbin/sleep", "1");
  12.  
  13. ui_print("+++MOUNTING PARTITIONS+++");
  14. run_program("/sbin/sh", "-c", "mount -t ext4 -o rw /dev/block/platform/13540000.dwmmc0/by-name/SYSTEM /system");
  15. run_program("/sbin/sh", "-c", "mount -t ext4 -o rw /dev/block/platform/13540000.dwmmc0/by-name/DATA /data");
  16. run_program("/sbin/sh", "-c", "mount -t ext4 -o rw /dev/block/platform/13540000.dwmmc0/by-name/CACHE /cache");
  17. ui_print("+++MOUNTING DONE+++");
  18.  
  19. ui_print("Wiping cache, dalvik, system");
  20. run_program("/sbin/sh", "-c", "rm -fR /cache /data/dalvik-cache /system");
  21. run_program("/sbin/sleep", "2");
  22.  
  23. ui_print("--> Installing NeoLite Lollipop Rom 1.0");
  24.  
  25. package_extract_dir("system", "/system");
  26.  
  27. run_program("/sbin/sleep", "3");
  28.  
  29. ui_print("--> Setting Permissions");
  30.  
  31. set_perm_recursive(0, 0, 0755, 0644, "/system");
  32. set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
  33. set_perm_recursive(0, 2000, 0755, 0755, "/system/vendor");
  34. set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
  35. set_perm_recursive(0, 0, 0755, 0644, "/system/etc/dhcpcd");
  36. set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp);
  37. set_perm_recursive(0, 0, 0755, 0644, "/system/lib");
  38. set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
  39. set_perm(0, 2000, 0755, "/system/bin/androidshmservice");
  40. set_perm(0, 2000, 0755, "/system/bin/apaservice");
  41. set_perm(0, 2000, 0755, "/system/bin/app_process32");
  42. set_perm(0, 2000, 0755, "/system/bin/at_distributor");
  43. set_perm(0, 2000, 0755, "/system/bin/auditd");
  44. set_perm(0, 2000, 0755, "/system/bin/bootanimation");
  45. set_perm(0, 2000, 0755, "/system/bin/bootchecker");
  46. set_perm(0, 2000, 0755, "/system/bin/bugreport");
  47. set_perm(0, 2000, 0755, "/system/bin/charon");
  48. set_perm(0, 2000, 0755, "/system/bin/clatd");
  49. set_perm(0, 2000, 0755, "/system/bin/connfwexe");
  50. set_perm(0, 2000, 0755, "/system/bin/cs");
  51. set_perm(0, 2000, 0755, "/system/bin/ddexe");
  52. set_perm(0, 2000, 0755, "/system/bin/debuggerd");
  53. set_perm(0, 2000, 0755, "/system/bin/dex2oat");
  54. set_perm(0, 2000, 0755, "/system/bin/dhcpcd");
  55. set_perm(0, 2000, 0755, "/system/bin/dnsmasq");
  56. set_perm(0, 2000, 0755, "/system/bin/dpm");
  57. set_perm(0, 2000, 0755, "/system/bin/drmserver");
  58. set_perm(0, 2000, 0755, "/system/bin/drsd");
  59. set_perm(0, 2000, 0755, "/system/bin/dumpstate");
  60. set_perm(0, 2000, 0755, "/system/bin/dumpsys");
  61. set_perm(0, 2000, 0755, "/system/bin/edmaudit");
  62. set_perm(0, 2000, 0755, "/system/bin/hostapd");
  63. set_perm(0, 2000, 0755, "/system/bin/icd");
  64. set_perm(0, 2000, 0755, "/system/bin/immvibed");
  65. set_perm(0, 0, 0750, "/system/bin/install-recovery.sh");
  66. set_perm(0, 2000, 0755, "/system/bin/installd");
  67. set_perm(0, 2000, 0755, "/system/bin/insthk");
  68. set_perm(0, 2000, 0755, "/system/bin/jackservice");
  69. set_perm(0, 2000, 0755, "/system/bin/keystore");
  70. set_perm(0, 2000, 0755, "/system/bin/lmkd");
  71. set_perm(0, 2000, 0755, "/system/bin/logd");
  72. set_perm(0, 2000, 0755, "/system/bin/macloader");
  73. set_perm(0, 2000, 0755, "/system/bin/mcDriverDaemon");
  74. set_perm(0, 2000, 0755, "/system/bin/mdnsd");
  75. set_perm(0, 2000, 0755, "/system/bin/mediaserver");
  76. set_perm(0, 2000, 0755, "/system/bin/mfgloader");
  77. set_perm(0, 2000, 0755, "/system/bin/mpdecision");
  78. set_perm(0, 2000, 0755, "/system/bin/mtpd");
  79. set_perm(0, 3003, 02750, "/system/bin/netcfg");
  80. set_perm(0, 2000, 0755, "/system/bin/netd");
  81. set_perm(0, 2000, 0755, "/system/bin/netmgrd");
  82. set_perm(0, 2000, 0755, "/system/bin/npsmobex");
  83. set_perm(0, 2000, 0755, "/system/bin/olsrd");
  84. set_perm(0, 2000, 0755, "/system/bin/patchoat");
  85. set_perm(0, 2000, 0755, "/system/bin/ping");
  86. set_perm(0, 2000, 0755, "/system/bin/pppd");
  87. set_perm(0, 2000, 0755, "/system/bin/prepare_param.sh");
  88. set_perm(0, 2000, 0755, "/system/bin/racoon");
  89. set_perm(1000, 1000, 0710, "/system/bin/resetreason");
  90. set_perm(0, 2000, 0755, "/system/bin/rild");
  91. set_perm(0, 2000, 0750, "/system/bin/run-as");
  92. set_perm(0, 2000, 0755, "/system/bin/samsungpowersoundplay");
  93. set_perm(0, 2000, 0755, "/system/bin/sdcard");
  94. set_perm(0, 2000, 0755, "/system/bin/sdp_cryptod");
  95. set_perm(0, 2000, 0755, "/system/bin/secure_storage_daemon");
  96. set_perm(0, 2000, 0755, "/system/bin/selinux-network.sh");
  97. set_perm(0, 2000, 0755, "/system/bin/sensorservice");
  98. set_perm(0, 2000, 0755, "/system/bin/servicemanager");
  99. set_perm(0, 2000, 0755, "/system/bin/sh");
  100. set_perm(0, 2000, 0755, "/system/bin/smdexe");
  101. set_perm(0, 2000, 0755, "/system/bin/ss_conn_daemon");
  102. set_perm(0, 2000, 0755, "/system/bin/ss_kbservice_daemon");
  103. set_perm(0, 2000, 0755, "/system/bin/surfaceflinger");
  104. set_perm(0, 2000, 0755, "/system/bin/tima_dump_log");
  105. set_perm(0, 2000, 0755, "/system/bin/tlc_server");
  106. set_perm(0, 0, 0750, "/system/bin/uncrypt");
  107. set_perm(0, 2000, 0755, "/system/bin/vdc");
  108. set_perm(0, 2000, 0755, "/system/bin/vold");
  109. set_perm(0, 2000, 0755, "/system/bin/wlandutservice");
  110. set_perm(0, 2000, 0755, "/system/bin/wpa_supplicant");
  111. set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
  112. set_perm(0, 0, 0644, "/system/etc/event-log-tags");
  113. set_perm(0, 0, 0755, "/system/lib/drm");
  114.  
  115. ui_print("--> Permissions done!");
  116.  
  117. run_program("/sbin/sleep", "3");
  118.  
  119. ui_print("--> Setting Symlinks");
  120.  
  121. symlink("app_process32", "/system/bin/app_process");
  122. symlink("dalvikvm32", "/system/bin/dalvikvm");
  123. symlink("toolbox", "/system/bin/cat", "/system/bin/chcon", "/system/bin/chmod", "/system/bin/chown",
  124. "/system/bin/clear", "/system/bin/cmp", "/system/bin/cp", "/system/bin/date", "/system/bin/dd",
  125. "/system/bin/df", "/system/bin/dmesg", "/system/bin/du", "/system/bin/getenforce", "/system/bin/getevent",
  126. "/system/bin/getprop", "/system/bin/getsebool", "/system/bin/grep", "/system/bin/hd", "/system/bin/id",
  127. "/system/bin/ifconfig", "/system/bin/iftop", "/system/bin/insmod", "/system/bin/ioctl", "/system/bin/ionice",
  128. "/system/bin/kill", "/system/bin/ln", "/system/bin/load_policy", "/system/bin/log", "/system/bin/ls",
  129. "/system/bin/lsmod", "/system/bin/lsof", "/system/bin/md5", "/system/bin/mkdir", "/system/bin/mknod",
  130. "/system/bin/mkswap", "/system/bin/mount", "/system/bin/mv", "/system/bin/nandread", "/system/bin/netstat",
  131. "/system/bin/newfs_msdos", "/system/bin/nohup", "/system/bin/notify", "/system/bin/printenv", "/system/bin/ps",
  132. "/system/bin/readlink", "/system/bin/renice", "/system/bin/restorecon", "/system/bin/rm", "/system/bin/rmdir",
  133. "/system/bin/rmmod", "/system/bin/route", "/system/bin/runcon", "/system/bin/schedtop", "/system/bin/sendevent",
  134. "/system/bin/setenforce", "/system/bin/setprop", "/system/bin/setsebool", "/system/bin/sleep", "/system/bin/smd",
  135. "/system/bin/start", "/system/bin/stop", "/system/bin/swapoff", "/system/bin/swapon", "/system/bin/sync",
  136. "/system/bin/top", "/system/bin/touch", "/system/bin/umount", "/system/bin/uptime",
  137. "/system/bin/vmstat", "/system/bin/watchprops", "/system/bin/wipe");
  138. symlink("/system/lib/libbluetooth_jni.so", "/system/app/Bluetooth/lib/arm/libbluetooth_jni.so");
  139. symlink("/system/lib/libnfc_nci_jni.so", "/system/app/NfcNci/lib/arm/libnfc_nci_jni.so");
  140. symlink("/system/lib/libjni_pacprocessor.so", "/system/app/PacProcessor/lib/arm/libjni_pacprocessor.so");
  141. symlink("/system/lib/libcommonpawrapper.so", "/system/app/RootPA/lib/arm/libcommonpawrapper.so");
  142. symlink("/system/lib/libapa_jni.so", "/system/app/SapaMonitor/lib/arm/libapa_jni.so");
  143. symlink("/system/lib/libdefcontainer_jni.so", "/system/priv-app/DefaultContainerService/lib/arm/libdefcontainer_jni.so");
  144. symlink("/data/misc/audio/wcd9320_anc.bin", "/system/etc/firmware/wcd9320/wcd9320_anc.bin");
  145. symlink("/data/misc/audio/wcd9320_mad_audio.bin", "/system/etc/firmware/wcd9320/wcd9320_mad_audio.bin");
  146. symlink("/data/misc/audio/mbhc.bin", "/system/etc/firmware/wcd9320/wcd9320_mbhc.bin");
  147. symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
  148. symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
  149. symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
  150. symlink("/system/lib/libbluetooth_jni.so", "/system/app/Bluetooth/lib/arm/libbluetooth_jni.so");
  151. symlink("/system/lib/libcommonpawrapper.so", "/system/app/RootPA/lib/arm/libcommonpawrapper.so");
  152. symlink("/system/lib/libdefcontainer_jni.so", "/system/priv-app/DefaultContainerService/lib/arm/libdefcontainer_jni.so");
  153. symlink("/system/lib/libjni_emailencryption.so", "/system/app/SecEmail_K/lib/arm/libjni_emailencryption.so");
  154. symlink("/system/lib/libjni_pacprocessor.so", "/system/app/PacProcessor/lib/arm/libjni_pacprocessor.so");
  155. symlink("/system/lib/libloadStylusCore.so", "/system/app/SamsungIME/lib/arm/libloadStylusCore.so");
  156. symlink("/system/lib/libnfc_nci_jni.so", "/system/app/NfcNci/lib/arm/libnfc_nci_jni.so");
  157. symlink("/system/lib/libprintspooler_jni.so", "/system/app/SPrintSpooler/lib/arm/libprintspooler_jni.so");
  158. symlink("/system/lib/libsbrowser.so", "/system/app/SBrowser/lib/arm/libsbrowser.so");
  159. symlink("/system/lib/libssecv8.so", "/system/app/SBrowser/lib/arm/libssecv8.so");
  160. symlink("/system/lib/libstlport_sh_521.so", "/system/app/SBrowser/lib/arm/libstlport_sh_521.so");
  161. symlink("/system/lib/libwbs.so", "/system/app/SBrowser/lib/arm/libwbs.so");
  162.  
  163. ui_print("--> Symlinks done!");
  164.  
  165. run_program("/sbin/sleep", "3");
  166.  
  167. set_progress(0.6);
  168.  
  169. run_program("/sbin/sleep", "2");
  170.  
  171. ui_print("+++UNMOUNTING PARTITIONS+++");
  172. run_program("/sbin/sh", "-c", "umount /system");
  173. run_program("/sbin/sh", "-c", "umount /data");
  174. run_program("/sbin/sh", "-c", "umount /cache");
  175.  
  176. set_progress(0.8);
  177.  
  178. ui_print(" ");
  179. ui_print("Installation complete");
  180. ui_print(" ");
  181.  
  182. set_progress(0.999992);
  183.  
  184. run_program("/sbin/reboot")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement