Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a9bbbfd

Browse files
committed
using steveice10 svchax
1 parent d4e75ee commit a9bbbfd

File tree

7 files changed

+557
-15
lines changed

7 files changed

+557
-15
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "source/svchax"]
2-
path = source/svchax
3-
url = https://github.com/aliaspider/svchax.git

CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ find_package(CTRULIB REQUIRED) # Look for ctrulib
1616
file(GLOB_RECURSE SOURCE_FILES
1717
source/*
1818
)
19-
file(GLOB FILTER_FILES
20-
source/svchax/test/test.c
21-
)
22-
list(REMOVE_ITEM SOURCE_FILES
23-
${FILTER_FILES}
24-
)
2519

2620
add_executable(PlaiSysUpdater ${SOURCE_FILES}) # Create the elf file
2721

source/Main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ void downgrade() {
225225
free(update);
226226

227227
debug->print("\n\nDowngrade completed. Trying to reboot in 10 sec...\n");
228-
debug->print("PowerOff your device if it doesn't...\n");
228+
debug->print("Power off your device if it doesn't...\n");
229229
svcSleepThread(10000000000LL);
230230
debug->print("Trying to reboot...\n");
231231
while (aptInit() != 0) { };
@@ -250,15 +250,14 @@ int main(int argc, char *argv[]) {
250250
}
251251

252252
consoleClear();
253-
printf("HAX INIT...\n");
254253

255254
if (mode > MODE_TITLES_CHECK) { // needs AM
256255
if (Utility::getAMu() != 0) {
257256
debug->printr("FAIL\n");
258257
debug->printr("Can't get am:u service ... try again :x\n");
259258
quit();
260259
}
261-
debug->printg("HAX SUCCESS\n");
260+
debug->printg("Got am:u service!\n");
262261
}
263262

264263
// late init

source/Utility.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
static FS_Archive sdmcArchive;
1212

1313
extern void _gfxInit();
14-
extern bool isNew3DS;
1514
extern "C" {
1615
void svchax_init();
1716
}
@@ -106,7 +105,7 @@ std::vector<TitleInfo> Utility::getTitles() {
106105
}
107106

108107
u64 titlesId[count];
109-
108+
110109
{
111110
u32 throwaway;
112111
if (AM_GetTitleList(&throwaway, MEDIATYPE_NAND, count, titlesId)) {
@@ -223,20 +222,30 @@ int Utility::getAMu() {
223222

224223
Handle amHandle = 0;
225224

225+
printf("Checking for am:u...\n");
226226
// verify am:u access
227227
srvGetServiceHandleDirect(&amHandle, "am:u");
228228
if (amHandle) {
229229
svcCloseHandle(amHandle);
230+
printf("Got am:u handle!\n");
230231
return 0;
231232
}
232233

234+
printf("Did not get am:u handle!\n");
235+
printf("Attempting svchax...\n");
236+
233237
// try to get arm11
234238
svchax_init();
239+
printf("Initted svchax...\n");
235240
aptInit();
241+
printf("Initted apt...\n");
236242

243+
printf("Checking for am:u...\n");
244+
// verify am:u access
237245
srvGetServiceHandleDirect(&amHandle, "am:u");
238246
if (amHandle) {
239247
svcCloseHandle(amHandle);
248+
printf("Got am:u handle!\n");
240249
return 0;
241250
}
242251

source/svchax

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)