original bluetooth apk just in case it crashes due to missing dalvik cache
|
|
@ -0,0 +1,43 @@
|
|||
#!/bin/sh
|
||||
|
||||
epd_cmd()
|
||||
{
|
||||
epd_fb_test $@ >/dev/null 2>&1
|
||||
}
|
||||
|
||||
dispClear()
|
||||
{
|
||||
epd_cmd gray DU PART 0
|
||||
}
|
||||
|
||||
get_screen_resolution()
|
||||
{
|
||||
head -1 /sys/class/graphics/fb0/modes | sed -e 's/^.*://' -e 's/p.*$//' -e 's/x/ /'
|
||||
}
|
||||
|
||||
get_screen_width()
|
||||
{
|
||||
set `get_screen_resolution`
|
||||
echo $1
|
||||
}
|
||||
|
||||
get_screen_height()
|
||||
{
|
||||
set `get_screen_resolution`
|
||||
echo $2
|
||||
}
|
||||
|
||||
LOG_FP=$1
|
||||
|
||||
dispClear
|
||||
|
||||
while [ 1 ]
|
||||
do
|
||||
for file in `\find $(dirname ${0})/images -name '*.bmp' | sort`; do
|
||||
epd_cmd file GC16 PART $file
|
||||
echo "[anim] displaying $file" >> $LOG_FP
|
||||
sleep 1
|
||||
done
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh
|
||||
|
||||
# initialization
|
||||
UPDATER_BASE=$(dirname ${0})
|
||||
ANIM_PID=0
|
||||
EPOCH=$(date +%s)
|
||||
LOG_FP=/root/updater_$EPOCH.log
|
||||
echo "" > $LOG_FP
|
||||
|
||||
# start animation script
|
||||
${UPDATER_BASE}/animation.sh $LOG_FP &
|
||||
ANIM_PID=$!
|
||||
sleep 2
|
||||
|
||||
# enable bluetooth hid by replacing the stock bluetooth apk
|
||||
echo "[updater.sh] run gethid.sh" >> $LOG_FP
|
||||
${UPDATER_BASE}/gethid.sh $LOG_FP
|
||||
if [ ! $? -eq 0 ]
|
||||
then
|
||||
# shutdown, remove update, error occurs
|
||||
RET=$?
|
||||
fi
|
||||
|
||||
sleep 2
|
||||
|
||||
# stop animation
|
||||
if [ $ANIM_PID -ne 0 ]
|
||||
then
|
||||
kill $ANIM_PID
|
||||
fi
|
||||
|
||||
# if returned 1, will shutdown
|
||||
exit $RET
|
||||
|
After Width: | Height: | Size: 6.9 MiB |
|
After Width: | Height: | Size: 6.9 MiB |
|
After Width: | Height: | Size: 6.9 MiB |
|
After Width: | Height: | Size: 6.9 MiB |
|
After Width: | Height: | Size: 6.9 MiB |
|
After Width: | Height: | Size: 6.9 MiB |
|
After Width: | Height: | Size: 6.9 MiB |
|
|
@ -0,0 +1,64 @@
|
|||
#!/bin/sh
|
||||
|
||||
# initialization
|
||||
UPDATER_BASE=$(dirname ${0})
|
||||
TAG="[gethid.sh]"
|
||||
LOG_FP=$1
|
||||
|
||||
BLU_APK=${UPDATER_BASE}/bluetooth/Bluetooth.apk
|
||||
BLUE_ODEX=${UPDATER_BASE}/bluetooth/Bluetooth.odex
|
||||
|
||||
SYSTMP=${UPDATER_BASE}/systmp
|
||||
SYSBLUAPP=${SYSTMP}/app/Bluetooth
|
||||
BLK09="/dev/mmcblk0p9"
|
||||
|
||||
# funcs
|
||||
log_print() {
|
||||
echo $TAG $1 >> $LOG_FP
|
||||
}
|
||||
|
||||
cp_perm() {
|
||||
log_print "copy from $4 to $5 w. perm $1.$2 $3"
|
||||
rm -f $5
|
||||
if [ -f "$4" ]; then
|
||||
cat $4 > $5
|
||||
set_perm $1 $2 $3 $5
|
||||
fi
|
||||
}
|
||||
|
||||
set_perm() {
|
||||
log_print "set perm $1.$2 $3 for $4"
|
||||
chown $1.$2 $4
|
||||
chown $1:$2 $4
|
||||
chmod $3 $4
|
||||
}
|
||||
|
||||
# check file existence
|
||||
if ! [ -f $BLU_APK -a -f $BLUE_ODEX ]
|
||||
then
|
||||
log_print "missing necessary files.."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# mount system
|
||||
mkdir -p $SYSTMP >> $LOG_FP 2>&1
|
||||
mount $BLK09 $SYSTMP >> $LOG_FP 2>&1
|
||||
|
||||
if [ ! $? -eq 0 ]
|
||||
then
|
||||
log_print "failed to mount system partition"
|
||||
umount $SYSTMP >> $LOG_FP 2>&1
|
||||
exit 2
|
||||
fi
|
||||
log_print "system partition mounted"
|
||||
|
||||
|
||||
log_print "copying original bluetooth files.."
|
||||
cp_perm 0 0 0644 ${BLU_APK} ${SYSBLUAPP}/Bluetooth.apk
|
||||
cp_perm 0 0 0644 ${BLUE_ODEX} ${SYSBLUAPP}/arm/Bluetooth.odex
|
||||
|
||||
# finishing up
|
||||
log_print "un-mount the system partition"
|
||||
umount $SYSTMP >> $LOG_FP 2>&1
|
||||
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
UPDATER_BASE=$(dirname ${0})
|
||||
${UPDATER_BASE}/eufwupdater.sh
|
||||
# tentative exit
|
||||
exit $?
|
||||
|
|
@ -0,0 +1 @@
|
|||
2714eb0d158c256c4868ef04f93cb50c56d0092c8df6285304b8ddb78d5f1ef9
|
||||
|
|
@ -0,0 +1 @@
|
|||
55460c2e3abf285af96fe660c0880bc
|
||||