5 Commits
Author SHA1 Message Date
niklascfw a850baae06 Version bump to v0.4.0
Build / Build (push) Successful in 15s
Release / Build and Release (push) Successful in 18s
2026-11-30 22:41:06 +01:00
niklascfw 1dabe126ac Let Erista reboot to hekate
The entry was hidden on Erista whenever the SD card was not mounted while
the menu was built. When shown, it tried atmosphere/reboot_payload.bin
first; on OmniNX that is fusee, which is rejected as not hekate, and the
rejection unmounted the card, so bootloader/update.bin was never found.
Always offer the entry, try the hekate files first, mount the card before
each attempt and point to RCM if hekate cannot be loaded.
2026-11-30 22:41:02 +01:00
niklascfw ed1361b33f Drop the fixed ldn_mitm / sys-con / MissionControl fixes
The sysmodule selector covers them: all three ship a toolbox.json and the
list shows each sysmodule as name and title ID, so the error code can be
matched directly. The selector now sits under the Atmosphere error codes
next to the theme fix.
2026-11-30 22:41:02 +01:00
niklascfw 81c8f0c92a Add sysmodule selector
Build / Build (push) Successful in 17s
Lists every sd:/atmosphere/contents/<TID>/ that ships a toolbox.json and
removes the chosen sysmodule, so any installed sysmodule can be
uninstalled without hardcoded title IDs.
2026-11-30 22:14:22 +01:00
niklascfw 2f07b26963 Rename AllgemeinerProblemLoeser to RepairNX
The payload is now built as RepairNX.bin (CI artifacts and release asset
too), the header and credits show RepairNX, and screenshots go to
sd:/RepairNX/screenshots.
2026-11-30 22:14:22 +01:00
11 changed files with 220 additions and 77 deletions

No files matched your search

