diff --git a/source/deletion_lists_clean.h b/source/deletion_lists_clean.h index a7e53d5..d279047 100644 --- a/source/deletion_lists_clean.h +++ b/source/deletion_lists_clean.h @@ -1,86 +1,24 @@ /* * OmniNX Installer - Deletion Lists for Clean Install Mode - * Selective deletion when no OmniNX install was found. - * Only listed paths are removed; does not wipe whole card or user configs. + * Deletion policy aligned with NiklasCFW pack clean install (TegraExplorer script): + * full sd:/atmosphere, bootloader/config subsets, sd:/switch, root + misc, then + * post-restore paths (e.g. tinfoil db). Backup/restore of DBI, Tinfoil, prod.keys + * is implemented in backup.c, not here. */ #pragma once -// Atmosphere subdirectories to delete +// Entire atmosphere/ tree (NiklasCFW: deldir("sd:/atmosphere")) static const char* clean_atmosphere_dirs_to_delete[] = { - "sd:/atmosphere/config", - "sd:/atmosphere/crash_reports", - "sd:/atmosphere/erpt_reports", - "sd:/atmosphere/exefs_patches/CrunchPatch", - "sd:/atmosphere/exefs_patches/Crunchyroll Patch 1.10.0", - "sd:/atmosphere/exefs_patches/bluetooth_patches", - "sd:/atmosphere/exefs_patches/bootlogo", - "sd:/atmosphere/exefs_patches/btm_patches", - "sd:/atmosphere/exefs_patches/es_patches", - "sd:/atmosphere/exefs_patches/hid_patches", - "sd:/atmosphere/exefs_patches/logo1", - "sd:/atmosphere/exefs_patches/nfim_ctest", - "sd:/atmosphere/exefs_patches/nim_ctest", - "sd:/atmosphere/exefs_patches/nvnflinger_cmu", - "sd:/atmosphere/extrazz", - "sd:/atmosphere/fatal_errors", - "sd:/atmosphere/fatal_reports", - "sd:/atmosphere/flags", - "sd:/atmosphere/hbl_html", - "sd:/atmosphere/hosts", - "sd:/atmosphere/kips", - "sd:/atmosphere/kip1", - "sd:/atmosphere/kip_patches", - "sd:/atmosphere/logs", + "sd:/atmosphere", NULL }; -// Atmosphere contents directories (title IDs; only under atmosphere/contents/) static const char* clean_atmosphere_contents_dirs_to_delete[] = { - "sd:/atmosphere/contents/0000000000534C56", - "sd:/atmosphere/contents/00FF0000B378D640", - "sd:/atmosphere/contents/00FF0000636C6BFF", - "sd:/atmosphere/contents/00FF0000A53BB665", - "sd:/atmosphere/contents/0100000000000008", - "sd:/atmosphere/contents/010000000000000D", - "sd:/atmosphere/contents/010000000000002B", - "sd:/atmosphere/contents/0100000000000032", - "sd:/atmosphere/contents/0100000000000034", - "sd:/atmosphere/contents/0100000000000036", - "sd:/atmosphere/contents/0100000000000037", - "sd:/atmosphere/contents/010000000000003C", - "sd:/atmosphere/contents/0100000000000042", - "sd:/atmosphere/contents/0100000000000895", - "sd:/atmosphere/contents/0100000000000F12", - "sd:/atmosphere/contents/0100000000001000", - "sd:/atmosphere/contents/0100000000001007", - "sd:/atmosphere/contents/0100000000001013", - "sd:/atmosphere/contents/010000000000DA7A", - "sd:/atmosphere/contents/010000000000bd00", - "sd:/atmosphere/contents/01006a800016e000", - "sd:/atmosphere/contents/01009D901BC56000", - "sd:/atmosphere/contents/0100A3900C3E2000", - "sd:/atmosphere/contents/0100F43008C44000", - "sd:/atmosphere/contents/050000BADDAD0000", - "sd:/atmosphere/contents/4200000000000000", - "sd:/atmosphere/contents/420000000000000B", - "sd:/atmosphere/contents/420000000000000E", - "sd:/atmosphere/contents/4200000000000010", - "sd:/atmosphere/contents/4200000000000FFF", - "sd:/atmosphere/contents/420000000007E51A", - "sd:/atmosphere/contents/420000000007E51B", - "sd:/atmosphere/contents/690000000000000D", NULL }; -// Atmosphere files to delete static const char* clean_atmosphere_files_to_delete[] = { - "sd:/atmosphere/config/exosphere.ini", - "sd:/atmosphere/config/stratosphere.ini", - "sd:/atmosphere/hbl.nsp", - "sd:/atmosphere/package3", - "sd:/atmosphere/reboot_payload.bin", - "sd:/atmosphere/stratosphere.romfs", NULL }; @@ -101,7 +39,6 @@ static const char* clean_bootloader_files_to_delete[] = { "sd:/bootloader/ArgonNX.bin", "sd:/bootloader/bootlogo.bmp", "sd:/bootloader/hekate_ipl.ini", - "sd:/bootloader/nyx.ini", "sd:/bootloader/patches.ini", "sd:/bootloader/update.bin", "sd:/bootloader/ini/EmuMMC ohne Mods.ini", @@ -114,7 +51,6 @@ static const char* clean_config_dirs_to_delete[] = { "sd:/config/blue_pack_updater", "sd:/config/kefir-updater", "sd:/config/nx-hbmenu", - "sd:/config/quickntp", "sd:/config/sys-con", "sd:/config/sys-patch", "sd:/config/uberhand", @@ -122,120 +58,13 @@ static const char* clean_config_dirs_to_delete[] = { NULL }; -// Switch directories to delete +// Entire switch/ tree (clean install recreates sd:/switch after wipe) static const char* clean_switch_dirs_to_delete[] = { - "sd:/switch/.overlays", - "sd:/switch/.packages", - "sd:/switch/90DNS_tester", - "sd:/switch/aio-switch-updater", - "sd:/switch/amsPLUS-downloader", - "sd:/switch/appstore", - "sd:/switch/AtmoXL-Titel-Installer", - "sd:/switch/breeze", - "sd:/switch/checkpoint", - "sd:/switch/cheats-updater", - "sd:/switch/chiaki", - "sd:/switch/ChoiDujourNX", - "sd:/switch/crash_ams", - "sd:/switch/Daybreak", - "sd:/switch/DNS_mitm Tester", - "sd:/switch/EdiZon", - "sd:/switch/Fizeau", - "sd:/switch/FTPD", - "sd:/switch/fw-downloader", - "sd:/switch/gamecard_installer", - "sd:/switch/Goldleaf", - "sd:/switch/haze", - "sd:/switch/JKSV", - "sd:/switch/kefir-updater", - "sd:/switch/ldnmitm_config", - "sd:/switch/Linkalho", - "sd:/switch/Moonlight-Switch", - "sd:/switch/Neumann", - "sd:/switch/NX-Activity-Log", - "sd:/switch/NX-Save-Sync", - "sd:/switch/NX-Shell", - "sd:/switch/NX-Update-Checker ", - "sd:/switch/NXGallery", - "sd:/switch/NXRemoteLauncher", - "sd:/switch/NXThemesInstaller", - "sd:/switch/nxdumptool", - "sd:/switch/nxmtp", - "sd:/switch/Payload_launcher", - "sd:/switch/Reboot", - "sd:/switch/reboot_to_argonNX", - "sd:/switch/reboot_to_hekate", - "sd:/switch/Shutdown_System", - "sd:/switch/SimpleModDownloader", - "sd:/switch/SimpleModManager", - "sd:/switch/sphaira", - "sd:/switch/studious-pancake", - "sd:/switch/Switch-Time", - "sd:/switch/SwitchIdent", - "sd:/switch/Switch_themes_Installer", - "sd:/switch/Switchfin", - "sd:/switch/Sys-Clk Manager", - "sd:/switch/Sys-Con", - "sd:/switch/sys-clk-manager", - "sd:/switch/themezer-nx", - "sd:/switch/themezernx", - "sd:/switch/tinwoo", + "sd:/switch", NULL }; -// Switch files (NRO) to delete static const char* clean_switch_files_to_delete[] = { - "sd:/switch/90DNS_tester/90DNS_tester.nro", - "sd:/switch/breeze.nro", - "sd:/switch/cheats-updater.nro", - "sd:/switch/chiaki.nro", - "sd:/switch/ChoiDujourNX.nro", - "sd:/switch/daybreak.nro", - "sd:/switch/DBI.nro", - "sd:/switch/DBI/DBI.nro", - "sd:/switch/DBI/DBI_810_DE.nro", - "sd:/switch/DBI/DBI_810_EN.nro", - "sd:/switch/DBI/DBI_845_DE.nro", - "sd:/switch/DBI/DBI_845_EN.nro", - "sd:/switch/DBI/DBI_849_DE.nro", - "sd:/switch/DBI/DBI_849_EN.nro", - "sd:/switch/DBI/DBI_874_DE.nro", - "sd:/switch/DBI/DBI_874_EN.nro", - "sd:/switch/DBI_810_DE/DBI_810.nro", - "sd:/switch/DBI_810_DE/DBI_810_DE.nro", - "sd:/switch/DBI_810_EN/DBI_810_EN.nro", - "sd:/switch/DBI_RU/DBI_RU.nro", - "sd:/switch/DBI/DBI_EN.nro", - "sd:/switch/DBI_DE/DBI_DE.nro", - "sd:/switch/DNS_mitm Tester.nro", - "sd:/switch/EdiZon.nro", - "sd:/switch/Fizeau.nro", - "sd:/switch/Goldleaf.nro", - "sd:/switch/haze.nro", - "sd:/switch/JKSV.nro", - "sd:/switch/ldnmitm_config.nro", - "sd:/switch/linkalho.nro", - "sd:/switch/Moonlight-Switch.nro", - "sd:/switch/Neumann.nro", - "sd:/switch/NX-Shell.nro", - "sd:/switch/NXGallery.nro", - "sd:/switch/NXThemesInstaller.nro", - "sd:/switch/nxdumptool.nro", - "sd:/switch/nxtc.bin", - "sd:/switch/reboot_to_payload.nro", - "sd:/switch/SimpleModDownloader.nro", - "sd:/switch/SimpleModManager.nro", - "sd:/switch/sphaira.nro", - "sd:/switch/SwitchIdent.nro", - "sd:/switch/Switch_themes_Installer/NXThemesInstaller.nro", - "sd:/switch/Switchfin.nro", - "sd:/switch/Sys-Clk Manager/sys-clk-manager.nro", - "sd:/switch/Sys-Con.nro", - "sd:/switch/sys-clk-manager.nro", - "sd:/switch/tinfoil.nro", - "sd:/switch/tinfoil/tinfoil.nro", - "sd:/switch/tinwoo.nro", - "sd:/switch/tinwoo/tinwoo.nro", NULL }; @@ -263,9 +92,9 @@ static const char* clean_misc_dirs_to_delete[] = { "sd:/NSPs (Tools)", "sd:/Patched Apps", "sd:/SaltySD/flags", + "sd:/SaltySD/patches", "sd:/scripts", "sd:/TegraExplorer", - "sd:/switch/tinfoil/db", "sd:/themes/systemData", "sd:/tools", "sd:/warmboot_mariko", @@ -285,6 +114,12 @@ static const char* clean_misc_files_to_delete[] = { NULL }; +// After DBI/Tinfoil/prod.keys restore (NiklasCFW: deldir("sd:/switch/tinfoil/db")) +static const char* clean_post_restore_dirs_to_delete[] = { + "sd:/switch/tinfoil/db", + NULL +}; + // Old version marker files to delete (clean install only) static const char* old_version_files_to_delete[] = { "sd:/1.4.0-pre", diff --git a/source/install_clean.c b/source/install_clean.c index 40960b3..7d9a60e 100644 --- a/source/install_clean.c +++ b/source/install_clean.c @@ -102,6 +102,7 @@ int clean_mode_restore(void) { set_color(COLOR_GREEN); gfx_printf(" [OK] Wiederherstellung abgeschlossen\n"); set_color(COLOR_WHITE); + delete_path_list(clean_post_restore_dirs_to_delete, "switch/ (nach Restore)"); } cleanup_backup(); return res;