-
-
Save c2h2/f2f6594492fd1926245cd6b11d6491c2 to your computer and use it in GitHub Desktop.
flashing android script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
date | |
#power up usb and 3.3v | |
echo 64 > /sys/class/gpio/export | |
echo 65 > /sys/class/gpio/export | |
echo out > /sys/class/gpio/gpio64/direction | |
echo out > /sys/class/gpio/gpio65/direction | |
echo 1 > /sys/class/gpio/gpio64/value | |
echo 1 > /sys/class/gpio/gpio65/value | |
#set audio 100% output | |
/usr/bin/amixer sset 'Left Line Mixer Line2L Bypass' off || true | |
/usr/bin/amixer sset 'Left Line Mixer Line2R Bypass' mute || true | |
/usr/bin/amixer sset 'PCM' 100% || true | |
/usr/bin/amixer sset 'Line DAC' 100% || true | |
/usr/bin/amixer sset 'HP DAC' 100% || true | |
/usr/bin/amixer sset 'Line' on || true | |
#play audio start | |
aplay /usr/share/sounds/system-upgrading.wav | |
echo 5 | |
sleep 1 | |
echo 4 | |
sleep 1 | |
echo 3 | |
sleep 1 | |
echo 2 | |
sleep 1 | |
echo 1 | |
sleep 1 | |
echo "START FLASHING" | |
zcat /root/android_working_emmc_20170117.img.gz > /dev/mmcblk0 | |
aplay /usr/share/sounds/system-upgraded.wav | |
echo "END FLASHING" | |
#play audio end | |
date |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment