diff --git a/GodMode9.firm b/GodMode9.firm deleted file mode 100644 index 79f316b..0000000 Binary files a/GodMode9.firm and /dev/null differ diff --git a/finalize_helper.gm9 b/finalize_helper.gm9 index 01227d6..dd09a2a 100644 --- a/finalize_helper.gm9 +++ b/finalize_helper.gm9 @@ -84,6 +84,7 @@ if not sha 0:/finalize.romfs FINALIZE_SHA256SUM else imgmount 0:/finalize.romfs cp -w -o -s G:/finalize/GodMode9.firm 0:/luma/payloads/GodMode9.firm + cp -w -o -s G:/finalize/gm9 0:/gm9 if not find 0:/gm9/scripts NULL mkdir 0:/gm9/scripts end diff --git a/romfs/finalize/GodMode9.firm b/romfs/finalize/GodMode9.firm index 59170d2..79f316b 100644 Binary files a/romfs/finalize/GodMode9.firm and b/romfs/finalize/GodMode9.firm differ diff --git a/romfs/finalize/finalize.gm9 b/romfs/finalize/finalize.gm9 index 07af07c..052b1bf 100644 --- a/romfs/finalize/finalize.gm9 +++ b/romfs/finalize/finalize.gm9 @@ -528,7 +528,6 @@ if find 0:/gm9/flags/INSTALLFLAG NULL goto INSTALLSKIP end -cp -w 9:/finalize/GM9Megascript.gm9 0:/gm9/scripts/GM9Megascript.gm9 rm -o -s 0:/gm9/scripts/finalize.gm9 rm -o -s 0:/finalize.romfs @@ -542,7 +541,6 @@ poweroff @BACKUPSKIP -cp -w 9:/finalize/GM9Megascript.gm9 0:/gm9/scripts/GM9Megascript.gm9 rm -o -s 0:/gm9/scripts/finalize.gm9 rm -o -s 0:/finalize.romfs @@ -567,7 +565,6 @@ goto NOSPACE @INSTALLSKIP -cp -w 9:/finalize/GM9Megascript.gm9 0:/gm9/scripts/GM9Megascript.gm9 rm -o -s 0:/gm9/scripts/finalize.gm9 rm -o -s 0:/finalize.romfs diff --git a/romfs/finalize/gm9/languages/de.trf b/romfs/finalize/gm9/languages/de.trf new file mode 100644 index 0000000..ae4bbd4 Binary files /dev/null and b/romfs/finalize/gm9/languages/de.trf differ diff --git a/romfs/finalize/gm9/languages/en.trf b/romfs/finalize/gm9/languages/en.trf new file mode 100644 index 0000000..e3888ff Binary files /dev/null and b/romfs/finalize/gm9/languages/en.trf differ diff --git a/romfs/finalize/gm9/languages/es.trf b/romfs/finalize/gm9/languages/es.trf new file mode 100644 index 0000000..bbe587f Binary files /dev/null and b/romfs/finalize/gm9/languages/es.trf differ diff --git a/romfs/finalize/gm9/languages/fr.trf b/romfs/finalize/gm9/languages/fr.trf new file mode 100644 index 0000000..234c9ef Binary files /dev/null and b/romfs/finalize/gm9/languages/fr.trf differ diff --git a/romfs/finalize/gm9/languages/id.trf b/romfs/finalize/gm9/languages/id.trf new file mode 100644 index 0000000..d6a4ed8 Binary files /dev/null and b/romfs/finalize/gm9/languages/id.trf differ diff --git a/romfs/finalize/gm9/languages/it.trf b/romfs/finalize/gm9/languages/it.trf new file mode 100644 index 0000000..111b0a5 Binary files /dev/null and b/romfs/finalize/gm9/languages/it.trf differ diff --git a/romfs/finalize/gm9/languages/ja-KANA.trf b/romfs/finalize/gm9/languages/ja-KANA.trf new file mode 100644 index 0000000..b329830 Binary files /dev/null and b/romfs/finalize/gm9/languages/ja-KANA.trf differ diff --git a/romfs/finalize/gm9/languages/ja.frf b/romfs/finalize/gm9/languages/ja.frf new file mode 100644 index 0000000..295357d Binary files /dev/null and b/romfs/finalize/gm9/languages/ja.frf differ diff --git a/romfs/finalize/gm9/languages/ja.trf b/romfs/finalize/gm9/languages/ja.trf new file mode 100644 index 0000000..5e1193d Binary files /dev/null and b/romfs/finalize/gm9/languages/ja.trf differ diff --git a/romfs/finalize/gm9/languages/ko.frf b/romfs/finalize/gm9/languages/ko.frf new file mode 100644 index 0000000..ece9dc4 Binary files /dev/null and b/romfs/finalize/gm9/languages/ko.frf differ diff --git a/romfs/finalize/gm9/languages/ko.trf b/romfs/finalize/gm9/languages/ko.trf new file mode 100644 index 0000000..2a87b10 Binary files /dev/null and b/romfs/finalize/gm9/languages/ko.trf differ diff --git a/romfs/finalize/gm9/languages/nl.trf b/romfs/finalize/gm9/languages/nl.trf new file mode 100644 index 0000000..ceb4c60 Binary files /dev/null and b/romfs/finalize/gm9/languages/nl.trf differ diff --git a/romfs/finalize/gm9/languages/no.trf b/romfs/finalize/gm9/languages/no.trf new file mode 100644 index 0000000..acb63e3 Binary files /dev/null and b/romfs/finalize/gm9/languages/no.trf differ diff --git a/romfs/finalize/gm9/languages/pl.trf b/romfs/finalize/gm9/languages/pl.trf new file mode 100644 index 0000000..d8d9845 Binary files /dev/null and b/romfs/finalize/gm9/languages/pl.trf differ diff --git a/romfs/finalize/gm9/languages/ro.trf b/romfs/finalize/gm9/languages/ro.trf new file mode 100644 index 0000000..cfaf849 Binary files /dev/null and b/romfs/finalize/gm9/languages/ro.trf differ diff --git a/romfs/finalize/gm9/languages/ru.trf b/romfs/finalize/gm9/languages/ru.trf new file mode 100644 index 0000000..6471fe9 Binary files /dev/null and b/romfs/finalize/gm9/languages/ru.trf differ diff --git a/romfs/finalize/gm9/languages/ry.frf b/romfs/finalize/gm9/languages/ry.frf new file mode 100644 index 0000000..295357d Binary files /dev/null and b/romfs/finalize/gm9/languages/ry.frf differ diff --git a/romfs/finalize/gm9/languages/ry.trf b/romfs/finalize/gm9/languages/ry.trf new file mode 100644 index 0000000..3d435a7 Binary files /dev/null and b/romfs/finalize/gm9/languages/ry.trf differ diff --git a/romfs/finalize/gm9/languages/zh-CN.frf b/romfs/finalize/gm9/languages/zh-CN.frf new file mode 100644 index 0000000..6db4f21 Binary files /dev/null and b/romfs/finalize/gm9/languages/zh-CN.frf differ diff --git a/romfs/finalize/gm9/languages/zh-CN.trf b/romfs/finalize/gm9/languages/zh-CN.trf new file mode 100644 index 0000000..2130f82 Binary files /dev/null and b/romfs/finalize/gm9/languages/zh-CN.trf differ diff --git a/romfs/finalize/gm9/languages/zh-TW.frf b/romfs/finalize/gm9/languages/zh-TW.frf new file mode 100644 index 0000000..34034e6 Binary files /dev/null and b/romfs/finalize/gm9/languages/zh-TW.frf differ diff --git a/romfs/finalize/gm9/languages/zh-TW.trf b/romfs/finalize/gm9/languages/zh-TW.trf new file mode 100644 index 0000000..fc4da06 Binary files /dev/null and b/romfs/finalize/gm9/languages/zh-TW.trf differ diff --git a/romfs/finalize/GM9Megascript.gm9 b/romfs/finalize/gm9/scripts/GM9Megascript.gm9 similarity index 100% rename from romfs/finalize/GM9Megascript.gm9 rename to romfs/finalize/gm9/scripts/GM9Megascript.gm9 diff --git a/romfs/finalize/gm9/scripts/NANDManager.gm9 b/romfs/finalize/gm9/scripts/NANDManager.gm9 new file mode 100644 index 0000000..8c6143d --- /dev/null +++ b/romfs/finalize/gm9/scripts/NANDManager.gm9 @@ -0,0 +1,173 @@ +@NAND_Manager +@nm_menu +labelsel -k -o -s "Select an option." nmopt_* +goto nm_menu +#goto options_main + +@nmopt_A_Backup_EmuNAND +# EmuNAND backup GM9 script +# This will create a backup named [SERIAL]_nandmin_???.bin +# author: d0k3 +set ERRORMSG "EmuNAND backup failed" +set SUCCESSMSG "EmuNAND backup success" +if ask "Create a EmuNAND backup in $[GM9OUT]?" + findnot $[GM9OUT]/$[DATESTAMP]_$[SERIAL]_emunand_???.bin OUTPATH + cp -h E:/nand_minsize.bin $[OUTPATH] + echo "Backup created succesfully:\n$[OUTPATH]" +end +goto nm_menu + +@nmopt_X_Backup_SysNAND +# SysNAND backup GM9 script +# This will create a backup named [SERIAL]_nandmin_???.bin +# author: d0k3 +set ERRORMSG "SysNAND backup failed" +set SUCCESSMSG "SysNAND backup success" +if ask "Create a SysNAND backup in $[GM9OUT]?" + findnot $[GM9OUT]/$[DATESTAMP]_$[SERIAL]_sysnand_???.bin OUTPATH + cp -h S:/nand_minsize.bin $[OUTPATH] + echo "Backup created succesfully:\n$[OUTPATH]" +end +goto nm_menu + +@nmopt_Y_Restore_EmuNAND +# 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." +if filesel "Select NAND Backup." $[GM9OUT]/*nand_???.bin NANDBAK + if ask "Restore\n$[NANDBAK]\nto EmuNAND?" + allow E:/nand.bin + imgmount $[NANDBAK] + if find I:/nand_minsize.bin NULL + # Uncomment the "verify" command 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 + rm -o -s 4:/data/$[EMUID0]/sysdata/00010011/00000000 + imgumount + else + echo "Not a valid NAND backup." + end + end +end +goto nm_menu + +@nmopt_L_Restore_SysNAND_(Full) +# 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." +# Gateway used to protect EmuNAND firm partitions. +# Old EmuNAND images updated while running Gateway could brick a device. +# If you understand the risk, feel free to comment the next two lines. +set ERRORMSG "This script requires ntrboot to run." +chk $[HAX] "ntrboot" +set ERRORMSG "SysNAND not changed." +if filesel "Select NAND Backup." $[GM9OUT]/*nand_???.bin NANDBAK + if 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 + imgmount $[NANDBAK] + if 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 + rm -o -s 1:/data/$[SYSID0]/sysdata/00010011/00000000 + imgumount + else + echo "Not a valid NAND backup." + end + end +end +goto nm_menu + +@nmopt_R_Restore_SysNAND_(Safe) +# 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] "" +# A "safe" restore has a high risk of bricking a Retail NAND. +# There is no way to know if a system is exploited if it is running NTRBootHax. +# If you understand the risk, feel free to comment the next two lines. +set ERRORMSG "Safe restore is not available on\nntrboot. Aborting to avoid a brick." +chk -u $[HAX] "ntrboot" +set ERRORMSG "SysNAND not changed." +if filesel "Select NAND Backup." $[GM9OUT]/*nand_???.bin NANDBAK + if 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] + if find I:/ctrnand_full.bin NULL + if find I:/twln.bin NULL + if find I:/twlp.bin NULL + # Uncomment the "verify" command 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 + rm -o -s 1:/data/$[SYSID0]/sysdata/00010011/00000000 + imgumount + else + echo "Not a valid NAND backup." + end + else + echo "Not a valid NAND backup." + end + else + echo "Not a valid NAND backup." + end + end +end +goto nm_menu + +@nmopt_LEFT_Transfer_Emu_to_Sys +if find E:/nand.bin NULL + set ERRORMSG "No qualifying exploit found.\nAborting to avoid bricking the device." + if chk -u $[HAX] "" + set SUCCESSMSG "EmuNAND successfully transferred to SysNAND." + set ERRORMSG "Failed to transfer EmuNAND to SysNAND." + if ask "Please make sure you have a backup of your SysNAND.\nAre you certain you want to continue?" + allow S:/nand.bin + cp -w -n E:/ctrnand_full.bin S:/ctrnand_full.bin + cp -w -n E:/twln.bin S:/twln.bin + cp -w -n E:/twlp.bin S:/twlp.bin + rm -o -s 1:/data/$[SYSID0]/sysdata/00010011/00000000 + end + else + echo "No qualifying exploit found.\nAborting to avoid bricking the device." + end +else + echo "EmuNAND not found." +end +goto nm_menu + +@nmopt_RIGHT_Transfer_Sys_to_Emu +if find E:/nand.bin NULL + set SUCCESSMSG "SysNAND successfully transferred to EmuNAND." + set ERRORMSG "Failed to transfer SysNAND to EmuNAND." + if ask "Please make sure you have a backup of your EmuNAND.\nAre you certain you want to continue?" + allow E:/nand_minsize.bin + inject -n S:/nand_minsize.bin E:/nand.bin@0 + rm -o -s 4:/data/$[EMUID0]/sysdata/00010011/00000000 + end +else + echo "EmuNAND not found." +end +goto nm_menu + +@nmopt_START_Reboot +reboot + +@nmopt_SELECT_Power_Off +poweroff + +@nmopt_UP_Exit_Script diff --git a/romfs/finalize/gm9/support/decTitleKeys.bin.here b/romfs/finalize/gm9/support/decTitleKeys.bin.here new file mode 100644 index 0000000..e69de29 diff --git a/romfs/finalize/gm9/support/seeddb.bin.here b/romfs/finalize/gm9/support/seeddb.bin.here new file mode 100644 index 0000000..e69de29