[REQUEST] Flashable zip to delete camera sounds - ONE Q&A, Help & Troubleshooting

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");

Related

MOD Please Delete

I am trying to learn how to create the edify scripts. I have several ring tones and live wall papers that I like to install and want to just flash them instead of using the adb. I have two folders in the root of the zip file the META-INF and system. Under the system folder I have an app folder, with apk's, and a lib folder for their libraries.
Here was my amend script that worked
Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:app
set_perm_recursive 0 0 0755 0644 SYSTEM:lib
show_progress 0.1 10
This is my first edify script that does not work (Status 6)
Code:
show_progress(0.1, 0);
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
set_perm_recursive(0, 0, 0755, 0644, "/system/lib");
unmount("/system");
show_progress(0.1, 10);
Then my latest edify script that runs but does not install the files
Code:
ui_print("Installing Live Wall Paper...");
ui_print("Mounting mount points...");
show_progress(0.1, 0);
run_program("/sbin/mount", "/dev/block/mtdblock4", "/system");
package_extract_dir("system", "/system");
show_progress(0.1, 10);
ui_print("Setting Permissions...");
show_progress(0.2, 0);
set_perm_recursive(0, 0, 0755, 0644, "system/app");
set_perm_recursive(0, 0, 0755, 0644, "system/lib");
show_progress(0.2, 10);
ui_print("Unmounting mount points...");
run_program("/sbin/umount", "/system");
ui_print("Update Complete.");
I want to learn this but I'm just going in circles now.
1. Why would my first edify script not run and gave me a "Status 6".
2. Why does my latest edify script run but does nothing.
Any help would be really really helpful. Thanks in advance.

[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(" ");

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?

[Completed] Updater-script error 6

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

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