Hacking 3DS Injector

  • Thread starter Thread starter zoogie
  • Start date Start date
  • Views Views 17,267
  • Replies Replies 87
  • Likes Likes 9
@mariogamer The NCCH is the build output, e.g. the repo itself. The output needs to be a certain size for injection to work.

You don't need to get anything, it's all there already. :P

Maybe,but I want doing it mysefl,not like other user...

But I don't understand the:

Currently, there is no support for FIRM building, so you need to do some steps manually. First, you have to add padding to make sure the NCCH is of the right size to drop in as a replacement. A hacky way is this patch which adds junk data. Play around with the size value to get the NCCH to be the exact same size as the one found in your decrypted FIRM dump.
 
Last edited by mariogamer,
FIRM modules are always a certain size. In order to properly rebuild a firm, they have to have the same size as the official nintendo modules. That patch does it by adding garbage after the code.

Chances are if you didn't understand what I just said nor the instructions, you're probably not the intended audience of this. Wait for it to make it to a CFW. It's mainly for devs at this point, e.g. not user friendly.
 
  • Like
Reactions: astronautlevel
does somebody have a backup from the "hacky padding trick" to pad the code to the right size?
 
does somebody have a backup from the "hacky padding trick" to pad the code to the right size?
This it?
Code:
diff --git a/source/loader.c b/source/loader.c
index 1bcb36d..52e0cc7 100644
--- a/source/loader.c
+++ b/source/loader.c
@@ -11,6 +11,15 @@

#define MAX_SESSIONS 1

+const volatile char test[0x7000] = {0xff};
+
const char CODE_PATH[] = {0x01, 0x00, 0x00, 0x00, 0x2E, 0x63, 0x6F, 0x64, 0x65, 0x00, 0x00, 0x00};

typedef struct
@@ -489,6 +498,10 @@ int main()
   u32* cmdbuf;

   ret = 0;
+  if (test[100] == 0)
+  {
+    ret = ret << 2;
+  }
   srv_handle = &g_handles[1];
   notification_handle = &g_handles[0];
 
This it?
Code:
diff --git a/source/loader.c b/source/loader.c
index 1bcb36d..52e0cc7 100644
--- a/source/loader.c
+++ b/source/loader.c
@@ -11,6 +11,15 @@

#define MAX_SESSIONS 1

+const volatile char test[0x7000] = {0xff};
+
const char CODE_PATH[] = {0x01, 0x00, 0x00, 0x00, 0x2E, 0x63, 0x6F, 0x64, 0x65, 0x00, 0x00, 0x00};

typedef struct
@@ -489,6 +498,10 @@ int main()
   u32* cmdbuf;

   ret = 0;
+  if (test[100] == 0)
+  {
+    ret = ret << 2;
+  }
   srv_handle = &g_handles[1];
   notification_handle = &g_handles[0];
no not that (but thank you ;)). The one he links to in this file (under the build section):
https://github.com/yifanlu/3ds_injector/blob/master/README.md

I made some adjustments, but when i compile i can't padd it right.

I also notice that the files attached to the first post of this topic (padded, and unpadded) have their strings stored in a different way (seems like endianness issues), what i assume has to do with the padding, but i want to know why ;)
 
The one he links to in this file (under the build section)
I mean, he links to http://pastebin.com/nyKXLnNh and I had that saved as nyKXLnNh.txt and dated 26 March, in my collection of pastebin download hoardings, so unless the paste changed between my saving it and it disappearing from pastebin.com, that's what it was.
 
I mean, he links to http://pastebin.com/nyKXLnNh and I had that saved as nyKXLnNh.txt and dated 26 March, in my collection of pastebin download hoardings, so unless the paste changed between my saving it and it disappearing from pastebin.com, that's what it was.
actually now i read it better jt makes sense :). Thank you
 
  • Like
Reactions: Vappy

Site & Scene News

Popular threads in this forum