d0k3 / GodMode9

GodMode9 Explorer - A full access file browser for the Nintendo 3DS console :godmode:
GNU General Public License v3.0
2.12k stars 191 forks source link

[BUG] Cannot build support files (title key db, seeddb) #729

Closed ghost closed 2 years ago

ghost commented 3 years ago

So you want to report a bug? Hold on, there are ways you could make things easier for us:

snap_210904061320

Building a title key db for a single ticket works, building full DBs from entire ticket db doesn't. It doesn't matter if you try to run it from main menu or from ticket.db options, it fails.

seeddb just fails as well and I'm not sure if there's another place you could build seeddb from.

Info about your system Include this info to make our work easier:

O3DS/O3DS XL/O2DS, nothing special, fb3ds 1.2, GM9 2.0.0

Help yourself Especially for any kind of boot issue ("GodMode9 doesn't boot"), but also in many other cases these steps make a lot of sense and we will ask you to do them anyways:

Have you actually read this? [x] I have read the information above

ZeroSkill1 commented 2 years ago

I have found the issue, it's quite simple. The ticket.db files aren't initialized (mounted) soon enough when the call(s) to BuildTitleKeyInfo is/are made. When the build is started, and the target is a ticket.db file, it immediately tries to get the number of tickets while the ticket.db isn't even mounted. This, of course, fails. I've rearranged it a tiny bit so it does everything in the correct order.

Regarding seeddb.bin, the only reason that fails is because the support files build flow goes like this:

  1. Build (enc/dec)TitleKeys.bin
  2. Build seeddb.bin

Since the first one fails (due to the reason mentioned above), it will not try to build seeddb.bin. Once the issue with the title key files is fixed, it will allow it to build seeddb.bin as well.

@Ammako Here's a test build. It should allow you to build title key files in both the Build support files menu and when choosing to manually build them by selecting ticket.db, and seeddb.bin should also get built.

Note: This should also work fine if you have an EmuNAND.

GodMode9.zip

ghost commented 2 years ago

Looks good to me