From e115b9bd9c7f470b7738e95eafaa638ba8e5669c Mon Sep 17 00:00:00 2001 From: LM <34066913+LightningMods@users.noreply.github.com> Date: Fri, 25 Oct 2024 14:32:17 -0400 Subject: [PATCH 1/4] make the payload auto enter rest mode when needed --- Makefile | 2 +- src/main.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f052891..2e77240 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ endif ELF := byepervisor.elf -CFLAGS := -std=c++11 -Wall -Werror -g -I./include -DHEN_BIN_PATH="\"hen/hen.bin\"" +CFLAGS := -std=c++11 -Wall -Werror -g -I./include -DHEN_BIN_PATH="\"hen/hen.bin\"" -lSceSystemService all: $(ELF) diff --git a/src/main.cpp b/src/main.cpp index 99a6f44..8ac1233 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -31,6 +31,7 @@ extern "C" int sceKernelSleep(int secs); int sceKernelLoadStartModule(char *name, size_t argc, const void *argv, uint32_t flags, void *unk, int *res); int __sys_is_development_mode(); + int sceSystemStateMgrEnterStandby(void); } void dump_kernel_to_client(int client) @@ -128,6 +129,9 @@ int main() kernel_copyin(&pte, pte_addr, sizeof(pte)); } } +S + // auto suspend + sceSystemStateMgrEnterStandby(); // Check if this is a resume state or not, if it's not, prompt for restart and exit if (kernel_read4(kdlsym(KERNEL_SYM_DATA_CAVE)) != 0x1337) { From 3027c75debddf0a6298f201703a0f5d0a4c0982a Mon Sep 17 00:00:00 2001 From: LM <34066913+LightningMods@users.noreply.github.com> Date: Fri, 25 Oct 2024 14:34:26 -0400 Subject: [PATCH 2/4] remove typo --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 8ac1233..e1b69ef 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -129,7 +129,7 @@ int main() kernel_copyin(&pte, pte_addr, sizeof(pte)); } } -S + // auto suspend sceSystemStateMgrEnterStandby(); @@ -185,4 +185,4 @@ S // run_dump_server(9003); reset_mirrors(); return 0; -} \ No newline at end of file +} From 60c2ebfdf1e3e8bb3eb3bfb6f1e44047cae096a0 Mon Sep 17 00:00:00 2001 From: LM <34066913+LightningMods@users.noreply.github.com> Date: Fri, 25 Oct 2024 14:57:40 -0400 Subject: [PATCH 3/4] correct the order of operations --- src/main.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index e1b69ef..34167a3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -130,17 +130,14 @@ int main() } } - // auto suspend - sceSystemStateMgrEnterStandby(); - // Check if this is a resume state or not, if it's not, prompt for restart and exit if (kernel_read4(kdlsym(KERNEL_SYM_DATA_CAVE)) != 0x1337) { // Notify the user that they have to suspend/resume their console SOCK_LOG("[+] System needs to be suspended and resumed...\n"); - flash_notification("Byepervisor\nEnter rest mode & resume"); kernel_write4(kdlsym(KERNEL_SYM_DATA_CAVE), 0x1337); - return 0; + // auto suspend + sceSystemStateMgrEnterStandby(); } // Print out the kernel base From ee630f6f9d94e294adfaa044ca7d506f8b809551 Mon Sep 17 00:00:00 2001 From: LM <34066913+LightningMods@users.noreply.github.com> Date: Fri, 25 Apr 2025 11:44:07 -0400 Subject: [PATCH 4/4] add a 3 sec delay --- src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 34167a3..fa15d26 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -134,10 +134,11 @@ int main() if (kernel_read4(kdlsym(KERNEL_SYM_DATA_CAVE)) != 0x1337) { // Notify the user that they have to suspend/resume their console SOCK_LOG("[+] System needs to be suspended and resumed...\n"); + flash_notification("Entering rest mode for Byepervisor in 3 secs"); kernel_write4(kdlsym(KERNEL_SYM_DATA_CAVE), 0x1337); - - // auto suspend + sleep(3); sceSystemStateMgrEnterStandby(); + return 0; } // Print out the kernel base