forked from Mirror/GodMode9
Added NAND restore scripts by Kazuma77
This commit is contained in:
parent
430bcd6997
commit
fe1791c7c5
@ -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"
|
||||
|
@ -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"
|
||||
|
23
resources/gm9/scripts/Restore EmuNAND.gm9
Normal file
23
resources/gm9/scripts/Restore EmuNAND.gm9
Normal file
@ -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
|
21
resources/gm9/scripts/Restore SysNAND (Full).gm9
Normal file
21
resources/gm9/scripts/Restore SysNAND (Full).gm9
Normal file
@ -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
|
35
resources/gm9/scripts/Restore SysNAND (Safe).gm9
Normal file
35
resources/gm9/scripts/Restore SysNAND (Safe).gm9
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user