Skip to content

Instantly share code, notes, and snippets.

@c2h2
Last active Jan 17, 2017
Embed
What would you like to do?
flashing android script
#!/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