#! /system/bin/sh
mount -o rw -o remount /system
if [[ $? != 0 ]]; then
echo 0> /sys/kernel/xxx/imagever
exit -1
fi
cp -rf Settings.apk /system/framework/Settings.apk
if [[ $? != 0 ]]; then
echo 1 >/sys/kernel/xxx/imagever
exit -1
fi
sync
echo "upgrade app image success"
mkdir test1
mount -t vfat /dev/block/mmcblk3p1 test/
if [[ $? != 0 ]]; then
echo 2> /sys/kernel/xxx/imagever
exit -1
fi
cp -rf linuximage test/
if [[ $? != 0 ]]; then
echo 3> sys/kernel/xxx/imagever
exit -1
fi
cp -rf oftree test/
if [[ $? != 0 ]]; then
echo 4> sys/kernel/xxx/imagever
exit -1
fi
umount test
if [[ $? != 0 ]]; then
echo 5> sys/kernel/xxx/imagever
exit -1
fi
sync
setprop persist.sys.xxx 1
echo 6 > sys/kernel/xxx/imagever
echo "upgrade kernel image success"