diff --git a/Makefile b/Makefile
index 134b81c..373f2a6 100644
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,7 @@ INCLUDES := include
EXEFS_SRC := exefs_src
APP_TITLE := Haku33
APP_AUTHOR := Kronos2308
-APP_VERSION := 3.9
+APP_VERSION := 4.0
ROMFS := romfs
#---------------------------------------------------------------------------------
diff --git a/source/ams_bpc.c b/source/ams_bpc.c
deleted file mode 100644
index 7b434c9..0000000
--- a/source/ams_bpc.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2018-2020 Atmosphère-NX
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-#include
-#include
-#include "ams_bpc.h"
-#include "service_guard.h"
-
-static Service g_amsBpcSrv;
-
-NX_GENERATE_SERVICE_GUARD(amsBpc);
-
-Result _amsBpcInitialize(void) {
- Handle h;
- Result rc = svcConnectToNamedPort(&h, "bpc:ams"); /* TODO: ams:bpc */
- if (R_SUCCEEDED(rc)) serviceCreate(&g_amsBpcSrv, h);
- return rc;
-}
-
-void _amsBpcCleanup(void) {
- serviceClose(&g_amsBpcSrv);
-}
-
-Service *amsBpcGetServiceSession(void) {
- return &g_amsBpcSrv;
-}
-
-Result amsBpcSetRebootPayload(const void *src, size_t src_size) {
- return serviceDispatch(&g_amsBpcSrv, 65001,
- .buffer_attrs = { SfBufferAttr_In | SfBufferAttr_HipcMapAlias },
- .buffers = { { src, src_size } },
- );
-}
diff --git a/source/ams_bpc.h b/source/ams_bpc.h
deleted file mode 100644
index 945b929..0000000
--- a/source/ams_bpc.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2018-2020 Atmosphère-NX
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-#pragma once
-#include
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-Result amsBpcInitialize();
-void amsBpcExit();
-Service *amsBpcGetServiceSession(void);
-
-Result amsBpcSetRebootPayload(const void *src, size_t src_size);
-
-#ifdef __cplusplus
-}
-#endif
\ No newline at end of file
diff --git a/source/lang.hpp b/source/lang.hpp
index 5506ef1..a24647b 100644
--- a/source/lang.hpp
+++ b/source/lang.hpp
@@ -66,7 +66,7 @@ language LG;
LG.text2 = "\n\x1b[30;1m SE REALIZARA UN HARD RESET LUEGO SE APAGARA LA CONSOLA \x1b[0m\n";
LG.text3 = "\n\x1b[30;1m SI NO SABES LO QUE HACES, PRESIONA B PARA ABORTAR \x1b[0m\n";
LG.text4 = "\n\n\x1b[30;1m-------- LO DEVORARE TODO --------\x1b[0m\n\n";
- LG.text5 = "\n\nPULSA \x1b[3%u;1m ZL\x1b[3%u;1m -\x1b[3%u;1m +\x1b[3%u;1m ZR \x1b[0m JUNTOS PARA LIMPIAR\n\n";
+ LG.text5 = "\n\nPULSA A PARA LIMPIAR\n\n";
LG.text6 = "\x1b[33;1m*\x1b[0m Recuerda Desinstalar Incognito Desde Incognito-RCM\n\n";
LG.text7 = "\x1b[33;1m*\x1b[0m Luego del Reinicio ve a Hekate -> More configs -> Haku33\n\n";
LG.text8 = " No se puede Reiniciar al Payload en una consola Mariko\n";
@@ -79,7 +79,7 @@ language LG;
LG.text2 = "\n\x1b[30;1m A HARD RESET WILL BE PERFORMED AFTER THE CONSOLE WILL BE OFF \x1b[0m\n";
LG.text3 = "\n\x1b[30;1m IF YOU DON'T KNOW WHAT YOU DO, PRESS B FOR ABORT \x1b[0m\n";
LG.text4 = "\n\n\x1b[30;1m-------- I WILL CONSUME EVERYTHING --------\x1b[0m\n\n";
- LG.text5 = "\n\nPRESS \x1b[3%u;1m ZL\x1b[3%u;1m -\x1b[3%u;1m +\x1b[3%u;1m ZR \x1b[0m TOGETHER TO CLEAN\n\n";
+ LG.text5 = "\n\nPRESS A TO CLEAN\n\n";
LG.text6 = "\x1b[33;1m*\x1b[0m Remember Uninstall Incognito from Incognito-RCM\n\n";
LG.text7 = "\x1b[33;1m*\x1b[0m After the Reboot go to Hekate -> More configs -> Haku33\n\n";
LG.text8 = " Reboot to payload cannot be used on a Mariko system\n";
diff --git a/source/main.cpp b/source/main.cpp
index 5b1dcf6..96e0dca 100644
--- a/source/main.cpp
+++ b/source/main.cpp
@@ -35,7 +35,6 @@ char Logs[2024];
bool isXSOS;
extern "C" {
-#include "ams_bpc.h"
#include "reboot.h"
}
@@ -66,27 +65,6 @@ void copy_me(string origen, string destino) {
dest.close();
}
-bool txIsAvailable() {
- auto srv_name = smEncodeName("tx");
- Handle tmph = 0;
- auto rc = smRegisterService(&tmph, srv_name, false, 1);
- if(R_FAILED(rc)) {
- return true;
- }
- smUnregisterService(srv_name);
-return false;
-}
-
-static void reboot_to_payload_AMS(void) {
- Result rc = amsBpcSetRebootPayload(g_reboot_payload, IRAM_PAYLOAD_MAX_SIZE);
- if (R_FAILED(rc)) {
- sprintf(Logs," Failed to set reboot payload: 0x%x\n", rc);
- }
- else {
- spsmShutdown(true);
- }
-}
-
bool is_patched = false;
void CheckHardware()
{
@@ -97,7 +75,6 @@ void CheckHardware()
}
}
-bool can_reboot_AMS = true;
void SetupClean (){
if (is_patched){
led_on(1);
@@ -115,11 +92,9 @@ void SetupClean (){
copy_me("romfs:/startup.te", "/startup.te");
copy_me("romfs:/poweroff.bin", "/poweroff.bin");
copy_me("romfs:/TegraExplorer.bin", "/Haku33.bin");
- if (isXSOS){
- bpcInitialize();
- if(init_slp()){reboot_to_payload();}
- bpcExit();
- }else if (can_reboot_AMS) { reboot_to_payload_AMS();}
+ bpcInitialize();
+ if(init_slp()){reboot_to_payload();}
+ bpcExit();
}
}
@@ -135,43 +110,7 @@ int main(int argc, char **argv)
padInitializeDefault(&pad);
Result rc = 0;
- bool isXSOS = txIsAvailable();
- if (!isXSOS){
- if (R_FAILED(rc = setsysInitialize())) {
- sprintf(Logs," Failed to initialize set:sys: 0x%x\n", rc);
- can_reboot_AMS = false;
- }
- else {
- if (is_patched) {
- sprintf(Logs,LG.text8 );
- can_reboot_AMS = false;
- }
- }
- if (can_reboot_AMS && R_FAILED(rc = spsmInitialize())) {
- sprintf(Logs," Failed to initialize spsm: 0x%x\n", rc);
- can_reboot_AMS = false;
- }
-
- if (can_reboot_AMS) {
- smExit(); //Required to connect to ams:bpc
- if R_FAILED(rc = amsBpcInitialize()) {
- sprintf(Logs," Failed to initialize ams:bpc: 0x%x\n", rc);
- can_reboot_AMS = false;
- }
- }
-
- if (can_reboot_AMS) {
- FILE *f = fopen("romfs:/TegraExplorer.bin", "rb");
- if (f == NULL) {
- sprintf(Logs," Failed to open atmosphere/romfs:/TegraExplorer.bin!\n");
- can_reboot_AMS = false;
- } else {
- fread(g_reboot_payload, 1, sizeof(g_reboot_payload), f);
- fclose(f);
- }
- }
- }
//keys
while (appletMainLoop())
{
@@ -214,20 +153,20 @@ int main(int argc, char **argv)
printf("\n\n %s",LG.text7);
}
printf("\n\x1b[31;1m%s \x1b[0m ",Logs);
- printf(LG.text5,LT,minus,more,RT);
+ printf(LG.text5);
consoleUpdate(NULL);
//call clean after combo
- if (kHeld & KEY_ZL && kHeld & KEY_ZR && kHeld & KEY_MINUS && kHeld & KEY_PLUS)
+ if (kHeld & KEY_A)
{
SetupClean();
//break;
}
//exit
- if (kDown & KEY_A || kDown & KEY_B || kDown & KEY_Y || kDown & KEY_X)
+ if (kDown & KEY_B || kDown & KEY_Y || kDown & KEY_X)
{
break;
}