Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c6b6b42eda | |||
| 9cd8953f78 | |||
| 45c659f1ea | |||
| f82ee15f52 | |||
| 2987a3c88e | |||
| e6676315c7 | |||
| ef9c1eaf7a | |||
| 763cb43983 | |||
| 59f7dde33a | |||
| bc086126e5 | |||
| 5702202ea9 | |||
| 36a08cf42f | |||
| 1a7b0a1667 | |||
| 6ee7d5f892 | |||
| 6239b65472 | |||
| 29d63ffbf7 |
46
.github/workflows/main.yml
vendored
46
.github/workflows/main.yml
vendored
@@ -1,52 +1,30 @@
|
||||
name: Release
|
||||
name: Build
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [ created ]
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_and_release:
|
||||
name: Build and release
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
container: devkitpro/devkita64:latest
|
||||
if: contains(github.event.comment.body, '/release-action')
|
||||
|
||||
steps:
|
||||
- name: Update latest libnx
|
||||
run: |
|
||||
git config --global --add safe.directory "*"
|
||||
git clone --recurse-submodules https://github.com/zdm65477730/libnx.git
|
||||
cd libnx
|
||||
make install -j$(nproc)
|
||||
shell: bash
|
||||
- name: Install dependencies
|
||||
run: apt-get update && apt-get install -y nodejs
|
||||
- name: Checkout latest code
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
ref: master
|
||||
clean: true
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
submodules: recursive
|
||||
- name: Setup ENV parameters
|
||||
run: |
|
||||
VER_FILE=Makefile
|
||||
VERSION=$(awk '/^LPVERSION_MAJOR/{print $3}' $VER_FILE).$(awk '/^LPVERSION_MINOR/{print $3}' $VER_FILE).$(awk '/^LPVERSION_BUGFX/{print $3}' $VER_FILE)
|
||||
echo "TAG=${VERSION}" >> "${GITHUB_ENV}"
|
||||
echo "RELEASE_NAME=CommonProblemResolver ${VERSION}" >> "${GITHUB_ENV}"
|
||||
shell: bash
|
||||
- name: Build
|
||||
run: |
|
||||
export DEVKITPRO=/opt/devkitpro
|
||||
make all
|
||||
make -j4 all
|
||||
shell: bash
|
||||
- name: Upload Release Asset
|
||||
uses: softprops/action-gh-release@v2.0.9
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.RELEASE_NAME }}
|
||||
tag_name: ${{ env.TAG }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
generate_release_notes: yes
|
||||
make_latest: true
|
||||
files: |
|
||||
output/CommonProblemResolver.bin
|
||||
name: AllgemeinerProblemLoeser.bin
|
||||
path: output/AllgemeinerProblemLoeser.bin
|
||||
|
||||
13
.gitignore
vendored
13
.gitignore
vendored
@@ -2,3 +2,16 @@
|
||||
build
|
||||
output
|
||||
research
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
._*
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.apDisk
|
||||
|
||||
10
Makefile
10
Makefile
@@ -9,13 +9,13 @@ include $(DEVKITARM)/base_rules
|
||||
################################################################################
|
||||
|
||||
IPL_LOAD_ADDR := 0x40008000
|
||||
LPVERSION_MAJOR := 0
|
||||
LPVERSION_MINOR := 3
|
||||
LPVERSION_BUGFX := 4
|
||||
APLVERSION_MAJOR := 0
|
||||
APLVERSION_MINOR := 3
|
||||
APLVERSION_BUGFX := 4
|
||||
|
||||
################################################################################
|
||||
|
||||
TARGET := CommonProblemResolver
|
||||
TARGET := AllgemeinerProblemLoeser
|
||||
BUILDDIR := build
|
||||
OUTPUTDIR := output
|
||||
SOURCEDIR = source
|
||||
@@ -37,7 +37,7 @@ FFCFG_INC := '"../$(SOURCEDIR)/libs/fatfs/ffconf.h"'
|
||||
################################################################################
|
||||
|
||||
CUSTOMDEFINES := -DIPL_LOAD_ADDR=$(IPL_LOAD_ADDR)
|
||||
CUSTOMDEFINES += -DLP_VER_MJ=$(LPVERSION_MAJOR) -DLP_VER_MN=$(LPVERSION_MINOR) -DLP_VER_BF=$(LPVERSION_BUGFX)
|
||||
CUSTOMDEFINES += -DAPL_VER_MJ=$(APLVERSION_MAJOR) -DAPL_VER_MN=$(APLVERSION_MINOR) -DAPL_VER_BF=$(APLVERSION_BUGFX)
|
||||
CUSTOMDEFINES += -DGFX_INC=$(GFX_INC) -DFFCFG_INC=$(FFCFG_INC)
|
||||
|
||||
# 0: UART_A, 1: UART_B.
|
||||
|
||||
53
README.md
53
README.md
@@ -1,34 +1,41 @@
|
||||
# CommonProblemResolver (CPR)
|
||||
# AllgemeinerProblemLoeser (APL)
|
||||
|
||||
Rescue your switch without a pc!
|
||||
Rette deine Switch ohne PC!
|
||||
|
||||
## Usage
|
||||
1. Get your favorite payload injector
|
||||
2. Inject CPR as a payload
|
||||
**Original-Projekt:** [Common Problem Resolver](https://github.com/Team-Neptune/CommonProblemResolver) von [Team Neptune](https://github.com/Team-Neptune).
|
||||
|
||||
Navigate around the menus using the joycons.
|
||||
- A: Select
|
||||
- B: Back
|
||||
- Left Joystick up/down (Dpad or joystick): navigate menus up/down
|
||||
- Right Joystick up/down: fast menu navigation up/down
|
||||
- Capture (Minerva only): Take a screenshot
|
||||
- L3/R3 (Press joysticks in): Recalibrate centerpoint
|
||||
## Nutzung
|
||||
|
||||
If you do not have your joycons connected:
|
||||
1. Besorge dir einen Payload-Injector deiner Wahl
|
||||
2. Lade APL als Payload
|
||||
|
||||
Navigation in den Menues mit den Joy-Cons:
|
||||
- A: Auswaehlen
|
||||
- B: Zurueck
|
||||
- Linker Stick hoch/runter (D-Pad oder Stick): Menue hoch/runter
|
||||
- Rechter Stick hoch/runter: Schnelle Menue-Navigation
|
||||
- Capture (nur Minerva): Screenshot
|
||||
- L3/R3 (Sticks eindruecken): Mittelpunkt neu kalibrieren
|
||||
|
||||
Ohne verbundene Joy-Cons:
|
||||
- Power -> A
|
||||
- Vol+ -> Left Joystick up
|
||||
- Vol- -> Left Joystick down
|
||||
- Vol+ -> Linker Stick hoch
|
||||
- Vol- -> Linker Stick runter
|
||||
|
||||
## Functions
|
||||
- Disables all sysmodules on your switch (might fix booting issues after update)
|
||||
- Delete installed themes (will fix booting issues after update)
|
||||
- Reverts changes made by clingwrap
|
||||
## Funktionen
|
||||
|
||||
- Deaktiviert automatischen Sysmodule-Start (kann Startprobleme nach Updates beheben)
|
||||
- Loescht installierte Themes (kann Startprobleme nach Updates beheben)
|
||||
- Behebt Archiv-Bit (SD-Karte)
|
||||
- Entfernt Mac-Sonderordner
|
||||
|
||||
## Support
|
||||
|
||||
Join [our discord](https://discord.gg/VkaRjYN) for help.
|
||||
Fuer Hilfe: [unser Discord](https://discord.gg/VkaRjYN)
|
||||
|
||||
## Credits
|
||||
## Danksagungen
|
||||
|
||||
This is heavily based on [TegraExplorer](https://github.com/suchmememanyskill/TegraExplorer) by suchmememanyskill,
|
||||
which itself is based on [Lockpick_RCM](https://github.com/shchmue/Lockpick_RCM), and thus also based on [Hekate](https://github.com/CTCaer/hekate)
|
||||
- **Deutsche Übersetzung:** [Switch Bros.](https://github.com/Switch-Bros/AllgemeinerProblemLoeser)
|
||||
- Dieses Projekt basiert stark auf dem [Original Common Problem Resolver](https://github.com/Team-Neptune/CommonProblemResolver) von [Team Neptune](https://github.com/Team-Neptune),
|
||||
sowie auf [TegraExplorer](https://github.com/suchmememanyskill/TegraExplorer) von suchmememanyskill,
|
||||
[Lockpick_RCM](https://github.com/shchmue/Lockpick_RCM) und [Hekate](https://github.com/CTCaer/hekate).
|
||||
|
||||
@@ -74,7 +74,7 @@ int _StartsWith(const char *a, const char *b)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int listdir(char *path, u32 hos_folder)
|
||||
int listdir(char *path, u32 hos_folder, int *deleted_count)
|
||||
{
|
||||
FRESULT res;
|
||||
DIR dir;
|
||||
@@ -100,11 +100,10 @@ int listdir(char *path, u32 hos_folder)
|
||||
if (!hos_folder && !strcmp(fno.fname, "Nintendo"))
|
||||
continue;
|
||||
|
||||
// // Set new directory or file.
|
||||
// Set new directory or file.
|
||||
memcpy(&path[dirLength], "/", 1);
|
||||
memcpy(&path[dirLength + 1], fno.fname, strlen(fno.fname) + 1);
|
||||
// gfx_printf("THING: %s\n", fno.fname);
|
||||
// gfx_printf("Path: %s\n", dir);
|
||||
|
||||
// Is it a directory?
|
||||
if (fno.fattrib & AM_DIR)
|
||||
{
|
||||
@@ -119,10 +118,12 @@ int listdir(char *path, u32 hos_folder)
|
||||
strcmp(fno.fname, ".TemporaryItems") == 0
|
||||
) {
|
||||
_FolderDelete(path);
|
||||
if (deleted_count) (*deleted_count)++;
|
||||
}
|
||||
else {
|
||||
// Only recurse into directories that were not deleted.
|
||||
listdir(path, 0, deleted_count);
|
||||
}
|
||||
|
||||
// Enter the directory.
|
||||
listdir(path, 0);
|
||||
if (res != FR_OK)
|
||||
break;
|
||||
} else {
|
||||
@@ -135,12 +136,14 @@ int listdir(char *path, u32 hos_folder)
|
||||
strcmp(fno.fname, ".TemporaryItems") == 0 ||
|
||||
_StartsWith(fno.fname, "._")
|
||||
) {
|
||||
_DeleteFileSimple(path);
|
||||
res = f_unlink(path);
|
||||
if (res)
|
||||
DrawError(newErrCode(res));
|
||||
if (deleted_count) (*deleted_count)++;
|
||||
}
|
||||
}
|
||||
}
|
||||
f_closedir(&dir);
|
||||
free(path);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -223,7 +226,7 @@ int _fix_attributes(char *path, u32 *total, u32 hos_folder, u32 check_first_run)
|
||||
|
||||
void m_entry_fixArchiveBit(u32 type){
|
||||
gfx_clearscreen();
|
||||
gfx_printf("\n\n-- Fix Archive Bits\n\n");
|
||||
gfx_printf("\n\n-- Behebe Archive Bit\n\n");
|
||||
|
||||
char path[256];
|
||||
char label[16];
|
||||
@@ -235,169 +238,122 @@ void m_entry_fixArchiveBit(u32 type){
|
||||
{
|
||||
case 0:
|
||||
strcpy(path, "/");
|
||||
strcpy(label, "SD Card");
|
||||
strcpy(label, "SD-Karte");
|
||||
break;
|
||||
case 1:
|
||||
default:
|
||||
strcpy(path, "/Nintendo");
|
||||
strcpy(label, "Nintendo folder");
|
||||
strcpy(label, "Nintendo Ordner");
|
||||
break;
|
||||
}
|
||||
|
||||
gfx_printf("Traversing all %s files!\nThis may take some time...\n\n", label);
|
||||
gfx_printf("Durchlaufe alle %s Dateien!\nDas kann einige Zeit dauern...\n\n", label);
|
||||
_fix_attributes(path, &total, type, type);
|
||||
gfx_printf("%kTotal archive bits cleared: %d!%k", 0xFF96FF00, total, 0xFFCCCCCC);
|
||||
gfx_printf("%kAnzahl reparierter Archiv bits: %d!%k", 0xFF96FF00, total, 0xFFCCCCCC);
|
||||
|
||||
gfx_printf("\n\n Done, press a key to proceed.");
|
||||
gfx_printf("\n\n Fertig! Druecke eine Taste um zurueckzukehren");
|
||||
hidWait();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void m_entry_fixAIOUpdate(){
|
||||
static void _fixAMSErrorFolder(const char *titleId, const char *label){
|
||||
gfx_clearscreen();
|
||||
gfx_printf("\n\n-- Fix broken Switch-AiO-Updater update.\n\n");
|
||||
|
||||
char *aio_fs_path = CpyStr("sd:/atmosphere/fusee-secondary.bin.aio");
|
||||
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("Detected aio updated fusee-secondary file -> replacing original\n\n");
|
||||
if (FileExists(o_fs_path)) {
|
||||
_DeleteFileSimple(o_fs_path);
|
||||
}
|
||||
_RenameFileSimple(aio_fs_path, o_fs_path);
|
||||
gfx_printf("\n\n-- Fix Fehlercode %s --\n\n", label);
|
||||
if (!sd_mount()) {
|
||||
gfx_printf("SD-Karte konnte nicht gemountet werden.\n");
|
||||
hidWait();
|
||||
return;
|
||||
}
|
||||
free(aio_fs_path);
|
||||
free(o_fs_path);
|
||||
|
||||
if (FileExists(aio_p_path)) {
|
||||
gfx_printf("Detected aio updated paload file -> replacing original\n\n");
|
||||
if (FileExists(o_p_path)) {
|
||||
_DeleteFileSimple(o_p_path);
|
||||
}
|
||||
_RenameFileSimple(aio_p_path, o_p_path);
|
||||
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(aio_p_path);
|
||||
free(o_p_path);
|
||||
|
||||
if (FileExists(aio_strt_path)) {
|
||||
gfx_printf("Detected aio updated stratosphere file -> replacing 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 Done, press a key to proceed.");
|
||||
free(full);
|
||||
gfx_printf("\n\n Fertig! Druecke eine Taste um zurueckzukehren");
|
||||
hidWait();
|
||||
}
|
||||
|
||||
void m_entry_fixClingWrap(){
|
||||
gfx_clearscreen();
|
||||
gfx_printf("\n\n-- Fixing ClingWrap.\n\n");
|
||||
char *bpath = CpyStr("sd:/_b0otloader");
|
||||
char *bopath = CpyStr("sd:/bootloader");
|
||||
char *kpath = CpyStr("sd:/atmosphere/_k1ps");
|
||||
char *kopath = CpyStr("sd:/atmosphere/kips");
|
||||
|
||||
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);
|
||||
if (res){
|
||||
DrawError(newErrCode(res));
|
||||
}
|
||||
gfx_printf("-- Fixed Bootloader\n");
|
||||
}
|
||||
|
||||
if (FileExists(kpath)) {
|
||||
if (FileExists(kopath)) {
|
||||
FolderDelete(kopath);
|
||||
}
|
||||
int res = f_rename(kpath, kopath);
|
||||
if (res){
|
||||
DrawError(newErrCode(res));
|
||||
}
|
||||
gfx_printf("-- Fixed kips\n");
|
||||
}
|
||||
|
||||
if (FileExists(ppath)) {
|
||||
if (FileExists(popath)) {
|
||||
_DeleteFileSimple(popath);
|
||||
}
|
||||
_RenameFileSimple(ppath,popath);
|
||||
gfx_printf("-- Fixed patches.ini\n");
|
||||
}
|
||||
|
||||
free(bpath);
|
||||
free(bopath);
|
||||
free(kpath);
|
||||
free(kopath);
|
||||
free(ppath);
|
||||
free(popath);
|
||||
|
||||
gfx_printf("\n\n Done, press a key to proceed.");
|
||||
hidWait();
|
||||
void m_entry_fixAMSError_4200(void){
|
||||
_fixAMSErrorFolder("4200000000000010", "4200000000000010");
|
||||
}
|
||||
|
||||
void _deleteTheme(char* basePath, char* folderId){
|
||||
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);
|
||||
if (FileExists(path)) {
|
||||
gfx_printf("-- Theme found: %s\n", path);
|
||||
gfx_printf("-- Theme gefunden: %s\n", path);
|
||||
FolderDelete(path);
|
||||
removed = 1;
|
||||
}
|
||||
free(path);
|
||||
return removed;
|
||||
}
|
||||
|
||||
void m_entry_deleteInstalledThemes(){
|
||||
gfx_clearscreen();
|
||||
gfx_printf("\n\n-- Deleting installed themes.\n\n");
|
||||
_deleteTheme("sd:/atmosphere/contents", "0100000000001000");
|
||||
_deleteTheme("sd:/atmosphere/contents", "0100000000001007");
|
||||
_deleteTheme("sd:/atmosphere/contents", "0100000000001013");
|
||||
gfx_printf("\n\n-- Loesche installierte Themes.\n\n");
|
||||
int count = 0;
|
||||
count += _deleteTheme("sd:/atmosphere/contents", "0100000000001000");
|
||||
count += _deleteTheme("sd:/atmosphere/contents", "0100000000001007");
|
||||
count += _deleteTheme("sd:/atmosphere/contents", "0100000000001013");
|
||||
|
||||
gfx_printf("\n\n Done, press a key to proceed.");
|
||||
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");
|
||||
hidWait();
|
||||
}
|
||||
|
||||
void m_entry_deleteBootFlags(){
|
||||
gfx_clearscreen();
|
||||
gfx_printf("\n\n-- Disabling automatic sysmodule startup.\n\n");
|
||||
gfx_printf("\n\n-- Automatisches starten der sysmodule deaktivieren.\n\n");
|
||||
char *storedPath = CpyStr("sd:/atmosphere/contents");
|
||||
int readRes = 0;
|
||||
int count = 0;
|
||||
Vector_t fileVec = ReadFolder(storedPath, &readRes);
|
||||
if (readRes){
|
||||
clearFileVector(&fileVec);
|
||||
free(storedPath);
|
||||
DrawError(newErrCode(readRes));
|
||||
} else {
|
||||
vecDefArray(FSEntry_t*, fsEntries, fileVec);
|
||||
for (int i = 0; i < fileVec.count; i++){
|
||||
|
||||
char *suf = "/flags/boot2.flag";
|
||||
char *flagPath = CombinePaths(storedPath, fsEntries[i].name);
|
||||
flagPath = CombinePaths(flagPath, suf);
|
||||
|
||||
char *subPath = CombinePaths(storedPath, fsEntries[i].name);
|
||||
char *flagPath = CombinePaths(subPath, suf);
|
||||
free(subPath);
|
||||
if (FileExists(flagPath)) {
|
||||
gfx_printf("Deleting: %s\n", flagPath);
|
||||
gfx_printf("Loesche: %s\n", flagPath);
|
||||
_DeleteFileSimple(flagPath);
|
||||
count++;
|
||||
} else {
|
||||
free(flagPath);
|
||||
}
|
||||
free(flagPath);
|
||||
}
|
||||
clearFileVector(&fileVec);
|
||||
free(storedPath);
|
||||
}
|
||||
gfx_printf("\n\n Done, press a key to proceed.");
|
||||
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");
|
||||
hidWait();
|
||||
}
|
||||
|
||||
@@ -405,38 +361,39 @@ void m_entry_deleteBootFlags(){
|
||||
|
||||
void m_entry_fixMacSpecialFolders(){
|
||||
gfx_clearscreen();
|
||||
gfx_printf("\n\n-- Fix mac folders (this can take some time, please wait.)\n\n");
|
||||
listdir("/", 0);
|
||||
gfx_printf("\n\rDone, press a key to proceed.");
|
||||
gfx_printf("\n\n-- Mac-Ordner reparieren (dies kann ein wenig dauern, bitte warten.)\n\n");
|
||||
int deleted = 0;
|
||||
char path[1024];
|
||||
strcpy(path, "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");
|
||||
hidWait();
|
||||
|
||||
// browse path
|
||||
// list files & folders
|
||||
// if file -> delete
|
||||
// if folder !== nintendo
|
||||
// if folder m_entry_fixMacSpecialFolders with new path
|
||||
}
|
||||
|
||||
void m_entry_stillNoBootInfo(){
|
||||
gfx_clearscreen();
|
||||
gfx_printf("\n\n-- My switch still does not boot.\n\n");
|
||||
gfx_printf("\n\n-- Meine Switch startet immer noch nicht.\n\n");
|
||||
|
||||
gfx_printf("%kDo you have a gamecard inserted?\n", COLOR_WHITE);
|
||||
gfx_printf("Try taking it out and reboot.\n\n");
|
||||
gfx_printf("%kSteckt eine Spiel-Cardrige im Slot?\n", COLOR_WHITE);
|
||||
gfx_printf("Entferne sie und starte neu.\n\n");
|
||||
|
||||
gfx_printf("%kDid you recently update Atmosphere/DeepSea?\n", COLOR_WHITE);
|
||||
gfx_printf("Insert your sdcard into a computer, delete 'atmosphere', 'bootloader' & 'sept', download your preffered CFW and put the files back on your switch.\n\n");
|
||||
gfx_printf("%kHast du vor kurzem Atmosphere/OmniNX aktualisiert?\n", COLOR_WHITE);
|
||||
gfx_printf("Stecke die SD-Karte in deinen PC, hol das neue Paket vom NiklasCFW Discord-Server und entpacke die .zip Datei auf deine SD-Karte und überschreibe alle Dateien.\nDanach kannst du den OmniNX-Installer-Payload ausfuehren.\n\n");
|
||||
|
||||
gfx_printf("%kDid you just buy a new SD-card?\n", COLOR_WHITE);
|
||||
gfx_printf("Make sure its not a fake card.\n\n");
|
||||
gfx_printf("%kHast du eine neue SD-Karte gekauft?\n", COLOR_WHITE);
|
||||
gfx_printf("Vergewissere dich das es keine fake/SanDisk Karte ist.\n\n");
|
||||
|
||||
gfx_printf("\n\n Done, press a key to proceed.");
|
||||
gfx_printf("\n\n Druecke eine Taste um zurueckzukehren");
|
||||
hidWait();
|
||||
}
|
||||
|
||||
void m_entry_ViewCredits(){
|
||||
gfx_clearscreen();
|
||||
gfx_printf("\nCommon Problem Resolver v%d.%d.%d\nBy Team Neptune\n\nBased on TegraExplorer by SuchMemeManySkill,\nLockpick_RCM & Hekate, from shchmue & CTCaer\n\n\n", LP_VER_MJ, LP_VER_MN, LP_VER_BF);
|
||||
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);
|
||||
hidWait();
|
||||
}
|
||||
|
||||
@@ -444,9 +401,6 @@ void m_entry_fixAll(){
|
||||
gfx_clearscreen();
|
||||
m_entry_deleteBootFlags();
|
||||
m_entry_deleteInstalledThemes();
|
||||
m_entry_fixClingWrap();
|
||||
m_entry_fixAIOUpdate();
|
||||
|
||||
|
||||
m_entry_stillNoBootInfo();
|
||||
}
|
||||
@@ -2,11 +2,12 @@
|
||||
#include <utils/util.h>
|
||||
|
||||
void m_entry_fixArchiveBit(u32 type);
|
||||
void m_entry_fixAIOUpdate();
|
||||
void m_entry_fixClingWrap();
|
||||
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();
|
||||
void m_entry_fixAll();
|
||||
void m_entry_stillNoBootInfo();
|
||||
void m_entry_fixMacSpecialFolders();
|
||||
void m_entry_fixMacSpecialFolders();
|
||||
@@ -13,7 +13,7 @@ void gfx_printTopInfo() {
|
||||
bq24193_get_property(BQ24193_ChargeStatus, ¤t_charge_status);
|
||||
SETCOLOR(COLOR_DEFAULT, COLOR_WHITE);
|
||||
gfx_con_setpos(0, 0);
|
||||
gfx_printf("CPR %d.%d.%d | Battery: %d%% %c\n", LP_VER_MJ, LP_VER_MN, LP_VER_BF, battery >> 8, ((current_charge_status) ? 129 : 32));
|
||||
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));
|
||||
RESETCOLOR;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,11 +7,13 @@
|
||||
#define COLOR_GREY 0xFF888888
|
||||
#define COLOR_DARKGREY 0xFF333333
|
||||
#define COLOR_ORANGE 0xFFFFA500
|
||||
#define COLOR_GREEN 0xFF008000
|
||||
#define COLOR_GREEN 0xFF00FF00
|
||||
#define COLOR_VIOLET 0xFFEE82EE
|
||||
#define COLOR_PURPLE 0xFF7C49EF
|
||||
#define COLOR_BLUE 0xFF0000FF
|
||||
#define COLOR_CYAN 0xFF00CCFF
|
||||
#define COLOR_RED 0xFF0000FF
|
||||
#define COLOR_YELLOW 0xFFFF0000
|
||||
#define COLOR_YELLOW 0xFFFFFF00
|
||||
|
||||
#define COLORTORGB(color) (color & 0x00FFFFFF)
|
||||
#define SETCOLOR(fg, bg) gfx_con_setcol(fg, 1, bg)
|
||||
|
||||
@@ -242,9 +242,9 @@ scriptFunction(funcWait){
|
||||
|
||||
scriptFunction(funcGetVer){
|
||||
int *arr = malloc(3 * sizeof(int));
|
||||
arr[0] = LP_VER_MJ;
|
||||
arr[1] = LP_VER_MN;
|
||||
arr[2] = LP_VER_BF;
|
||||
arr[0] = APL_VER_MJ;
|
||||
arr[1] = APL_VER_MN;
|
||||
arr[2] = APL_VER_BF;
|
||||
Vector_t res = vecFromArray(arr, 3, sizeof(int));
|
||||
return newVar(IntArrayType, 1, .vectorType = res);
|
||||
}
|
||||
|
||||
@@ -25,19 +25,21 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../cpr/cpr.h"
|
||||
#include "../apl/apl.h"
|
||||
|
||||
extern hekate_config h_cfg;
|
||||
|
||||
enum {
|
||||
MainExplore = 0,
|
||||
DeleteBootFlags,
|
||||
DeleteThemes,
|
||||
FixClingWrap,
|
||||
FixAIOUpdaterBoot,
|
||||
FixArchiveBitA,
|
||||
FixArchiveBitN,
|
||||
// FixAll,
|
||||
MainAMS,
|
||||
DeleteThemes,
|
||||
FixAMS_4200,
|
||||
FixAMS_6900,
|
||||
FixAMS_BD00,
|
||||
MainConvenience,
|
||||
FixMacSpecialFolders,
|
||||
MainOther,
|
||||
@@ -48,32 +50,33 @@ enum {
|
||||
MainRebootRCM,
|
||||
// MainRebootNormal,
|
||||
MainRebootHekate,
|
||||
MainRebootAMS,
|
||||
};
|
||||
|
||||
MenuEntry_t mainMenuEntries[] = {
|
||||
[MainExplore] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "-- Bootfixes --"},
|
||||
[DeleteBootFlags] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Disable automatic sysmodule startup"},
|
||||
[DeleteThemes] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Delete installed themes"},
|
||||
[FixClingWrap] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Fix ClingWrap"},
|
||||
[FixAIOUpdaterBoot] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Fix Switch-AiO-Updater update"},
|
||||
[FixArchiveBitA] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Fix archive bit (all folders except nintendo)"},
|
||||
[FixArchiveBitN] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Fix archive bit (nintendo folder)"},
|
||||
[MainExplore] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "-- Behebe Start Probleme --"},
|
||||
[DeleteBootFlags] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Automatisches starten der sysmodule deaktivieren"},
|
||||
[FixArchiveBitA] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Behebe Archive Bit (alle Ordner ausser Nintendo)"},
|
||||
[FixArchiveBitN] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Behebe Archive Bit (Nintendo Ordner)"},
|
||||
// [FixAll] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Try everything"},
|
||||
|
||||
[MainConvenience] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "\n-- Convenience --"},
|
||||
[FixMacSpecialFolders] = {.optionUnion = COLORTORGB(COLOR_ORANGE), .name = "Remove special folders created by Mac"},
|
||||
[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)"},
|
||||
|
||||
[MainOther] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "\n-- Other --"},
|
||||
[MainViewStillNoBootInfo] = {.optionUnion = COLORTORGB(COLOR_YELLOW), .name = "My switch still does not boot"},
|
||||
[MainViewCredits] = {.optionUnion = COLORTORGB(COLOR_YELLOW), .name = "Credits"},
|
||||
[MainConvenience] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "\n-- Bequemlichkeit --"},
|
||||
[FixMacSpecialFolders] = {.optionUnion = COLORTORGB(COLOR_ORANGE), .name = "Entferne spezielle MacOS Dateien"},
|
||||
|
||||
[MainExit] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "\n-- Exit --"},
|
||||
[MainPowerOff] = {.optionUnion = COLORTORGB(COLOR_VIOLET), .name = "Power off"},
|
||||
[MainRebootRCM] = {.optionUnion = COLORTORGB(COLOR_VIOLET), .name = "Reboot to RCM"},
|
||||
// [MainRebootNormal] = {.optionUnion = COLORTORGB(COLOR_VIOLET), .name = "Reboot normally"},
|
||||
[MainRebootHekate] = {.optionUnion = COLORTORGB(COLOR_VIOLET), .name = "Reboot to bootloader/update.bin"},
|
||||
[MainRebootAMS] = {.optionUnion = COLORTORGB(COLOR_VIOLET), .name = "Reboot to atmosphere/reboot_payload.bin"}
|
||||
[MainOther] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "\n-- Sonstiges --"},
|
||||
[MainViewStillNoBootInfo] = {.optionUnion = COLORTORGB(COLOR_YELLOW), .name = "Meine Switch startet nicht mehr"},
|
||||
[MainViewCredits] = {.optionUnion = COLORTORGB(COLOR_YELLOW), .name = "Ueber"},
|
||||
|
||||
[MainExit] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "\n-- Beenden --"},
|
||||
[MainPowerOff] = {.optionUnion = COLORTORGB(COLOR_PURPLE), .name = "Ausschalten"},
|
||||
[MainRebootRCM] = {.optionUnion = COLORTORGB(COLOR_PURPLE), .name = "Neustart in RCM-Modus"},
|
||||
// [MainRebootNormal] = {.optionUnion = COLORTORGB(COLOR_VIOLET), .name = "Normaler Neustart"},
|
||||
[MainRebootHekate] = {.optionUnion = COLORTORGB(COLOR_PURPLE), .name = "Neustart in hekate"}
|
||||
|
||||
|
||||
// [MainBrowseSd] = {.optionUnion = COLORTORGB(COLOR_GREEN), .name = "Browse SD"},
|
||||
@@ -102,10 +105,6 @@ void HandleSD(){
|
||||
extern bool is_sd_inited;
|
||||
extern int launch_payload(char *path);
|
||||
|
||||
void RebootToAMS(){
|
||||
launch_payload("sd:/atmosphere/reboot_payload.bin");
|
||||
}
|
||||
|
||||
void RebootToHekate(){
|
||||
launch_payload("sd:/bootloader/update.bin");
|
||||
}
|
||||
@@ -130,17 +129,17 @@ void archBitHelperN(){
|
||||
menuPaths mainMenuPaths[] = {
|
||||
[DeleteBootFlags] = m_entry_deleteBootFlags,
|
||||
[DeleteThemes] = m_entry_deleteInstalledThemes,
|
||||
[FixClingWrap] = m_entry_fixClingWrap,
|
||||
[FixAIOUpdaterBoot] = m_entry_fixAIOUpdate,
|
||||
[FixArchiveBitA] = archBitHelperA,
|
||||
[FixArchiveBitN] = archBitHelperN,
|
||||
[FixAMS_4200] = m_entry_fixAMSError_4200,
|
||||
[FixAMS_6900] = m_entry_fixAMSError_6900,
|
||||
[FixAMS_BD00] = m_entry_fixAMSError_BD00,
|
||||
[FixMacSpecialFolders] = m_entry_fixMacSpecialFolders,
|
||||
// [FixAll] = m_entry_fixAll,
|
||||
[MainViewStillNoBootInfo] = m_entry_stillNoBootInfo,
|
||||
[MainRebootHekate] = RebootToHekate,
|
||||
[MainRebootRCM] = reboot_rcm,
|
||||
[MainPowerOff] = power_off,
|
||||
[MainRebootAMS] = RebootToAMS,
|
||||
[MainViewCredits] = m_entry_ViewCredits,
|
||||
};
|
||||
|
||||
@@ -151,7 +150,6 @@ void EnterMainMenu(){
|
||||
sd_unmount();
|
||||
|
||||
// // -- Exit --
|
||||
mainMenuEntries[MainRebootAMS].hide = (!sd_get_card_mounted() || !FileExists("sd:/atmosphere/reboot_payload.bin"));
|
||||
mainMenuEntries[MainRebootHekate].hide = (!sd_get_card_mounted() || !FileExists("sd:/bootloader/update.bin"));
|
||||
mainMenuEntries[MainRebootRCM].hide = h_cfg.t210b01;
|
||||
|
||||
|
||||
@@ -325,11 +325,11 @@ void TakeScreenshot(){
|
||||
return;
|
||||
|
||||
char *name, *path;
|
||||
const char basepath[] = "sd:/tegraexplorer/screenshots";
|
||||
const char basepath[] = "sd:/APL/screenshots";
|
||||
name = malloc(40);
|
||||
s_printf(name, "Screenshot_%08X.bmp", get_tmr_us());
|
||||
|
||||
f_mkdir("sd:/tegraexplorer");
|
||||
f_mkdir("sd:/APL");
|
||||
f_mkdir(basepath);
|
||||
path = CombinePaths(basepath, name);
|
||||
free(name);
|
||||
|
||||
Reference in New Issue
Block a user