Created
July 26, 2009 03:34
-
-
Save openback/155419 to your computer and use it in GitHub Desktop.
A shell script that uses adb to push fonts onto the G1. Make sure adb is in your path.
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/bash | |
# make sure we have 1 or 2 arguments | |
if [ $# -ne 1 ] && [ $# -ne 2 ]; then | |
echo "usage: `basename $0` font [bold_font]" | |
exit 1 | |
fi | |
adb devices|grep -w device > /dev/null | |
if [ $? -eq 1 ]; then | |
echo "Error: device not found by adb" | |
exit 1 | |
fi | |
echo "Device found" | |
echo "- Remounting / as rw" | |
adb remount | |
echo "- Sending fonts" | |
adb push "$1" /system/fonts/DroidSans.ttf | |
if [ $# -eq 2 ]; then | |
adb push "$2" /system/fonts/DroidSans-Bold.ttf | |
else | |
adb push "$1" /system/fonts/DroidSans-Bold.ttf | |
fi | |
echo "- Remounting / as ro" | |
adb remount | |
echo "Done." | |
echo -n "Reboot device (Y/N)? " | |
read reply | |
if [ "$reply" == "y" ] || [ "$reply" == "Y" ]; then | |
echo "Rebooting device..." | |
adb shell reboot | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instead of this, now you can use Type Fresh!