Skip to content

Instantly share code, notes, and snippets.

@gsora
Created March 26, 2012 15:37
Show Gist options
  • Select an option

  • Save gsora/2206022 to your computer and use it in GitHub Desktop.

Select an option

Save gsora/2206022 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Adrenizer: a simple Adreno 200 official driver installer.
# Works on all operating system that Google's adb supports.
# Developed by @PeppeLaKappa (aka Gianguido Sorà) gianguidorama (at) gmail (dot) com
# help me!
if [ "$1" = "" ]; then
echo "Adrenizer: a simple Adreno 200 official driver installer."
echo "Works on all operating system that Google's adb supports."
echo "Developed by @PeppeLaKappa (aka Gianguido Sorà): gianguidorama (at) gmail (dot) com"
echo "Make sure that adb it's installed and well configured."
echo "Usage:"
echo " help show this help"
echo " backup backup your current driver"
echo " install install Adreno 200 official driver"
echo " restore restore the backup of your driver if any"
fi
if [ "$1" = "help" ]; then
echo "Adrenizer: a simple Adreno 200 official driver installer."
echo "Works on all operating system that Google's adb supports."
echo "Developed by @PeppeLaKappa (aka Gianguido Sorà): gianguidorama (at) gmail (dot) com"
echo "Make sure that adb it's installed and well configured."
echo "Usage:"
echo " help show this help"
echo " backup backup your current driver"
echo " install install Adreno 200 official driver"
echo " restore restore the backup of your driver if any"
fi
# backup section
if [ "$1" = "backup" ]; then
echo "Copying your current installed driver..."
mkdir backup_driver
echo "Is your device listed? [y/n]"
echo ""
#./adb devices
read LIST
# if lol then asd
if [ "$LIST" = "y" ]; then
true
else
echo "Device not found? Make sure that "USB Debug" is activated on your device!"
exit 1
fi
echo "OK! Backup running right now... In the meantime, would you wanna listen to a good song? Take it! http://www.youtube.com/watch?v=XyGc8Qx-8ac"
mkdir -p backup_driver/system/lib
mkdir -p backup_driver/system/etc/firmware
mkdir backup_driver/system/lib/egl
# /system/lib backup
cd backup_driver/system/lib
adb pull /system/lib/libgsl.so
adb pull /system/lib/libsc-a2xx.so
# /system/lib/egl backup
cd egl
adb pull /system/lib/egl/egl.cfg
adb pull /system/lib/egl/eglsubAndroid.so
adb pull /system/lib/egl/libEGL_adreno200.so
adb pull /system/lib/egl/libGLES_android.so
adb pull /system/lib/egl/libGLESv1_CM_adreno200.so
adb pull /system/lib/egl/libGLESv2_adreno200.so
adb pull /system/lib/egl/libq3dtools_adreno200.so
# /system/etc/firmware backup
cd ../..
cd etc/firmware
adb pull /system/etc/firmware/yamato_pfp.fw
adb pull /system/etc/firmware/yamato_pm4.fw
echo "Backup finished! DO NOT DELETE "backup_driver" FOLDER!"
fi
# install section
if [ "$1" = "install" ]; then
mkdir adreno200od
echo "Download Adreno 200 official driver from https://developer.qualcomm.com/file/10127 and place the archive in the "adreno200od" folder, then press ENTER"
read ENTER
cd adreno200od
unzip *.zip
adb remount
# pushing /system/lib*
cd system/lib
for i in $(ls); do
adb push $i /system/lib/$i
done
# pushing /system/lib/egl
cd egl
for i in $(ls); do
adb push $i /system/lib/egl/$i
done
# pushing /system/etc/firmware
cd ../..
cd etc/firmware
for i in $(ls); do
adb push $i /system/etc/firmware/$i
done
echo "Complete! Rebooting..."
adb reboot
fi
# restore section
if [ "$1" = "restore" ]; then
echo "Restoring old driver backup..."
if [ ! -d "backup_driver" ]; then
echo "Backup folder doesn't exist."
exit 1
fi
cd backup_driver
adb remount
# pushing /system/lib*
cd system/lib
for i in $(ls); do
adb push $i /system/lib/$i
done
# pushing /system/lib/egl
cd egl
for i in $(ls); do
adb push $i /system/lib/egl/$i
done
# pushing /system/etc/firmware
cd ../..
cd etc/firmware
for i in $(ls); do
adb push $i /system/etc/firmware/$i
done
echo "Complete! Rebooting..."
adb reboot
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment