Skip to content

Instantly share code, notes, and snippets.

@LukeZGD
Last active June 23, 2024 07:34
Show Gist options
  • Save LukeZGD/da484f6deb02edefd6689c6bf921d5d4 to your computer and use it in GitHub Desktop.
Save LukeZGD/da484f6deb02edefd6689c6bf921d5d4 to your computer and use it in GitHub Desktop.
ios 4 powder nvram fix - thanks to testingthings (@throwaway167074) for the fix impl
#include <stdlib.h>
int main() {
system("nvram -c");
system("nvram boot-partition=2");
system("nvram auto-boot=1");
//system("nvram auto-boot=0"); // for 4.2.x and lower, to send device to recovery after restore
system("umount /mnt1");
system("mount_hfs /dev/disk0s1 /mnt1");
system("dd if=/iBoot of=/mnt1/iBEC bs=512k");
system("/sbin/reboot__");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment