#!/sbin/sh # # Backup and restore proprietary Android system files # C=/tmp/backupdir S=/system V=9 PROCEED=1; check_prereq() { if ( ! grep -q "^ro.cm.version=$V.*" /system/build.prop ); then echo "Not backing up files from incompatible version."; PROCEED=0; fi } check_installscript() { if [ -f "/tmp/.installscript" ] && [ $PROCEED -ne 0 ]; then # We have an install script, and ROM versions match! # We now need to check and see if we have force_backup # in either /etc or /tmp/backupdir if [ -f "$S/etc/force_backuptool" ] || [ -f "$C/force_backuptool" ]; then echo "force_backuptool file found, Forcing backuptool." else echo "/tmp/.installscript found. Skipping backuptool." PROCEED=0; fi fi } get_files() { cat < $C/fixed_custom_backup_list.txt L=`cat $C/fixed_custom_backup_list.txt` cat <