GM9Megascript: remove "Un-install Hax" (#916)

This option is confusing because despite it saying "will completely
remove CFW", it is not sufficient to actually fully remove custom
firmware. It doesn't, and can't, detect everything like region changes,
modified system titles, and other things that could brick a stock
console.

There have been numerous cases of bricked consoles because someone saw
this, thinking it would do everything needed to restore a console back
to an unmodified state, and getting a bricked console that needs a
flashcart purchase to fix.

(There is also a issue where, even if everything else was in order, it
can still brick a console due to a bad SD card. For some reason it
copies the FIRM to the SD card, where it can potentially get corrupted
if a counterfeit card was used.)

A proper uninstall guide is required, and we have one here:
https://3ds.hacks.guide/uninstall-cfw
This commit is contained in:
ihaveahax 2025-04-26 07:36:36 -05:00 committed by GitHub
parent 4424c37a89
commit 15eb3b1ebe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -409,100 +409,6 @@ else
end
goto Hax_Options_Install_Boot9Strap
###################Hax Uninstall##################
@Hax_Options_Un-install_Hax
set PREVIEW_MODE "GODMODE9 ALL-IN-ONE MEGASCRIPT\nby annson24\n \nHax Options\n>Hax Un-install"
if not ask "!!WARNING!!\nThis will completely remove CFW and\nrevert your system to stock.\n \nProceed anyway?"
goto MainMenu_Hax_Options
end
if not chk -u $[HAX] "ntrboot"
if not ask "!!WARNING!!\nntrboot not detected!\nYou should at least have ntrboot or a hardmod\nwith you before proceeding in case of brick.\n \nProceed anyway?"
goto MainMenu_Restore_Options
end
end
if chk -u $[ONTYPE] "N3DS"
goto Unhax_Old
end
if not sha S:/sector0x96.bin 82F2730D2C2DA3F30165F987FDCCAC5CBAB24B4E5F65C981CD7BE6F438E6D9D3
if not find 0:/boot9strap/secret_sector.bin SECRET
if not find $[GM9IN]/boot9strap/secret_sector.bin SECRET
echo "Sector 0x96 is not genuine.\nYou must have the secret_sector.bin file in the\nboot9strap folder first then try again.\n \nAborting."
goto Hax_Options_Install_Boot9Strap
end
end
if not allow -a S:
echo "Permissions denied. Aborting."
goto MainMenu_Hax_Options
end
cp -n -w S:/sector0x96.bin $[SECRET].bak
cp -n -w $[SECRET] S:/sector0x96.bin
end
if not find 1:/title/00040138/20000002/content/????????.app NATIVE_NCCH
echo "NATIVE_FIRM not found.\nIs this a N3DS?"
goto MainMenu_Hax_Options
end
imgmount $[NATIVE_NCCH]
verify G:/exefs/.firm
set NATIVE_FIRM $[GM9OUT]/NATIVE_FIRM.firm
cp -w G:/exefs/.firm $[NATIVE_FIRM]
imgumount
if allow -a S:
allow -a 1:
rm -o -s 1:/boot.firm
rm -o -s 1:/rw/luma
cp -n $[NATIVE_FIRM] S:/firm0.bin
cp -n $[NATIVE_FIRM] S:/firm1.bin
shaget S:/nand.bin@57FFE00:200 PRE_STAGE2_HASH
if not sha S:/nand.bin@B800000:200 $[PRE_STAGE2_HASH]
fget S:/nand.bin@57FFE00:1 PRE_STAGE2
fill S:/nand.bin@B7FFE00:89C00 $[PRE_STAGE2]
end
echo "CFW uninstalled successfully"
else
echo "Permissions denied. Aborting."
end
goto MainMenu_Hax_Options
@Unhax_Old
if not find 1:/title/00040138/00000002/content/????????.app NATIVE_NCCH
echo "NATIVE_FIRM not found.\nIs this an O3DS?"
goto MainMenu_Hax_Options
end
imgmount $[NATIVE_NCCH]
verify G:/exefs/.firm
set NATIVE_FIRM $[GM9OUT]/NATIVE_FIRM.firm
cp -w G:/exefs/.firm $[NATIVE_FIRM]
imgumount
if allow -a S:
allow -a 1:
rm -o -s 1:/boot.firm
rm -o -s 1:/rw/luma
cp -n $[NATIVE_FIRM] S:/firm0.bin
cp -n $[NATIVE_FIRM] S:/firm1.bin
shaget S:/nand.bin@57FFE00:200 PRE_STAGE2_HASH
if not sha S:/nand.bin@B800000:200 $[PRE_STAGE2_HASH]
fget S:/nand.bin@57FFE00:1 PRE_STAGE2
fill S:/nand.bin@B7FFE00:89C00 $[PRE_STAGE2]
end
echo "CFW uninstalled successfully"
else
echo "Permissions denied. Aborting."
end
goto MainMenu_Hax_Options
################FBI to H&S Options################
@MainMenu_FBI_to_H&S_Options