UpdateScript - Galaxy S III Q&A, Help & Troubleshooting

Can anybody check my code?
Code:
ui_print("UltraRock for ARHD 9.0.0");
ui_print("");
ui_print("");
ui_print("Mounting /system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
ui_print("");
ui_print("Installing applications");
ui_print("");
package_extract_dir("system", "/system");
ui_print("");
ui_print("Setting permissions");
ui_print("");
run_program("chmod 0644 /system/app/FmRadio.apk");
run_program("chmod 0644 /system/app/SecLauncher2.apk");
ui_print("");
ui_print("Unmounting");
ui_print("");
unmount("/system");
ui_print("Looks we're done");
by some reason it tells me: status 0;

GR0S said:
Can anybody check my code?
Code:
ui_print("UltraRock for ARHD 9.0.0");
ui_print("");
ui_print("");
ui_print("Mounting /system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
ui_print("");
ui_print("Installing applications");
ui_print("");
package_extract_dir("system", "/system");
ui_print("");
ui_print("Setting permissions");
ui_print("");
run_program("chmod 0644 /system/app/FmRadio.apk");
run_program("chmod 0644 /system/app/SecLauncher2.apk");
ui_print("");
ui_print("Unmounting");
ui_print("");
unmount("/system");
ui_print("Looks we're done");
by some reason it tells me: status 0;
Click to expand...
Click to collapse
I have never seen
Code:
run_program("chmod 0644 /system/app/SecLauncher2.apk");
used for setting permissions..
use this instead
Code:
set_perm(0, 0, 0755, 0644, "/system/app/SecLauncher2.apk");
or
Code:
set_perm_recursive(0, 0, 0755, 0644, "/system/app");

Related

Need Help With updater-script

Hello to all!
So I was writing an updater-script and for some reason after flashing nothing seems to actually happened... I don't get any errors but when I reboot I don't see my changes reflected. The phone I am using is a Motorola Atrix 2 on 4.0.4. Thanks for any help!!
Here's the script:
Code:
ui_print("Google Now Remover by Farshad525hou");
ui_print("Mounting System");
run_program("/sbin/busybox", "mount", "/system");
ui_print("Removing Google Now");
delete("/system/app/velvet.apk");
delete("/system/app/voicesearchstub.apk");
ui_print("Installing Stock ICS Search");
package_extract_dir("system", "/system");
ui_print("Setting Permissions");
set_perm(0, 0, 0644, "system/app/googlequicksearchbox.apk");
ui_print("Unmounting System");
run_program("/sbin/busybox", "unmount", "/system");
ui_print("Removal Complete!");
ui_print("Don't Forget the Thanks Button!");
I gave you a response in the AROMA/Script thread. It's likely your mount command.
Sent from my LG-P999 using xda premium

[Q] SuperSU script file

I have a Concern about SuperSU root files, while i have been always using Super User for a long time, i could say that SuperSU is much better, but the issue is that i was browsing inside the zip file of the SuperSU and i came to the script file and i opened it with a notepad, while i am not a developer to fully understand whats is written but a few line about copying and fixing permissions for both Maps and youtube make me wonder whats the relation between SuperSU and those apps specially that the script file for Super user never had such lines
This is the Content of the Script file included with the SuperSU:
ui_print("*********************");
ui_print("SuperSU installer ZIP");
ui_print("*********************");
ui_print("- Mounting /system, /data and rootfs");
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/data");
run_program("/sbin/busybox", "mount", "-o", "rw,remount", "/system", "/system");
run_program("/sbin/busybox", "mount", "-o", "rw,remount", "/", "/");
ui_print("- Disabling OTA survival");
package_extract_dir("tools", "/system");
run_program("/system/chattr", "-i", "/system/bin/.ext/.su");
delete("/system/chattr");
ui_print("- Removing old files");
delete("/system/bin/su");
delete("/system/xbin/su");
delete("/system/bin/.ext/.su");
delete("/system/app/Superuser.apk");
delete("/system/app/Superuser.odex");
delete("/system/app/SuperUser.apk");
delete("/system/app/SuperUser.odex");
delete("/system/app/superuser.apk");
delete("/system/app/superuser.odex");
delete("/system/app/Supersu.apk");
delete("/system/app/Supersu.odex");
delete("/system/app/SuperSU.apk");
delete("/system/app/SuperSU.odex");
delete("/system/app/supersu.apk");
delete("/system/app/supersu.odex");
run_program("/sbin/busybox", "rm", "/data/dalvik-cache/*com.noshufou.android.su*");
run_program("/sbin/busybox", "rm", "/data/dalvik-cache/*Superuser.apk*");
run_program("/sbin/busybox", "rm", "/data/dalvik-cache/*SuperUser.apk*");
run_program("/sbin/busybox", "rm", "/data/dalvik-cache/*superuser.apk*");
run_program("/sbin/busybox", "rm", "/data/dalvik-cache/*eu.chainfire.supersu*");
run_program("/sbin/busybox", "rm", "/data/dalvik-cache/*Supersu.apk*");
run_program("/sbin/busybox", "rm", "/data/dalvik-cache/*SuperSU.apk*");
run_program("/sbin/busybox", "rm", "/data/dalvik-cache/*supersu.apk*");
ui_print("- Creating space");
run_program("/sbin/busybox", "cp", "/system/app/Maps.apk", "/Maps.apk");
run_program("/sbin/busybox", "cp", "/system/app/GMS_Maps.apk", "/GMS_Maps.apk");
run_program("/sbin/busybox", "cp", "/system/app/YouTube.apk", "/YouTube.apk");
run_program("/sbin/busybox", "rm", "/system/app/Maps.apk");
run_program("/sbin/busybox", "rm", "/system/app/GMS_Maps.apk");
run_program("/sbin/busybox", "rm", "/system/app/YouTube.apk");
ui_print("- Extracting files");
package_extract_dir("system", "/system");
ui_print("- Restoring files");
run_program("/sbin/busybox", "cp", "/Maps.apk", "/system/app/Maps.apk");
run_program("/sbin/busybox", "cp", "/GMS_Maps.apk", "/system/app/GMS_Maps.apk");
run_program("/sbin/busybox", "cp", "/YouTube.apk", "/system/app/YouTube.apk");
run_program("/sbin/busybox", "rm", "/Maps.apk");
run_program("/sbin/busybox", "rm", "/GMS_Maps.apk");
run_program("/sbin/busybox", "rm", "/YouTube.apk");
ui_print("- Setting permissions");
set_perm(0, 0, 0777, "/system/bin/.ext");
set_perm(0, 0, 06755, "/system/bin/.ext/.su");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 0644, "/system/app/Superuser.apk");
set_perm(0, 0, 0644, "/system/app/Maps.apk");
set_perm(0, 0, 0644, "/system/app/GMS_Maps.apk");
set_perm(0, 0, 0644, "/system/app/YouTube.apk");
ui_print("- Unmounting /system and /data");
unmount("/system");
unmount("/data");
ui_print("- Done !");

Setting permissions to file after flashing .zip

I am trying to make my first custom ROM, but I have a problem with permissions.. this is my updater-script:
Code:
ui_print(" ");
ui_print("________________________________");
ui_print(" MADE BY FECHE ");
ui_print(" ** ONLY FOR CRYSTAL QUADCORE ** ");
ui_print("________________________________");
show_progress(0.200000, 10);
ui_print("Mounting..");
mount("ext4", "EMMC", "/dev/block/actc", "/system");
mount("ext4", "EMMC", "/dev/block/acte", "/cache");
mount("ext4", "EMMC", "/dev/block/actd", "/data");
show_progress(0.200000, 20);
delete_recursive("/system");
ui_print("Formatting /system..");
delete_recursive("/cache");
ui_print("Formatting /cache..");
delete_recursive("/data");
ui_print("Formatting /data..");
show_progress(0.200000, 35);
#Install system
ui_print("Installing /system.. (this will take a while)");
package_extract_dir("system", "/system");
show_progress(0.200000, 45);
symlink("/system/xbin/su", "/system/bin/su");
ui_print("Setting permissions..");
set_perm_recursive(0, 0, 0755, 0755, "/system");
show_progress(0.200000, 65);
#Finish_installation
ui_print("Unmouting..");
unmount("/system");
show_progress(0.200000, 80);
unmount("/data");
show_progress(1.000000, 90);
unmount("/cache");
ui_print(" ");
show_progress(1.000000, 0);
ui_print("Done, enjoy! :)");
But when I press on reboot on recovery, it says that the ROOT may have been lost, then it says, repair root? I press on 'no', the device restarts but it gets a black screen right after the device logo.. thanks.
take a look at:
set_perm() or set_perm_recursive()
link: http://forum.xda-developers.com/wiki/Edify_script_language

Help creating a bloatware remover script

Hi Guys,
I was wondering if there was a way that i can create a simply script to remove the apps i never want on my phone. Can i simply take the same concept from the below script?
Basically adding in lines of "delete("/system/app/????.apk")?
Code:
ui_print("");
ui_print("");
ui_print("");
ui_print("");
ui_print("");
ui_print("");
ui_print("");
ui_print("");
ui_print("");
ui_print("");
ui_print("");
ui_print("");
ui_print("");
ui_print("");
ui_print("");
ui_print(" %% %%");
ui_print(" %%% %%%");
ui_print(" %%%% %%%%");
ui_print(" %%%%%% %%%%%%");
ui_print(" %%%%%%%%%%%%%%%%%%%%%%%%%%");
ui_print("%%%%% TRULYCLEAN SCRIPT %%%%%");
ui_print(" %%%%%%%%%%%%%%%%%%%%%%%%%%");
ui_print(" %% v1.6 by schoolsux %%");
ui_print(" %%%%%%%%%%%%%%%%%%%");
ui_print("");
ui_print("");
ui_print("Running script & cleaning up...");
package_extract_file("busybox", "/tmp/busybox");
set_perm(0, 0, 0777, "/tmp/busybox");
run_program("/tmp/busybox", "mount", "/system");
run_program("/tmp/busybox", "mount", "/data");
ui_print("");
ui_print("Removing sounds...");
delete("/system/media/audio/ui/PowerOn.ogg");
delete("/system/media/audio/ui/LowBattery.ogg");
delete("/system/media/audio/ui/TW_Volume_control.ogg");
ui_print("Removing apps and releated stuff...");
delete("/system/app/Chrome.apk");
delete("/system/app/SBrowser.apk");
delete("/system/app/SBrowserTry.apk");
delete("/system/app/sCloudSyncSBrowserBookmark.apk");
delete("/system/app/sCloudSyncSBrowserTabs.apk");
delete("/system/app/AccuweatherPhone2013.apk");
delete("/system/app/WeatherWidgetDaemon.apk");
delete("/system/app/SMemo2.apk");
delete("/system/app/sCloudSyncSNote.apk");
delete("/system/app/SNoteProvider.apk");
delete("/system/lib/libsnote_core.so");
delete("/system/lib/libSPenGesturePE.so");
delete("/system/lib/libSPenSDKImageFilterLibsPE.so");
delete("/system/app/SHealth2.apk");
delete("/system/app/HealthContentProvider.apk");
delete("/system/app/SensorService.apk");
delete("/system/lib/libhealth_jni.so");
delete("/system/app/S-Voice_Android_phone_J.apk");
delete("/system/app/SamsungTTS.apk");
delete_recursive("/system/tts/lang_SMT");
delete_recursive("/system/tts/lang_SVOX");
delete_recursive("/system/tts/lang_SVOXP");
delete_recursive("/system/wakeupdata");
delete_recursive("/system/voicebargeindata");
delete_recursive("/system/VODB");
delete("/system/app/Earth.apk");
delete("/system/lib/libearthmobile.so");
delete("/system/app/PolarisViewer5.apk");
delete("/system/lib/libpolarisviewer5.so");
delete("/system/lib/libpolarisofficedump.so");
delete("/system/app/Talk.apk");
delete("/system/lib/libgtalk_jni.so");
delete("/system/app/ChatON_feature.apk");
delete("/system/app/ChatONV_J.apk");
delete("/system/lib/libChatOnAMSImageFilterLibs-1.0.2.so");
delete("/system/app/FaceLock.apk");
delete("/system/lib/libfacelock_jni.so");
delete("/system/app/ColorBlind.apk");
delete("/system/app/DioDict3Service.apk");
delete("/system/app/EasyFavoritesContactsWidget.apk");
delete("/system/app/EasyLauncher.apk");
delete("/system/app/EasySettings.apk");
delete("/system/app/GMS_Maps.apk");
delete("/system/app/Street.apk");
delete("/system/app/KNOXAgent.apk");
delete("/system/app/KNOXStore.apk");
delete("/system/app/MobilePrint2.apk");
delete("/system/app/MobilePrintSvc_CUPS.apk");
delete("/system/app/MobilePrintSvc_CUPS_Backend.apk");
delete("/system/app/MobilePrintSvc_Epson.apk");
delete("/system/app/MobilePrintSvc_HP.apk");
delete("/system/app/MobilePrintSvc_Samsung.apk");
delete("/system/app/SamsungOCR2.apk");
delete_recursive("/system/opticalreader");
delete("/system/app/PageBuddyNotiSvc2.apk");
delete("/system/app/PlusOne.apk");
delete("/system/app/S_Translator_CSLi.apk");
delete("/system/app/SamsungVideo.apk");
delete("/system/app/SimpleWidget.apk");
delete("/system/app/SmartBriefing4x2.apk");
delete("/system/app/SNS.apk");
delete("/system/app/talkback.apk");
delete("/system/app/WebManual.apk");
delete("/system/app/YouTube.apk");
delete("/system/app/GoogleSearchWidget.apk");
delete("/system/app/AllSharePlay15.apk");
delete("/system/app/CHS_J_Device_only.apk");
delete("/system/app/Com2usPoker_ASGC.apk");
delete("/system/app/Dropbox.apk");
delete("/system/app/DropboxOOBE.apk");
delete("/system/app/Episodes.apk");
delete("/system/app/Flipboard.apk");
delete("/system/app/GoogleFeedback.apk");
delete("/system/app/GroupPlay_20.apk");
delete("/system/app/InteractiveTutorial.apk");
delete("/system/app/Magazines.apk");
delete("/system/app/Match3VS.apk");
delete("/system/app/Music2.apk");
delete("/system/app/Peel.apk");
delete("/system/app/PlusOne.apk.apk");
delete("/system/app/S_Translator_CSLi.apk.apk");
delete("/system/app/SamsungApps_J_Only.apk");
delete("/system/app/SamsungAppsUNA3.apk");
delete("/system/app/SamsungBooks.apk");
delete("/system/app/SamsungGames.apk");
delete("/system/app/SamsungHub.apk");
delete("/system/app/SamsungHubUpdater.apk");
delete("/system/app/SamsungLearning.apk");
delete("/system/app/SamsungMusic.apk");
delete("/system/app/SamsungWatchON.apk");
delete("/system/app/TravelWidget.apk");
delete("/system/app/TravelService.apk");
delete("/system/app/TripAdvisor.apk");
delete("/system/app/YahoostockPhone2013.apk");
delete("/system/app/YahoonewsPhone2013.apk");
delete("/system/app/Blurb.apk");
delete("/system/app/Books.apk");
delete("/system/app/StoryAlbumWidget.apk");
delete("/system/app/Gmail2.apk");
delete("/system/app/secRCS.apk");
delete("/system/app/Videos.apk");
delete("/system/app/ContainerAgent.apk");
delete("/system/app/SPDClient.apk");
delete("/system/app/SyncmlDM.apk");
delete("/system/app/SyncmlDS.apk");
delete("/system/app/DSMForwarding.apk");
delete("/system/app/DSMLawmo.apk");
delete("/system/app/ELMAgent.apk");
delete("/system/app/BluetoothTest.apk");
delete("/system/app/WlanTest.apk");
delete("/system/app/wssyncmlnps.apk");
ui_print("Deleting folders and misc...");
delete_recursive("/system/media/video");
delete_recursive("/system/containers");
delete_recursive("/system/lost+found");
delete_recursive("/system/preloaddata");
delete_recursive("/system/app/pak");
delete_recursive("/system/app/mcRegistry");
delete("/system/app/CSC.apk");
delete("/system/CSCVersion.txt");
delete("/system/csc_contents");
delete_recursive("/system/csc");
run_program("/tmp/busybox", "umount", "/system");
run_program("/tmp/busybox", "umount", "/data");
ui_print("Done, enjoy!");

Problem while installing zip file

Hi,
I've used the bloatware-removal-skript from this post http://forum.xda-developers.com/android/software/gapps-google-apps-minimal-edition-t2943330 on my Galaxy S5 with CM12.1 for over a year and it worked very fine.
Now I've updated to CM13 and tried the skript again, it won't work. TWRP 2.8.7.0 just says:
Error flashing zip '/sdcard/postinstall.zip'
No further information.
I don't know how to fix this. Here's the content of my "updater-script":
Code:
ui_print("******************************************");
ui_print("Bloatware Removal Script for Android 6.x.x");
ui_print("");
ui_print("Release Date: 2016-01-09");
ui_print("******************************************");
show_progress(1, 15);
ui_print("Unmounting system");
run_program("/sbin/busybox", "umount", "/system");
ui_print("Mounting system");
run_program("/sbin/busybox", "mount", "/system");
show_progress(1, 15);
ui_print("Removing system bloat, if any...");
delete_recursive(
"/system/app/BasicDreams",
"/system/app/Browser",
"/system/app/Calendar",
"/system/app/Camera2",
"/system/app/CMWallpapers",
"/system/app/Eleven",
"/system/app/Email",
"/system/app/Exchange2",
"/system/app/Galaxy4",
"/system/app/HoloSpiralWallpaper",
"/system/app/LiveWallpapers",
"/system/app/LiveWallpapersPicker",
"/system/app/NoiseField",
"/system/app/PhaseBeam",
"/system/app/PhotoPhase",
"/system/app/PhotoTable",
"/system/app/SoundRecorder",
);
delete_recursive(
"/system/priv-app/AudioFX",
);
show_progress(1, 15);
ui_print("Copying files");
package_extract_dir("system", "/system");
show_progress(1, 15);
ui_print("Unmounting system");
run_program("/sbin/busybox", "umount", "/system");
ui_print("Installation complete!");
Any suggestions / ideas?
thx,
bigtreiber

Categories

Resources