Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/sbin/sh
- #
- # Backup and restore script for customized OmniROM addons
- # by SpasilliumNexus @ XDA Developers
- # /system/addon.d/80-omniaddons.sh
- #
- . /tmp/backuptool.functions
- list_files() {
- cat <<EOF
- 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)
- ;;
- post-restore)
- # Remove entries of deep_buffer from various locations to improve compatibility with equalizers
- SYSETC=/system/etc
- VENETC=/system/vendor/etc
- AUDPOL=audio_policy.conf
- # Remove deep_buffer from audio_policy.conf
- if [ -f $SYSETC/$AUDPOL ]; then
- sed -i '/deep_buffer {/,/}/s/^/#/' $SYSETC/$AUDPOL
- fi
- if [ -f $VENETC/$AUDPOL ]; then
- sed -i '/deep_buffer {/,/}/s/^/#/' $VENETC/$AUDPOL
- fi
- ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement