[Completed] Updater-script error 6 - XDA Assist

I'm terribly new to recovery scripting. Why I'm I getting code 6 error in TWRP?
Line endings are LF already in the "updater-script" file.
Code:
ui_print("+-------------------------------------+");
ui_print("| ANDROID DEBLOATER |");
ui_print("+-------------------------------------+");
ui_print(" ");
show_progress(0.0, 1);
run_program("/sbin/sleep", "1");
ui_print("***REMOUNTING /SYSTEM***");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "mount", "/system");
ui_print(" ");
ui_print(" ");
ui_print("***REMOUNTING /CUST***");
run_program("/sbin/busybox", "umount", "/cust");
run_program("/sbin/busybox", "mount", "/cust");
ui_print(" ");
ui_print(" ");
show_progress(0.1, 1);
run_program("/sbin/sleep", "1");
ui_print("***CREATING BACKUP FOLDERS***");
run_program("/sbin/busybox", "mkdir", "/system/Debloat");
run_program("/sbin/busybox", "mkdir", "/system/Debloat/cust");
run_program("/sbin/busybox", "mkdir", "/system/Debloat/cust/app");
run_program("/sbin/busybox", "mkdir", "/system/Debloat/system");
run_program("/sbin/busybox", "mkdir", "/system/Debloat/system/app");
run_program("/sbin/busybox", "mkdir", "/system/Debloat/system/etc");
run_program("/sbin/busybox", "mkdir", "/system/Debloat/system/priv-app");
ui_print(" ");
ui_print(" ");
show_progress(0.2, 1);
run_program("/sbin/sleep", "1");
ui_print("***SETTING PERMISSIONS FOR BACKUP FOLDERS***");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat/cust");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat/cust/app");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat/system");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat/system/app");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat/system/etc");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat/system/priv-app");
ui_print(" ");
ui_print(" ");
show_progress(0.3, 1);
run_program("/sbin/sleep", "1");
ui_print("***MOVING /CUST/APP/CUSTOMIZED***");
run_program("/sbin/busybox", "mv", "/cust/app/customized", "/system/Debloat/cust/app");
ui_print(" ");
ui_print(" ");
show_progress(0.4, 1);
run_program("/sbin/sleep", "1");
ui_print("***MOVING /SYSTEM/APP***");
run_program("/sbin/busybox", "mv", "/system/app/AnalyticsCore", "/system/Debloat/system/app/");
#run_program("/sbin/busybox", "mv", "/system/app/AntHalService", "/system/Debloat/system/app/"); #for smartwatches, tracking sports etc.
#run_program("/sbin/busybox", "mv", "/system/app/AntiSpam", "/system/Debloat/system/app/"); #block numbers
run_program("/sbin/busybox", "mv", "/system/app/BasicDreams", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/BookmarkProvider", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/BugReport", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Chrome", "/system/Debloat/system/app/");
#run_program("/sbin/busybox", "mv", "/system/app/Cit", "/system/Debloat/system/app/"); #diagnostics
run_program("/sbin/busybox", "mv", "/system/app/CloudPrint2", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/CloudService", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/CTNVItem", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/DMService", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/DocumentsUI", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Drive", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Email", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/fastdormancy", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/FileExplorer", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Galaxy4", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Gmail2", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/GoogleTTS", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/GuardProvider", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Hangouts", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/HoloSpiralWallpaper", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/HTMLViewer", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/KeyChain", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/KingSoftCleaner", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/KSICibaEngine", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/LatinImeGoogle", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/LiveWallpapers", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/LiveWallpapersPicker", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Maps", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/matcli", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/MiDiscover", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/MiDrive", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/MiLinkService", "/system/Debloat/system/app/");
#run_program("/sbin/busybox", "mv", "/system/app/MiGalleryLockscreen", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/MiLivetalk", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/MiPlay", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/MiuiVideo", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/MiuiVideoPlayer", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/MiWallpaper", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/ModemTestMode", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Music2", "/system/Debloat/system/app/");
#run_program("/sbin/busybox", "mv", "/system/app/NetworkAssistant2", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/NfcNci", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/NFCtestSvc", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/NoiseField", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Notes", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/PacProcessor", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/PartnerBookmarksProvider", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/PaymentService", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/PerfTurbo", "/system/Debloat/system/app/");
#run_program("/sbin/busybox", "mv", "/system/app/PersonalAssistantPlugin", "/system/Debloat/system/app/"); #breaks MiLauncher if removed
#run_program("/sbin/busybox", "mv", "/system/app/PowerKeeper", "/system/Debloat/system/app/"); #battery optimizer
run_program("/sbin/busybox", "mv", "/system/app/PhaseBeam", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Photos", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/PhaseBeam", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/PhotoTable", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/PrintSpooler", "/system/Debloat/system/app/");
#run_program("/sbin/busybox", "mv", "/system/app/SecurityAdd", "/system/Debloat/system/app/");
#run_program("/sbin/busybox", "mv", "/system/app/SecurityCoreAdd", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/SeempService", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/SmsExtra", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/SpacesCore", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/SpacesPolicyApp", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/SSCMService", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/StepsProvider", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Stk", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/SYSOPT", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/SystemAdSolution", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/talkback", "/system/Debloat/system/app/");
#run_program("/sbin/busybox", "mv", "/system/app/ThemeManager", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/TouchAssistant", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/TranslationService", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/uimremoteclient", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Updater", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Videos", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/WAPPushManager", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/WfdService", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Whetstone", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/xdivert", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/XiaomiAccount", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/XiaomiServiceFramework", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/XiaomiSimActivateService", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/YouTube", "/system/Debloat/system/app/");
ui_print(" ");
ui_print(" ");
show_progress(0.5, 1);
run_program("/sbin/sleep", "1");
ui_print("***MOVING /SYSTEM/DATA-APP***");
run_program("/sbin/busybox", "mv", "/system/data-app", "/system/Debloat/system");
ui_print(" ");
ui_print(" ");
show_progress(0.6, 1);
run_program("/sbin/sleep", "1");
ui_print("***MOVING /SYSTEM/ETC***");
run_program("/sbin/busybox", "mv", "/system/etc/WhetstonePermission", "/system/Debloat/system/etc");
ui_print(" ");
ui_print(" ");
show_progress(0.7, 1);
run_program("/sbin/sleep", "1");
ui_print("***MOVING /SYSTEM/PRIV-APP***");
run_program("/sbin/busybox", "mv", "/system/priv-app/Backup", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/BackupRestoreConfirmation", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/Browser", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/Calendar", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/CallLogBackup", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/CellBroadcastReceiver", "/system/Debloat/system/priv-app/");
#run_program("/sbin/busybox", "mv", "/system/priv-app/CleanMaster", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/CloudBackup", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/CloudServiceSysbase", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/CNEService", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/DownloadProviderUi", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/dpmserviceapp", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/FindDevice", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/GoogleFeedback", "/system/Debloat/system/priv-app/");
#run_program("/sbin/busybox", "mv", "/system/priv-app/GoogleOneTimeInitializer", "/system/Debloat/system/priv-app/"); #required for first boot
run_program("/sbin/busybox", "mv", "/system/priv-app/ims", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/ManagedProvisioning", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/MiDrop", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/Mipub", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/MiuiGallery", "/system/Debloat/system/priv-app/");
#run_program("/sbin/busybox", "mv", "/system/priv-app/MiuiKeyguard", "/system/Debloat/system/priv-app/"); #breaks lockscreen if removed
run_program("/sbin/busybox", "mv", "/system/priv-app/MiuiVideo", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/MiVRFramework", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/Mms", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/Music", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/MusicFX", "/system/Debloat/system/priv-app/");
#run_program("/sbin/busybox", "mv", "/system/priv-app/OneTimeInitializer", "/system/Debloat/system/priv-app/"); #required for first boot
#run_program("/sbin/busybox", "mv", "/system/priv-app/PersonalAssistant", "/system/Debloat/system/priv-app/"); #breaks MiLauncher if removed
run_program("/sbin/busybox", "mv", "/system/priv-app/QuickSearchBox", "/system/Debloat/system/priv-app/");
#run_program("/sbin/busybox", "mv", "/system/priv-app/SecurityCenter", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/SpacesManagerService", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/SpacesTrustAgent", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/Tag", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/Velvet", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/YellowPage", "/system/Debloat/system/priv-app/");
ui_print(" ");
ui_print(" ");
show_progress(0.8, 1);
run_program("/sbin/sleep", "1");
ui_print("***COPYING FILES***");
package_extract_dir("system", "/system");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat/system/app/ClassicKeyboard");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat/system/app/ClassicKeyboard/ClassicKeyboard.apk");
ui_print(" ");
ui_print(" ");
show_progress(0.9, 1);
run_program("/sbin/sleep", "1");
ui_print("***UNMOUNTING /SYSTEM***");
run_program("/sbin/busybox", "umount", "/system");
ui_print(" ");
ui_print(" ");
show_progress(1, 1);
ui_print("OPERATION COMPLETED");
ui_print("ENJOY!");
ui_print(" ");

Rejerf said:
I'm terribly new to recovery scripting. Why I'm I getting code 6 error in TWRP?
Line endings are LF already in the "updater-script" file.
Code:
ui_print("+-------------------------------------+");
ui_print("| ANDROID DEBLOATER |");
ui_print("+-------------------------------------+");
ui_print(" ");
show_progress(0.0, 1);
run_program("/sbin/sleep", "1");
ui_print("***REMOUNTING /SYSTEM***");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "mount", "/system");
ui_print(" ");
ui_print(" ");
ui_print("***REMOUNTING /CUST***");
run_program("/sbin/busybox", "umount", "/cust");
run_program("/sbin/busybox", "mount", "/cust");
ui_print(" ");
ui_print(" ");
show_progress(0.1, 1);
run_program("/sbin/sleep", "1");
ui_print("***CREATING BACKUP FOLDERS***");
run_program("/sbin/busybox", "mkdir", "/system/Debloat");
run_program("/sbin/busybox", "mkdir", "/system/Debloat/cust");
run_program("/sbin/busybox", "mkdir", "/system/Debloat/cust/app");
run_program("/sbin/busybox", "mkdir", "/system/Debloat/system");
run_program("/sbin/busybox", "mkdir", "/system/Debloat/system/app");
run_program("/sbin/busybox", "mkdir", "/system/Debloat/system/etc");
run_program("/sbin/busybox", "mkdir", "/system/Debloat/system/priv-app");
ui_print(" ");
ui_print(" ");
show_progress(0.2, 1);
run_program("/sbin/sleep", "1");
ui_print("***SETTING PERMISSIONS FOR BACKUP FOLDERS***");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat/cust");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat/cust/app");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat/system");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat/system/app");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat/system/etc");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat/system/priv-app");
ui_print(" ");
ui_print(" ");
show_progress(0.3, 1);
run_program("/sbin/sleep", "1");
ui_print("***MOVING /CUST/APP/CUSTOMIZED***");
run_program("/sbin/busybox", "mv", "/cust/app/customized", "/system/Debloat/cust/app");
ui_print(" ");
ui_print(" ");
show_progress(0.4, 1);
run_program("/sbin/sleep", "1");
ui_print("***MOVING /SYSTEM/APP***");
run_program("/sbin/busybox", "mv", "/system/app/AnalyticsCore", "/system/Debloat/system/app/");
#run_program("/sbin/busybox", "mv", "/system/app/AntHalService", "/system/Debloat/system/app/"); #for smartwatches, tracking sports etc.
#run_program("/sbin/busybox", "mv", "/system/app/AntiSpam", "/system/Debloat/system/app/"); #block numbers
run_program("/sbin/busybox", "mv", "/system/app/BasicDreams", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/BookmarkProvider", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/BugReport", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Chrome", "/system/Debloat/system/app/");
#run_program("/sbin/busybox", "mv", "/system/app/Cit", "/system/Debloat/system/app/"); #diagnostics
run_program("/sbin/busybox", "mv", "/system/app/CloudPrint2", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/CloudService", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/CTNVItem", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/DMService", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/DocumentsUI", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Drive", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Email", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/fastdormancy", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/FileExplorer", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Galaxy4", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Gmail2", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/GoogleTTS", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/GuardProvider", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Hangouts", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/HoloSpiralWallpaper", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/HTMLViewer", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/KeyChain", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/KingSoftCleaner", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/KSICibaEngine", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/LatinImeGoogle", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/LiveWallpapers", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/LiveWallpapersPicker", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Maps", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/matcli", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/MiDiscover", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/MiDrive", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/MiLinkService", "/system/Debloat/system/app/");
#run_program("/sbin/busybox", "mv", "/system/app/MiGalleryLockscreen", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/MiLivetalk", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/MiPlay", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/MiuiVideo", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/MiuiVideoPlayer", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/MiWallpaper", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/ModemTestMode", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Music2", "/system/Debloat/system/app/");
#run_program("/sbin/busybox", "mv", "/system/app/NetworkAssistant2", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/NfcNci", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/NFCtestSvc", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/NoiseField", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Notes", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/PacProcessor", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/PartnerBookmarksProvider", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/PaymentService", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/PerfTurbo", "/system/Debloat/system/app/");
#run_program("/sbin/busybox", "mv", "/system/app/PersonalAssistantPlugin", "/system/Debloat/system/app/"); #breaks MiLauncher if removed
#run_program("/sbin/busybox", "mv", "/system/app/PowerKeeper", "/system/Debloat/system/app/"); #battery optimizer
run_program("/sbin/busybox", "mv", "/system/app/PhaseBeam", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Photos", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/PhaseBeam", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/PhotoTable", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/PrintSpooler", "/system/Debloat/system/app/");
#run_program("/sbin/busybox", "mv", "/system/app/SecurityAdd", "/system/Debloat/system/app/");
#run_program("/sbin/busybox", "mv", "/system/app/SecurityCoreAdd", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/SeempService", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/SmsExtra", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/SpacesCore", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/SpacesPolicyApp", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/SSCMService", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/StepsProvider", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Stk", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/SYSOPT", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/SystemAdSolution", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/talkback", "/system/Debloat/system/app/");
#run_program("/sbin/busybox", "mv", "/system/app/ThemeManager", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/TouchAssistant", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/TranslationService", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/uimremoteclient", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Updater", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Videos", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/WAPPushManager", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/WfdService", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/Whetstone", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/xdivert", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/XiaomiAccount", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/XiaomiServiceFramework", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/XiaomiSimActivateService", "/system/Debloat/system/app/");
run_program("/sbin/busybox", "mv", "/system/app/YouTube", "/system/Debloat/system/app/");
ui_print(" ");
ui_print(" ");
show_progress(0.5, 1);
run_program("/sbin/sleep", "1");
ui_print("***MOVING /SYSTEM/DATA-APP***");
run_program("/sbin/busybox", "mv", "/system/data-app", "/system/Debloat/system");
ui_print(" ");
ui_print(" ");
show_progress(0.6, 1);
run_program("/sbin/sleep", "1");
ui_print("***MOVING /SYSTEM/ETC***");
run_program("/sbin/busybox", "mv", "/system/etc/WhetstonePermission", "/system/Debloat/system/etc");
ui_print(" ");
ui_print(" ");
show_progress(0.7, 1);
run_program("/sbin/sleep", "1");
ui_print("***MOVING /SYSTEM/PRIV-APP***");
run_program("/sbin/busybox", "mv", "/system/priv-app/Backup", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/BackupRestoreConfirmation", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/Browser", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/Calendar", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/CallLogBackup", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/CellBroadcastReceiver", "/system/Debloat/system/priv-app/");
#run_program("/sbin/busybox", "mv", "/system/priv-app/CleanMaster", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/CloudBackup", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/CloudServiceSysbase", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/CNEService", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/DownloadProviderUi", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/dpmserviceapp", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/FindDevice", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/GoogleFeedback", "/system/Debloat/system/priv-app/");
#run_program("/sbin/busybox", "mv", "/system/priv-app/GoogleOneTimeInitializer", "/system/Debloat/system/priv-app/"); #required for first boot
run_program("/sbin/busybox", "mv", "/system/priv-app/ims", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/ManagedProvisioning", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/MiDrop", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/Mipub", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/MiuiGallery", "/system/Debloat/system/priv-app/");
#run_program("/sbin/busybox", "mv", "/system/priv-app/MiuiKeyguard", "/system/Debloat/system/priv-app/"); #breaks lockscreen if removed
run_program("/sbin/busybox", "mv", "/system/priv-app/MiuiVideo", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/MiVRFramework", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/Mms", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/Music", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/MusicFX", "/system/Debloat/system/priv-app/");
#run_program("/sbin/busybox", "mv", "/system/priv-app/OneTimeInitializer", "/system/Debloat/system/priv-app/"); #required for first boot
#run_program("/sbin/busybox", "mv", "/system/priv-app/PersonalAssistant", "/system/Debloat/system/priv-app/"); #breaks MiLauncher if removed
run_program("/sbin/busybox", "mv", "/system/priv-app/QuickSearchBox", "/system/Debloat/system/priv-app/");
#run_program("/sbin/busybox", "mv", "/system/priv-app/SecurityCenter", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/SpacesManagerService", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/SpacesTrustAgent", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/Tag", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/Velvet", "/system/Debloat/system/priv-app/");
run_program("/sbin/busybox", "mv", "/system/priv-app/YellowPage", "/system/Debloat/system/priv-app/");
ui_print(" ");
ui_print(" ");
show_progress(0.8, 1);
run_program("/sbin/sleep", "1");
ui_print("***COPYING FILES***");
package_extract_dir("system", "/system");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat/system/app/ClassicKeyboard");
run_program("/sbin/busybox", "chmod", "755", "/system/Debloat/system/app/ClassicKeyboard/ClassicKeyboard.apk");
ui_print(" ");
ui_print(" ");
show_progress(0.9, 1);
run_program("/sbin/sleep", "1");
ui_print("***UNMOUNTING /SYSTEM***");
run_program("/sbin/busybox", "umount", "/system");
ui_print(" ");
ui_print(" ");
show_progress(1, 1);
ui_print("OPERATION COMPLETED");
ui_print("ENJOY!");
ui_print(" ");
Click to expand...
Click to collapse
Greetings and welcome to assist. Its great you are trying to learn scripts, this is what xda is meant to be for. There is an excellent guide in xda university here
https://forum.xda-developers.com/showthread.php?t=2377695
I'm sure the experts there will give you all the help you need
Good Luck
Sawdoctor

Related

[Help] update-script set_perm failure reported

I am having reports of people saying there is a issues with setting permissions when using my update.zip
I have looked over it countless times and I have not changes anything to the permissions
I also uploaded a copy of the actual flash-able update.zip
UPDATE-SCRIPT
Code:
ui_print("************************************************");
ui_print("* *");
ui_print("* BootMenu Second System Patch *");
ui_print("* Version 0.0.4 09-27-2012 *");
ui_print("* for *");
ui_print("* OMAP4 devices *");
ui_print("* CM10/CM9/AOKP *");
ui_print("* By Gerald Wayne Baggett Jr *");
ui_print("* AKA Raziel23x *");
ui_print("* http://apkmultitool.com *");
ui_print("* *");
ui_print("************************************************");
ui_print(" ");
ui_print("************************************************");
ui_print("* *");
ui_print("* Mounting system Folder *");
ui_print("* *");
ui_print("************************************************");
ui_print(" ");
run_program("/sbin/busybox", "mount", "/system");
show_progress(1, 15);
ui_print("************************************************");
ui_print("* *");
ui_print("* Starting Installation *");
ui_print("* of *");
ui_print("* 10storage Patch *");
ui_print("* *");
ui_print("************************************************");
ui_print(" ");
package_extract_dir("system", "/system");
ui_print("************************************************");
ui_print("* *");
ui_print("* Installation complete! *");
ui_print("* *");
ui_print("************************************************");
ui_print(" ");
ui_print("************************************************");
ui_print("* *");
ui_print("* Mounting preinstall Folder *");
ui_print("* *");
ui_print("************************************************");
ui_print(" ");
run_program("/sbin/busybox", "mount", "/preinstall");
ui_print("************************************************");
ui_print("* *");
ui_print("* Starting Installation *");
ui_print("* of *");
ui_print("* preinstall Patch *");
ui_print("* *");
ui_print("************************************************");
ui_print(" ");
package_extract_dir("preinstall", "/preinstall");
ui_print("************************************************");
ui_print("* *");
ui_print("* Fixing Permissions *");
ui_print("* *");
ui_print("************************************************");
ui_print(" ");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/init.d/10storage");
set_perm_recursive(0, 2000, 0755, 0755, "/preinstall/bootmenu/script");
set_perm(0, 0, 0755, "/preinstall/bootmenu/script/boot_second.sh");
set_perm(0, 0, 0755, "/preinstall/bootmenu/script/boot_stock.sh");
show_progress(0.200000, 10);
show_progress(0.100000, 0);
ui_print("************************************************");
ui_print("* *");
ui_print("* Unmounting system Folder *");
ui_print("* *");
ui_print("************************************************");
ui_print(" ");
run_program("/sbin/busybox", "umount", "/system");
ui_print("************************************************");
ui_print("* *");
ui_print("* Unmounting preinstall Folder *");
ui_print("* *");
ui_print("************************************************");
ui_print(" ");
run_program("/sbin/busybox", "umount", "/preinstall");
ui_print("************************************************");
ui_print("* *");
ui_print("* Finished installing BootMenu Patch *");
ui_print("* for *");
ui_print("* OMAP4 devices, Enjoy! *");
ui_print("* *");
ui_print("************************************************");
ui_print(" ");

[HOWTO] Install custom rom WARRANTY SAFE - knox = 0x0 ! (root + adb skills needed)

I already made a hastly "guide" for this yesterday but it got way too few love so far if you ask me, because this should be interesting to more people. So I decided to redo the guide with explaining things more deeply. I also redid the process from "scratch" once more so I can confirm it it safe and does not trip knox flag.
Still, I cant be made resposible if this does not work for you or if you mess up your phone during the process, but its pretty foolproof if you understand everything.
Before you start read the full guide to make sure you understand everything and better ask before you do anything you dont understand.
---
So here it goes:
IMPORTANT: You should either use a custom rom which fits your current stock roms version (MI6,MI7,MJ3,MJ7,etc)
or upgrade to the same stock version as the rom you want to install.
If you need to upgrade then please make sure you do not upgrade the bootloaders in the process as this could render URDLV useless on the new rom version leaving you with a non rooted phone =(
---
NOTE: There is alot of permission fixing needed with this install method. In 99% of the cases, unless otherwise noted, all the files and folders you copy over have to be owned by root:root. Directories need the permission 755 (rwxr-xr-x) and files 644 (rw-r--r--). Only binary files in /system/bin and /system/xbin need 755 permissions. (usually.... so the best thing you can do is to check out the files permissions before you copy over the new files, so you can set them exactly the same... just incase)
0.) Make sure your current roms version is the same as the custom roms version you are trying to install. You will also need to be rooted and be able to handle adb and shell commands. (use RDLV / URDLV method for root without tripping knox - do not install a custom recovery or kernel, or this process will trip knox!!!)
1.)
Extract the custom roms installer zip to your internal or external sd card. It should contain a folder called system - this will be the most important one for the rom "install" - so if i refer to your custom roms system folder, then I mean this one. It would normally just be copied over your existing folder during the rom installation in custom recovery, but since the system is running we cannot just do this - or this guide wouldnt be needed. Deep down in the folder META-INF you will find a file called "updater-script" - open this one up on your computer in a text editor to see what is actually done during the rom installation. Here you will find out if anything needs special permissions too. Like if there are folders your system folder does not yet contain - (for example photoreader has its own folder in system and needs the permissions fixed to what you find in the updater-script).
Just "get familiar" with the folders and files in the custom roms installer zip - if this all means nothing to you you should better not continue with the process! We are only interested in the system folder for now - do not try to install kernel or recovery files or something.
---
2.)
Now we actually start the "installation process":
Copy over the folders your system folder does not yet contain - like the photoreader example from above - and fix the permissions according to what you find in the updater-script.
---
3.)
For this step you need a file explorer which can handle root commands, because doing this with shell is a pain in the ass.
Once you have copied over all the "new" folders from your custom rom, we now copy over all the files in the "system/lib" folder from your custom rom to the /system/lib directory to ensure we got all the libs the rom needs.
This has to be done without overwriting any existing files - this is where the file explorer comes in. They usually have an option to skip the copy process if the file already exists. If you do this with shell you would have to type "n" and enter like 100 times.
If you just copy and overwrite existing files in this directory then you will break things and probably will get a bootloop and need to reflash with odin. (I tried it hehe - libc.so couldnt be fully copied over and then the device wouldnt boot anymore)
Fix permissions to root:root and 755 for directories and 644 for files inside the lib directory.
---
4.)
Repeat the process from 4.) with /system/bin and /system/xbin folder if they are included in your custom roms installer zip. Do not overwrite existing files and this time the files need to have root:root and 755 permission to be runnable.
---
5.)
Copy over the others.xml file from system/csc if it exists to your system and fix permissions. This file includes some modifications like sub-symbols on stock keyboard etc. So if you want the full rom experience you will need this file. Leave the other csc files untouched, just the others.xml is interesting. Fix permissions obviously.
---
6.)
Copy over the missing files from system/etc and system/etc/init.d if they exist in your custom rom. I think you could just copy over and overwrite the whole system/etc folder if you make sure you fix the permissions correctly afterwards, but I just copied over the missing files so far. (rest was identical anyway)
There is one file you most likely "want" to overwrite with the version of your custom rom: system/etc/install-recovery.sh - this file usually starts the su daemon for SuperUser and could be customized to also run init.d scripts or do other things.
---
7.)
If you did not reboot the device yet, do it now.
Once its fully booted make sure you did everything above: new folders, missing libs, others.xml in csc, etc folder.
If all this is done, we can now go on to the system apps.
For this you need to be connected over adb shell.
Run "stop" in the shell - this will stop the systemui and allows you to modify system apps without the phone suddenly rebooting or something.
---
8.)
Still in adb browse into the system/app folder of your extracted custom rom.
Now we gonna delete everything in /system/app to make it clean. So run " rm /system/app/* " to remove everything in that folder.
Right after it finishes, we copy over all the apps from the new rom. So run " cp * /system/app/ " to copy over all the files. (you must be inside the right folder for this!!!!)
After the copy is done fix permissions to root:root and 644 for all the files!
9.)
Repeat the process from step 8.) with the system/framework folder from your custom roms directory.
---
10.)
Delete the dalvik cache by running " rm -r /data/dalvik-cache ".
Youre done! Reboot the phone by issuing "reboot" through shell and your new rom should be booting up.
---
If you have done everything correctly you should basically have the same experience as if you had installed the rom through a custom recovery. It boils down to copying all the files by hand rather than relying on the zip installer - its the price you pay if you want to retain your warranty and have a custom rom. Maybe a tool or something could be created to ease up the process. You probably could just use "Flash Gordon" as long as you leave out the lib files (these are the only files I couldnt overwrite on the running device without crash so far) but I'm not sure if it can handle aroma installer scripts. Probably not, so you will end up messing up things more than you want.
With this install method you will have a "clean" install of the custom rom. Whats left maybe is to find out which lib's are actually not used since they tend to be kinda big and you could save some space by deleting. But we got plenty of space anyway... so who cares.
Hope this one gets some more love hehe - I was pretty exited when I was done with my first manual rom installation when I checked out knox and it was indeed still at 0x0.
If you have any questions or enhancements or so for this method then shoot.
Perfect work your method is wonderful but its hard for not prof. people if we can make it like script it will be greet :good::good::good:
Hi.
Great guide! Lots of work I assume...
Thanks.
No FC? No random reboot?
Regards
robert1968 said:
Hi.
Great guide! Lots of work I assume...
Thanks.
No FC? No random reboot?
Regards
Click to expand...
Click to collapse
none so far. Although I need to investigate further to make sure everything is running without problems.
There are some errors in logcat, but I think they come from the rom itself and the modifications, rather than the install method.
And yea - its a bit much work, but if you want to retain warranty you gotta go this way for now.
ADD: The errors I'm getting in logcat are only minor as it seems so far - they are most likely caused by a: errors in the files itself b: me having run bloat_remove script and deleting all sorts of other system apps that were bloatware c: xposed + xprivacy and other modules running. No force closes or reboots or other error messages so far.
When I did this process the first time I did not delete everything in /system/app and /system/framework before copying over the contents of the custom rom. But instead just copied over the apps and deleted all odex files inside the folders afterwards. This left some "orphan" files as I later found out with titanium backup - those were showing as deinstalled apps with orphan data - but Titanium could only delete the data not the apps itself, so I had to manually find out the corresponding apks. To save this hustle just delete the everything in /system/apps and /system/framework before you copy over the new data - as I described above.
I did not do a factory reset after all this - maybe I should do that just to make sure. (well yea actually I really should.. meh)
So I did a factory reset with most bloatware deinstalled, then I had some fc's with the phone app during boot. It was most likely caused by some apps missing that need to run at least once to set everything up after a factory rest.
Then I just copied over all the apps (including bloatware) once more and did another factory reset and everything worked fine then.
Afterwards I just ran the bloatware removal script again and will now remove the leftover bloatware.
Everything is working fine.
ADD:
If someone tells me how I could make the file copy process without overwriting anything (android is missing the "yes" command to automize the file copy confirmations) then I could write a script for this I'm sure.
Should be simple to do I guess, maybe I find something myself, but if anyone knows pls say so.
so did anyone else here have the balls to do it yet? =)
(its so quiet so far.. sigh I really thought people would be liking this ... too complicated or is your warranty already gone? hehe)
zroice said:
so did anyone else here have the balls to do it yet? =)
(its so quiet so far.. sigh I really thought people would be liking this ... too complicated or is your warranty already gone? hehe)
Click to expand...
Click to collapse
Already tripped my KNOX otherwise I would have defo tried it. Seems like a good fix/alternative, Kudos man
EDIT: Altho saying that, I might try it when I get home from work, just too see for myself and then maybe claim a lost phone on my insurance hahaha KNOX Free then eh
I was thinking of giving this a try to get Wicked v3 on my Galaxy Note 3.
Question 1:
looking through the updater-script, I'm seeing other steps besides file copies and permission setting..most notably I'm seeing dozens of commands (/system/bin/cat, system/bin/chmod, /system/bin/chown, etc) symlinked to toolbox (and others symlinked to busybox).
Should I manually recreate these symlinks as well?
Question 2:
How about other steps I see in the scripts? Anything I should absolutely not do? Most notably, I see him call some other scripts from this script, any reason I should avoid giving those a try? I guess I should probably inspect what these scripts do, it looks like they are just used to install the theme.
Question 3:
If I screw up and render my phone unbootable, I'm assuming I can still boot into download mode and use odin to reflash system.ext4 using the tar.md5 file I used to to install RDLV. Is this correct?
For your convenience, should you be curious, here are the contents of updater-script:
Code:
ui_print("@ DEVIANT DEVELOPMENT ");
ui_print("@ WICKED Note 3");
ui_print(" ");
ui_print(" ");
unmount("/system");
ui_print("Hacking files on the phone");
if
file_getprop("/tmp/aroma/install.prop","selected") == "1"
then
set_progress(0.10);
mount("ext4", "EMMC", "/dev/block/mmcblk0p23", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p24", "/cache");
mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/data");
ui_print("Wiping cache and dalvik cache.....");
delete_recursive("/system");
delete_recursive("/cache");
delete_recursive("/dalvik/dalvik-cache");
delete_recursive("/data/dalvik-cache");
delete_recursive("/sdcard/LOST.DIR");
delete_recursive("/sdcard/.android_secure");
ui_print("Unleashing the evil.....");
package_extract_dir("data", "/data");
package_extract_dir("system", "/system");
endif;
#
if
file_getprop("/tmp/aroma/install.prop","selected") == "2"
then
set_progress(0.10);
mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/data");
mount("ext4", "EMMC", "/dev/block/mmcblk0p23", "/system");
ui_print("Wiping cache and dalvik cache.....");
delete_recursive("/cache");
delete_recursive("/dalvik/dalvik-cache");
delete_recursive("/data/dalvik-cache");
endif;
# Install
if
file_getprop("/tmp/aroma/install.prop","selected") == "1"
then
set_progress(0.30);
ui_print("Symlinking alot of crap.....");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
"/system/xbin/adjtimex", "/system/xbin/arp", "/system/xbin/ash",
"/system/xbin/awk", "/system/xbin/base64", "/system/xbin/basename",
"/system/xbin/bbconfig", "/system/xbin/blkid", "/system/xbin/blockdev",
"/system/xbin/brctl", "/system/xbin/bunzip2", "/system/xbin/bzcat",
"/system/xbin/bzip2", "/system/xbin/cal", "/system/xbin/cat",
"/system/xbin/catv", "/system/xbin/chattr", "/system/xbin/chgrp",
"/system/xbin/chmod", "/system/xbin/chown", "/system/xbin/chroot",
"/system/xbin/clear", "/system/xbin/cmp", "/system/xbin/comm",
"/system/xbin/cp", "/system/xbin/cpio", "/system/xbin/crond",
"/system/xbin/crontab", "/system/xbin/cut", "/system/xbin/date",
"/system/xbin/dc", "/system/xbin/dd", "/system/xbin/depmod",
"/system/xbin/devmem", "/system/xbin/df", "/system/xbin/diff",
"/system/xbin/dirname", "/system/xbin/dmesg", "/system/xbin/dnsd",
"/system/xbin/dos2unix", "/system/xbin/du", "/system/xbin/echo",
"/system/xbin/ed", "/system/xbin/egrep", "/system/xbin/env",
"/system/xbin/expand", "/system/xbin/expr", "/system/xbin/false",
"/system/xbin/fdisk", "/system/xbin/fgrep", "/system/xbin/find",
"/system/xbin/flash_lock", "/system/xbin/flash_unlock",
"/system/xbin/flashcp", "/system/xbin/flock", "/system/xbin/fold",
"/system/xbin/free", "/system/xbin/freeramdisk", "/system/xbin/fsync",
"/system/xbin/ftpget", "/system/xbin/ftpput", "/system/xbin/fuser",
"/system/xbin/getopt", "/system/xbin/grep", "/system/xbin/groups",
"/system/xbin/gunzip", "/system/xbin/gzip", "/system/xbin/halt",
"/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/id",
"/system/xbin/ifconfig", "/system/xbin/inetd", "/system/xbin/insmod",
"/system/xbin/install", "/system/xbin/iostat", "/system/xbin/ip",
"/system/xbin/kill", "/system/xbin/killall", "/system/xbin/killall5",
"/system/xbin/length", "/system/xbin/less", "/system/xbin/ln",
"/system/xbin/losetup", "/system/xbin/ls", "/system/xbin/lsattr",
"/system/xbin/lsmod", "/system/xbin/lsusb", "/system/xbin/lzcat",
"/system/xbin/lzma", "/system/xbin/lzop", "/system/xbin/lzopcat",
"/system/xbin/man", "/system/xbin/md5sum", "/system/xbin/mesg",
"/system/xbin/mkdir", "/system/xbin/mke2fs", "/system/xbin/mkfifo",
"/system/xbin/mkfs.ext2", "/system/xbin/mkfs.vfat",
"/system/xbin/mknod", "/system/xbin/mkswap", "/system/xbin/mktemp",
"/system/xbin/modinfo", "/system/xbin/modprobe", "/system/xbin/more",
"/system/xbin/mount", "/system/xbin/mountpoint", "/system/xbin/mpstat",
"/system/xbin/mv", "/system/xbin/nanddump", "/system/xbin/nandwrite",
"/system/xbin/netstat", "/system/xbin/nice", "/system/xbin/nohup",
"/system/xbin/nslookup", "/system/xbin/ntpd", "/system/xbin/od",
"/system/xbin/patch", "/system/xbin/pgrep", "/system/xbin/pidof",
"/system/xbin/ping", "/system/xbin/pkill", "/system/xbin/pmap",
"/system/xbin/poweroff", "/system/xbin/printenv", "/system/xbin/printf",
"/system/xbin/ps", "/system/xbin/pstree", "/system/xbin/pwd",
"/system/xbin/pwdx", "/system/xbin/rdev", "/system/xbin/readlink",
"/system/xbin/realpath", "/system/xbin/renice", "/system/xbin/reset",
"/system/xbin/resize", "/system/xbin/rev", "/system/xbin/rm",
"/system/xbin/rmdir", "/system/xbin/rmmod", "/system/xbin/route",
"/system/xbin/run-parts", "/system/xbin/rx", "/system/xbin/sed",
"/system/xbin/seq", "/system/xbin/setconsole", "/system/xbin/setserial",
"/system/xbin/setsid", "/system/xbin/sh", "/system/xbin/sha1sum",
"/system/xbin/sha256sum", "/system/xbin/sha512sum",
"/system/xbin/sleep", "/system/xbin/sort", "/system/xbin/split",
"/system/xbin/stat", "/system/xbin/strings", "/system/xbin/stty",
"/system/xbin/sum", "/system/xbin/swapoff", "/system/xbin/swapon",
"/system/xbin/sync", "/system/xbin/sysctl", "/system/xbin/tac",
"/system/xbin/tail", "/system/xbin/tar", "/system/xbin/taskset",
"/system/xbin/tee", "/system/xbin/telnet", "/system/xbin/telnetd",
"/system/xbin/test", "/system/xbin/tftp", "/system/xbin/tftpd",
"/system/xbin/time", "/system/xbin/timeout", "/system/xbin/top",
"/system/xbin/touch", "/system/xbin/tr", "/system/xbin/traceroute",
"/system/xbin/true", "/system/xbin/ttysize", "/system/xbin/tune2fs",
"/system/xbin/umount", "/system/xbin/uname", "/system/xbin/uncompress",
"/system/xbin/unexpand", "/system/xbin/uniq", "/system/xbin/unix2dos",
"/system/xbin/unlzma", "/system/xbin/unlzop", "/system/xbin/unxz",
"/system/xbin/unzip", "/system/xbin/uptime", "/system/xbin/usleep",
"/system/xbin/uudecode", "/system/xbin/uuencode", "/system/xbin/vi",
"/system/xbin/watch", "/system/xbin/wc", "/system/xbin/wget",
"/system/xbin/which", "/system/xbin/whoami", "/system/xbin/xargs",
"/system/xbin/xz", "/system/xbin/xzcat", "/system/xbin/yes",
"/system/xbin/zcat");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/md5");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/playback");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/reboot");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/touch");
symlink("toolbox", "/system/bin/touchinput");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
symlink("dumpstate", "/system/bin/dumpcrash");
symlink("debuggerd", "/system/bin/csview");
symlink("mksh", "/system/bin/sh");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
ui_print("Fixing permissions.....");
set_progress(0.50);
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0755, 0755, "/system/etc/init.d");
set_perm(0, 2000, 0755, "/system/etc/install-recovery.sh");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 06755, "/system/bin/ip");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pair_devlist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/etc");
set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm(0, 2000, 0755, "/system/vendor/lib/egl");
set_perm(0, 2000, 0755, "/system/vendor/lib/hw");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
set_perm (0, 0, 0755, "/system/bin/restorecon");
set_perm (0, 0, 0755, "/system/xbin/restorecon");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 06755, "/system/xbin/daemonsu");
set_perm(0, 0, 06755, "/system/etc/install-recovery.sh");
set_perm(0, 0, 0644, "/system/app/Superuser.apk");
set_perm(0, 0, 0644, "/system/etc/.has_su_daemon");
set_perm(0, 0, 0644, "/system/etc/.installed_su_daemon");
set_perm(0, 0, 0644, "/system/lib/libdummy.so");
symlink("/system/xbin/su", "/system/bin/su");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_progress(0.50);
ui_print("Flashing kernel.....");
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "/dev/block/mmcblk0p14"),
delete("/tmp/boot.img"));
endif;
if
(file_getprop("/tmp/aroma/install.prop","selected") == "1" || file_getprop("/tmp/aroma/install.prop","selected") == "2")
then
set_progress(0.80);
ui_print(" Selected Theme");
if file_getprop("/tmp/aroma/theme.prop","selected.1") == "1"
then
ui_print("@ Installing Stock Theme");
package_extract_dir("evil/Theme/Stock", "/system");
endif;
if file_getprop("/tmp/aroma/theme.prop","selected.1") == "2"
then
ui_print("@ Installing White Theme");
package_extract_dir("evil/Theme/White", "/system");
endif;
ui_print(" Music App");
if file_getprop("/tmp/aroma/music.prop","selected.1") == "1"
then
ui_print("@ Installing Samsung music app");
package_extract_dir("evil/Music/Stock", "/system");
endif;
if file_getprop("/tmp/aroma/music.prop","selected.1") == "2"
then
ui_print("@ Installing Apollo music app");
package_extract_dir("evil/Music/Apollo", "/system");
endif;
if file_getprop("/tmp/aroma/music.prop","selected.1") == "3"
then
ui_print("@ Installing Fusion music app");
package_extract_dir("evil/Music/Fusion", "/system");
endif;
if file_getprop("/tmp/aroma/music.prop","selected.1") == "4"
then
ui_print("@ Installing Sony music app");
package_extract_dir("evil/Music/Sony", "/system");
endif;
ui_print(" Selected Boot Animations");
if file_getprop("/tmp/aroma/boot.prop","selected.1") == "1"
then
ui_print("@ Installing Stock Boot up");
package_extract_dir("evil/Boot/Stock", "/system");
endif;
if file_getprop("/tmp/aroma/boot.prop","selected.1") == "2"
then
ui_print("@ Installing Xray Boot up");
package_extract_dir("evil/Boot/Xray", "/system");
endif;
if file_getprop("/tmp/aroma/boot.prop","selected.1") == "3"
then
ui_print("@ Installing H.R. Giger Boot up");
package_extract_dir("evil/Boot/Giger", "/system");
endif;
if file_getprop("/tmp/aroma/boot.prop","selected.1") == "4"
then
ui_print("@ Installing Hater Boot up");
package_extract_dir("evil/Boot/Hater", "/system");
endif;
if file_getprop("/tmp/aroma/boot.prop","selected.1") == "5"
then
ui_print("@ Installing Fire Boot up");
package_extract_dir("evil/Boot/Fire", "/system");
endif;
if file_getprop("/tmp/aroma/boot.prop","selected.2") == "1"
then
ui_print("@ Installing Stock Shutdown");
package_extract_dir("evil/Shut/Stock", "/system");
endif;
if file_getprop("/tmp/aroma/boot.prop","selected.2") == "2"
then
ui_print("@ Installing Wicked Eye Shutdown");
package_extract_dir("evil/Shut/Eye", "/system");
endif;
if file_getprop("/tmp/aroma/boot.prop","selected.2") == "3"
then
ui_print("@ Installing Stay Deviant Shutdown");
package_extract_dir("evil/Shut/Stay", "/system");
endif;
ui_print(" Installing Add-ons");
if
file_getprop("/tmp/aroma/add.prop","item.1.1") == "1"
then
ui_print("@ MotoX Camera");
package_extract_dir("evil/Add/Moto", "/system");
endif;
if
file_getprop("/tmp/aroma/add.prop","item.1.2") == "1"
then
ui_print("@ GE Camera");
package_extract_dir("evil/Add/GE", "/system");
endif;
if
file_getprop("/tmp/aroma/add.prop","item.1.3") == "1"
then
ui_print("@ Focal Camera");
package_extract_dir("evil/Add/Focal", "/data");
endif;
ui_print("Installing Selected Apps ...");
if
file_getprop("/tmp/aroma/bloat.prop","item.1.1") == "1"
then
ui_print("@ Blomberg");
package_extract_dir("evil/Bloat/Bloom", "/system");
endif;
if
file_getprop("/tmp/aroma/bloat.prop","item.1.2") == "1"
then
ui_print("@ Blurp");
package_extract_dir("evil/Bloat/Blurp", "/system");
endif;
if
file_getprop("/tmp/aroma/bloat.prop","item.1.3") == "1"
then
ui_print("@ ChatOn");
package_extract_dir("evil/Bloat/Chat", "/system");
endif;
if
file_getprop("/tmp/aroma/bloat.prop","item.1.4") == "1"
then
ui_print("@ Evernote");
package_extract_dir("evil/Bloat/Evernote", "/system");
endif;
if
file_getprop("/tmp/aroma/bloat.prop","item.1.5") == "1"
then
ui_print("@ Flipboard");
package_extract_dir("evil/Bloat/Flip", "/system");
endif;
if
file_getprop("/tmp/aroma/bloat.prop","item.1.6") == "1"
then
ui_print("@ Games");
package_extract_dir("evil/Bloat/Game", "/system");
endif;
if
file_getprop("/tmp/aroma/bloat.prop","item.1.7") == "1"
then
ui_print("@ Travel");
package_extract_dir("evil/Bloat/Travel", "/system");
endif;
if
file_getprop("/tmp/aroma/bloat.prop","item.1.8") == "1"
then
ui_print("@ Yahoo");
package_extract_dir("evil/Bloat/Yahoo", "/system");
endif;
if
file_getprop("/tmp/aroma/tmobile.prop","item.1.1") == "1"
then
ui_print("@ Access");
package_extract_dir("evil/Tmobile/Access", "/system");
endif;
if
file_getprop("/tmp/aroma/tmobile.prop","item.1.2") == "1"
then
ui_print("@ Highlight");
package_extract_dir("evil/Tmobile/Highlight", "/system");
endif;
if
file_getprop("/tmp/aroma/tmobile.prop","item.1.3") == "1"
then
ui_print("@ ID");
package_extract_dir("evil/Tmobile/Id", "/system");
endif;
if
file_getprop("/tmp/aroma/tmobile.prop","item.1.4") == "1"
then
ui_print("@ Tv");
package_extract_dir("evil/Tmobile/Tv", "/system");
endif;
if
file_getprop("/tmp/aroma/tmobile.prop","item.1.5") == "1"
then
ui_print("@ Voice");
package_extract_dir("evil/Tmobile/Voice", "/system");
endif;
if
file_getprop("/tmp/aroma/system.prop","item.1.1") == "1"
then
ui_print("@ Group Play ");
package_extract_dir("evil/System/Group", "/system");
endif;
if
file_getprop("/tmp/aroma/system.prop","item.1.2") == "1"
then
ui_print("@ SHealth");
package_extract_dir("evil/System/Shealth", "/system");
endif;
if
file_getprop("/tmp/aroma/system.prop","item.1.3") == "1"
then
ui_print("@ Story Album ");
package_extract_dir("evil/System/Story", "/system");
endif;
if
file_getprop("/tmp/aroma/system.prop","item.1.4") == "1"
then
ui_print("@ WatchOn ");
package_extract_dir("evil/System/Watch", "/system");
endif;
if
file_getprop("/tmp/aroma/system.prop","item.1.5") == "1"
then
ui_print("@ Samsung Hub ");
package_extract_dir("evil/System/Samsung", "/system");
endif;
if
file_getprop("/tmp/aroma/system.prop","item.1.6") == "1"
then
ui_print("@ Print ");
package_extract_dir("evil/System/Print", "/system");
endif;
ui_print(" Selected Animations");
# Animation
if
file_getprop("/tmp/aroma/ani.prop","selected.1") == "1"
then
run_program("/sbin/busybox", "mount", "/system");
ui_print("@ Stock Animations");
package_extract_dir("evil/Ani/Stock/vrtheme", "/sdcard/vrtheme");
set_perm(0, 0, 0755, "/sdcard/vrtheme/installtheme.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zip");
set_perm(0, 0, 0755, "/sdcard/vrtheme/cleanup.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zipalign");
ui_print(" Adding Files");
run_program("/sdcard/vrtheme/installtheme.sh");
run_program("/sdcard/vrtheme/cleanup.sh");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/sdcard");
endif;
if
file_getprop("/tmp/aroma/ani.prop","selected.1") == "2"
then
run_program("/sbin/busybox", "mount", "/system");
ui_print("@ Aosp Animations");
package_extract_dir("evil/Ani/Aosp/vrtheme", "/sdcard/vrtheme");
set_perm(0, 0, 0755, "/sdcard/vrtheme/installtheme.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zip");
set_perm(0, 0, 0755, "/sdcard/vrtheme/cleanup.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zipalign");
ui_print(" Adding Files");
run_program("/sdcard/vrtheme/installtheme.sh");
run_program("/sdcard/vrtheme/cleanup.sh");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/sdcard");
endif;
if
file_getprop("/tmp/aroma/ani.prop","selected.1") == "3"
then
run_program("/sbin/busybox", "mount", "/system");
ui_print("@ Folding Animations");
package_extract_dir("evil/Ani/Fold/vrtheme", "/sdcard/vrtheme");
set_perm(0, 0, 0755, "/sdcard/vrtheme/installtheme.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zip");
set_perm(0, 0, 0755, "/sdcard/vrtheme/cleanup.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zipalign");
ui_print(" Adding Files");
run_program("/sdcard/vrtheme/installtheme.sh");
run_program("/sdcard/vrtheme/cleanup.sh");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/sdcard");
endif;
if
file_getprop("/tmp/aroma/ani.prop","selected.2") == "1"
then
run_program("/sbin/busybox", "mount", "/system");
ui_print("@ Wicked Speed");
package_extract_dir("evil/Ani/Wicked/vrtheme", "/sdcard/vrtheme");
set_perm(0, 0, 0755, "/sdcard/vrtheme/installtheme.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zip");
set_perm(0, 0, 0755, "/sdcard/vrtheme/cleanup.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zipalign");
ui_print(" Adding More Speed");
run_program("/sdcard/vrtheme/installtheme.sh");
run_program("/sdcard/vrtheme/cleanup.sh");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/sdcard");
endif;
if
file_getprop("/tmp/aroma/ani.prop","selected.2") == "2"
then
run_program("/sbin/busybox", "mount", "/system");
ui_print("@ Wicked on Crack");
package_extract_dir("evil/Ani/Crack/vrtheme", "/sdcard/vrtheme");
set_perm(0, 0, 0755, "/sdcard/vrtheme/installtheme.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zip");
set_perm(0, 0, 0755, "/sdcard/vrtheme/cleanup.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zipalign");
ui_print(" Smoking Crack");
run_program("/sdcard/vrtheme/installtheme.sh");
run_program("/sdcard/vrtheme/cleanup.sh");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/sdcard");
endif;
endif;
unmount("/system");
unmount("/cache");
unmount("/data");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print("@ First boot will take longer! ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print("@ Let the phone sit 5 mins then reboot and enjoy ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print("@ Donations are appreciated! ");
ui_print(" ");
ui_print(" ");
set_progress(1);
gygelly said:
I was thinking of giving this a try to get Wicked v3 on my Galaxy Note 3.
Question 1:
looking through the updater-script, I'm seeing other steps besides file copies and permission setting..most notably I'm seeing dozens of commands (/system/bin/cat, system/bin/chmod, /system/bin/chown, etc) symlinked to toolbox (and others symlinked to busybox).
Should I manually recreate these symlinks as well?
Question 2:
How about other steps I see in the scripts? Anything I should absolutely not do? Most notably, I see him call some other scripts from this script, any reason I should avoid giving those a try? I guess I should probably inspect what these scripts do, it looks like they are just used to install the theme.
Question 3:
If I screw up and render my phone unbootable, I'm assuming I can still boot into download mode and use odin to reflash system.ext4 using the tar.md5 file I used to to install RDLV. Is this correct?
For your convenience, should you be curious, here are the contents of updater-script:
Code:
ui_print("@ DEVIANT DEVELOPMENT ");
ui_print("@ WICKED Note 3");
ui_print(" ");
ui_print(" ");
unmount("/system");
ui_print("Hacking files on the phone");
if
file_getprop("/tmp/aroma/install.prop","selected") == "1"
then
set_progress(0.10);
mount("ext4", "EMMC", "/dev/block/mmcblk0p23", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p24", "/cache");
mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/data");
ui_print("Wiping cache and dalvik cache.....");
delete_recursive("/system");
delete_recursive("/cache");
delete_recursive("/dalvik/dalvik-cache");
delete_recursive("/data/dalvik-cache");
delete_recursive("/sdcard/LOST.DIR");
delete_recursive("/sdcard/.android_secure");
ui_print("Unleashing the evil.....");
package_extract_dir("data", "/data");
package_extract_dir("system", "/system");
endif;
#
if
file_getprop("/tmp/aroma/install.prop","selected") == "2"
then
set_progress(0.10);
mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/data");
mount("ext4", "EMMC", "/dev/block/mmcblk0p23", "/system");
ui_print("Wiping cache and dalvik cache.....");
delete_recursive("/cache");
delete_recursive("/dalvik/dalvik-cache");
delete_recursive("/data/dalvik-cache");
endif;
# Install
if
file_getprop("/tmp/aroma/install.prop","selected") == "1"
then
set_progress(0.30);
ui_print("Symlinking alot of crap.....");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
"/system/xbin/adjtimex", "/system/xbin/arp", "/system/xbin/ash",
"/system/xbin/awk", "/system/xbin/base64", "/system/xbin/basename",
"/system/xbin/bbconfig", "/system/xbin/blkid", "/system/xbin/blockdev",
"/system/xbin/brctl", "/system/xbin/bunzip2", "/system/xbin/bzcat",
"/system/xbin/bzip2", "/system/xbin/cal", "/system/xbin/cat",
"/system/xbin/catv", "/system/xbin/chattr", "/system/xbin/chgrp",
"/system/xbin/chmod", "/system/xbin/chown", "/system/xbin/chroot",
"/system/xbin/clear", "/system/xbin/cmp", "/system/xbin/comm",
"/system/xbin/cp", "/system/xbin/cpio", "/system/xbin/crond",
"/system/xbin/crontab", "/system/xbin/cut", "/system/xbin/date",
"/system/xbin/dc", "/system/xbin/dd", "/system/xbin/depmod",
"/system/xbin/devmem", "/system/xbin/df", "/system/xbin/diff",
"/system/xbin/dirname", "/system/xbin/dmesg", "/system/xbin/dnsd",
"/system/xbin/dos2unix", "/system/xbin/du", "/system/xbin/echo",
"/system/xbin/ed", "/system/xbin/egrep", "/system/xbin/env",
"/system/xbin/expand", "/system/xbin/expr", "/system/xbin/false",
"/system/xbin/fdisk", "/system/xbin/fgrep", "/system/xbin/find",
"/system/xbin/flash_lock", "/system/xbin/flash_unlock",
"/system/xbin/flashcp", "/system/xbin/flock", "/system/xbin/fold",
"/system/xbin/free", "/system/xbin/freeramdisk", "/system/xbin/fsync",
"/system/xbin/ftpget", "/system/xbin/ftpput", "/system/xbin/fuser",
"/system/xbin/getopt", "/system/xbin/grep", "/system/xbin/groups",
"/system/xbin/gunzip", "/system/xbin/gzip", "/system/xbin/halt",
"/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/id",
"/system/xbin/ifconfig", "/system/xbin/inetd", "/system/xbin/insmod",
"/system/xbin/install", "/system/xbin/iostat", "/system/xbin/ip",
"/system/xbin/kill", "/system/xbin/killall", "/system/xbin/killall5",
"/system/xbin/length", "/system/xbin/less", "/system/xbin/ln",
"/system/xbin/losetup", "/system/xbin/ls", "/system/xbin/lsattr",
"/system/xbin/lsmod", "/system/xbin/lsusb", "/system/xbin/lzcat",
"/system/xbin/lzma", "/system/xbin/lzop", "/system/xbin/lzopcat",
"/system/xbin/man", "/system/xbin/md5sum", "/system/xbin/mesg",
"/system/xbin/mkdir", "/system/xbin/mke2fs", "/system/xbin/mkfifo",
"/system/xbin/mkfs.ext2", "/system/xbin/mkfs.vfat",
"/system/xbin/mknod", "/system/xbin/mkswap", "/system/xbin/mktemp",
"/system/xbin/modinfo", "/system/xbin/modprobe", "/system/xbin/more",
"/system/xbin/mount", "/system/xbin/mountpoint", "/system/xbin/mpstat",
"/system/xbin/mv", "/system/xbin/nanddump", "/system/xbin/nandwrite",
"/system/xbin/netstat", "/system/xbin/nice", "/system/xbin/nohup",
"/system/xbin/nslookup", "/system/xbin/ntpd", "/system/xbin/od",
"/system/xbin/patch", "/system/xbin/pgrep", "/system/xbin/pidof",
"/system/xbin/ping", "/system/xbin/pkill", "/system/xbin/pmap",
"/system/xbin/poweroff", "/system/xbin/printenv", "/system/xbin/printf",
"/system/xbin/ps", "/system/xbin/pstree", "/system/xbin/pwd",
"/system/xbin/pwdx", "/system/xbin/rdev", "/system/xbin/readlink",
"/system/xbin/realpath", "/system/xbin/renice", "/system/xbin/reset",
"/system/xbin/resize", "/system/xbin/rev", "/system/xbin/rm",
"/system/xbin/rmdir", "/system/xbin/rmmod", "/system/xbin/route",
"/system/xbin/run-parts", "/system/xbin/rx", "/system/xbin/sed",
"/system/xbin/seq", "/system/xbin/setconsole", "/system/xbin/setserial",
"/system/xbin/setsid", "/system/xbin/sh", "/system/xbin/sha1sum",
"/system/xbin/sha256sum", "/system/xbin/sha512sum",
"/system/xbin/sleep", "/system/xbin/sort", "/system/xbin/split",
"/system/xbin/stat", "/system/xbin/strings", "/system/xbin/stty",
"/system/xbin/sum", "/system/xbin/swapoff", "/system/xbin/swapon",
"/system/xbin/sync", "/system/xbin/sysctl", "/system/xbin/tac",
"/system/xbin/tail", "/system/xbin/tar", "/system/xbin/taskset",
"/system/xbin/tee", "/system/xbin/telnet", "/system/xbin/telnetd",
"/system/xbin/test", "/system/xbin/tftp", "/system/xbin/tftpd",
"/system/xbin/time", "/system/xbin/timeout", "/system/xbin/top",
"/system/xbin/touch", "/system/xbin/tr", "/system/xbin/traceroute",
"/system/xbin/true", "/system/xbin/ttysize", "/system/xbin/tune2fs",
"/system/xbin/umount", "/system/xbin/uname", "/system/xbin/uncompress",
"/system/xbin/unexpand", "/system/xbin/uniq", "/system/xbin/unix2dos",
"/system/xbin/unlzma", "/system/xbin/unlzop", "/system/xbin/unxz",
"/system/xbin/unzip", "/system/xbin/uptime", "/system/xbin/usleep",
"/system/xbin/uudecode", "/system/xbin/uuencode", "/system/xbin/vi",
"/system/xbin/watch", "/system/xbin/wc", "/system/xbin/wget",
"/system/xbin/which", "/system/xbin/whoami", "/system/xbin/xargs",
"/system/xbin/xz", "/system/xbin/xzcat", "/system/xbin/yes",
"/system/xbin/zcat");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/md5");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/playback");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/reboot");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/touch");
symlink("toolbox", "/system/bin/touchinput");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
symlink("dumpstate", "/system/bin/dumpcrash");
symlink("debuggerd", "/system/bin/csview");
symlink("mksh", "/system/bin/sh");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
ui_print("Fixing permissions.....");
set_progress(0.50);
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0755, 0755, "/system/etc/init.d");
set_perm(0, 2000, 0755, "/system/etc/install-recovery.sh");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 06755, "/system/bin/ip");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pair_devlist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/etc");
set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm(0, 2000, 0755, "/system/vendor/lib/egl");
set_perm(0, 2000, 0755, "/system/vendor/lib/hw");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
set_perm (0, 0, 0755, "/system/bin/restorecon");
set_perm (0, 0, 0755, "/system/xbin/restorecon");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 06755, "/system/xbin/daemonsu");
set_perm(0, 0, 06755, "/system/etc/install-recovery.sh");
set_perm(0, 0, 0644, "/system/app/Superuser.apk");
set_perm(0, 0, 0644, "/system/etc/.has_su_daemon");
set_perm(0, 0, 0644, "/system/etc/.installed_su_daemon");
set_perm(0, 0, 0644, "/system/lib/libdummy.so");
symlink("/system/xbin/su", "/system/bin/su");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_progress(0.50);
ui_print("Flashing kernel.....");
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "/dev/block/mmcblk0p14"),
delete("/tmp/boot.img"));
endif;
if
(file_getprop("/tmp/aroma/install.prop","selected") == "1" || file_getprop("/tmp/aroma/install.prop","selected") == "2")
then
set_progress(0.80);
ui_print(" Selected Theme");
if file_getprop("/tmp/aroma/theme.prop","selected.1") == "1"
then
ui_print("@ Installing Stock Theme");
package_extract_dir("evil/Theme/Stock", "/system");
endif;
if file_getprop("/tmp/aroma/theme.prop","selected.1") == "2"
then
ui_print("@ Installing White Theme");
package_extract_dir("evil/Theme/White", "/system");
endif;
ui_print(" Music App");
if file_getprop("/tmp/aroma/music.prop","selected.1") == "1"
then
ui_print("@ Installing Samsung music app");
package_extract_dir("evil/Music/Stock", "/system");
endif;
if file_getprop("/tmp/aroma/music.prop","selected.1") == "2"
then
ui_print("@ Installing Apollo music app");
package_extract_dir("evil/Music/Apollo", "/system");
endif;
if file_getprop("/tmp/aroma/music.prop","selected.1") == "3"
then
ui_print("@ Installing Fusion music app");
package_extract_dir("evil/Music/Fusion", "/system");
endif;
if file_getprop("/tmp/aroma/music.prop","selected.1") == "4"
then
ui_print("@ Installing Sony music app");
package_extract_dir("evil/Music/Sony", "/system");
endif;
ui_print(" Selected Boot Animations");
if file_getprop("/tmp/aroma/boot.prop","selected.1") == "1"
then
ui_print("@ Installing Stock Boot up");
package_extract_dir("evil/Boot/Stock", "/system");
endif;
if file_getprop("/tmp/aroma/boot.prop","selected.1") == "2"
then
ui_print("@ Installing Xray Boot up");
package_extract_dir("evil/Boot/Xray", "/system");
endif;
if file_getprop("/tmp/aroma/boot.prop","selected.1") == "3"
then
ui_print("@ Installing H.R. Giger Boot up");
package_extract_dir("evil/Boot/Giger", "/system");
endif;
if file_getprop("/tmp/aroma/boot.prop","selected.1") == "4"
then
ui_print("@ Installing Hater Boot up");
package_extract_dir("evil/Boot/Hater", "/system");
endif;
if file_getprop("/tmp/aroma/boot.prop","selected.1") == "5"
then
ui_print("@ Installing Fire Boot up");
package_extract_dir("evil/Boot/Fire", "/system");
endif;
if file_getprop("/tmp/aroma/boot.prop","selected.2") == "1"
then
ui_print("@ Installing Stock Shutdown");
package_extract_dir("evil/Shut/Stock", "/system");
endif;
if file_getprop("/tmp/aroma/boot.prop","selected.2") == "2"
then
ui_print("@ Installing Wicked Eye Shutdown");
package_extract_dir("evil/Shut/Eye", "/system");
endif;
if file_getprop("/tmp/aroma/boot.prop","selected.2") == "3"
then
ui_print("@ Installing Stay Deviant Shutdown");
package_extract_dir("evil/Shut/Stay", "/system");
endif;
ui_print(" Installing Add-ons");
if
file_getprop("/tmp/aroma/add.prop","item.1.1") == "1"
then
ui_print("@ MotoX Camera");
package_extract_dir("evil/Add/Moto", "/system");
endif;
if
file_getprop("/tmp/aroma/add.prop","item.1.2") == "1"
then
ui_print("@ GE Camera");
package_extract_dir("evil/Add/GE", "/system");
endif;
if
file_getprop("/tmp/aroma/add.prop","item.1.3") == "1"
then
ui_print("@ Focal Camera");
package_extract_dir("evil/Add/Focal", "/data");
endif;
ui_print("Installing Selected Apps ...");
if
file_getprop("/tmp/aroma/bloat.prop","item.1.1") == "1"
then
ui_print("@ Blomberg");
package_extract_dir("evil/Bloat/Bloom", "/system");
endif;
if
file_getprop("/tmp/aroma/bloat.prop","item.1.2") == "1"
then
ui_print("@ Blurp");
package_extract_dir("evil/Bloat/Blurp", "/system");
endif;
if
file_getprop("/tmp/aroma/bloat.prop","item.1.3") == "1"
then
ui_print("@ ChatOn");
package_extract_dir("evil/Bloat/Chat", "/system");
endif;
if
file_getprop("/tmp/aroma/bloat.prop","item.1.4") == "1"
then
ui_print("@ Evernote");
package_extract_dir("evil/Bloat/Evernote", "/system");
endif;
if
file_getprop("/tmp/aroma/bloat.prop","item.1.5") == "1"
then
ui_print("@ Flipboard");
package_extract_dir("evil/Bloat/Flip", "/system");
endif;
if
file_getprop("/tmp/aroma/bloat.prop","item.1.6") == "1"
then
ui_print("@ Games");
package_extract_dir("evil/Bloat/Game", "/system");
endif;
if
file_getprop("/tmp/aroma/bloat.prop","item.1.7") == "1"
then
ui_print("@ Travel");
package_extract_dir("evil/Bloat/Travel", "/system");
endif;
if
file_getprop("/tmp/aroma/bloat.prop","item.1.8") == "1"
then
ui_print("@ Yahoo");
package_extract_dir("evil/Bloat/Yahoo", "/system");
endif;
if
file_getprop("/tmp/aroma/tmobile.prop","item.1.1") == "1"
then
ui_print("@ Access");
package_extract_dir("evil/Tmobile/Access", "/system");
endif;
if
file_getprop("/tmp/aroma/tmobile.prop","item.1.2") == "1"
then
ui_print("@ Highlight");
package_extract_dir("evil/Tmobile/Highlight", "/system");
endif;
if
file_getprop("/tmp/aroma/tmobile.prop","item.1.3") == "1"
then
ui_print("@ ID");
package_extract_dir("evil/Tmobile/Id", "/system");
endif;
if
file_getprop("/tmp/aroma/tmobile.prop","item.1.4") == "1"
then
ui_print("@ Tv");
package_extract_dir("evil/Tmobile/Tv", "/system");
endif;
if
file_getprop("/tmp/aroma/tmobile.prop","item.1.5") == "1"
then
ui_print("@ Voice");
package_extract_dir("evil/Tmobile/Voice", "/system");
endif;
if
file_getprop("/tmp/aroma/system.prop","item.1.1") == "1"
then
ui_print("@ Group Play ");
package_extract_dir("evil/System/Group", "/system");
endif;
if
file_getprop("/tmp/aroma/system.prop","item.1.2") == "1"
then
ui_print("@ SHealth");
package_extract_dir("evil/System/Shealth", "/system");
endif;
if
file_getprop("/tmp/aroma/system.prop","item.1.3") == "1"
then
ui_print("@ Story Album ");
package_extract_dir("evil/System/Story", "/system");
endif;
if
file_getprop("/tmp/aroma/system.prop","item.1.4") == "1"
then
ui_print("@ WatchOn ");
package_extract_dir("evil/System/Watch", "/system");
endif;
if
file_getprop("/tmp/aroma/system.prop","item.1.5") == "1"
then
ui_print("@ Samsung Hub ");
package_extract_dir("evil/System/Samsung", "/system");
endif;
if
file_getprop("/tmp/aroma/system.prop","item.1.6") == "1"
then
ui_print("@ Print ");
package_extract_dir("evil/System/Print", "/system");
endif;
ui_print(" Selected Animations");
# Animation
if
file_getprop("/tmp/aroma/ani.prop","selected.1") == "1"
then
run_program("/sbin/busybox", "mount", "/system");
ui_print("@ Stock Animations");
package_extract_dir("evil/Ani/Stock/vrtheme", "/sdcard/vrtheme");
set_perm(0, 0, 0755, "/sdcard/vrtheme/installtheme.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zip");
set_perm(0, 0, 0755, "/sdcard/vrtheme/cleanup.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zipalign");
ui_print(" Adding Files");
run_program("/sdcard/vrtheme/installtheme.sh");
run_program("/sdcard/vrtheme/cleanup.sh");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/sdcard");
endif;
if
file_getprop("/tmp/aroma/ani.prop","selected.1") == "2"
then
run_program("/sbin/busybox", "mount", "/system");
ui_print("@ Aosp Animations");
package_extract_dir("evil/Ani/Aosp/vrtheme", "/sdcard/vrtheme");
set_perm(0, 0, 0755, "/sdcard/vrtheme/installtheme.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zip");
set_perm(0, 0, 0755, "/sdcard/vrtheme/cleanup.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zipalign");
ui_print(" Adding Files");
run_program("/sdcard/vrtheme/installtheme.sh");
run_program("/sdcard/vrtheme/cleanup.sh");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/sdcard");
endif;
if
file_getprop("/tmp/aroma/ani.prop","selected.1") == "3"
then
run_program("/sbin/busybox", "mount", "/system");
ui_print("@ Folding Animations");
package_extract_dir("evil/Ani/Fold/vrtheme", "/sdcard/vrtheme");
set_perm(0, 0, 0755, "/sdcard/vrtheme/installtheme.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zip");
set_perm(0, 0, 0755, "/sdcard/vrtheme/cleanup.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zipalign");
ui_print(" Adding Files");
run_program("/sdcard/vrtheme/installtheme.sh");
run_program("/sdcard/vrtheme/cleanup.sh");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/sdcard");
endif;
if
file_getprop("/tmp/aroma/ani.prop","selected.2") == "1"
then
run_program("/sbin/busybox", "mount", "/system");
ui_print("@ Wicked Speed");
package_extract_dir("evil/Ani/Wicked/vrtheme", "/sdcard/vrtheme");
set_perm(0, 0, 0755, "/sdcard/vrtheme/installtheme.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zip");
set_perm(0, 0, 0755, "/sdcard/vrtheme/cleanup.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zipalign");
ui_print(" Adding More Speed");
run_program("/sdcard/vrtheme/installtheme.sh");
run_program("/sdcard/vrtheme/cleanup.sh");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/sdcard");
endif;
if
file_getprop("/tmp/aroma/ani.prop","selected.2") == "2"
then
run_program("/sbin/busybox", "mount", "/system");
ui_print("@ Wicked on Crack");
package_extract_dir("evil/Ani/Crack/vrtheme", "/sdcard/vrtheme");
set_perm(0, 0, 0755, "/sdcard/vrtheme/installtheme.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zip");
set_perm(0, 0, 0755, "/sdcard/vrtheme/cleanup.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zipalign");
ui_print(" Smoking Crack");
run_program("/sdcard/vrtheme/installtheme.sh");
run_program("/sdcard/vrtheme/cleanup.sh");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/sdcard");
endif;
endif;
unmount("/system");
unmount("/cache");
unmount("/data");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print("@ First boot will take longer! ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print("@ Let the phone sit 5 mins then reboot and enjoy ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print("@ Donations are appreciated! ");
ui_print(" ");
ui_print(" ");
set_progress(1);
Click to expand...
Click to collapse
well 1st it installs busybox which can be done by hand (copy over the busybox binary to /system/xbin and run " busybox --install /system/xbin/ ") or which already be installed if you did root with RDLV.
2nd the toolbox: Should already be symlinked on stock rom. Just leave the stuff that is already there.
3rd the additional scripts. Well look through them and see what they do, they usually install mods or themes etc. If you want their functionality you will need to mimic those scripts or just run them if they are sh scripts (make sure the file structure is how the script expects it though).
What I did was to compare folders and see what was missing or was changed in the rom installation. (compare the file sizes in a file explorer etc. if youre unsure).
Basically just mimic the stuff that is necessary.
--
Since we are not working on the kernel and/or recovery I'm sure download mode will always work so that you can go back to where you started. (just reflash the odin file rdlv created - but it needs to be the full not the csc version obviously).
I had to reflash 2 times so far which taught me: Do not try to overwrite lib files which are currently in use. Do delete all files in /system/app and /system/framework before you copy over the new files if you are starting from an odexed rom - because else you might get the orphan apks without odex which are not present in the custom rom you are trying to install.
For first try I can suggest X-Note 5 installation - apart from the photoreader installation its pretty straight forward as described in the guide.
I'll be real brave now I think:
I want to use simplistic framework and it only supports mj6 fully - but I'm on mj7 alrdy.
So I downloaded slim version of the stock mj6 and I will change the system.apks and the framework to the mj6 ones.
I expect it to work, maybe ill also change build.prop to get the correct info, but apart from that ill leave everything as it is.
But will have to factory reset afterwards just to be safe.. sigh once more. But then I'll hopefully have the ability to use simplistic framework, xposed + wanam together for maximum customization.
--
If it doesnt work ill just have to reflash with odin..
---
ADD1: So far I just changed the framework files to mj6 and deleted dalvik cache. And copied over simplistic framework. Booted up fine, lets see if it fully works now.
UPDATE: Although I'm getting no errors simplistic is not working so I will have to downgrade full to mj6 i think. Not sure if I gonna try odin downgrade though... could trip knox altough i actually doubt it as long as i only flash system img.
Oh my god u are a hero
Would be nice if you could write a script or smth
I dont dare doing so many steps where a single fail you brick my phone :b
hit 'thanks' if i helped you
SM-N9005 DMJ7 0x0
XDA Developers 4 premium app
Killberty said:
Oh my god u are a hero
Would be nice if you could write a script or smth
I dont dare doing so many steps where a single fail you brick my phone :b
hit 'thanks' if i helped you
SM-N9005 DMJ7 0x0
XDA Developers 4 premium app
Click to expand...
Click to collapse
I think he is still playing with a lot of it before script writing etc, but no doubt it is a very clever workaround... I'm surprised not many people have noticed this yet?
radicalisto said:
I think he is still playing with a lot of it before script writing etc, but no doubt it is a very clever workaround... I'm surprised not many people have noticed this yet?
Click to expand...
Click to collapse
Yeah what a great pity...
I am quite new to android, never used adb - i felt like the bawwws when i used cygwin to make URDLV work on dmj7 (packed a tar.md5)
So i want that script -wouldnt it be possible to do all the steps from your pc via adb?
I mean just stop system ui and copy and set permissions recursively? Works in my head
hit 'thanks' if i helped you
SM-N9005 DMJ7 0x0
XDA Developers 4 premium app
Killberty said:
Yeah what a great pity...
I am quite new to android, never used adb - i felt like the bawwws when i used cygwin to make URDLV work on dmj7 (packed a tar.md5)
So i want that script -wouldnt it be possible to do all the steps from your pc via adb?
I mean just stop system ui and copy and set permissions recursively? Works in my head
hit 'thanks' if i helped you
SM-N9005 DMJ7 0x0
XDA Developers 4 premium app
Click to expand...
Click to collapse
yea would work. What would be needed though is a way to mimic the linux "yes" command. Unfortunately busybox does not have it. It's used to automatically confirm on user requests. So if you want to copy over all the libs without overwriting (to avoid crash) you would need to use the cp -i for interactive option, which asks before overwriting files, and "yes n|cp * /system/lib" would simply say no whenever there are file conflicts. This is why I said this step needs to be done with a file explorer, because else its a pain in the ass to type "n" and enter a 100 times. And if you want to do this in a script it has to work without user interaction anyway.
So find me a "yes" binary or some script that mimics that and maybe I can make a custom rom installer script.
But I'm also still fiddling around with things. To see which libaries are actually in use while the system runs without systemui (after you run "stop" in terminal or over adb).
I actually could overwrite quite alot of the libs without problems, but when I once copied over the whole folder it would render the device unbootable and I had to reflash with odin. (this happened because the file transfer was cut off mid transfer when some important libary got overwritten it seems.. but it also means that even with fked up libaries, where my phone wouldnt even show boot animation anymore, I could just odin back to stock and everything was fine again)
---
Other thought: could the updater-binary be used to run the updater-script directly? But it would need tweaking i think, even if you can run the updater-binary I have no clue how you could call it from the zip itself. How does cwm etc do it? Their processes should be able to run on the system too, but then you need to be careful about the lib overwriting.
---
What also would help is to have adb in stock recovery or something so we can actually manipulate the whole system. (but most libs are not changed anyway if you use the same base rom)
sorry for multi posting but it gets ugly otherwise..
found out which libs run if you stop systemui:
Code:
/system/lib/D13QS_libchromatix_imx135_preview.so
/system/lib/hw/gralloc.msm8974.so
/system/lib/libc.so
/system/lib/liblog.so
/system/lib/libm.so
/system/lib/libnetutils.so
/system/lib/libsecril-client.so
/system/lib/libselinux.so
/system/lib/libstdc++.so
/system/vendor/lib/libQSEEComAPI.so
/system/vendor/lib/libdiag.so
those need to be deleted from the lib folder of your custom rom youre trying to install and then it can be all copied over - ill test it and report back =)...
Just for my understanding, those libs that run when u stop sysui - those are the same in custom and stock roms?
hit 'thanks' if i helped you
SM-N9005 DMJ7 0x0
XDA Developers 4 premium app
Killberty said:
Just for my understanding, those libs that run when u stop sysui - those are the same in custom and stock roms?
hit 'thanks' if i helped you
SM-N9005 DMJ7 0x0
XDA Developers 4 premium app
Click to expand...
Click to collapse
well, cannot be guaranteed, but in most cases they should be the same (as long as you have the same base as the rom youre trying to install)
I did a comparison of file size of my stock mj7 libs vs those from xnote 5 (on those that still ran i mean) and they were all the same.
Ill copy over the whole libary folder minus those on top now and then report back.
zroice said:
well, cannot be guaranteed, but in most cases they should be the same (as long as you have the same base as the rom youre trying to install)
I did a comparison of file size of my stock mj7 libs vs those from xnote 5 (on those that still ran i mean) and they were all the same.
Ill copy over the whole libary folder minus those on top now and then report back.
Click to expand...
Click to collapse
So you can just write a script which copies all apart from those.
If you need ideas or brainstorming i am your man highly intersted in this and i wanna help
hit 'thanks' if i helped you
SM-N9005 DMJ7 0x0
XDA Developers 4 premium app
aww im dumb - forgot to leave out libc.so - it wasnt shown when I ran "lsof" to find out the necessary files.. sigh. (but i had this happen to me before, so i shouldve known lol..) back to odin..... argh.
Really need adb over recovery sigh =(
so when also leaving out libc.so (alrdy added it to the list on top) I can copy the whole lib folder.
--
might do a script when i got time, but if you delete those libs you can basically just copy over the whole rom i think, but this needs testing and to be honest im quite fed up with flashing for now hehe..

install app in data/app with updater script

Hi,
i can not install some apps in to data/app folder with updater-script.
What i tryed :
(app in data/app installation zip):
Code:
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
set_perm(1000, 1000, 0771, "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/data");
run_program("adb", "install", "-r", "added_files/data/app/com.lge.fmradio-1.apk");
run_program("/sbin/busybox", "umount", "/data");
(app in data/app installation zip):
Code:
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
unmount("/data");
both scripts run without error and app in data/app folder but it's not installed.
When i install as normal app it's working. Also when install via cmd adb install -r com.lge.fmradio-1.apk it's also installins succesfully.
How to install with updater-script?

[REQUEST] Flashable zip to delete camera sounds

IIRC the files to delete are:
camera_focus.ogg
camera_click.ogg
VideoRecord.ogg
Seemed it was pretty easy to make. Now i can survive nightly flashes.
Warning: Use at own risk.
Code:
ui_print("Mounting /system");
ui_print(" ");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "mount", "/system");
ui_print(" ");
ui_print("Deleting camera sounds");
ui_print(" ");
delete("/system/media/audio/ui/camera_click.ogg");
delete("/system/media/audio/ui/camera_focus.ogg");
delete("/system/media/audio/ui/VideoRecord.ogg");
ui_print(" ");
ui_print("Unmounting /system");
ui_print(" ");
run_program("/sbin/busybox", "umount", "/system");
ui_print(" ");
ui_print("Finished");

TWRP: Error 11 (wrong categorie sorry)

Goodday Everyone/Hello!
I'm trying to make a CyanogenMod 12 port rom to my device called "Samsung Galaxy Grand Prime VE SM-G531F"
But it shows me while flashing:
"Updater process ended with signal: 11"
What can be the problem? Here's my updater-script file's code:
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/soc.2/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("ext4", "EMMC", "/dev/block/platform/soc.2/by-name/USER", "/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);
block_image_update("/dev/block/platform/soc.2/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/soc.2/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/soc.2/by-name/KERNEL");
show_progress(0.200000, 10);

Categories

Resources