Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

semc: updated bootrec with light indicator recovery

Change-Id: I373d9137e6c38106eb6e1f2346e4bb346fcb9097
  • Loading branch information...
commit 3131302e1080f17da02c1c242bde19b2b1298a49 1 parent eec94b5
@freexperia freexperia authored
Showing with 19 additions and 6 deletions.
  1. +19 −6 prebuilt/bootrec
View
25 prebuilt/bootrec
@@ -1,13 +1,27 @@
#!/sbin/sh
+# fixing CPU clocks to avoid issues in recovery
+echo 1024000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+echo 122000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+# trigger amber LED
+echo '255' > /sys/class/leds/blue/brightness
+echo '255' > /sys/class/leds/red/brightness
+echo '0' > /sys/class/leds/green/brightness
+# trigger button-backlight
+echo '255' > /sys/class/leds/button-backlight/brightness
cat /dev/input/event1 > /dev/keycheck&
sleep 3
+# trigger amber LED
+echo '0' > /sys/class/leds/blue/brightness
+echo '0' > /sys/class/leds/red/brightness
+echo '0' > /sys/class/leds/green/brightness
+# trigger button-backlight
+echo '0' > /sys/class/leds/button-backlight/brightness
+
kill -9 $!
if [ -s /dev/keycheck -o -e /cache/recovery/boot ]
then
-# fixing CPU clocks to avoid issues in recovery
-echo 1024000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
-echo 245000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
rm /cache/recovery/boot
mount -o remount,rw rootfs /
@@ -23,11 +37,10 @@ rm /etc
mkdir /etc
cp /recovery.fstab /etc/recovery.fstab
mount /dev/block/mmcblk0p1 /sdcard
-/sbin/recovery &
-/sbin/adbd recovery
+/sbin/recovery&
+/sbin/adbd recovery
fi
/system/bin/chargemon
-
#continue booting
Please sign in to comment.
Something went wrong with that request. Please try again.