+2 -2
View File
@@ -26,5 +26,5 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: AllgemeinerProblemLoeser.bin
path: output/AllgemeinerProblemLoeser.bin
name: RepairNX.bin
path: output/RepairNX.bin
+1 -1
View File
@@ -37,4 +37,4 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: |-
output/AllgemeinerProblemLoeser.bin
output/RepairNX.bin
+3 -3
View File
@@ -10,12 +10,12 @@ include $(DEVKITARM)/base_rules
IPL_LOAD_ADDR := 0x40008000
APLVERSION_MAJOR := 0
APLVERSION_MINOR := 3
APLVERSION_BUGFX := 5
APLVERSION_MINOR := 4
APLVERSION_BUGFX := 0
################################################################################
TARGET := AllgemeinerProblemLoeser
TARGET := RepairNX
BUILDDIR := build
OUTPUTDIR := output
SOURCEDIR = source
+4 -2
View File
@@ -1,13 +1,15 @@
# AllgemeinerProblemLoeser (APL)
# RepairNX
Rette deine Switch ohne PC!
Vormals **AllgemeinerProblemLoeser (APL)**.
**Original-Projekt:** [Common Problem Resolver](https://github.com/Team-Neptune/CommonProblemResolver) von [Team Neptune](https://github.com/Team-Neptune).
## Nutzung
1. Besorge dir einen Payload-Injector deiner Wahl
2. Lade APL als Payload
2. Lade RepairNX als Payload
Navigation in den Menues mit den Joy-Cons:
- A: Auswaehlen
+181 -36
View File
@@ -259,41 +259,6 @@ void m_entry_fixArchiveBit(u32 type){
}
static void _fixAMSErrorFolder(const char *titleId, const char *label){
gfx_clearscreen();
gfx_printf("\n\n-- Fix Fehlercode %s --\n\n", label);
if (!sd_mount()) {
gfx_printf("SD-Karte konnte nicht gemountet werden.\n");
hidWait();
return;
}
char *path = CpyStr("sd:/atmosphere/contents");
char *full = CombinePaths(path, titleId);
free(path);
if (FileExists(full)) {
gfx_printf("Entferne Ordner %s ...\n", titleId);
FolderDelete(full);
gfx_printf("Ordner erfolgreich geloescht.\n");
} else {
gfx_printf("Ordner %s nicht gefunden (evtl. bereits behoben).\n", titleId);
}
free(full);
gfx_printf("\n\n Fertig! Druecke eine Taste um zurueckzukehren");
hidWait();
}
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);
@@ -942,7 +907,7 @@ void m_entry_stillNoBootInfo(){
void m_entry_ViewCredits(){
gfx_clearscreen();
gfx_printf("\nAllgemeinerProblemLoeser %d.%d.%d\nVon Team Neptune - (NiklasCFW Fork - Uebersetzt von Switch Bros.)\n\nBasierend auf TegraExplorer von SuchMemeManySkill,\nLockpick_RCM & Hekate, von shchmue & CTCaer\n\n\n", APL_VER_MJ, APL_VER_MN, APL_VER_BF);
gfx_printf("\nRepairNX %d.%d.%d (vormals AllgemeinerProblemLoeser)\nVon Team Neptune - (NiklasCFW Fork - Uebersetzt von Switch Bros.)\n\nBasierend auf TegraExplorer von SuchMemeManySkill,\nLockpick_RCM & Hekate, von shchmue & CTCaer\n\n\n", APL_VER_MJ, APL_VER_MN, APL_VER_BF);
hidWait();
}
@@ -953,3 +918,183 @@ void m_entry_fixAll(){
m_entry_stillNoBootInfo();
}
// ---------------------------------------------------------------------------
// Sysmodule selector: lists every sd:/atmosphere/contents/<TID>/ that ships a
// toolbox.json (Hekate-Toolbox / Ultrahand convention) and removes the chosen
// one. Works for any sysmodule the user installed, no hardcoded title IDs.
// ---------------------------------------------------------------------------
#define SYSMOD_MAX 64
#define SYSMOD_NAME_LEN 48
#define SYSMOD_LABEL_LEN 80
#define TOOLBOX_MAX_SIZE 4096
typedef struct {
char tid[24];
char label[SYSMOD_LABEL_LEN];
} sysmod_entry_t;
// Extract the string value of "name" from a toolbox.json. Minimal parser:
// the file is a flat object, we only need one string key.
static bool _toolbox_read_name(const char *json_path, char *out, u32 out_sz)
{
FIL fp;
if (f_open(&fp, json_path, FA_READ) != FR_OK)
return false;
u32 size = f_size(&fp);
if (size == 0 || size > TOOLBOX_MAX_SIZE)
{
f_close(&fp);
return false;
}
char *buf = malloc(size + 1);
UINT br = 0;
FRESULT res = f_read(&fp, buf, size, &br);
f_close(&fp);
if (res != FR_OK)
{
free(buf);
return false;
}
buf[br] = 0;
bool found = false;
char *p = strstr(buf, "\"name\"");
if (p)
{
p += 6;
while (*p == ' ' || *p == '\t' || *p == '\r' || *p == '\n')
p++;
if (*p == ':')
{
p++;
while (*p == ' ' || *p == '\t' || *p == '\r' || *p == '\n')
p++;
if (*p == '"')
{
p++;
u32 n = 0;
while (*p && *p != '"' && n + 1 < out_sz)
{
if (*p == '\\' && p[1])
p++;
// Font only covers ASCII; replace anything else.
out[n++] = ((u8)*p >= 0x20 && (u8)*p < 0x7F) ? *p : '?';
p++;
}
out[n] = 0;
found = n > 0;
}
}
}
free(buf);
return found;
}
// Fills entries[], returns count (-1 if contents folder can't be read).
static int _sysmod_scan(sysmod_entry_t *entries, int max)
{
const char *base = "sd:/atmosphere/contents";
DIR dir;
static FILINFO fno;
if (f_opendir(&dir, base) != FR_OK)
return -1;
int count = 0;
char json_path[128];
char name[SYSMOD_NAME_LEN];
while (count < max)
{
if (f_readdir(&dir, &fno) != FR_OK || fno.fname[0] == 0)
break;
if (!(fno.fattrib & AM_DIR))
continue;
if (strlen(fno.fname) != 16) // title IDs only
continue;
s_printf(json_path, "%s/%s/toolbox.json", base, fno.fname);
if (!_toolbox_read_name(json_path, name, sizeof(name)))
continue;
strcpy(entries[count].tid, fno.fname);
s_printf(entries[count].label, "%s (%s)", name, fno.fname);
count++;
}
f_closedir(&dir);
return count;
}
void m_entry_sysmoduleSelector(void)
{
sysmod_entry_t *mods = calloc(SYSMOD_MAX, sizeof(sysmod_entry_t));
MenuEntry_t *entries = calloc(SYSMOD_MAX + 1, sizeof(MenuEntry_t));
int sel = 0;
while (1)
{
gfx_clearscreen();
gfx_printf("\n\n-- Sysmodule deinstallieren --\n\n");
if (!sd_mount())
{
gfx_printf("SD-Karte konnte nicht gemountet werden.\n");
gfx_printf("\n\n Druecke eine Taste um zurueckzukehren");
hidWait();
break;
}
int count = _sysmod_scan(mods, SYSMOD_MAX);
if (count <= 0)
{
if (count < 0)
gfx_printf("Ordner sd:/atmosphere/contents nicht gefunden.\n");
else
gfx_printf("Keine Sysmodule mit toolbox.json gefunden.\n");
gfx_printf("\n\n Druecke eine Taste um zurueckzukehren");
hidWait();
break;
}
gfx_printf("Auswahl mit A loescht das Sysmodul sofort.\n");
gfx_printf("Ordner: sd:/atmosphere/contents/<TitleID>\n\n");
entries[0].optionUnion = COLORTORGB(COLOR_WHITE);
entries[0].name = "<- Zurueck";
for (int i = 0; i < count; i++)
{
entries[i + 1].optionUnion = COLORTORGB(COLOR_CYAN);
entries[i + 1].name = mods[i].label;
}
if (sel > count)
sel = count;
Vector_t ent = vecFromArray(entries, count + 1, sizeof(MenuEntry_t));
sel = newMenu(&ent, sel, 79, 20, ENABLEB | ALWAYSREDRAW, count + 1);
if (sel <= 0 || sel > count)
break;
sysmod_entry_t *m = &mods[sel - 1];
char path[64];
s_printf(path, "sd:/atmosphere/contents/%s", m->tid);
gfx_clearscreen();
gfx_printf("\n\n-- Sysmodule deinstallieren --\n\n");
gfx_printf("Entferne %s ...\n", m->label);
ErrCode_t err = FolderDelete(path);
if (err.err)
gfx_printf("%kFehler beim Loeschen (Code %d).%k\n", COLOR_RED, err.err, COLOR_DEFAULT);
else
gfx_printf("%kErfolgreich deinstalliert.%k\n", 0xFF96FF00, 0xFFCCCCCC);
gfx_printf("\n\n Druecke eine Taste um zurueckzukehren");
hidWait();
}
free(entries);
free(mods);
}
+1 -3
View File
@@ -2,9 +2,6 @@
#include <utils/util.h>
void m_entry_fixArchiveBit(u32 type);
void m_entry_fixAMSError_4200(void);
void m_entry_fixAMSError_6900(void);
void m_entry_fixAMSError_BD00(void);
void m_entry_deleteInstalledThemes();
void m_entry_deleteBootFlags();
void m_entry_ViewCredits();
@@ -12,3 +9,4 @@ void m_entry_fixAll();
void m_entry_stillNoBootInfo();
void m_entry_fixMacSpecialFolders();
void m_entry_fixMarikoWarmbootSleep(void);
void m_entry_sysmoduleSelector(void);
+1 -1
View File
@@ -13,7 +13,7 @@ void gfx_printTopInfo() {
bq24193_get_property(BQ24193_ChargeStatus, &current_charge_status);
SETCOLOR(COLOR_DEFAULT, COLOR_WHITE);
gfx_con_setpos(0, 0);
gfx_printf("APL %d.%d.%d | Battery: %d%% %c\n", APL_VER_MJ, APL_VER_MN, APL_VER_BF, battery >> 8, ((current_charge_status) ? 129 : 32));
gfx_printf("RepairNX %d.%d.%d | Battery: %d%% %c\n", APL_VER_MJ, APL_VER_MN, APL_VER_BF, battery >> 8, ((current_charge_status) ? 129 : 32));
RESETCOLOR;
}
+6 -10
View File
@@ -37,9 +37,7 @@ enum {
// FixAll,
MainAMS,
DeleteThemes,
FixAMS_4200,
FixAMS_6900,
FixAMS_BD00,
SysmoduleSelector,
MainConvenience,
FixMarikoWarmbootSleep,
FixMacSpecialFolders,
@@ -62,9 +60,7 @@ MenuEntry_t mainMenuEntries[] = {
[MainAMS] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "\n-- Atmosphere Fehlercodes --"},
[DeleteThemes] = {.optionUnion = COLORTORGB(COLOR_CYAN), .name = "Fix 0100000000001000 (Installiertes Theme)"},
[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)"},
[SysmoduleSelector] = {.optionUnion = COLORTORGB(COLOR_CYAN), .name = "Sysmodul deinstallieren (Fehlercode = Title ID)"},
[MainConvenience] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "\n-- Bequemlichkeit --"},
[FixMarikoWarmbootSleep] = {.optionUnion = COLORTORGB(COLOR_ORANGE), .name = "Mariko Sleep Fix (Warmboot)"},
@@ -131,9 +127,7 @@ menuPaths mainMenuPaths[] = {
[DeleteThemes] = m_entry_deleteInstalledThemes,
[FixArchiveBitA] = archBitHelperA,
[FixArchiveBitN] = archBitHelperN,
[FixAMS_4200] = m_entry_fixAMSError_4200,
[FixAMS_6900] = m_entry_fixAMSError_6900,
[FixAMS_BD00] = m_entry_fixAMSError_BD00,
[SysmoduleSelector] = m_entry_sysmoduleSelector,
[FixMacSpecialFolders] = m_entry_fixMacSpecialFolders,
[FixMarikoWarmbootSleep] = m_entry_fixMarikoWarmbootSleep,
// [FixAll] = m_entry_fixAll,
@@ -151,7 +145,9 @@ void EnterMainMenu(){
sd_unmount();
// // -- Exit --
mainMenuEntries[MainRebootHekate].hide = !h_cfg.t210b01 && (!sd_get_card_mounted() || !hekate_reboot_available());
// Always offered: on Erista, reboot_to_hekate_menu() mounts the SD card
// itself and says so if hekate is missing.
mainMenuEntries[MainRebootHekate].hide = false;
mainMenuEntries[MainRebootRCM].hide = h_cfg.t210b01;
mainMenuEntries[FixMarikoWarmbootSleep].hide = !h_cfg.t210b01;
+2 -2
View File
@@ -325,11 +325,11 @@ void TakeScreenshot(){
return;
char *name, *path;
const char basepath[] = "sd:/APL/screenshots";
const char basepath[] = "sd:/RepairNX/screenshots";
name = malloc(40);
s_printf(name, "Screenshot_%08X.bmp", get_tmr_us());
f_mkdir("sd:/APL");
f_mkdir("sd:/RepairNX");
f_mkdir(basepath);
path = CombinePaths(basepath, name);
free(name);
+19 -16
View File
@@ -12,33 +12,22 @@
#include "../fs/fsutils.h"
#include "../config.h"
#include <rtc/max77620-rtc.h>
#include <storage/sd.h>
#include <string.h>
extern hekate_config h_cfg;
extern int launch_payload_ex(char *path, bool force_hekate_menu);
// Hekate files first: reboot_payload.bin is often Atmosphere's fusee (no hekate
// magic, skipped by launch_payload_ex), so it only helps when it is hekate.
static const char *hekate_payload_paths[] = {
"sd:/atmosphere/reboot_payload.bin",
"sd:/bootloader/update.bin",
"sd:/bootloader/payloads/hekate.bin",
"sd:/atmosphere/reboot_payload.bin",
"sd:/sept/payload.bin",
};
bool hekate_reboot_available(void)
{
if (h_cfg.t210b01)
return true;
for (u32 i = 0; i < sizeof(hekate_payload_paths) / sizeof(hekate_payload_paths[0]); i++)
{
if (FileExists(hekate_payload_paths[i]))
return true;
}
return false;
}
void reboot_to_hekate_menu(void)
{
if (h_cfg.t210b01)
@@ -50,8 +39,22 @@ void reboot_to_hekate_menu(void)
return;
}
// Erista: chainload hekate from the SD card (mounted here, so the entry
// also works after an action unmounted the card).
if (!sd_get_card_mounted() && !sd_mount())
{
gfx_clearscreen();
gfx_printf("\n\nSD-Karte konnte nicht gemountet werden.\n\nNutze \"Neustart in RCM-Modus\" und starte\nhekate per Payload-Injector.\n\nDruecke eine Taste um zurueckzukehren");
hidWait();
return;
}
for (u32 i = 0; i < sizeof(hekate_payload_paths) / sizeof(hekate_payload_paths[0]); i++)
{
// launch_payload_ex() unmounts the card when it rejects a payload that is
// not hekate, so mount again before checking the next path.
if (!sd_get_card_mounted() && !sd_mount())
break;
if (!FileExists(hekate_payload_paths[i]))
continue;
@@ -60,7 +63,7 @@ void reboot_to_hekate_menu(void)
}
gfx_clearscreen();
gfx_printf("\n\nHekate nicht gefunden.\n\nDruecke eine Taste um zurueckzukehren");
gfx_printf("\n\nHekate nicht gefunden (bootloader/update.bin).\n\nNutze \"Neustart in RCM-Modus\" und starte\nhekate per Payload-Injector.\n\nDruecke eine Taste um zurueckzukehren");
hidWait();
}
-1
View File
@@ -7,7 +7,6 @@ bool StrEndsWith(char *begin, char *end);
void WaitFor(u32 ms);
void RebootToPayloadOrRcm();
void reboot_to_hekate_menu(void);
bool hekate_reboot_available(void);
int launch_payload_ex(char *path, bool force_hekate_menu);
int launch_payload(char *path);