#!/sbin/sh

rm -rf /sdcard/OneOS-*
rm -rf /sdcard/OneOS*
rm -rf /data/dalvik-cache
rm -rf /data/system/package_cache/*
rm -rf /data/resource-cache/*


cur_time=$(date +%s)

if [ ! -f /sdcard/Android/OneOS/persist_backup_*.img ]; then
  mkdir /sdcard/Android/OneOS
  dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/Android/OneOS/persist_backup_$cur_time.img
fi
