Skip to content

Instantly share code, notes, and snippets.

@playfulgod
Created June 17, 2012 16:17
Show Gist options
  • Save playfulgod/2944984 to your computer and use it in GitHub Desktop.
Save playfulgod/2944984 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Unix OS Sniffer and $adb setup by Firon
platform=`uname`
if [ $(uname -p) = 'powerpc' ]; then
echo "[-] PowerPC is not supported."
exit 1
fi
if [ "$platform" = 'Darwin' ]; then
adb="Files/./adb.osx"
version="OSX"
else
adb="Files/./adb"
version="Linux"
fi
chmod +x adb
which adb > /dev/null 2>&1
if [ $? -eq 0 ]; then
adb="Files/adb"
fi
# End section, thanks Firon!
echo off
clear
echo CWM Recovery for the LG Connect 4G
echo One click Built by mtmichaelson
echo Testing and Help by markolo25 and Rlwallace
echo Exploit Built by djrbliss
echo CWM made by shabbypenguin
echo Linux Shell script by PlayfulGod
echo Data wipe fix by thecubed and PlayfulGod
echo
echo
echo Clockwork Mod Recovery
echo "[*] Press enter to install CWM to your phone..."
read -n 1 -s
echo Pushing CWM to Phone
$adb push Files/cwmrecovery.img /data/local/tmp/cwmrecovery.img
$adb shell "rm /data/gpscfg/gps_env.conf 2>/dev/null"
$adb shell "ln -s /data /data/gpscfg/gps_env.conf"
echo Rebooting device
$adb reboot
echo Waiting for device to reboot
$adb wait-for-device
echo Pushing Exploit
$adb shell "echo 'ro.kernel.qemu=1' > /data/local.prop"
echo Rebooting device again
$adb reboot
echo Waiting for device to reboot
$adb wait-for-device
echo Installing CWM Recovery
$adb remount
$adb shell "rm /system/etc/install-recovery.sh"
$adb shell "rm /system/recovery-from-boot.p"
$adb shell "dd if=/data/local/tmp/cwmrecovery.img of=/dev/block/mmcblk0p13 bs=4096"
echo Removing Trash
$adb shell "rm /data/local/tmp/cwmrecovery.img"
$adb shell "rm /data/local.prop"
$adb shell "rm /data/gpscfg/*"
$adb shell "chmod 771 /data/"
echo Finished Recovery!!!
$adb reboot
echo "[*] Press any key to exit."
read -n1 -r
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment