diff --git a/resources/gm9/scripts/Backup EmuNAND.gm9 b/resources/gm9/scripts/Backup EmuNAND.gm9 index 7796b96..0b578c1 100644 --- a/resources/gm9/scripts/Backup EmuNAND.gm9 +++ b/resources/gm9/scripts/Backup EmuNAND.gm9 @@ -1,5 +1,5 @@ # EmuNAND backup GM9 script -# This will create a backup named [SERIAL]_nandmin_???.bin +# This will create a backup named [DATESTAMP]_[SERIAL]_emunand_???.bin # author: d0k3 set ERRORMSG "EmuNAND backup failed" diff --git a/resources/gm9/scripts/Backup SysNAND.gm9 b/resources/gm9/scripts/Backup SysNAND.gm9 index c8be191..ef5932e 100644 --- a/resources/gm9/scripts/Backup SysNAND.gm9 +++ b/resources/gm9/scripts/Backup SysNAND.gm9 @@ -1,5 +1,5 @@ # SysNAND backup GM9 script -# This will create a backup named [SERIAL]_nandmin_???.bin +# This will create a backup named [DATESTAMP]_[SERIAL]_sysnand_???.bin # author: d0k3 set ERRORMSG "SysNAND backup failed" diff --git a/resources/gm9/scripts/Restore EmuNAND.gm9 b/resources/gm9/scripts/Restore EmuNAND.gm9 new file mode 100644 index 0000000..0fc0973 --- /dev/null +++ b/resources/gm9/scripts/Restore EmuNAND.gm9 @@ -0,0 +1,23 @@ +# EmuNAND restore GM9 script +# This will restore a backup from 0:/gm9/out, expecting the name scheme from the backup scripts +# author: Kazuma77 + +set SUCCESSMSG "Successfully Restored EmuNAND." + +set ERRORMSG "EmuNAND not changed." +filesel "Select NAND Backup." $[GM9OUT]/*nand_???.bin NANDBAK +ask "Restore\n$[NANDBAK]\nto EmuNAND?" +allow E:/nand.bin + +set ERRORMSG "Not a valid NAND backup." +imgmount $[NANDBAK] +find I:/nand_minsize.bin NULL + +# Uncomment the "verify" line below to enable verification. +# I left it out since EmuNAND isn't vital. +# Besides, EmuNANDs don't even use their firm partitions. +#verify I:/nand_minsize.bin + +set ERRORMSG "An error occurred during the transfer\nPlease try again." +inject -n I:/nand_minsize.bin E:/nand.bin@0 +imgumount diff --git a/resources/gm9/scripts/Restore SysNAND (Full).gm9 b/resources/gm9/scripts/Restore SysNAND (Full).gm9 new file mode 100644 index 0000000..959e643 --- /dev/null +++ b/resources/gm9/scripts/Restore SysNAND (Full).gm9 @@ -0,0 +1,21 @@ +# SysNAND full restore GM9 script +# This will restore a backup from 0:/gm9/out, expecting the name scheme from the backup scripts +# author: Kazuma77 + +set SUCCESSMSG "Successfully Restored SysNAND." + +set ERRORMSG "This script requires ntrboot to run." +chk $[HAX] "ntrboot" + +set ERRORMSG "SysNAND not changed." +filesel "Select NAND Backup." $[GM9OUT]/*nand_???.bin NANDBAK +ask "WARNING:\nSystem exploit will not be protected.\nNEVER use an EmuNAND image with this\nscript - it may brick your device.\n \nFully restore\n$[NANDBAK]\nto SysNAND?" + +allow S:/nand.bin +set ERRORMSG "Not a valid NAND backup." +imgmount $[NANDBAK] +verify I:/nand_minsize.bin + +set ERRORMSG "An error occurred during the transfer\nPlease try again." +inject -n I:/nand_minsize.bin S:/nand.bin@0 +imgumount diff --git a/resources/gm9/scripts/Restore SysNAND (Safe).gm9 b/resources/gm9/scripts/Restore SysNAND (Safe).gm9 new file mode 100644 index 0000000..03fe7b7 --- /dev/null +++ b/resources/gm9/scripts/Restore SysNAND (Safe).gm9 @@ -0,0 +1,35 @@ +# SysNAND safe restore GM9 script +# This will restore a backup from 0:/gm9/out, expecting the name scheme from the backup scripts +# author: Kazuma77 + +set SUCCESSMSG "Successfully Restored SysNAND." + +set ERRORMSG "No qualifying exploit was found.\nAborting to avoid bricking the unit." +chk -u $[HAX] "" + +set ERRORMSG "Safe restore is not available on\nntrboot. Aborting to avoid a brick." +chk -u $[HAX] "ntrboot" + +set ERRORMSG "SysNAND not changed." +filesel "Select NAND Backup." $[GM9OUT]/*nand_???.bin NANDBAK +ask "Safe restore\n$[NANDBAK]\nto SysNAND?" +allow S:/ctrnand_full.bin +allow S:/twln.bin +allow S:/twlp.bin + +set ERRORMSG "Not a valid NAND backup." +imgmount $[NANDBAK] +find I:/ctrnand_full.bin NULL +find I:/twln.bin NULL +find I:/twlp.bin NULL + +# Uncomment the "verify" line below to enable verification. +# I left it out since the firm partitions are not being touched. +# If you do not want the script to even try to recover content from a bricked image, enable it. +#verify I:/nand_minsize.bin + +set ERRORMSG "An error occurred during the transfer.\nPlease try again." +cp -w -n I:/ctrnand_full.bin S:/ctrnand_full.bin +cp -w -n I:/twln.bin S:/twln.bin +cp -w -n I:/twlp.bin S:/twlp.bin +imgumount