[Galaxy Note 4 Android Development (Snapdragon)] haojingkr:
Thanks for dev this flash script.

Thanks for dev this script.

I modified your script for delete more apps.

Tested in Galaxy Note 4 (KOR SKT) + TWRP Recovery

Recommended

- Samsung Touchwiz Stock Marshmallow Rom

- SELinux Permissive Kernel

Do NOT Delete

- VPN. if delete this, VPN apps not work.

- Galaxy Apps. if delete this, GameMode, Game Tuner apps not work.

- Ultra Power Saving

- Samsung Gallery. if delete this, Camera Gallery not work.

Delete more bloatwares.

- Remove Samsung SoundAlive. if you wanna sound effect, Please install ViPER4Android or(and) Dolby Atmos. (SELinux Permissive Kernel only)

- Remove annoying SELinux message on notification bar for Custom SELinux Permissive Kernel Users.

- [KOR SKT ONLY] T Store

- [KOR SKT ONLY] T Phone

- [KOR SKT ONLY] T Service

- [KOR SKT ONLY] SKT Hidden Menu

- TalkBack

- Samsung E-mail

- Kies

- Samsung Cloud

- GMail

- Google Play Games, Books, Movies

- Google+

- T-DMB

- Samsung stock Video Player. Please use 3rd party app.

- Samsung stock Music Player. Please use 3rd party app.

- Samsung S Planner. Please use Google Calendar instead.

- Samsung Clock. Please use Google Clock instead.

- Weather Widget.

- Launcher Background Animation Apps.

- Unusable Fonts

- Remove S Finder/Q Connect from notification bar.

- system/preloadmdm

- Change Emoji TTF to smaller Open Source EmojiOne-android Font. So this zip is bigger than your original zip. thanks for emojione.com

Build.prop

- ro.product.name, ro.product.device tweak #[KOR ONLY] Remove SKT/KT/LGU Operator Icon from Status Bar

- ro.config.knox=0 #Deactivate KNOX

- ro.securestorage.support=false #Fix Wi-Fi storage issue in Custom SELinux Permissive Kernel.

- net.tethering.noprovisioning=true #Fix Tethering issue if you flashed Custom Kernel.

Not works

- /system/etc/permissions/platform.xml: Fix External SD Card Permissions. but not work.

- Tried to force mute Camera Shutter Sound, but not work.

Boot Time Comparison (Galaxy Note 4 N916S)

Before(Stock) 24.3 Seconds

After 21.5 Seconds

/system size Comparison (Galaxy Note 4 N916S)

Before 3.33GB

After 1.85GB

ui_print("system/app: Clean more.");
delete_recursive("/system/app/AppleMint");
delete_recursive("/system/app/DictDiotek");
delete_recursive("/system/app/Gmail2");
delete_recursive("/system/app/mobileTworld");
delete_recursive("/system/app/Newsstand");
delete_recursive("/system/app/SamsungSans");
delete_recursive("/system/app/SamsungTTS");
delete_recursive("/system/app/talkback");
delete_recursive("/system/app/TcloudAgent");
delete_recursive("/system/app/Tinker");
delete_recursive("/system/app/SKTService");
delete_recursive("/system/app/SKTServiceUtility");
delete_recursive("/system/app/SktUsimService");
delete_recursive("/system/app/V3Mobile2_Repack");
delete_recursive("/system/app/VideoEditor_Lite_T");
delete_recursive("/system/app/WeatherDaemon2014_T_MMR");
delete_recursive("/system/app/SKTHiddenMenu");
delete_recursive("/system/app/VolteSettings");
delete_recursive("/system/app/Books");
delete_recursive("/system/app/HomeScreenEffect_KOR");
delete_recursive("/system/app/KWeatherNews2014_T_MMR");
delete_recursive("/system/app/PlayGames");
delete_recursive("/system/app/PlusOne");
delete_recursive("/system/app/RDiagno");
delete_recursive("/system/app/RInstallAgent_Hidden");
delete_recursive("/system/app/SamsungDLPService");
delete_recursive("/system/app/SecEmail_K");
delete_recursive("/system/app/SecExchange");
delete_recursive("/system/app/sktrsperm");
delete_recursive("/system/app/sktrssrn2");
delete_recursive("/system/app/Tdmb_HD_MUPG");
delete_recursive("/system/app/AdvSoundDetector");
delete_recursive("/system/app/AllshareMediaServer");
delete_recursive("/system/app/DigitalClockEasy_MUPG");
delete_recursive("/system/app/DigitalClock_MUPG");
delete_recursive("/system/app/DriveLink");
delete_recursive("/system/app/DriveLinkRemote");
delete_recursive("/system/app/DualClockDigital_MUPG");
delete_recursive("/system/app/FactoryCameraFB");
delete_recursive("/system/app/InteractiveKeyguardTutorial");
delete_recursive("/system/app/InteractiveTutorial");
delete_recursive("/system/app/SamsungAppsWidget_BannerStyle_common");
delete_recursive("/system/app/SamsungWidget_ActiveApplication");
delete_recursive("/system/app/TapandpayWidget");

ui_print("system/priv-app: Clean more.");
delete_recursive("/system/priv-app/AndroidTStore");
delete_recursive("/system/priv-app/ANTRadioService");
delete_recursive("/system/priv-app/HealthService");
delete_recursive("/system/priv-app/Kies");
delete_recursive("/system/priv-app/SamsungCloud");
delete_recursive("/system/priv-app/sCloudBackupApp");
delete_recursive("/system/priv-app/sCloudDataRelay");
delete_recursive("/system/priv-app/sCloudDataSync");
delete_recursive("/system/priv-app/sCloudQuotaApp");
delete_recursive("/system/priv-app/sCloudSyncCalendar");
delete_recursive("/system/priv-app/sCloudSyncContacts");
delete_recursive("/system/priv-app/sCloudSyncMemo");
delete_recursive("/system/priv-app/SHealth3_5");
delete_recursive("/system/priv-app/TPhone");
delete_recursive("/system/priv-app/TPhoneInternal");
delete_recursive("/system/priv-app/TPhoneSetup");
delete_recursive("/system/priv-app/TstoreAgent");
delete_recursive("/system/priv-app/TstoreStartup");
delete_recursive("/system/priv-app/HancomOfficeViewer");
delete_recursive("/system/priv-app/SamsungLinkPlatform");
delete_recursive("/system/priv-app/ASKSManager");
delete_recursive("/system/priv-app/NoiseField");
delete_recursive("/system/priv-app/PhaseBeam");
delete_recursive("/system/priv-app/Z0000TSEED");
delete_recursive("/system/priv-app/SecVideo");
delete_recursive("/system/priv-app/SecVideoPlayer");
#delete_recursive("/system/priv-app/SecGallery2014L");	#Camera Gallery Not Work.
delete_recursive("/system/priv-app/SamsungMusic_20_M");
delete_recursive("/system/priv-app/PhotoStudio_WQHD_K");
delete_recursive("/system/priv-app/MusicCommonUtility_M");
delete_recursive("/system/priv-app/S-Voice_Android_phone");
delete_recursive("/system/priv-app/SStudio_WQHD_K");
delete_recursive("/system/priv-app/TrimApp_phone_light");
delete_recursive("/system/priv-app/3DTourViewer_WQHD_lightTheme");

delete_recursive("/system/priv-app/ConfigUpdater");
delete_recursive("/system/priv-app/EasyLauncher2");
delete_recursive("/system/priv-app/SamsungMagnifier");
delete_recursive("/system/priv-app/wssyncmlnps");

ui_print("system/preloadedmdm: Remove preloadedmdm (5.51MB)");
delete_recursive("/system/preloadedmdm");

ui_print("build.prop: Fix Wi-Fi Settings Issue if you flashed Custom Kernel.");
run_program("/sbin/sh", "-c", "sed -i 's:ro.securestorage.support=.*:ro.securestorage.support=false:' /system/build.prop");
run_program("/sbin/sh", "-c", "sed -i 's:ro.sec.fle.encryption=.*:ro.sec.fle.encryption=false:' /system/build.prop");

ui_print("build.prop: Kill KNOX.");
run_program("/sbin/sh", "-c", "sed -i 's:ro.config.knox=.*:ro.config.knox=0:' /system/build.prop");

ui_print("[For KOR Roms] build.prop: Fix Unhideable SKT/LGU Operator Logo.");
run_program("/sbin/sh", "-c", "sed -i 's:ro.product.name=\(.*\)\(skt\|lgu\):ro.product.name=\1:' /system/build.prop");
run_program("/sbin/sh", "-c", "sed -i 's:ro.product.device=\(.*\)\(skt\|lgu\):ro.product.device=\1:' /system/build.prop");

ui_print("[For KOR Roms] build.prop: Fix Unhideable KT Operator Logo.");
run_program("/sbin/sh", "-c", "sed -i 's:ro.product.name=\(.*\)kt:ro.product.name=\1:' /system/build.prop");
run_program("/sbin/sh", "-c", "sed -i 's:ro.product.device=\(.*\)kt:ro.product.device=\1:' /system/build.prop");

ui_print("build.prop: Fix Tethering issue if you flashed Custom Kernel.");
run_program("/sbin/sh", "-c", "sed -i 's:net.tethering.noprovisioning=.*::' /system/build.prop");
run_program("/sbin/sh", "-c", "sed -i '$s:\(.*\):net.tethering.noprovisioning=true:' /system/build.prop");

ui_print("/system/etc/permissions/platform.xml: Fix External SD Card Permissions.");
run_program("/sbin/sh", "-c", "sed -i ':a;N;$!ba;s:<permission name=\"android.permission.WRITE_EXTERNAL_STORAGE\" >\(\s\|.*\)\+</permission>:<permission name=\"android.permission.WRITE_EXTERNAL_STORAGE\" >\n<group gid=\"sdcard_r\">\n<group gid=\"sdcard_rw\">\n<group gid=\"media_rw\">\n</permission>:igm' /system/etc/permissions/platform.xml");
run_program("/sbin/sh", "-c", "sed -i ':a;N;$!ba;s:<permission name=\"android.permission.WRITE_MEDIA_STORAGE\" >\(\s\|.*\)\+</permission>:<permission name=\"android.permission.WRITE_MEDIA_STORAGE\" >\n<group gid=\"sdcard_rw\">\n<group gid=\"media_rw\">\n</permission>:igm' /system/etc/permissions/platform.xml");

ui_print("/system/fonts/: Delete Unusable Samsuck Fonts.");
delete("/system/fonts/Chococooky.ttf");
delete("/system/fonts/Cooljazz.ttf");
delete("/system/fonts/DancingScript-Bold.ttf");
delete("/system/fonts/DancingScript-Regular.ttf");
delete("/system/fonts/Rosemary.ttf");
delete("/system/fonts/ComingSoon.ttf");
delete("/system/fonts/CarroisGothicSC-Regular.ttf");

ui_print("/system/fonts/: Delete Color Emoji Fonts.");
delete("/system/fonts/NotoColorEmoji.ttf");
delete("/system/fonts/SamsungColorEmoji.ttf");

ui_print("/system/fonts/: Delete Unusable Noto***-Bold.ttf Fonts.");
delete("/system/fonts/NotoNaskhArabic-Bold.ttf");
delete("/system/fonts/NotoNaskhArabicUI-Bold.ttf");
delete("/system/fonts/NotoSansArmenian-Bold.ttf");
delete("/system/fonts/NotoSansBengali-Bold.ttf");
delete("/system/fonts/NotoSansBengaliUI-Bold.ttf");
delete("/system/fonts/NotoSansCham-Bold.ttf");
delete("/system/fonts/NotoSansDevanagari-Bold.ttf");
delete("/system/fonts/NotoSansDevanagariUI-Bold.ttf");
delete("/system/fonts/NotoSansEthiopic-Bold.ttf");
delete("/system/fonts/NotoSansGeorgian-Bold.ttf");
delete("/system/fonts/NotoSansGujarati-Bold.ttf");
delete("/system/fonts/NotoSansGujaratiUI-Bold.ttf");
delete("/system/fonts/NotoSansGurmukhi-Bold.ttf");
delete("/system/fonts/NotoSansGurmukhiUI-Bold.ttf");
delete("/system/fonts/NotoSansHebrew-Bold.ttf");
delete("/system/fonts/NotoSansKannada-Bold.ttf");
delete("/system/fonts/NotoSansKannadaUI-Bold.ttf");
delete("/system/fonts/NotoSansKhmer-Bold.ttf");
delete("/system/fonts/NotoSansKhmerUI-Bold.ttf");
delete("/system/fonts/NotoSansLao-Bold.ttf");
delete("/system/fonts/NotoSansLaoUI-Bold.ttf");
delete("/system/fonts/NotoSansMalayalam-Bold.ttf");
delete("/system/fonts/NotoSansMalayalamUI-Bold.ttf");
delete("/system/fonts/NotoSansMyanmar-Bold.ttf");
delete("/system/fonts/NotoSansMyanmarUI-Bold.ttf");
delete("/system/fonts/NotoSansOriya-Bold.ttf");
delete("/system/fonts/NotoSansOriyaUI-Bold.ttf");
delete("/system/fonts/NotoSansSinhala-Bold.ttf");
delete("/system/fonts/NotoSansTamil-Bold.ttf");
delete("/system/fonts/NotoSansTamilUI-Bold.ttf");
delete("/system/fonts/NotoSansTelugu-Bold.ttf");
delete("/system/fonts/NotoSansTeluguUI-Bold.ttf");
delete("/system/fonts/NotoSansThaana-Bold.ttf");
delete("/system/fonts/NotoSansThai-Bold.ttf");
delete("/system/fonts/NotoSansThaiUI-Bold.ttf");

ui_print("/system/fonts/: Delete Unusable Samsuck Fonts.");
delete("/system/fonts/NotoSansJP-Regular.otf");
delete("/system/fonts/NotoSansKR-Regular.otf");
delete("/system/fonts/NotoSansSC-Regular.otf");
delete("/system/fonts/NotoSansTC-Regular.otf");
#delete("/system/fonts/SECHans-Regular.otf");	#CJK NOT Work.
#delete("/system/fonts/SamsungKorean-Bold.ttf");	# Samsung Keyboard NOT Work.
#delete("/system/fonts/SamsungKorean-Regular.ttf");	# Font Weight will changed to bold.
delete("/system/fonts/SamsungNeoNum-3L.ttf");
delete("/system/fonts/SamsungNeoNum-3R.ttf");
#delete("/system/fonts/SamsungNeoNum-3T.ttf");	#Alarm NOT Work.
delete("/system/fonts/SamsungNeoNumCond-3T.ttf");
delete("/system/fonts/SamsungSans-Num35.ttf");
#delete("/system/fonts/SamsungSans-Num3L.ttf");	#Contacts NOT Work.
#delete("/system/fonts/SamsungSans-Num3Lv.ttf");	#Contacts NOT Work.
delete("/system/fonts/SamsungSans-Num3R.ttf");
delete("/system/fonts/SamsungSans-Num3T.ttf");
delete("/system/fonts/SamsungSans-Num45.ttf");
delete("/system/fonts/SamsungSans-Num4L.ttf");
delete("/system/fonts/SamsungSans-Num4Lv.ttf");
delete("/system/fonts/SamsungSans-Num4T.ttf");
delete("/system/fonts/SamsungSans-Num4Tv.ttf");
delete("/system/fonts/SECRobotoLight-Bold.ttf");
delete("/system/fonts/SECRobotoLight-Regular.ttf");

ui_print("/system/fonts/: Delete Unusable Roboto*** Fonts.");
delete("/system/fonts/Roboto-Black.ttf");
delete("/system/fonts/Roboto-BlackItalic.ttf");
delete("/system/fonts/Roboto-Bold.ttf");
delete("/system/fonts/Roboto-BoldItalic.ttf");
delete("/system/fonts/Roboto-Italic.ttf");
delete("/system/fonts/Roboto-Light.ttf");
delete("/system/fonts/Roboto-LightItalic.ttf");
#delete("/system/fonts/Roboto-Medium.ttf");	# Samsung IME Not Work.
delete("/system/fonts/Roboto-MediumItalic.ttf");
#delete("/system/fonts/Roboto-Regular.ttf");	# Samsung IME Not Work.
delete("/system/fonts/Roboto-Thin.ttf");
delete("/system/fonts/Roboto-ThinItalic.ttf");
delete("/system/fonts/RobotoCondensed-Bold.ttf");
delete("/system/fonts/RobotoCondensed-BoldItalic.ttf");
delete("/system/fonts/RobotoCondensed-Italic.ttf");
delete("/system/fonts/RobotoCondensed-Light.ttf");
delete("/system/fonts/RobotoCondensed-LightItalic.ttf");
delete("/system/fonts/RobotoCondensed-Regular.ttf");

ui_print("kill samsuck KNOX.");
#delete("/system/lib/libknox_encryption.so");	# Bootloop
#delete("/system/lib/libknox_km.so");	# Bootloop
#delete("/system/lib/libknox_legacy_ode_km.so");	# Bootloop
#delete("/system/lib/libknox_migration.so");	# Bootloop
#delete("/system/lib/libknoxvpnfdsensor.so");	# Bootloop
delete("/system/framework/knoxvpnuidtag.jar");
delete_recursive("/system/etc/secure_storage/com.sec.knox.store");
delete_recursive("/system/etc/secure_storage/com.sec.knox.store!dex");

ui_print("Remove S Finder/Q Connect from notification bar.");
delete("/system/etc/permissions/com.sec.feature.findo.xml");

ui_print("/system/fonts/: Copy smaller Emoji Font for reduce Resource usage.");
ui_print("Emojione font produced by emojione.com/developers/");
package_extract_dir("system", "/system");