forked from CyanogenDefy/android_external_bootmenu
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpost_bootmenu.sh
executable file
·57 lines (40 loc) · 1.3 KB
/
post_bootmenu.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/system/bin/sh
######## BootMenu Script
######## Execute Post BootMenu
source /system/bootmenu/script/_config.sh
export PATH=/system/xbin:/system/bin:/sbin
######## Main Script
# there is a problem, this script is executed if we
# exit from recovery...
echo 0 > /sys/class/leds/blue/brightness
## Run Init Script
######## Don't Delete.... ########################
mount -o remount,rw rootfs /
mount -o remount,rw $PART_SYSTEM /system
##################################################
if [ -d $BM_ROOTDIR/init.d ]; then
chmod 755 $BM_ROOTDIR/init.d/*
run-parts $BM_ROOTDIR/init.d/
fi
# normal cleanup here (need fix in recovery first)
# ...
# fast button warning (to check when script is really used)
if [ -f /sbin/busybox ]; then
echo 1 > /sys/class/leds/button-backlight/brightness
usleep 50000
echo 0 > /sys/class/leds/button-backlight/brightness
usleep 50000
echo 1 > /sys/class/leds/button-backlight/brightness
usleep 50000
echo 0 > /sys/class/leds/button-backlight/brightness
usleep 50000
echo 1 > /sys/class/leds/button-backlight/brightness
usleep 50000
echo 0 > /sys/class/leds/button-backlight/brightness
exit 1
fi
######## Don't Delete.... ########################
mount -o remount,ro rootfs /
mount -o remount,ro $PART_SYSTEM /system
##################################################
exit 0