119 lines
4.5 KiB
Bash
Executable File
119 lines
4.5 KiB
Bash
Executable File
__HEADER__
|
|
|
|
list_files() {
|
|
cat <<EOF
|
|
bin/oem-iptables-init.sh
|
|
EOF
|
|
}
|
|
|
|
case "$1" in
|
|
backup)
|
|
list_files | while read FILE DUMMY; do
|
|
backup_file $S/"$FILE"
|
|
done
|
|
;;
|
|
restore)
|
|
list_files | while read FILE REPLACEMENT; do
|
|
R=""
|
|
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
|
|
[ -f "$C/$S/$FILE" ] && restore_file $S/"$FILE" "$R"
|
|
done
|
|
;;
|
|
pre-backup)
|
|
# Stub
|
|
;;
|
|
post-backup)
|
|
# Stub
|
|
;;
|
|
pre-restore)
|
|
# Stub
|
|
;;
|
|
post-restore)
|
|
# mute camera
|
|
chmod 000 $(get_output_path $SYS/media/audio/ui/camera_*.ogg)
|
|
chmod 000 $(get_output_path $PRODUCT/media/audio/ui/camera_*.ogg)
|
|
chmod 000 $(get_output_path $PRODUCT/media/audio/ui/Video*.ogg)
|
|
# remove bloat
|
|
rm -rf $(get_output_path $SYS/priv-app/AudioFX)
|
|
rm -rf $(get_output_path $SYS/priv-app/CMAccount)
|
|
rm -rf $(get_output_path $SYS/priv-app/CMBugReport)
|
|
rm -rf $(get_output_path $SYS/priv-app/CMUpdater)
|
|
rm -rf $(get_output_path $SYS/priv-app/LiveLockScreenService)
|
|
rm -rf $(get_output_path $SYS/priv-app/ThemeChooser)
|
|
rm -rf $(get_output_path $SYS/priv-app/ThemesProvider)
|
|
rm -rf $(get_output_path $SYS/priv-app/Trebuchet)
|
|
rm -rf $(get_output_path $SYS/priv-app/TrebuchetQuickStep)
|
|
rm -rf $(get_output_path $SYS/app/BasicDreams)
|
|
rm -rf $(get_output_path $SYS/app/CMWallpapers)
|
|
rm -rf $(get_output_path $SYS/app/Camera2)
|
|
rm -rf $(get_output_path $SYS/app/Email)
|
|
rm -rf $(get_output_path $SYS/app/Exchange2)
|
|
rm -rf $(get_output_path $SYS/app/Galaxy4)
|
|
rm -rf $(get_output_path $SYS/app/HoloSpiralWallpaper)
|
|
rm -rf $(get_output_path $SYS/app/HexoLibre)
|
|
rm -rf $(get_output_path $SYS/app/Jelly)
|
|
rm -rf $(get_output_path $SYS/app/LiveWallpapers)
|
|
rm -rf $(get_output_path $SYS/app/LiveWallpapersPicker)
|
|
rm -rf $(get_output_path $SYS/app/LockClock)
|
|
rm -rf $(get_output_path $SYS/app/NoiseField)
|
|
rm -rf $(get_output_path $SYS/app/PhaseBeam)
|
|
rm -rf $(get_output_path $SYS/app/PhotoPhase)
|
|
rm -rf $(get_output_path $SYS/app/PhotoTable)
|
|
rm -rf $(get_output_path $SYS/app/Profiles)
|
|
rm -rf $(get_output_path $SYS/app/Stk)
|
|
rm -rf $(get_output_path $SYS/app/Terminal)
|
|
rm -rf $(get_output_path $SYS/app/TimeService)
|
|
rm -rf $(get_output_path $SYS/app/VisualizationWallpapers)
|
|
rm -rf $(get_output_path $SYS/app/WAPPushManager)
|
|
rm -rf $(get_output_path $SYS/app/WhisperPush)
|
|
# lineageos 17
|
|
rm -rf $(get_output_path $PRODUCT/priv-app/Eleven)
|
|
rm -rf $(get_output_path $PRODUCT/priv-app/Gallery2)
|
|
rm -rf $(get_output_path $PRODUCT/app/Email)
|
|
rm -rf $(get_output_path $PRODUCT/app/Exchange2)
|
|
rm -rf $(get_output_path $PRODUCT/app/Jelly)
|
|
rm -rf $(get_output_path $PRODUCT/app/PhotoTable)
|
|
rm -rf $(get_output_path $PRODUCT/app/Recorder)
|
|
# lineageos 18
|
|
rm -rf $(get_output_path $SYSTEM_EXT/priv-app/Gallery2)
|
|
# omnirom
|
|
rm -rf $(get_output_path $SYS/priv-app/Launcher3)
|
|
rm -rf $(get_output_path $SYS/priv-app/OmniBrain)
|
|
rm -rf $(get_output_path $SYS/priv-app/OmniStyle)
|
|
rm -rf $(get_output_path $SYS/priv-app/OmniSwitch)
|
|
rm -rf $(get_output_path $SYS/priv-app/MatLog)
|
|
rm -rf $(get_output_path $SYS/priv-app/OpenDelta)
|
|
rm -rf $(get_output_path $SYS/app/OmniTorch)
|
|
rm -rf $(get_output_path $SYS/app/OmniJaws)
|
|
rm -rf $(get_output_path $SYS/app/OmniClockOSS)
|
|
rm -rf $(get_output_path $SYS/app/OmniChange)
|
|
rm -rf $(get_output_path $SYS/app/Chromium)
|
|
rm -rf $(get_output_path $SYS/app/MusicFX)
|
|
rm -rf $(get_output_path $SYS/app/EggGame)
|
|
rm -rf $(get_output_path $SYS/app/EasterEgg)
|
|
rm -rf $(get_output_path $SYS/app/MonthCalendarWidget)
|
|
# omnirom sustratum stuff
|
|
rm -rf $(get_output_path $SYS/overlay)
|
|
# arrow
|
|
rm -rf $(get_output_path $SYS/priv-app/AsusCamera)
|
|
rm -rf $(get_output_path $SYS/priv-app/Camera2)
|
|
rm -rf $(get_output_path $SYS/app/Browser)
|
|
rm -rf $(get_output_path $SYS/app/Simple-Gallery)
|
|
rm -rf $(get_output_path $SYS/app/SoundPickerPrebuilt)
|
|
rm -rf $(get_output_path $SYS/vendor/app/DTVPlayer)
|
|
rm -rf $(get_output_path $SYS/vendor/app/DTVService)
|
|
# qualcomm service tha constantly monitor 3/4G and wifi
|
|
# https://www.qualcomm.com/news/onq/2013/07/02/qualcomms-cne-bringing-smarts-3g4g-wi-fi-seamless-interworking
|
|
# smart is crap
|
|
rm -rf $(get_output_path $SYS/priv-app/CNEService)
|
|
# Fix ownership/permissions
|
|
for i in $(list_files); do
|
|
f=$(get_output_path "$SYS/$i")
|
|
chown root:root $f
|
|
chmod 644 $f
|
|
chmod 755 $(dirname $f)
|
|
done
|
|
;;
|
|
esac
|
|
# vi: ft=sh
|