Added AMS section and fixed inconsistencies

This commit is contained in:
2026-02-07 23:00:29 +01:00
parent 59f7dde33a
commit 763cb43983
6 changed files with 75 additions and 121 deletions

View File

@@ -26,9 +26,7 @@ Ohne verbundene Joy-Cons:
- Deaktiviert automatischen Sysmodule-Start (kann Startprobleme nach Updates beheben) - Deaktiviert automatischen Sysmodule-Start (kann Startprobleme nach Updates beheben)
- Loescht installierte Themes (kann Startprobleme nach Updates beheben) - Loescht installierte Themes (kann Startprobleme nach Updates beheben)
- Macht Aenderungen durch ClingWrap rueckgaengig
- Behebt Archiv-Bit (SD-Karte) - Behebt Archiv-Bit (SD-Karte)
- Behebt fehlerhafte AIO-Updater-Updates
- Entfernt Mac-Sonderordner - Entfernt Mac-Sonderordner
## Support ## Support

View File

@@ -74,7 +74,7 @@ int _StartsWith(const char *a, const char *b)
return 0; return 0;
} }
int listdir(char *path, u32 hos_folder) int listdir(char *path, u32 hos_folder, int *deleted_count)
{ {
FRESULT res; FRESULT res;
DIR dir; DIR dir;
@@ -119,10 +119,11 @@ int listdir(char *path, u32 hos_folder)
strcmp(fno.fname, ".TemporaryItems") == 0 strcmp(fno.fname, ".TemporaryItems") == 0
) { ) {
_FolderDelete(path); _FolderDelete(path);
if (deleted_count) (*deleted_count)++;
} }
// Enter the directory. // Enter the directory.
listdir(path, 0); listdir(path, 0, deleted_count);
if (res != FR_OK) if (res != FR_OK)
break; break;
} else { } else {
@@ -136,6 +137,7 @@ int listdir(char *path, u32 hos_folder)
_StartsWith(fno.fname, "._") _StartsWith(fno.fname, "._")
) { ) {
_DeleteFileSimple(path); _DeleteFileSimple(path);
if (deleted_count) (*deleted_count)++;
} }
} }
} }
@@ -254,121 +256,65 @@ void m_entry_fixArchiveBit(u32 type){
} }
void m_entry_fixAIOUpdate(){ static void _fixAMSErrorFolder(const char *titleId, const char *label){
gfx_clearscreen(); gfx_clearscreen();
gfx_printf("\n\n-- Behebe fehlerhaftes AIO-switch-updater Update.\n\n"); gfx_printf("\n\n-- Fix Fehlercode %s --\n\n", label);
if (!sd_mount()) {
char *aio_fs_path = CpyStr("sd:/atmosphere/fusee-secondary.bin.aio"); gfx_printf("SD-Karte konnte nicht gemountet werden.\n");
char *aio_p_path = CpyStr("sd:/sept/payload.bin.aio");
char *aio_strt_path = CpyStr("sd:/atmosphere/stratosphere.romfs.aio");
char *o_fs_path = CpyStr("sd:/atmosphere/fusee-secondary.bin");
char *o_p_path = CpyStr("sd:/sept/payload.bin");
char *o_strt_path = CpyStr("sd:/atmosphere/stratosphere.romfs");
if (FileExists(aio_fs_path)) {
gfx_printf("Von AIO aktualisierte fusee-secondary erkannt -> ersetze Original\n\n");
if (FileExists(o_fs_path)) {
_DeleteFileSimple(o_fs_path);
}
_RenameFileSimple(aio_fs_path, o_fs_path);
}
free(aio_fs_path);
free(o_fs_path);
if (FileExists(aio_p_path)) {
gfx_printf("Von AIO aktualisierte payload erkannt -> ersetze Original\n\n");
if (FileExists(o_p_path)) {
_DeleteFileSimple(o_p_path);
}
_RenameFileSimple(aio_p_path, o_p_path);
}
free(aio_p_path);
free(o_p_path);
if (FileExists(aio_strt_path)) {
gfx_printf("Von AIO aktualisierte stratosphere erkannt -> ersetzte Original\n\n");
if (FileExists(o_strt_path)) {
_DeleteFileSimple(o_strt_path);
}
_RenameFileSimple(aio_strt_path, o_strt_path);
}
free(aio_strt_path);
free(o_strt_path);
gfx_printf("\n\n Fertig, druecke eine Taste um Fortzufahren.");
hidWait(); hidWait();
return;
} }
char *path = CpyStr("sd:/atmosphere/contents");
void m_entry_fixClingWrap(){ char *full = CombinePaths(path, titleId);
gfx_clearscreen(); free(path);
gfx_printf("\n\n-- Repariere Bootloader, Kips und Patches.\n\n"); if (FileExists(full)) {
char *bpath = CpyStr("sd:/_b0otloader"); gfx_printf("Entferne Ordner %s ...\n", titleId);
char *bopath = CpyStr("sd:/bootloader"); FolderDelete(full);
char *kpath = CpyStr("sd:/atmosphere/_k1ps"); gfx_printf("Ordner erfolgreich geloescht.\n");
char *kopath = CpyStr("sd:/atmosphere/kips"); } else {
gfx_printf("Ordner %s nicht gefunden (evtl. bereits behoben).\n", titleId);
char *ppath = CpyStr("sd:/bootloader/_patchesCW.ini");
char *popath = CpyStr("sd:/atmosphere/patches.ini");
if (FileExists(bpath)) {
if (FileExists(bopath)) {
FolderDelete(bopath);
} }
int res = f_rename(bpath, bopath); free(full);
if (res){
DrawError(newErrCode(res));
}
gfx_printf("-- Bootloader repariert!\n");
}
if (FileExists(kpath)) {
if (FileExists(kopath)) {
FolderDelete(kopath);
}
int res = f_rename(kpath, kopath);
if (res){
DrawError(newErrCode(res));
}
gfx_printf("-- kips repariert!\n");
}
if (FileExists(ppath)) {
if (FileExists(popath)) {
_DeleteFileSimple(popath);
}
_RenameFileSimple(ppath,popath);
gfx_printf("-- patches.ini repariert!\n");
}
free(bpath);
free(bopath);
free(kpath);
free(kopath);
free(ppath);
free(popath);
gfx_printf("\n\n Fertig! Druecke eine Taste um zurueckzukehren"); gfx_printf("\n\n Fertig! Druecke eine Taste um zurueckzukehren");
hidWait(); hidWait();
} }
void _deleteTheme(char* basePath, char* folderId){ void m_entry_fixAMSError_4200(void){
_fixAMSErrorFolder("4200000000000010", "4200000000000010");
}
void m_entry_fixAMSError_6900(void){
_fixAMSErrorFolder("690000000000000D", "690000000000000D");
}
void m_entry_fixAMSError_BD00(void){
_fixAMSErrorFolder("010000000000BD00", "010000000000BD00");
}
static int _deleteTheme(char* basePath, char* folderId){
int removed = 0;
char *path = CombinePaths(basePath, folderId); char *path = CombinePaths(basePath, folderId);
if (FileExists(path)) { if (FileExists(path)) {
gfx_printf("-- Theme gefunden: %s\n", path); gfx_printf("-- Theme gefunden: %s\n", path);
FolderDelete(path); FolderDelete(path);
removed = 1;
} }
free(path); free(path);
return removed;
} }
void m_entry_deleteInstalledThemes(){ void m_entry_deleteInstalledThemes(){
gfx_clearscreen(); gfx_clearscreen();
gfx_printf("\n\n-- Loesche installierte Themes.\n\n"); gfx_printf("\n\n-- Loesche installierte Themes.\n\n");
_deleteTheme("sd:/atmosphere/contents", "0100000000001000"); int count = 0;
_deleteTheme("sd:/atmosphere/contents", "0100000000001007"); count += _deleteTheme("sd:/atmosphere/contents", "0100000000001000");
_deleteTheme("sd:/atmosphere/contents", "0100000000001013"); count += _deleteTheme("sd:/atmosphere/contents", "0100000000001007");
count += _deleteTheme("sd:/atmosphere/contents", "0100000000001013");
if (count > 0)
gfx_printf("\n%d Theme(s) geloescht.\n", count);
else
gfx_printf("\nKeine installierten Themes gefunden.\n");
gfx_printf("\n\n Fertig! Druecke eine Taste um zurueckzukehren"); gfx_printf("\n\n Fertig! Druecke eine Taste um zurueckzukehren");
hidWait(); hidWait();
} }
@@ -378,6 +324,7 @@ void m_entry_deleteBootFlags(){
gfx_printf("\n\n-- Automatisches starten der sysmodule deaktivieren.\n\n"); gfx_printf("\n\n-- Automatisches starten der sysmodule deaktivieren.\n\n");
char *storedPath = CpyStr("sd:/atmosphere/contents"); char *storedPath = CpyStr("sd:/atmosphere/contents");
int readRes = 0; int readRes = 0;
int count = 0;
Vector_t fileVec = ReadFolder(storedPath, &readRes); Vector_t fileVec = ReadFolder(storedPath, &readRes);
if (readRes){ if (readRes){
clearFileVector(&fileVec); clearFileVector(&fileVec);
@@ -393,6 +340,7 @@ void m_entry_deleteBootFlags(){
if (FileExists(flagPath)) { if (FileExists(flagPath)) {
gfx_printf("Loesche: %s\n", flagPath); gfx_printf("Loesche: %s\n", flagPath);
_DeleteFileSimple(flagPath); _DeleteFileSimple(flagPath);
count++;
} else { } else {
free(flagPath); free(flagPath);
} }
@@ -400,6 +348,10 @@ void m_entry_deleteBootFlags(){
clearFileVector(&fileVec); clearFileVector(&fileVec);
free(storedPath); free(storedPath);
} }
if (count > 0)
gfx_printf("\n%d Boot-Flag(s) geloescht.\n", count);
else if (!readRes)
gfx_printf("\nKeine Boot-Flags gefunden.\n");
gfx_printf("\n\n Fertig! Druecke eine Taste um zurueckzukehren"); gfx_printf("\n\n Fertig! Druecke eine Taste um zurueckzukehren");
hidWait(); hidWait();
} }
@@ -409,15 +361,15 @@ void m_entry_deleteBootFlags(){
void m_entry_fixMacSpecialFolders(){ void m_entry_fixMacSpecialFolders(){
gfx_clearscreen(); gfx_clearscreen();
gfx_printf("\n\n-- Mac-Ordner reparieren (dies kann ein wenig dauern, bitte warten.)\n\n"); gfx_printf("\n\n-- Mac-Ordner reparieren (dies kann ein wenig dauern, bitte warten.)\n\n");
listdir("/", 0); int deleted = 0;
char *path = CpyStr("sd:/");
listdir(path, 0, &deleted);
if (deleted > 0)
gfx_printf("\n%d Mac-Datei(en)/Ordner entfernt.\n", deleted);
else
gfx_printf("\nKeine Mac-Sonderdateien oder -ordner gefunden.\n");
gfx_printf("\n\n Fertig! Druecke eine Taste um zurueckzukehren"); gfx_printf("\n\n Fertig! Druecke eine Taste um zurueckzukehren");
hidWait(); hidWait();
// browse path
// list files & folders
// if file -> delete
// if folder !== nintendo
// if folder m_entry_fixMacSpecialFolders with new path
} }
void m_entry_stillNoBootInfo(){ void m_entry_stillNoBootInfo(){
@@ -447,9 +399,6 @@ void m_entry_fixAll(){
gfx_clearscreen(); gfx_clearscreen();
m_entry_deleteBootFlags(); m_entry_deleteBootFlags();
m_entry_deleteInstalledThemes(); m_entry_deleteInstalledThemes();
m_entry_fixClingWrap();
m_entry_fixAIOUpdate();
m_entry_stillNoBootInfo(); m_entry_stillNoBootInfo();
} }

View File

@@ -2,8 +2,9 @@
#include <utils/util.h> #include <utils/util.h>
void m_entry_fixArchiveBit(u32 type); void m_entry_fixArchiveBit(u32 type);
void m_entry_fixAIOUpdate(); void m_entry_fixAMSError_4200(void);
void m_entry_fixClingWrap(); void m_entry_fixAMSError_6900(void);
void m_entry_fixAMSError_BD00(void);
void m_entry_deleteInstalledThemes(); void m_entry_deleteInstalledThemes();
void m_entry_deleteBootFlags(); void m_entry_deleteBootFlags();
void m_entry_ViewCredits(); void m_entry_ViewCredits();

View File

@@ -11,7 +11,7 @@
#define COLOR_VIOLET 0xFFEE82EE #define COLOR_VIOLET 0xFFEE82EE
#define COLOR_PURPLE 0xFF7C49EF #define COLOR_PURPLE 0xFF7C49EF
#define COLOR_BLUE 0xFF0000FF #define COLOR_BLUE 0xFF0000FF
#define COLOR_CYAN 0xFF00FFFF #define COLOR_CYAN 0xFF00CCFF
#define COLOR_RED 0xFF0000FF #define COLOR_RED 0xFF0000FF
#define COLOR_YELLOW 0xFFFFFF00 #define COLOR_YELLOW 0xFFFFFF00

View File

@@ -33,11 +33,13 @@ enum {
MainExplore = 0, MainExplore = 0,
DeleteBootFlags, DeleteBootFlags,
DeleteThemes, DeleteThemes,
FixClingWrap,
FixAIOUpdaterBoot,
FixArchiveBitA, FixArchiveBitA,
FixArchiveBitN, FixArchiveBitN,
// FixAll, // FixAll,
MainAMS,
FixAMS_4200,
FixAMS_6900,
FixAMS_BD00,
MainConvenience, MainConvenience,
FixMacSpecialFolders, FixMacSpecialFolders,
MainOther, MainOther,
@@ -54,12 +56,15 @@ MenuEntry_t mainMenuEntries[] = {
[MainExplore] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "-- Behebe Start Probleme --"}, [MainExplore] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "-- Behebe Start Probleme --"},
[DeleteBootFlags] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Automatisches starten der sysmodule deaktivieren"}, [DeleteBootFlags] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Automatisches starten der sysmodule deaktivieren"},
[DeleteThemes] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Loesche installierte Themes"}, [DeleteThemes] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Loesche installierte Themes"},
[FixClingWrap] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Repariere SigPatches"},
[FixAIOUpdaterBoot] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Behebe fehlerhaftes AIO-switch-updater Update"},
[FixArchiveBitA] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Behebe Archive Bit (alle Ordner ausser Nintendo)"}, [FixArchiveBitA] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Behebe Archive Bit (alle Ordner ausser Nintendo)"},
[FixArchiveBitN] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Behebe Archive Bit (Nintendo Ordner)"}, [FixArchiveBitN] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Behebe Archive Bit (Nintendo Ordner)"},
// [FixAll] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Try everything"}, // [FixAll] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Try everything"},
[MainAMS] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "\n-- Atmosphere Fehlercodes --"},
[FixAMS_4200] = {.optionUnion = COLORTORGB(COLOR_CYAN), .name = "Fix 4200000000000010 (ldn_mitm)"},
[FixAMS_6900] = {.optionUnion = COLORTORGB(COLOR_CYAN), .name = "Fix 690000000000000D (sys-con)"},
[FixAMS_BD00] = {.optionUnion = COLORTORGB(COLOR_CYAN), .name = "Fix 010000000000BD00 (MissionControl)"},
[MainConvenience] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "\n-- Bequemlichkeit --"}, [MainConvenience] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "\n-- Bequemlichkeit --"},
[FixMacSpecialFolders] = {.optionUnion = COLORTORGB(COLOR_ORANGE), .name = "Entferne spezielle MacOS Dateien"}, [FixMacSpecialFolders] = {.optionUnion = COLORTORGB(COLOR_ORANGE), .name = "Entferne spezielle MacOS Dateien"},
@@ -124,10 +129,11 @@ void archBitHelperN(){
menuPaths mainMenuPaths[] = { menuPaths mainMenuPaths[] = {
[DeleteBootFlags] = m_entry_deleteBootFlags, [DeleteBootFlags] = m_entry_deleteBootFlags,
[DeleteThemes] = m_entry_deleteInstalledThemes, [DeleteThemes] = m_entry_deleteInstalledThemes,
[FixClingWrap] = m_entry_fixClingWrap,
[FixAIOUpdaterBoot] = m_entry_fixAIOUpdate,
[FixArchiveBitA] = archBitHelperA, [FixArchiveBitA] = archBitHelperA,
[FixArchiveBitN] = archBitHelperN, [FixArchiveBitN] = archBitHelperN,
[FixAMS_4200] = m_entry_fixAMSError_4200,
[FixAMS_6900] = m_entry_fixAMSError_6900,
[FixAMS_BD00] = m_entry_fixAMSError_BD00,
[FixMacSpecialFolders] = m_entry_fixMacSpecialFolders, [FixMacSpecialFolders] = m_entry_fixMacSpecialFolders,
// [FixAll] = m_entry_fixAll, // [FixAll] = m_entry_fixAll,
[MainViewStillNoBootInfo] = m_entry_stillNoBootInfo, [MainViewStillNoBootInfo] = m_entry_stillNoBootInfo,

View File

@@ -325,11 +325,11 @@ void TakeScreenshot(){
return; return;
char *name, *path; char *name, *path;
const char basepath[] = "sd:/tegraexplorer/screenshots"; const char basepath[] = "sd:/APL/screenshots";
name = malloc(40); name = malloc(40);
s_printf(name, "Screenshot_%08X.bmp", get_tmr_us()); s_printf(name, "Screenshot_%08X.bmp", get_tmr_us());
f_mkdir("sd:/tegraexplorer"); f_mkdir("sd:/APL");
f_mkdir(basepath); f_mkdir(basepath);
path = CombinePaths(basepath, name); path = CombinePaths(basepath, name);
free(name); free(name);