Skip to content

Instantly share code, notes, and snippets.

View passiweinberger's full-sized avatar
🚀
building

Pascal Weinberger passiweinberger

🚀
building
View GitHub Profile
@passiweinberger
passiweinberger / restart_iphone.sh
Created August 5, 2016 13:25
To fix this annoying problem when your iPhone goes nuts (black screen, unresponsive or whatever) but your f*cking Power-Button is broken... Just connect it to your Mac via USB and then run this. Thank me later, bro ;)
echo "Using: http://krypted.com/mac-os-x/use-libimobiledevice-to-view-ios-logs/"
echo "Installing needed tools:"
brew install -v --fresh automake autoconf libtool wget libimobiledevice
echo "Done installing tools!"
echo "Make sure your iPhone is connected via USB"
read -p "Is your iPhone connected via USB? And do you want to restart it? [yn]" answer
if [[ $answer = y ]] ; then
echo "Trying to restart iPhone, make sure you keep it connected!"
idevicediagnostics restart
echo "iPhone restarted."