Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

GodMode9 3DS: Difference between revisions

From GameBrew
m (Text replacement - "Infobox 3DS homebrew" to "Infobox-3DS-Homebrews")
 
(28 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox-3DS-Homebrews
{{Infobox 3DS Homebrews
| title = GodMode9
|title=GodMode9
| image = https://dlhb.gamebrew.org/3dshomebrew/GodMode9.png|250px
|image=Godmode92.png
| type = Utilities
|description=A full access file browser for the Nintendo 3DS console.
| version = v2.0.0
|author=d0k3
| licence = Mixed
|lastupdated=2022/03/23
| author = d0k3
|type=File Browsers
| website = https://github.com/d0k3/GodMode9
|version=2.1.1
| download = https://dlhb.gamebrew.org/3dshomebrew/GodMode9-v2.0.0.7z
|license=Mixed
| source = https://github.com/d0k3/GodMode9
|download=https://dlhb.gamebrew.org/3dshomebrews/godmode9.7z
|website=https://github.com/d0k3/GodMode9
|source=https://github.com/d0k3/GodMode9
}}
}}
<youtube>Tz0i11Y2cvc</youtube>
GodMode9 is a full access file browser for the Nintendo 3DS console, giving you access to your SD card, to the FAT partitions inside your SysNAND and EmuNAND and to basically anything else. Among other functionality (see below), you can copy, delete, rename files and create folders.


=GodMode9=
'''Note from developers:'''


''A full access file browser for the 3DS console'' :godmode:
This is powerful stuff, it provides you with the means to do basically any thinkable modification to any system data available on the 3DS console. However, precautions are taken so you don't accidentally damage the data of your console. The write permissions system protects you by providing warnings and forces you to enter an unlock sequence for enabling write permissions. It is not possible to overwrite or modify any important stuff without such unlock sequences and it is not possible to accidentally unlock something.


GodMode9 is a full access file browser for the Nintendo 3DS console, giving you access to your SD card, to the FAT partitions inside your SysNAND and EmuNAND and to basically anything else. Among other functionality (see below), you can copy, delete, rename files and create folders.
As always, be smart, keep backups, just to be safe.


== Warning ==
==Features==
* Manage files on all your data storages, such as copy, delete, rename files and create folders.
* Make screenshots.
* Use multiple panes.
* Search drives and folders.
* Format your SD card/setup a RedNAND.
* Run it without an SD card/unmount the SD card.
* Direct access to SD installed contents.
* Build CIAs from NCCH/NCSD (.3DS)/TMD (installed contents).
* Decrypt and verify NCCH/NCSD/CIA/TMD/FIRM images.
* Batch mode for the above two operations.
* Access any file inside NCCH/NCSD/CIA/FIRM images.
* Generate XORpads for any NAND partition.
* Directly mount and access NAND dumps or standard FAT images.
* Restore/dump NAND partitions or even full NANDs.
* Compare and verify files.
* Hexview and hexedit any file.
* Inject a file to another file.


'''This is powerful stuff''', it provides you with the means to do basically any thinkable modification to any system data available on the 3DS console. However, precautions are taken so you don't accidentally damage the data of your console. The write permissions system protects you by providing warnings and forces you to enter an unlock sequence for enabling write permissions. It is not possible to overwrite or modify any important stuff without such unlock sequences and it is not possible to accidentally unlock something.
==Installation==
The recommended bootloader for use with GodMode9 is [[fastboot3DS]]. There are [https://github.com/d0k3/GodMode9/issues/466 known issues for some users] when using the standard setup based on [[boot9strap 3DS|boot9strap]] and [[Luma3DS]]. If you are using that setup, follow the instructions found in [https://3ds.hacks.guide this guide]. Here's how to set up GodMode9 (and fastboot3DS) up quickly.


'''As always, be smart, keep backups, just to be safe'''.
* Download [[OpenFirmInstaller_3DS|OpenFirmInstaller]] and follow the quick setup instructions found there.
* Copy the <code>gm9</code> folder from the release archive to your SD card.
* Then, get good versions of <code>seeddb.bin</code> and <code>encTitleKeys.bin</code> from somewhere and put these two files into <code>sd:/gm9/support</code> (optional but recommended for full functionality).
** It is also recommended you setup the RTC clock if you're running GodMode9 for the first time.
** Find the option via HOME button > <code>More...</code>. Also keep in mind that you should fix your system OS clock afterwards.
** While you're in the <code>More...</code> menu, you may also set screen brightness to a fixed value of your choosing and manually calibrate the touch screen (*not recommended* - try the automatic configuration first).


== Quick start guide ==
'''About support files:'''


The recommended bootloader for use with GodMode9 is [https://github.com/derrekr/fastboot3DS fastboot3DS]. There are [https://github.com/d0k3/GodMode9/issues/466 known issues for some users] when using the standard setup based on [https://github.com/SciresM/boot9strap boot9strap] and [https://github.com/AuroraWright/Luma3DS Luma3DS]. If you insist on using that setup follow the instructions found in a [https://3ds.hacks.guide certain guide]. Here's how to set up GodMode9 (and fastboot3DS) up quickly:
For certain functionality, GodMode9 may need support files. Support files should be placed into either <code>0:/gm9/support</code> or <code>1:/gm9/support</code>. Support files contain additional information that is required in decryption operations. A list of support files, and what they do, is found below. Please don't ask for support files - find them yourself.
* <code>aeskeydb.bin</code> - Should contain 0x25keyX, 0x18keyX and 0x1BkeyX to enable decryption of 7x/Secure3/Secure4 encrypted NCCH files, 0x11key95/0x11key96 for FIRM decrypt support and 0x11keyOTP/0x11keyIVOTP for secret sector 0x96 crypto support. Entrypoints other than boot9strap or fastboot3ds may require a aeskeydb.bin file. This is now included in standard releases of GM9.
* <code>seeddb.bin</code> - This file is optional and required to decrypt and mount seed-encrypted NCCHs and CIAs (if the seed in question is not installed to your NAND). Note that your seeddb.bin must also contain the seed for the specific game you need to decrypt.
* <code>encTitleKeys.bin/decTitleKeys.bin</code> - These files are optional and provide titlekeys, which are required to decrypt and install contents downloaded from CDN (for DSi and 3DS content).


* Download [https://github.com/d0k3/OpenFirmInstaller/releases/tag/v0.0.9 OpenFirmInstaller] and follow the quick setup instructions found there.
'''Helpful notes:'''
* Copy the <code>gm9</code> folder from the release archive to your SD card. Then, get good versions of <code>seeddb.bin</code> and <code>encTitleKeys.bin</code> from somewhere (don't ask me!) and put these two files into <code>sd:/gm9/support</code> (optional but recommended for full functionality).
* Go [https://3ds.hacks.guide/godmode9-usage here] for step by steps on doing some common tasks in GodMode9. Especially users coming from Decrypt9WIP or Hourglass9 may find this to be helpful.
* It is also recommended you setup the RTC clock if you're running GodMode9 for the first time. Find the option via HOME button -&gt; <code>More...</code>. Also keep in mind that you should fix your system OS clock afterwards. While you're in the <code>More...</code> menu, you may also set screen brightness to a fixed value of your choosing and manually calibrate the touch screen (''not recommended'' - try the automatic configuration first).
* Never unlock the [https://github.com/d0k3/GodMode9#write-permissions-system red write permission level] unless you know exactly what you're doing. You will notice that prompt when it comes up, it features a completely red screen. It is recommended you stay on the yellow permission level or below at all times to be completely safe. Also read more on the write permissions system below.
* Helpful hint #1: Go [https://3ds.hacks.guide/godmode9-usage here] for step by steps on doing some common tasks in GodMode9. Especially users coming from Decrypt9WIP or Hourglass9 may find this to be helpful.
* Helpful hint #2: '''Never unlock the red write permission level unless you know exactly what you're doing'''. You will notice that prompt when it comes up, it features a completely red screen. It is recommended you stay on the yellow permission level or below at all times to be completely safe. Also read more on the write permissions system below.


You may now run GodMode9 via holding the X Button (or any other button you chose) at startup. See below for a list of stuff you can do with it.
'''How to update GodMode9:'''
* Just replace GodMode9.firm on your SD card with the file found in the release ZIP.
* You may also want to update scripts, which are found in the ./gm9 folder inside the archive and go to the same folder on your SD card.


== Buttons in GodMode9 ==
==User guide==
With the possibilites GodMode9 provides, not everything may be obvious at first glance. In short, GodMode9 includes improved versions of basically everything that Decrypt9 has, and more. Any kind of dumps and injections are handled via standard copy operations and more specific operations are found inside the A button menu. The A button menu also works for batch operations when multiple files are selected. A (incomplete) list of what GodMode9 can do follows below.


GodMode9 is designed to be intuitive, buttons leading to the results you'd expect. However, some stuff may not be obvious at first glance. So, here's a quick, incomplete rundown of what each button / button combo does.
See also [https://github.com/d0k3/GodMode9#drives-in-godmode9 Drives in GodMode9].


* '''&lt;A&gt; button''': The &lt;A&gt; button is the 'confirm' / 'choose' button. It confirms prompts and selects entries in menus. In the main file view, it pulls up a submenu for files and opens directories (use &lt;R+A&gt; on directories for a submenu, also including the invaluable title search). In the hexviewer, &lt;A&gt; switches into edit mode.
===Basic functionality===
* '''&lt;B&gt; button''': The &lt;B&gt; button is the 'cancel' / 'return' button. Use it to leave menus without action, hold it on file operations to cancel said file operations.
* '''Manage files on all your data storages:'''
* '''&lt;X&gt; button''': In the main file view, the &lt;X&gt; button deletes (marked) files. With &lt;R+X&gt; files are renamed.
** Included are all standard file operations such as copy, delete, rename files and create folders.  
* '''&lt;Y&gt; button''': In the main file view, the &lt;Y&gt; button copies and pastes files. With &lt;R+Y&gt; you can create folders and dummy files.
** Use the L button to mark multiple files and apply file operations to multiple files at once.
* '''&lt;L&gt; button''': The &lt;L&gt; button is the 'mark' button. Use it with &lt;LEFT&gt; / &lt;RIGHT&gt; to mark / unmark all files in a folder, hold it and use &lt;UP&gt; / &lt;DOWN&gt; to select multiple files.
*''' Make screenshots: '''
* '''&lt;R&gt; button''': The &lt;R&gt; button is the 'switch' button. It switches buttons to their secondary function. Notable exceptions are &lt;R+L&gt; for a screenshot (works almost anywhere), &lt;R+LEFT&gt; / &lt;R+RIGHT&gt; to switch panes and &lt;R+DOWN&gt; to reload the file listing.
** Press R+L anywhere. Screenshots are stored in PNG format.
* '''&lt;START&gt; button''': Use the &lt;START&gt; button to reboot from GodMode9. Use &lt;R+START&gt; to poweroff your 3DS.
*''' Use multiple panes: '''
* '''&lt;SELECT&gt; button''': The &lt;SELECT&gt; button clears or restores the clipboard (depending on if it's empty or not).
** Press R+left|right. This enables you to stay in one location in the first pane and open another in the second pane.
* '''&lt;HOME&gt; button''': The &lt;HOME&gt; button enters the HOME menu, including the scripts / payloads submenus, options for formatting the SD, setting the RTC, and more. The &lt;POWER&gt; button is an alternative way of entering the HOME menu.
* '''Search drives and folders: '''
* '''&lt;R+UP&gt; combo''': This little known keycombo, when held at startup, pauses the GodMode9 boot so that you can stare at the splash screen for a little longer.
** Just press R+A on the drive/folder you want to search.
* '''&lt;R+LEFT&gt; combo''': If you have installed GodMode9 as your bootloader, this keycombo enters the bootmenu. Hold on startup! If you built GodMode9 as SALTMODE and have it as a bootloader, the keycombo is simply the &lt;START&gt; button.
* '''Compare and verify files: '''
** Press the A button on the first file, select Calculate SHA-256. Do the same for the second file.
** If the two files are identical, you will get a message about them being identical.  
** On the SDCARD drive (0:) you can also write an SHA file, so you can check for any modifications at a later point.
* '''Hexview and hexedit any file: '''
** Press the A button on a file and select Show in Hexeditor.  
** A button again enables edit mode, hold the A button and press arrow buttons to edit bytes.
** You will get an additional confirmation prompt to take over changes. Take note that for certain files, write permissions can't be enabled.
* '''View text files in a text viewer: '''
** Press the A button on a file and select Show in Textviewer (only shows up for actual text files).
** You can enable wordwrapped mode via R+Y, and navigate around the file via R+X and the dpad.
* '''Chainload FIRM payloads: '''
** Press the A button on a FIRM file, select FIRM options > Boot FIRM.  
** Keep in mind you should not run FIRMs from dubious sources and that the write permissions system is no longer in place after booting a payload.
* '''Chainload FIRM payloads from a neat menu: '''
** The payloads menu is found inside the HOME button menu.  
** It provides any FIRM found in 0:/gm9/payloads for quick chainloading.
* '''Inject a file to another file: '''
** Put exactly one file (the file to be injected from) into the clipboard (via the Y button).  
** Press A on the file to be injected to. There will be an option to inject the first file into it.


== How to build this / developer info ==
===Scripting functionality===
* '''Run .gm9 scripts from anywhere on your SD card: '''
** You can run scripts in .gm9 format via the A button menu. .gm9 scripts use a shell-like language and can be edited in any text editor.
** For an overview of usable commands have a look into the sample scripts included in the release archive.
** Don't run scripts from untrusted sources.
* '''Run .gm9 scripts via a neat menu: '''
** Press the HOME button, select More... > Scripts.... Any script you put into 0:/gm9/scripts (subdirs included) will be found here.
** Scripts ran via this method won't have the confirmation at the beginning either.


Build <code>GodMode9.firm</code> via <code>make firm</code>. This requires [https://github.com/TuxSH/firmtool firmtool], [https://www.python.org/downloads/ Python 3.5+] and [https://sourceforge.net/projects/devkitpro/ devkitARM] installed).
===SD card handling===
* '''Format your SD card/setup an EmuNAND: '''
** Press the HOME button, select More... > SD format menu.  
** This also allows to setup a RedNAND (single/multi) or GW type EmuNAND on your SD card.
** You will get a warning prompt and an unlock sequence before any operation starts.
* '''Handle multiple EmuNANDs: '''
** Press the HOME button, select More... > Switch EmuNAND to switch between EmuNANDs/RedNANDs.
** Only available on multi EmuNAND/RedNAND systems.
* '''Run it without an SD card/unmount the SD card: '''
** If no SD card is found, you will be offered to run without the SD card.
** You can also unmount and remount your SD card from the file system root at any point.
* '''Direct access to SD installed contents: '''
** Just take a look inside the A:/B: drives.  
** On-the-fly-crypto is taken care for, you can access this the same as any other content.
* '''Set (and use) the RTC clock: '''
** For correct modification/creation dates in your file system, you need to setup the RTC clock first.  
** Press the HOME Button and select More... to find the option.  
** Keep in mind that modifying the RTC clock means you should also fix system OS time afterwards.


You may run <code>make release</code> to get a nice, release-ready package of all required files. To build '''SafeMode9''' (a bricksafe variant of GodMode9, with limited write permissions) instead of GodMode9, compile with <code>make FLAVOR=SafeMode9</code>. To switch screens, compile with <code>make SWITCH_SCREENS=1</code>. For additional customization, you may choose the internal font by replacing <code>font_default.pbm</code> inside the <code>data</code> directory. You may also hardcode the brightness via <code>make FIXED_BRIGHTNESS=x</code>, whereas <code>x</code> is a value between 0...15.
===Game file handling===
* '''List titles installed on your system: '''
** Press HOME and select Title manager.
** This will also work via R+A for CTRNAND and A:/B: drives.
** This will list all titles installed in the selected location.
* '''Install titles to your system: '''
** Just press A on any file you want installed and select Install game image from the submenu.
** Works with NCCH/NCSD/CIA/DSiWare SRLs/ 3DS CDN TMDs/DSi CDN TMDs/NUS TMDs.
* '''(Batch) Uninstall titles from your system: '''
** Most easily done via the HOME menu Title manager.
** Just select one or more titles and find the option inside the Manage title... submenu.
* '''Build CIAs from NCCH/NCSD (.3DS)/SRL/TMD: '''
** Press A on the file you want converted and the option will be shown.
** Installed contents are found most easily via the HOME menu Title manager.
** Where applicable, you will also be able to generate legit CIAs. Note: this works also from a file search and title listing.
* '''Dump CXIs/NDS from TMD (installed contents): '''
** This works the same as building CIAs, but dumps decrypted CXIs or NDS rom dumps instead.
** Note: this works also from a file search and title listing.
* '''Decrypt, encrypt and verify NCCH/NCSD/CIA/BOSS/FIRM images: '''
** Options are found inside the A button menu.
** You will be able to decrypt/encrypt to the standard output directory or (where applicable) in place.
* '''Decrypt content downloaded from CDN/NUS: '''
** Press A on the file you want decrypted.
** For this to work, you need at least a TMD file (encTitlekeys.bin/decTitlekeys.bin also required, see Support files below) or a CETK file.
** Either keep the names provided by CDN/NUS, or rename the downloaded content to (anything).nus or (anything).cdn and the CETK to (anything).cetk.
* '''Batch mode for the above operations: '''
** Just select multiple files of the same type via the L button, then press the A button on one of the selected files.
* '''Access any file inside NCCH/NCSD/CIA/FIRM/NDS images: '''
** Just mount the file via the A button menu and browse to the file you want.
** For CDN/NUS content, prior decryption is required for full access.
* '''Rename your NCCH/NCSD/CIA/NDS/GBA files to proper names: '''
** Find this feature inside the A button menu. Proper names include title id, game name, product code and region.
* '''Trim NCCH/NCSD/NDS/GBA/FIRM/NAND images: '''
** This feature is found inside the A button menu.  
** It allows you to trim excess data from supported file types.
** Warning: Excess data may not be empty, bonus drives are stored there for NAND images, NCSD card2 images store savedata there, for FIRMs parts of the A9LH exploit may be stored there.
* '''Dump 3DS/NDS/DSi type retail game cartridges:'''
** Insert the cartridge and take a look inside the C: drive.  
** You may also dump private headers from 3DS game cartridges.
** The C: drive also gives you read/write access to the saves on the cartridges.
** Note: For 4GiB cartridges, the last byte is not included in the .3ds file dump. This is due to restrictrions of the FAT32 file system.


Further customization is possible by hardcoding <code>aeskeydb.bin</code> (just put the file into the <code>data</code> folder when compiling). All files put into the <code>data</code> folder will turn up in the <code>V:</code> drive, but keep in mind there's a hard 3MB limit for all files inside, including overhead. A standalone script runner is compiled by providing <code>autorun.gm9</code> (again, in the <code>data</code> folder) and building with <code>make SCRIPT_RUNNER=1</code>. There's more possibility for customization, read the Makefiles to learn more.
===NAND handling===
* '''Directly mount and access NAND dumps or standard FAT images:'''
** Press the A button on these files to get the option. You can only mount NAND dumps from the same console.
* '''Restore NAND dumps while keeping your A9LH/sighax installation intact: '''
** Select Restore SysNAND (safe) from inside the A button menu for NAND dumps.
* '''Restore/dump NAND partitions or even full NANDs: '''
** Just take a look into the S: (or E:/ I:) drive. This is done the same as any other file operation.
* '''Transfer CTRNAND images between systems: '''
** Transfer the file located at S:/ctrnand_full.bin (or E:/ I:).
** On the receiving system, press A, select CTRNAND Options..., then Transfer to NAND.
* '''Embed an essential backup right into a NAND dump: '''
** This is available in the A button menu for NAND dumps.
** Essential backups contain NAND header, movable.sed, LocalFriendCodeSeed_B, SecureInfo_A, NAND CID and OTP.  
** If your local SysNAND does not contain an embedded backup, you will be asked to do one at startup.
** To update the essential SysNAND backup at a later point in time, press A on S:/nand.bin and select NAND image options... -> Update embedded backup.
* '''Install an AES key database to your NAND: '''
** For aeskeydb.bin files the option is found in aeskeydb.bin options > Install aeskeydb.bin.
** Only the recommended key database can be installed (see above). With an installed key database, it is possible to run the GodMode9 bootloader completely from NAND.
* '''Install FIRM files to your NAND: '''
** Found inside the A button menu for FIRM files, select FIRM options > Install FIRM.
** Use this with caution - installing an incompatible FIRM file will lead to a brick.
** The FIRMs signature will automagically be replaced with a sighax signature to ensure compatibility.
* '''Actually use that extra NAND space: '''
** You can set up a bonus drive via the HOME menu, which will be available via drive letter 8:.
** Only available on systems that have the extra space.
* '''Fix certain problems on your NANDs: '''
** You can fix CMACs for a whole drive (works on A:, B:, S: and E:) via an entry in the R+A button menu, or even restore borked NAND headers back to a functional state (inside the A button menu of borked NANDs and available for S:/nand_hdr.bin).
** Recommended only for advanced users.


To build a .firm signed with SPI boot keys (for ntrboot and the like), run <code>make NTRBOOT=1</code>. You may need to rename the output files if the ntrboot installer you use uses hardcoded filenames. Some features such as boot9 / boot11 access are not currently available from the ntrboot environment.
===System file handling===
* '''Check and fix CMACs (for any file that has them): '''
** This option will appear in the A button menu if available for a given file (f.e. system savegames, ticket.db, etc...).
** This can also be done for multiple files at once if they are marked.
* '''Mount ticket.db files and dump tickets: '''
** Mount the file via the A button menu.
** Tickets are sorted into eshop (stuff from eshop), system (system tickets), unknown (typically empty) and hidden (hidden tickets, found via a deeper scan) categories.
** All tickets displayed are legit, fake tickets are ignored.
* '''Inject any NCCH CXI file into Health & Safety: '''
** This option is found in the A button menu for any NCCH CXI file. NCCH CXIs are commonly found inside CIAs.
** Keep in mind there is a (system internal) size restriction on H&S injectable apps.
* '''Inject and dump GBA VC saves: '''
** Access these options in the A button menu for agbsave.bin on the S: drive.
** Make sure you start the specific GBA game on your console before dumping or injecting the save.  
** To inject a save, it must be copied to the clipboard.
* '''Dump a copy of boot9, boot11 & your OTP: '''
** This works on sighax, via boot9strap only. These files are found inside the M: drive and can be copied from there to any other place.


== Bootloader mode ==
===Support file handling===
* '''Build decTitleKeys.bin/encTitleKeys.bin/seeddb.bin: '''
** Press the HOME button, select More... > Build support files.
** decTitleKeys.bin/encTitleKeys.bin can also be created/merged from tickets, ticket.db and merged from other decTitleKeys.bin/encTitleKeys.bin files via the A button menu.
* '''Build, mount, decrypt and encrypt aeskeydb.bin: '''
** AES key databases can be merged from other aeskeydb.bin or build from legacy slot??Key?.bin files.
** Just select one or more files, press A on one of them and then select Build aeskeydb.bin.
** Options for mounting, decrypting and encrypting are also found in the A button menu.


Same as [https://github.com/SciresM/boot9strap boot9strap] or [https://github.com/derrekr/fastboot3DS fastboot3ds], GodMode9 can be installed to the system FIRM partition ('FIRM0'). When executed from a FIRM partition, GodMode9 will default to bootloader mode and try to boot, in order, <code>FIRM from FCRAM</code> (see [https://github.com/d0k3/A9NC/releases A9NC]), <code>0:/bootonce.firm</code> (will be deleted on a successful boot), <code>0:/boot.firm</code>, <code>1:/boot.firm</code>. In bootloader mode, hold R+LEFT on boot to enter the boot menu. ''Installing GodMode9 to a FIRM partition is only recommended for developers and will overwrite [https://github.com/SciresM/boot9strap boot9strap] or any other bootloader you have installed in there''.
===Dumping games with GodMode9===
Dumping games is the act of taking a game from your system or gamecart and copying it into a readable format onto your SD card. Dumping is perfectly legal if you keep the dumps to yourself, however sharing these dumps is piracy and is illegal.


== Write permissions system ==
This guide will tell you how to dump games from various formats and for various purposes (by [https://gist.github.com/PixelSergey/73d0a4bc1437dbaa53a1d1ce849fdda1 PixelSergey]). Dumping 3DS cartriges as .cia files is good if you want to install them to your system. Dumping them as .3ds files is good for emulators. Installed titles cannot be dumped as .3ds files. NDS cartiges can only be dumped as .nds files and cannot be installed (however, you can play them with emulators or flashcarts).


GodMode9 provides a write permissions system, which will protect you from accidentally damaging your system, losing data and/or modifying important system data. To unlock a write permission, an unlock sequence must be entered. This is not possible by accident. The write permission system is based on colors and the top bar on the top screen will change color according to the current write permission level. No permission above the yellow level can be unlocked on SafeMode9.
Dumping the RomFS of a game is primarily for romhacking purposess. RomFS is the place where a game stores its data. If dumped and modified, these files can be used with Luma's [https://gist.github.com/PixelSergey/5dbb4a9b90d290736353fa58e4fcbb42 LayeredFS feature] to patch games.


* '''Green:''' Modification to system files is not possible on this permission level. You can't edit or delete savegames and installed data. However, keep in mind that any non-system related or custom stuff on your SD card is not protected.
Many instructions here are adapted from Plailect's [https://3ds.hacks.guide/godmode9-usage Godmode9 Usage page]. This guide requires [[Luma3DS]], [[boot9strap 3DS|b9s]] and Godmode9. If you do not have any of those, please follow [https://3ds.hacks.guide/ the guide].
* '''Yellow:''' You can modify system files on this permission level. Data that is unique to your console and cannot be gotten from anywhere else is still not modifiable. Any damages you introduce can be fixed in software, but loss of savegames and installed data is possible if you are not careful. '''A NAND backup is highly recommended starting at this level.'''
* '''Orange:''' This is similar to the yellow permission level, but, in addition, allows edits to console unique data. Any damages you introduce are still fixable in software, but if you play around with this, '''having a NAND backup is an absolute requirement'''.
* '''Red:''' The highest regular permission level. There are no limits to system file edits, and if you are not careful enough, you can brick your console and/or remove your A9LH/B9S installation. Bricks on this level may only be fixable in hardware. '''If you don't have a NAND backup at this point, you seem to have a deathwish for your console'''.
* '''Blue:''' This permission level is reserved for edits to system memory. While, most likely, nothing bad at all will happen, consequences of edits can be unforeseen. There is even a (albeit very small) chance of bricking your console, maybe even permanently. '''Tread with caution on this level'''.


== Support files ==
'''Dumping a 3DS game cartrige as a .3ds file:'''
* Insert your gamecart into your console.
* Boot your console while holding (START) to launch Godmode9.
* Navigate to [C:] GAMECART.
* Press (A) on the <titleid>.trim.3ds file in the drive.
* Select Copy to /gm9/out.
* Press (START) to save and reboot.
* Your dump will be in the /gm9/out folder on the SD card.


For certain functionality, GodMode9 may need 'support files'. Support files should be placed into either <code>0:/gm9/support</code> or <code>1:/gm9/support</code>. Support files contain additional information that is required in decryption operations. A list of support files, and what they do, is found below. Please don't ask for support files - find them yourself.
'''Dumping a 3DS game cartrige as a .cia file:'''
* Insert your gamecart into your console.
* Boot your console while holding (START) to launch Godmode9.
* Navigate to [C:] GAMECART.
* Press (A) on the <titleid>.trim.3ds file in the drive.
* Select NCSD image options..., then select Build CIA from file.
* Press (START) to save and reboot.
* Your dump will be in the /gm9/out folder on the SD card.


* '''<code>aeskeydb.bin</code>''': This should contain 0x25keyX, 0x18keyX and 0x1BkeyX to enable decryption of 7x / Secure3 / Secure4 encrypted NCCH files, 0x11key95 / 0x11key96 for FIRM decrypt support and 0x11keyOTP / 0x11keyIVOTP for 'secret' sector 0x96 crypto support. Entrypoints other than [https://github.com/SciresM/boot9strap boot9strap] or [https://github.com/derrekr/fastboot3DS fastboot3ds] may require a aeskeydb.bin file. A known perfect <code>aeskeydb.bin</code> can be found somewhere on the net, is exactly 1024 byte big and has an MD5 of A5B28945A7C051D7A0CD18AF0E580D1B. Have fun hunting!
'''Dumping an NDS game cartrige as a .nds file:'''
* '''<code>seeddb.bin</code>''': This file is required to decrypt and mount seed encrypted NCCHs and CIAs if the seed in question is not installed to your NAND. Note that your seeddb.bin must also contain the seed for the specific game you need to decrypt.
* Insert your gamecart into your console.
* '''<code>encTitleKeys.bin</code>''' / '''<code>decTitleKeys.bin</code>''': These files are optional and provide titlekeys, which are required to create updatable CIAs from NCCH / NCSD files. CIAs created without these files will still work, but won't be updatable from eShop.
* Boot your console while holding (START) to launch Godmode9.
* Navigate to [C:] GAMECART.
* Press (A) on the <titleid>.trim.nds file in the drive.
* Select Copy to /gm9/out.
* Press (START) to save and reboot.
* Your dump will be in the /gm9/out folder on the SD card.


== Drives in GodMode9 ==
'''Dumping an installed title as a .cia file:'''
* Boot your console while holding (START) to launch Godmode9.
* Hold (R)+(A) while pointing to [A:] SYSNAND SD to open the drive options.
* Selct Search for titles.
* Press (A) to continue.
* Press (A) on the .tmd file of the game you want to dump.
* Select TMD file options... then select Build CIA (standard).
* Your dump will be in the /gm9/out folder on your sd card.


GodMode9 provides access to system data via drives, a listing of what each drive contains and additional info follows below. Some of these drives are removable (such as drive <code>7:</code>), some will only turn up if they are available (drive <code>8:</code> and everything associated with EmuNAND, f.e.). Information on the 3DS console file system is also found on [https://3dbrew.org/wiki/Flash_Filesystem 3Dbrew.org].
'''Dumping a system title as a .cia file:'''
* Boot your console while holding (START) to launch Godmode9.
* Hold (R)+(A) while pointing to [1:] SYSNAND CTRNAND to open the drive options.
* Selct Search for titles.
* Press (A) to continue.
* Press (A) on the .tmd file of the game you want to dump.
* Select TMD file options... then select Build CIA (standard).
* Your dump will be in the /gm9/out folder on your sd card.


* '''<code>0: SDCARD</code>''': The SD card currently inserted into the SD card slot. The <code>0:/Nintendo 3DS</code> folder contains software installs and extdata and is specially protected via the write permission system. The SD card can be unmounted from the root directory via the R+B buttons, otherwise the SD card is always available.
'''Extracting RomFS from a 3DS game cartrige:'''
* '''<code>1: SYSNAND CTRNAND</code>''': The CTRNAND partition on SysNAND. This contains your 3DS console's operating system and system software installs. Data in here is protected by the write permissions system.
* Insert your gamecart into your console.
* '''<code>2: SYSNAND TWLN</code>''': The TWLN partition on SysNAND. This contains your 3DS console's TWL mode operating system and system software installs. Data in here is protected by the write permissions system.
* Boot your console while holding (START) to launch Godmode9.
* '''<code>3: SYSNAND TWLP</code>''': The TWLP partition on SysNAND. This contains photos taken while in TWL mode.
* Navigate to [C:] GAMECART.
* '''<code>A: SYSNAND SD</code>''': This drive is used for special access to data on your SD card. It actually links to a subfolder inside <code>0:/Nintendo 3DS</code> and contains software and extdata installed to SD from SysNAND. Crypto in this folder is handled only when accessed via the <code>A:</code> drive (not from <code>0:</code>). This is protected by the write permissions system.
* Press (A) on the <titleid>.trim.3ds file in the drive.
* '''<code>S: SYSNAND VIRTUAL</code>''': This drive provides access to all partitions of the SysNAND, some of them critical for base system functionality. This is protected by the write permissions system, but, when unlocked, modifications can brick the system.
* Select NCSD image options..., then select Mount image to drive.
* '''<code>4: EMUNAND CTRNAND</code>''': Same as <code>1:</code>, but handles the CTRNAND on EmuNAND. For multi EmuNAND setups, the currently active EmuNAND partition can be switched via the HOME menu.
* Press (A) to enter the drive.
* '''<code>5: EMUNAND TWLN</code>''': Same as <code>2</code>, but handles TWLN on EmuNAND. No write protection here, cause this partition is never used on EmuNAND.
* For each file you want to dump, press (A) while hovering over it and select Copy to /gm9/out.
* '''<code>6: EMUNAND TWLP</code>''': Same as <code>3</code>, but handles TWLP on EmuNAND.
* For each folder you want to dump, press (R)+(A) while hovering over it and select Copy to /gm9/out.
* '''<code>B: EMUNAND SD</code>''': Same as <code>A:</code>, but handles the <code>0:/Nintendo 3DS</code> subfolder associated with EmuNAND. In case of linked NANDs, this is identical with <code>A:</code>. This is also protected by the write permissions system.
* Press (START) to save and reboot.
* '''<code>E: EMUNAND VIRTUAL</code>''': Same as <code>S:</code>, but handles system partitions on EmuNAND. No bricking risk here as EmuNAND is never critical to system functionality.
* Your files will be in the /gm9/out folder on the SD card.
* '''<code>7: FAT IMAGE / IMGNAND CTRNAND</code>''': This provides access to mounted FAT images. When a NAND image is mounted, it provides access to the mounted NAND image's CTRNAND.
* '''<code>8: BONUS DRIVE / IMGNAND TWLN</code>''': This provides access to the bonus drive on SysNAND. The bonus drive can be setup via the HOME menu on 3DS consoles that provide the space for it. When a NAND image is mounted, this provides access to the mounted NAND image's TWLN.
* '''<code>9: RAM DRIVE / IMGNAND TWLP</code>''': This provides access to the RAM drive. All data stored inside the RAM drive is temporary and will be wiped after a reboot. When a NAND image is mounted, this provides access to the mounted NAND image's TWLP.
* '''<code>I: IMGNAND VIRTUAL</code>''': When a NAND image is mounted, this provides access to the partitions inside the NAND image.
* '''<code>C: GAMECART</code>''': This is read-only and provides access to the game cartridge currently inserted into the cart slot. This can be used for dumps of CTR and TWL mode cartridges. Flash cards are supported only to a limited extent.
* '''<code>G: GAME IMAGE</code>''': CIA/NCSD/NCCH/EXEFS/ROMFS/FIRM images can be accessed via this drive when mounted. This is read-only.
* '''<code>K: AESKEYDB IMAGE</code>''': An <code>aeskeydb.bin</code> image can be mounted and accessed via this drive. The drive shows all keys inside the aeskeydb.bin. This is read-only.
* '''<code>T: TICKET.DB IMAGE</code>''': Ticket database files can be mounted and accessed via this drive. This provides easy and quick access to all tickets inside the <code>ticket.db</code>. This is read-only.
* '''<code>M: MEMORY VIRTUAL</code>''': This provides access to various memory regions. This is protected by a special write permission, and caution is advised when doing modifications inside this drive. This drive also gives access to <code>boot9.bin</code>, <code>boot11.bin</code> (boot9strap only) and <code>otp.mem</code> (sighaxed systems only).
* '''<code>V: VRAM VIRTUAL</code>''': This drive resides in the first VRAM bank and contains files essential to GodMode9. The font (in PBM format), the splash logo (in PNG format) and the readme file are found there, as well as any file that is provided inside the <code>data</code> folder at build time. This is read-only.
* '''<code>Z: LAST SEARCH</code>''': After a search operation, search results are found inside this drive. The drive can be accessed at a later point to return to the former search results.


== What you can do with GodMode9 ==
'''Extracting RomFS from an NDS game cartrige:'''
* Insert your gamecart into your console.
* Boot your console while holding (START) to launch Godmode9.
* Navigate to [C:] GAMECART.
* Press (A) on the <titleid>.trim.nds file in the drive.
* Select NDS image options..., then select Mount image to drive.
* Press (A) to enter the drive.
* For each file you want to dump, press (A) while hovering over it and select Copy to /gm9/out.
* For each folder you want to dump, press (R)+(A) while hovering over it and select Copy to /gm9/out.
* Press (START) to save and reboot.
* Your files will be in the /gm9/out folder on the SD card.


With the possibilites GodMode9 provides, not everything may be obvious at first glance. In short, '''GodMode9 includes improved versions of basically everything that Decrypt9 has, and more'''. Any kind of dumps and injections are handled via standard copy operations and more specific operations are found inside the A button menu. The A button menu also works for batch operations when multiple files are selected. For your convenience a (incomplete!) list of what GodMode9 can do follows below.
'''Extracting RomFS from an installed title:'''
* Boot your console while holding (START) to launch Godmode9.
* Hold (R)+(A) while pointing to [A:] SYSNAND SD to open the drive options.
* Selct Search for titles.
* Press (A) to continue.
* Press (A) on the .tmd file of the game which you want to extract the RomFS from.
* Select TMD file options... then select Mount CXI/NDS to drive.
* Press (A) to enter the drive.
* For each file you want to dump, press (A) while hovering over it and select Copy to /gm9/out.
* For each folder you want to dump, press (R)+(A) while hovering over it and select Copy to /gm9/out.
* Press (START) to save and reboot.
* Your files will be in the /gm9/out folder on the SD card.


=== Basic functionality ===
'''Extracting RomFS from a system title:'''
* Boot your console while holding (START) to launch Godmode9.
* Hold (R)+(A) while pointing to [1:] SYSNAND CTRNAND to open the drive options.
* Selct Search for titles.
* Press (A) to continue.
* Press (A) on the .tmd file of the game which you want to extract the RomFS from.
* Select TMD file options... then select Mount CXI/NDS to drive.
* Press (A) to enter the drive.
* For each file you want to dump, press (A) while hovering over it and select Copy to /gm9/out.
* For each folder you want to dump, press (R)+(A) while hovering over it and select Copy to /gm9/out.
* Press (START) to save and reboot.
* Your files will be in the /gm9/out folder on the SD card.


* '''Manage files on all your data storages''': You wouldn't have expected this, right? Included are all standard file operations such as copy, delete, rename files and create folders. Use the L button to mark multiple files and apply file operations to multiple files at once.
'''Extracting RomFS from a .cia/.3ds/.nds file:'''
* '''Make screenshots''': Press R+L anywhere. Screenshots are stored in PNG format.
* Obtain your game file using one of the methods above.
* '''Use multiple panes''': Press R+left|right. This enables you to stay in one location in the first pane and open another in the second pane.
* Boot your console while holding (START) to launch Godmode9.
* '''Search drives and folders''': Just press R+A on the drive / folder you want to search.
* Navigate to your game file inside the [0:] SDCARD drive.
* '''Compare and verify files''': Press the A button on the first file, select <code>Calculate SHA-256</code>. Do the same for the second file. If the two files are identical, you will get a message about them being identical. On the SDCARD drive (<code>0:</code>) you can also write a SHA file, so you can check for any modifications at a later point.
* Press (A) on the game file.
* '''Hexview and hexedit any file''': Press the A button on a file and select <code>Show in Hexeditor</code>. A button again enables edit mode, hold the A button and press arrow buttons to edit bytes. You will get an additional confirmation prompt to take over changes. Take note that for certain files, write permissions can't be enabled.
* Select <type> image options..., then select Mount image to drive.
* '''View text files in a text viewer''': Press the A button on a file and select <code>Show in Textviewer</code> (only shows up for actual text files). You can enable wordwrapped mode via R+Y, and navigate around the file via R+X and the dpad.
* Press (A) to enter the drive.
* '''Chainload FIRM payloads''': Press the A button on a FIRM file, select <code>FIRM options</code> -&gt; <code>Boot FIRM</code>. Keep in mind you should not run FIRMs from dubious sources and that the write permissions system is no longer in place after booting a payload.
* Press (A) on any files or (R)+(A) on any folders you want to dump, then select Copy to /gm9/out.
* '''Chainload FIRM payloads from a neat menu''': The <code>payloads</code> menu is found inside the HOME button menu. It provides any FIRM found in <code>0:/gm9/payloads</code> for quick chainloading.
* Your files will be in the /gm9/out folder on the SD card.
* '''Inject a file to another file''': Put exactly one file (the file to be injected from) into the clipboard (via the Y button). Press A on the file to be injected to. There will be an option to inject the first file into it.


=== Scripting functionality ===
'''Converting .3ds files to .cia files:'''
* Boot your console while holding (START) to launch Godmode9.
* Navigate to your .3ds file inside of the [0:] SDCARD drive.
* Press (A) on the .3ds file.
* Select NCSD image options... them select Build CIA from file.
* Your converted .cia file will be in the /gm9/out folder on the SD card.


* '''Run .gm9 scripts from anywhere on your SD card''': You can run scripts in .gm9 format via the A button menu. .gm9 scripts use a shell-like language and can be edited in any text editor. For an overview of usable commands have a look into the sample scripts included in the release archive. ''Don't run scripts from untrusted sources.''
==Controls==
* '''Run .gm9 scripts via a neat menu''': Press the HOME button, select <code>More...</code> -&gt; <code>Scripts...</code>. Any script you put into <code>0:/gm9/scripts</code> (subdirs included) will be found here. Scripts ran via this method won't have the confirmation at the beginning either.
A - Confirm prompts, select button (menus), Open submenu for files and open directories (main file view), Switch into edit mode (hexviewer)


=== SD card handling ===
R+A - Open submenu (on directories)


* '''Format your SD card / setup an EmuNAND''': Press the HOME button, select <code>More...</code> -&gt; <code>SD format menu</code>. This also allows to setup a RedNAND (single/multi) or GW type EmuNAND on your SD card. You will get a warning prompt and an unlock sequence before any operation starts.
B - Cancel, Leave menus without action, Hold to cancel said file operations
* '''Handle multiple EmuNANDs''': Press the HOME button, select <code>More...</code> -&gt; <code>Switch EmuNAND</code> to switch between EmuNANDs / RedNANDs. (Only available on multi EmuNAND / RedNAND systems.)
* '''Run it without an SD card / unmount the SD card''': If no SD card is found, you will be offered to run without the SD card. You can also unmount and remount your SD card from the file system root at any point.
* '''Direct access to SD installed contents''': Just take a look inside the <code>A:</code>/<code>B:</code> drives. On-the-fly-crypto is taken care for, you can access this the same as any other content.
* '''Set (and use) the RTC clock''': For correct modification / creation dates in your file system, you need to setup the RTC clock first. Press the HOME Button and select <code>More...</code> to find the option. Keep in mind that modifying the RTC clock means you should also fix system OS time afterwards.


=== Game file handling ===
X - Delete marked files, R+X to Rename files (main file view)


* '''List titles installed on your system''': Press R+A on a /title dir or a subdir below that. This will also work directly for <code>CTRNAND</code>, <code>TWLN</code> and <code>A:</code>/<code>B:</code> drives. This will list all titles installed in the selected location. Works best with the below two features.
Y - Copy and paste files, R+Y to create folders and dummy files (main file view)
* '''Build CIAs from NCCH / NCSD (.3DS) / TMD (installed contents)''': Press A on the file you want converted and the option will be shown. Installed contents are found (among others) in <code>1:/titles/</code>(SysNAND) and <code>A:/titles/</code>(SD installed). Where applicable, you will also be able to generate legit CIAs. Note: this works also from a file search and title listing.
* '''Dump CXIs / NDS from TMD (installed contents)''': This works the same as building CIAs, but dumps decrypted CXIs or NDS rom dumps instead. Note: this works also from a file search and title listing.
* '''Decrypt, encrypt and verify NCCH / NCSD / CIA / BOSS / FIRM images''': Options are found inside the A button menu. You will be able to decrypt/encrypt to the standard output directory or (where applicable) in place.
* '''Decrypt content downloaded from CDN / NUS''': Press A on the file you want decrypted. For this to work, you need at least a TMD file (<code>encTitlekeys.bin</code> / <code>decTitlekeys.bin</code> also required, see ''Support files'' below) or a CETK file. Either keep the names provided by CDN / NUS, or rename the downloaded content to <code>(anything).nus</code> or <code>(anything).cdn</code> and the CETK to <code>(anything).cetk</code>.
* '''Batch mode for the above operations''': Just select multiple files of the same type via the L button, then press the A button on one of the selected files.
* '''Access any file inside NCCH / NCSD / CIA / FIRM / NDS images''': Just mount the file via the A button menu and browse to the file you want. For CDN / NUS content, prior decryption is required for full access.
* '''Rename your NCCH / NCSD / CIA / NDS / GBA files to proper names''': Find this feature inside the A button menu. Proper names include title id, game name, product code and region.
* '''Trim NCCH / NCSD / NDS / FIRM / NAND images''': This feature is found inside the A button menu. It allows you to trim excess data from supported file types. ''Warning: Excess data may not be empty, bonus drives are stored there for NAND images, NCSD card2 images store savedata there, for FIRMs parts of the A9LH exploit may be stored there''.
* '''Dump 3DS / NDS / DSi type retail game cartridges''': Insert the cartridge and take a look inside the <code>C:</code> drive. You may also dump private headers from 3DS game cartridges. The <code>C:</code> drive also gives you read/write access to the saves on the cartridges.


=== NAND handling ===
L - Mark file


* '''Directly mount and access NAND dumps or standard FAT images''': Just press the A button on these files to get the option. You can only mount NAND dumps from the same console.
L+Right/Left - Mark/unmark all files in a folder
* '''Restore NAND dumps while keeping your A9LH / sighax installation intact''': Select <code>Restore SysNAND (safe)</code> from inside the A button menu for NAND dumps.
* '''Restore / dump NAND partitions or even full NANDs''': Just take a look into the <code>S:</code> (or <code>E:</code>/ <code>I:</code>) drive. This is done the same as any other file operation.
* '''Transfer CTRNAND images between systems''': Transfer the file located at <code>S:/ctrnand_full.bin</code> (or <code>E:</code>/ <code>I:</code>). On the receiving system, press A, select <code>CTRNAND Options...</code>, then <code>Transfer to NAND</code>.
* '''Embed an essential backup right into a NAND dump''': This is available in the A button menu for NAND dumps. Essential backups contain NAND header, <code>movable.sed</code>, <code>LocalFriendCodeSeed_B</code>, <code>SecureInfo_A</code>, NAND CID and OTP. If your local SysNAND does not contain an embedded backup, you will be asked to do one at startup. To update the essential SysNAND backup at a later point in time, press A on <code>S:/nand.bin</code> and select <code>NAND image options...</code> -&gt; <code>Update embedded backup</code>.
* '''Install an AES key database to your NAND''': For <code>aeskeydb.bin</code> files the option is found in <code>aeskeydb.bin options</code> -&gt; <code>Install aeskeydb.bin</code>. Only the recommended key database can be installed (see above). With an installed key database, it is possible to run the GodMode9 bootloader completely from NAND.
* '''Install FIRM files to your NAND''': Found inside the A button menu for FIRM files, select <code>FIRM options</code> -&gt; <code>Install FIRM</code>. '''Use this with caution''' - installing an incompatible FIRM file will lead to a '''brick'''. The FIRMs signature will automagically be replaced with a sighax signature to ensure compatibility.
* '''Actually use that extra NAND space''': You can setup a '''bonus drive''' via the HOME menu, which will be available via drive letter <code>8:</code>. (Only available on systems that have the extra space.)
* '''Fix certain problems on your NANDs''': You can fix CMACs for a whole drive (works on <code>A:</code>, <code>B:</code>, <code>S:</code> and <code>E:</code>) via an entry in the R+A button menu, or even restore borked NAND headers back to a functional state (inside the A button menu of borked NANDs and available for <code>S:/nand_hdr.bin</code>). Recommended only for advanced users!


=== System file handling ===
L(hold)+Up/Down - Select multiple files


* '''Check and fix CMACs (for any file that has them)''': The option will turn up in the A button menu if it is available for a given file (f.e. system savegames, <code>ticket.db</code>, etc...). This can also be done for multiple files at once if they are marked.
R - Switch buttons to their secondary function
* '''Mount ticket.db files and dump tickets''': Mount the file via the A button menu. Tickets are sorted into <code>eshop</code> (stuff from eshop), <code>system</code> (system tickets), <code>unknown</code> (typically empty) and <code>hidden</code> (hidden tickets, found via a deeper scan) categories. All tickets displayed are legit, fake tickets are ignored
* '''Inject any NCCH CXI file into Health &amp; Safety''': The option is found inside the A button menu for any NCCH CXI file. NCCH CXIs are found, f.e. inside of CIAs. Keep in mind there is a (system internal) size restriction on H&amp;S injectable apps.
* '''Inject and dump GBA VC saves''': Find the options to do this inside the A button menu for <code>agbsave.bin</code> in the <code>S:</code> drive. Keep in mind that you need to start the specific GBA game on your console before dumping / injecting the save.
* '''Dump a copy of boot9, boot11 &amp; your OTP''': This works on sighax, via boot9strap only. These files are found inside the <code>M:</code> drive and can be copied from there to any other place.


=== Support file handling ===
R+L - Screenshot (works almost anywhere)


* '''Build <code>decTitleKeys.bin</code> / <code>encTitleKeys.bin</code> / <code>seeddb.bin</code>''': Press the HOME button, select <code>More...</code> -&gt; <code>Build support files</code>. <code>decTitleKeys.bin</code> / <code>encTitleKeys.bin</code> can also be created / merged from tickets, <code>ticket.db</code> and merged from other <code>decTitleKeys.bin</code> / <code>encTitleKeys.bin</code> files via the A button menu.
R+Left/Right - Switch panes
* '''Build, mount, decrypt and encrypt <code>aeskeydb.bin</code>''': AES key databases can be merged from other <code>aeskeydb.bin</code> or build from legacy <code>slot??Key?.bin</code> files. Just select one or more files, press A on one of them and then select <code>Build aeskeydb.bin</code>. Options for mounting, decrypting and encrypting are also found in the A button menu.


== License ==
R+Down - Reload the file listing


You may use this under the terms of the GNU General Public License GPL v2 or under the terms of any later revisions of the GPL. Refer to the provided <code>LICENSE.txt</code> file for further information.
Start - Reboot from GodMode9, R+Start to poweroff 3DS


== Credits ==
Select - Clear or restores the clipboard (depending on if it's empty or not)


This tool would not have been possible without the help of numerous people. Thanks go to (in no particular order)...
Home - Enter HOME menu, including the scripts/payloads submenus, options for formatting the SD, setting the RTC, etc


* '''Archshift''', for providing the base project infrastructure
Power button - Enter HOME menu (alternative)
* '''Normmatt''', for sdmmc.c / sdmmc.h and gamecart code, and for being of great help on countless other occasions
* '''Cha(N)''', '''Kane49''', and all other FatFS contributors for [http://elm-chan.org/fsw/ff/00index_e.html FatFS]
* '''Wolfvak''' for ARM11 code, FIRM binary launcher, exception handlers, PCX code, Makefile and for help on countless other occasions
* '''SciresM''' for helping me figure out RomFS and for boot9strap
* '''SciresM''', '''Myria''', '''Normmatt''', '''TuxSH''' and '''hedgeberg''' for figuring out sighax and giving us access to bootrom
* '''ihaveamac''' for first developing the simple CIA generation method and for being of great help in porting it
* '''wwylele''' and '''aspargas2''' for documenting and implementing the DISA, DIFF, and BDRI formats
* '''dratini0''' for savefile management, based on [https://github.com/TuxSH/TWLSaveTool/ TWLSaveTool]
* '''b1l1s''' for helping me figure out A9LH compatibility
* '''Gelex''' and '''AuroraWright''' for helping me figure out various things
* '''stuckpixel''' for the new 6x10 font and help on various things
* '''Al3x_10m''' for help with countless hours of testing and useful advice
* '''WinterMute''' for helping me with his vast knowledge on everything gamecart related
* '''profi200''' for always useful advice and helpful hints on various things
* '''windows-server-2003''' for the initial implementation of if-else-goto in .gm9 scripts
* '''Kazuma77''' for pushing forward scripting, for testing and for always useful advice
* '''JaySea''', '''YodaDaCoda''', '''liomajor''', '''Supster131''', '''imanoob''', '''Kasher_CS''' and countless others from freenode #Cakey and the GBAtemp forums for testing, feedback and helpful hints
* '''Shadowhand''' for being awesome and [https://d0k3.secretalgorithm.com/ hosting my nightlies]
* '''Plailect''' for putting his trust in my tools and recommending this in [https://3ds.guide/ The Guide]
* '''SirNapkin1334''' for testing, bug reports and for hosting the official [https://discord.gg/EGu6Qxw GodMode9 Discord channel]
* '''Project Nayuki''' for [https://github.com/nayuki/QR-Code-generator qrcodegen]
* '''Amazingmax fonts''' for the Amazdoom font
* The fine folks on '''freenode #Cakey'''
* All '''[https://www.3dbrew.org/wiki/Main_Page 3dbrew.org] editors'''
* Everyone I possibly forgot, if you think you deserve to be mentioned, just contact me!


==HIstory==
R+Up (at startup) - Pauses the GodMode9 boot so that you can stare at the splash screen for a little longer


'''v2.0.0'''
R+Left - If you have installed GodMode9 as your bootloader, this keycombo enters the bootmenu when you hold on startup (if you built GodMode9 as SALTMODE and have it as a bootloader, the keycombo is simply the Start button)
Today marks the 5th anniversary of the first public GodMode9 release. With this being a special day, a proper release is in order. The conjoined changelog is long, it includes 189 commits, 437 days of development work and two prereleases. The two killer features in this one, for most users, will be the new title manager and the ability to install basically anything (read below), but there are countless other goodies in there, such as the revamped title info, better support for carts and lots of under-the-hood improvements


This is new since the last prerelease:
==Screenshots==
https://dlhb.gamebrew.org/3dshomebrews/godmode93.png
https://dlhb.gamebrew.org/3dshomebrews/godmode94.png


* [new] Completely revamped title info, with special info for installed titles, TMDs and CIAs
https://dlhb.gamebrew.org/3dshomebrews/godmode95.png
* [new] Initial CARD2 save read support for carts (thanks [https://github.com/dratini0 @dratini0]!)
https://dlhb.gamebrew.org/3dshomebrews/godmode96.png
* [improved] Title manager now includes a ticket dumper
* [improved] Release ntrboot FIRMs now include scripts (thanks [https://github.com/gholms @gholms])
* [improved] Software keyboard now includes firstrun instructions
* [improved/fixed] Various smaller visual improvements and bugfixes


In addition, this is new since the last proper release:
==Media==
'''How to Use Godmode9 - to "Dump 3DS Carts to CIA files" & Keep Saves! (Digitally Backup Cartridges)''' ([https://www.youtube.com/watch?v=Tz0i11Y2cvc GameInCanada]) <br>
<youtube>Tz0i11Y2cvc</youtube>


* [new] Possibility to install NCCH, NCSD (.3DS), DSiWare NDS, CIA, NUS/CDN, DSi CDN content to the system
==Changelog==
* [new] Title manager available via HOME menu
'''v2.1.1'''
* [new] Mount support for title.db (thanks [https://github.com/aspargas2 @aspargas2])
* [improved] Improved installation of DSiWare games (thanks @Epicpkmn11).
* [new] Support for handling variable sized tickets (thanks [https://github.com/luigoalma @luigoalma])
* [scripting] Faster script loading as well as other improvements and fixes (thanks @aspargas2).
* [new] Completely rewritten MCU event handler (fixes a lot of stuff) (thanks [https://github.com/Wolfvak @Wolfvak])
* [fixed] Fixed a nasty bug when trimming certain DS cart dumps.
* [new] NDS carts can be dumped with secure area encrypted (thanks [https://github.com/mariomadproductions @mariomadproductions] for testing)
* [fixed] Some smaller bugfixes and general code maintenance.
* [new] Gamecart drive G:/ now includes an info text file (thanks [https://github.com/GerbilSoft @GerbilSoft])
* [new] Tickets can now be verified, installed and identified
* [new] Trimming functionality for GBA rom dumps
* [improved] Several improvements to the GM9 MegaScript (thanks [https://github.com/aspargas2 @aspargas2])
* [improved] Improved CIA builder, with stricter checks for legit builds
* [improved] Better handling of special cases in cart dumper (thanks [https://github.com/GerbilSoft @GerbilSoft])
* [improved] Tons of small performance improvements (thanks [https://github.com/Wolfvak @Wolfvak])
* [improved] Much smaller firm size (thanks [https://github.com/Wolfvak @Wolfvak])
* [improved] Proper mount support for ticket.db (thanks [https://github.com/aspargas2 @aspargas2])
* [scripting] install command for installing game images
* [scripting] Quotes can be escaped (&quot;) in variables*
* [fixed] Fixed screen init (for real this time!) (thanks [https://github.com/Wolfvak @Wolfvak])


'''Killer Feature 1: Title manager'''<br />
'''v2.1.0'''
The title manager may be the one feature most relevant to our users in this release. It enables you to get an overview of your installed titles, build CIAs and even (batch-) uninstall stuff from your system. To enter the title manager, press and select <code>Title manager</code>. SD installed titles are found on the <code>A:/</code> drive, system titles and DSiWare titles are found on the <code>1:/</code> drive.
* [new] Unicode support, including a special Unicode font created for GodMode9 (@Epicpkmn11).
* [new] Support for mounting certs.db, including improvement of certs handling (@luigoalma).
* [new] Support for SHA-1 checksums (@aspargas2).
* [new] Raw cart dumper, accessible via R+A on cart drive.
* [improved] Wider support for flash chips on carts, including ir (@dratini0).
* [scripting] SDSIZE, SDFREE and NANDFREE global variables.
* [scripting] Added cartdump command.
* [fixed] Numerous bugfixes and small improvements, too many to list.


'''Killer Feature 2: Universal installer'''<br />
'''v2.0.0'''
The other killer feature in this release is the ability to install basically anything to your system. You can install CIA (obvious), NCSD (also called .3DS files), NCCH, DSiWare .NDS dumps, 3DS CDN/ NUS contents and DSi CDN contents. It's even possible to install a title directly from one of your gamecarts. For DSi CDN contents, the <code>Nintendo DSi (Digital) (CDN)</code> dat-file over on [https://datomatic.no-intro.org/ No-Intro] may help you get your CDN files in order. You will also need to provide a <code>decTitlekeys.bin</code> file (with DSi titlekeys included) inside the <code>0:/GM9/support/</code> folder.
* [new] Completely revamped title info, with special info for installed titles, TMDs and CIAs.
 
* [new] Initial CARD2 save read support for carts (thanks @dratini0).
'''How do I update GodMode9?'''<br />
* [improved] Title manager now includes a ticket dumper.
You wouldn't believe how often we get that question when we do a new release. It's actually very simple: Just replace <code>GodMode9.firm</code> on your SD card with the file found in the release ZIP. You may also want to update scripts, which are found in <code>gm9</code> folder inside the archive and go to the same folder on your SD card.
* [improved] Release ntrboot FIRMs now include scripts (thanks @gholms).
* [improved] Software keyboard now includes firstrun instructions.
* [improved/fixed] Various smaller visual improvements and bugfixes.


'''Did you know?'''<br />
'''v1.9.3pre1'''
We actually missed last years' anniversary release by a solid 5 months, and all you got back then was a prerelease. GodMode9 is a side project for all of our main developers (that's [https://github.com/Wolfvak @Wolfvak], [https://github.com/aspargas2 @aspargas2] and myself), so it has to take second place to real life(tm) at times. Gladly, we're able to get this release out in time. Thanks go out to the numerous people who helped make this possible, including contributing developers, people who submitted bug reports &amp; feature requests and least but not last, you, the users, who motivate us to keep on improving GodMode9.
* [new] Completely rewritten MCU event handler (fixes a lot of stuff) (thanks @Wolfvak).
* [new] Ability to install, build CIA from, verify, identify DSi CDN content (read below).
* [new] Title manager available via HOME menu (read below).
* [new] NDS carts can be dumped with secure area encrypted (thanks @mariomadproductions for testing).
* [new] Gamecart drive G:/ now includes an info text file (thanks @GerbilSoft).
* [new] Tickets can now be verified, installed and identified.
* [new] Trimming functionality for GBA rom dumps.
* [improved] Improved title info functionality, now compatible with more files.
* [improved] Several improvements to the GM9 MegaScript (thanks @aspargas2).
* [improved] Several improvements to the game image installer.
* [improved] Improved CIA builder, with stricter checks for legit builds.
* [improved] Better handling of special cases in cart dumper (thanks @GerbilSoft).
* [fixed] Proper seed handling when installing game images to the system.
* [fixed] Countless smaller fixes and improvements, too many to list.
* [scripting] 'install' command for installing game images to system.
* [scripting] Quotes can be escaped (\") in variables.


'''v1.9.2pre1'''
* [new] Mount support for title.db (thanks @aspargas2).
* [new] Support for handling variable sized tickets (thanks @luigoalma).
* [improved] Proper mount support for ticket.db (thanks @aspargas2).
* [improved] Various improvements to the CIA builder, mostly for CIA from NCSD.
* [improved] Tons of small performance improvements (thanks @Wolfvak).
* [improved] Much smaller firm size (thanks @Wolfvak).
* [fixed] Fixed screen init (for real this time) (thanks @Wolfvak).
* [fixed] Tons of small bug fixes.
* [preview] Possibility to install NCCH, NCSD (.3DS), DSiWare NDS, CIA, NUS/CDN to the system.


Time for a new GodMode9 release. The last major release, v1.9.0, was a pretty solid release to begin with, but as always there is room for improvement. This one focuses on bugfixes, fixing stuff that v1.9.0 did not do right. This is new:
'''v1.9.1'''
* [new] On verification, offer fixing for badly decrypted NCCH/NCSD.
* [improved] Much faster scrolling speeds in wordwrapped text view.
* [improved] Largely improved method of GBA VC save injection (thanks @TurdPooCharger).
* [fixed] Fixed the .BPS code in scripting (thanks @Wolfvak).
* [fixed] Fixed a crash in the DISA/DIFF handling code (thanks @aspargas2).
* [fixed] Actually allow decrypting N3DS NATIVE_FIRM on O3DS.
* [fixed] Last search drive is back again.
* [fixed] Cart drive checking (don't show empty when it isn't).
* [fixed] Notification light handling.


* [new] On verification, offer fixing for badly decrypted NCCH/NCSD
'''v1.9.0'''
* [improved] Much faster scrolling speeds in wordwrapped text view
* [new] Touchscreen support, used for keyboard (manual calibration is possible, but not required).
* [improved] Largely improved method of GBA VC save injection (thanks @TurdPooCharger)
* [new] LED support, signaling finished operations when the shell is closed.
* [fixed] Fixed the .BPS code in scripting (thanks @Wolfvak)
* [new] Detecting shell opened/closed, turn off display to save battery.
* [fixed] Fixed a crash in the DISA/DIFF handling code (thanks @aspargas2)
* [new] Brightness configuration (in HOME menu).
* [fixed] Actually allow decrypting N3DS NATIVE_FIRM on O3DS
* [new] Support for mounting, reading and writing DISA and DIFF (.db) files (thanks @aspargas2).
* [fixed] Last search drive is back again
* [new] Allow setting attributes for directories.
* [fixed] Cart drive checking (don't show empty when it isn't
* [new] Read and write support for gamecart saves (thanks @dratini0).
* [fixed] Notification light handling
* [improved] Completely rewritten ARM11 core.
* [improved] Countless under-the-hood improvements thanks to @Wolfvak.
* [fixed] A metric fuckton of bugfixes (quoting @Wolfvak here).
* [scripting] Allow game icons as preview.


Did you know? This marks the 40th release of GodMode9, with a whopping 1260 commits leading up to here. GodMode9 is now in it's fourth year of development and still going strong, thanks to all of my fellow developers, bug reporters and feature requesters.
[https://github.com/d0k3/GodMode9/releases/tag/v2.1.0 Revision changelog.]


===Tsktsktsk===
==Credits==
We've been seeing a lot of bug reports these days with people telling us they can't convert their NCSD (&quot;.3DS&quot;) files to CIA in GodMode9. It can be assumed that all of them got their badly decrypted .3DS files from some shady source. Shady source: please at least provide proper decrypted files. @citra-emu: maybe stop supporting these files or at least give a warning to users? We, for our part, now properly detect these files and offer fixing. To use the new fixer, just verify your files.
This tool would not have been possible without the help of numerous people. Thanks go to (in no particular order):
* Archshift, for providing the base project infrastructure.
* Normmatt, for sdmmc.c / sdmmc.h and gamecart code, and for being of great help on countless other occasions.
* Cha(N), Kane49, and all other FatFS contributors for FatFS.
* Wolfvak for ARM11 code, FIRM binary launcher, exception handlers, PCX code, Makefile and for help on countless other occasions.
* SciresM for the help on figuring out RomFS and for boot9strap.
* SciresM, Myria, Normmatt, TuxSH and hedgeberg for figuring out sighax and giving us access to bootrom.
* ihaveamac for first developing the simple CIA generation method and for being of great help in porting it.
* wwylele and aspargas2 for documenting and implementing the DISA, DIFF, and BDRI formats.
* dratini0 for savefile management, based on TWLSaveTool.
* b1l1s for the help on figuring out A9LH compatibility.
* Gelex and AuroraWright for the help on figuring out various things.
* stuckpixel for the new 6x10 font and help on various things.
* Al3x_10m for help with countless hours of testing and useful advice.
* WinterMute for helping with his vast knowledge on everything gamecart related.
* profi200 for always useful advice and helpful hints on various things.
* windows-server-2003 for the initial implementation of if-else-goto in .gm9 scripts.
* Kazuma77 for pushing forward scripting, for testing and for always useful advice.
* TurdPooCharger for being one of the most meticulous software testers around.
* JaySea, YodaDaCoda, liomajor, Supster131, imanoob, Kasher_CS and countless others from freenode #Cakey and the GBAtemp forums for testing, feedback and helpful hints.
* Shadowhand for being awesome and hosting my nightlies.
* Plailect for putting his trust in my tools and recommending this in The Guide.
* SirNapkin1334 for testing, bug reports and for hosting the original GodMode9 Discord server.
* Lilith Valentine for testing and helpful advice.
* Project Nayuki for qrcodegen.
* Amazingmax fonts for the Amazdoom font.
* The fine folks on the official GodMode9 IRC channel and Discord server.
* The fine folks on freenode #Cakey.
* All 3dbrew.org editors.


===Credits===
==External links==
As always this wouldn't have been possible without some help. Thanks go to @Wolfvak, @aspargas2 and @TurdPooCharger for actively contributing to development. I also thank everyone submitting bug reports and feature requests. A special mention goes to @HIDE810 who finally pointed out that text viewer scrolling is awfully slow in some cases and needs some work. Thanks, all of you!
* GitHub - https://github.com/d0k3/GodMode9
* Discord - https://discord.gg/BRcbvtFxX4
* GBAtemp - https://gbatemp.net/threads/release-godmode9-all-access-file-browser-for-the-3ds.420027
* Reddit - https://www.reddit.com/r/3dshacks/comments/mauor0/godmode9_v200_fifth_anniversary_release
* 3DS Guide - https://quantumcat1.github.io/godmode9-usage.html

Latest revision as of 11:56, 24 July 2024

GodMode9
Godmode92.png
General
Authord0k3
TypeFile Browsers
Version2.1.1
LicenseMixed
Last Updated2022/03/23
Links
Download
Website
Source

GodMode9 is a full access file browser for the Nintendo 3DS console, giving you access to your SD card, to the FAT partitions inside your SysNAND and EmuNAND and to basically anything else. Among other functionality (see below), you can copy, delete, rename files and create folders.

Note from developers:

This is powerful stuff, it provides you with the means to do basically any thinkable modification to any system data available on the 3DS console. However, precautions are taken so you don't accidentally damage the data of your console. The write permissions system protects you by providing warnings and forces you to enter an unlock sequence for enabling write permissions. It is not possible to overwrite or modify any important stuff without such unlock sequences and it is not possible to accidentally unlock something.

As always, be smart, keep backups, just to be safe.

Features

  • Manage files on all your data storages, such as copy, delete, rename files and create folders.
  • Make screenshots.
  • Use multiple panes.
  • Search drives and folders.
  • Format your SD card/setup a RedNAND.
  • Run it without an SD card/unmount the SD card.
  • Direct access to SD installed contents.
  • Build CIAs from NCCH/NCSD (.3DS)/TMD (installed contents).
  • Decrypt and verify NCCH/NCSD/CIA/TMD/FIRM images.
  • Batch mode for the above two operations.
  • Access any file inside NCCH/NCSD/CIA/FIRM images.
  • Generate XORpads for any NAND partition.
  • Directly mount and access NAND dumps or standard FAT images.
  • Restore/dump NAND partitions or even full NANDs.
  • Compare and verify files.
  • Hexview and hexedit any file.
  • Inject a file to another file.

Installation

The recommended bootloader for use with GodMode9 is fastboot3DS. There are known issues for some users when using the standard setup based on boot9strap and Luma3DS. If you are using that setup, follow the instructions found in this guide. Here's how to set up GodMode9 (and fastboot3DS) up quickly.

  • Download OpenFirmInstaller and follow the quick setup instructions found there.
  • Copy the gm9 folder from the release archive to your SD card.
  • Then, get good versions of seeddb.bin and encTitleKeys.bin from somewhere and put these two files into sd:/gm9/support (optional but recommended for full functionality).
    • It is also recommended you setup the RTC clock if you're running GodMode9 for the first time.
    • Find the option via HOME button > More.... Also keep in mind that you should fix your system OS clock afterwards.
    • While you're in the More... menu, you may also set screen brightness to a fixed value of your choosing and manually calibrate the touch screen (*not recommended* - try the automatic configuration first).

About support files:

For certain functionality, GodMode9 may need support files. Support files should be placed into either 0:/gm9/support or 1:/gm9/support. Support files contain additional information that is required in decryption operations. A list of support files, and what they do, is found below. Please don't ask for support files - find them yourself.

  • aeskeydb.bin - Should contain 0x25keyX, 0x18keyX and 0x1BkeyX to enable decryption of 7x/Secure3/Secure4 encrypted NCCH files, 0x11key95/0x11key96 for FIRM decrypt support and 0x11keyOTP/0x11keyIVOTP for secret sector 0x96 crypto support. Entrypoints other than boot9strap or fastboot3ds may require a aeskeydb.bin file. This is now included in standard releases of GM9.
  • seeddb.bin - This file is optional and required to decrypt and mount seed-encrypted NCCHs and CIAs (if the seed in question is not installed to your NAND). Note that your seeddb.bin must also contain the seed for the specific game you need to decrypt.
  • encTitleKeys.bin/decTitleKeys.bin - These files are optional and provide titlekeys, which are required to decrypt and install contents downloaded from CDN (for DSi and 3DS content).

Helpful notes:

  • Go here for step by steps on doing some common tasks in GodMode9. Especially users coming from Decrypt9WIP or Hourglass9 may find this to be helpful.
  • Never unlock the red write permission level unless you know exactly what you're doing. You will notice that prompt when it comes up, it features a completely red screen. It is recommended you stay on the yellow permission level or below at all times to be completely safe. Also read more on the write permissions system below.

How to update GodMode9:

  • Just replace GodMode9.firm on your SD card with the file found in the release ZIP.
  • You may also want to update scripts, which are found in the ./gm9 folder inside the archive and go to the same folder on your SD card.

User guide

With the possibilites GodMode9 provides, not everything may be obvious at first glance. In short, GodMode9 includes improved versions of basically everything that Decrypt9 has, and more. Any kind of dumps and injections are handled via standard copy operations and more specific operations are found inside the A button menu. The A button menu also works for batch operations when multiple files are selected. A (incomplete) list of what GodMode9 can do follows below.

See also Drives in GodMode9.

Basic functionality

  • Manage files on all your data storages:
    • Included are all standard file operations such as copy, delete, rename files and create folders.
    • Use the L button to mark multiple files and apply file operations to multiple files at once.
  • Make screenshots:
    • Press R+L anywhere. Screenshots are stored in PNG format.
  • Use multiple panes:
    • Press R+left|right. This enables you to stay in one location in the first pane and open another in the second pane.
  • Search drives and folders:
    • Just press R+A on the drive/folder you want to search.
  • Compare and verify files:
    • Press the A button on the first file, select Calculate SHA-256. Do the same for the second file.
    • If the two files are identical, you will get a message about them being identical.
    • On the SDCARD drive (0:) you can also write an SHA file, so you can check for any modifications at a later point.
  • Hexview and hexedit any file:
    • Press the A button on a file and select Show in Hexeditor.
    • A button again enables edit mode, hold the A button and press arrow buttons to edit bytes.
    • You will get an additional confirmation prompt to take over changes. Take note that for certain files, write permissions can't be enabled.
  • View text files in a text viewer:
    • Press the A button on a file and select Show in Textviewer (only shows up for actual text files).
    • You can enable wordwrapped mode via R+Y, and navigate around the file via R+X and the dpad.
  • Chainload FIRM payloads:
    • Press the A button on a FIRM file, select FIRM options > Boot FIRM.
    • Keep in mind you should not run FIRMs from dubious sources and that the write permissions system is no longer in place after booting a payload.
  • Chainload FIRM payloads from a neat menu:
    • The payloads menu is found inside the HOME button menu.
    • It provides any FIRM found in 0:/gm9/payloads for quick chainloading.
  • Inject a file to another file:
    • Put exactly one file (the file to be injected from) into the clipboard (via the Y button).
    • Press A on the file to be injected to. There will be an option to inject the first file into it.

Scripting functionality

  • Run .gm9 scripts from anywhere on your SD card:
    • You can run scripts in .gm9 format via the A button menu. .gm9 scripts use a shell-like language and can be edited in any text editor.
    • For an overview of usable commands have a look into the sample scripts included in the release archive.
    • Don't run scripts from untrusted sources.
  • Run .gm9 scripts via a neat menu:
    • Press the HOME button, select More... > Scripts.... Any script you put into 0:/gm9/scripts (subdirs included) will be found here.
    • Scripts ran via this method won't have the confirmation at the beginning either.

SD card handling

  • Format your SD card/setup an EmuNAND:
    • Press the HOME button, select More... > SD format menu.
    • This also allows to setup a RedNAND (single/multi) or GW type EmuNAND on your SD card.
    • You will get a warning prompt and an unlock sequence before any operation starts.
  • Handle multiple EmuNANDs:
    • Press the HOME button, select More... > Switch EmuNAND to switch between EmuNANDs/RedNANDs.
    • Only available on multi EmuNAND/RedNAND systems.
  • Run it without an SD card/unmount the SD card:
    • If no SD card is found, you will be offered to run without the SD card.
    • You can also unmount and remount your SD card from the file system root at any point.
  • Direct access to SD installed contents:
    • Just take a look inside the A:/B: drives.
    • On-the-fly-crypto is taken care for, you can access this the same as any other content.
  • Set (and use) the RTC clock:
    • For correct modification/creation dates in your file system, you need to setup the RTC clock first.
    • Press the HOME Button and select More... to find the option.
    • Keep in mind that modifying the RTC clock means you should also fix system OS time afterwards.

Game file handling

  • List titles installed on your system:
    • Press HOME and select Title manager.
    • This will also work via R+A for CTRNAND and A:/B: drives.
    • This will list all titles installed in the selected location.
  • Install titles to your system:
    • Just press A on any file you want installed and select Install game image from the submenu.
    • Works with NCCH/NCSD/CIA/DSiWare SRLs/ 3DS CDN TMDs/DSi CDN TMDs/NUS TMDs.
  • (Batch) Uninstall titles from your system:
    • Most easily done via the HOME menu Title manager.
    • Just select one or more titles and find the option inside the Manage title... submenu.
  • Build CIAs from NCCH/NCSD (.3DS)/SRL/TMD:
    • Press A on the file you want converted and the option will be shown.
    • Installed contents are found most easily via the HOME menu Title manager.
    • Where applicable, you will also be able to generate legit CIAs. Note: this works also from a file search and title listing.
  • Dump CXIs/NDS from TMD (installed contents):
    • This works the same as building CIAs, but dumps decrypted CXIs or NDS rom dumps instead.
    • Note: this works also from a file search and title listing.
  • Decrypt, encrypt and verify NCCH/NCSD/CIA/BOSS/FIRM images:
    • Options are found inside the A button menu.
    • You will be able to decrypt/encrypt to the standard output directory or (where applicable) in place.
  • Decrypt content downloaded from CDN/NUS:
    • Press A on the file you want decrypted.
    • For this to work, you need at least a TMD file (encTitlekeys.bin/decTitlekeys.bin also required, see Support files below) or a CETK file.
    • Either keep the names provided by CDN/NUS, or rename the downloaded content to (anything).nus or (anything).cdn and the CETK to (anything).cetk.
  • Batch mode for the above operations:
    • Just select multiple files of the same type via the L button, then press the A button on one of the selected files.
  • Access any file inside NCCH/NCSD/CIA/FIRM/NDS images:
    • Just mount the file via the A button menu and browse to the file you want.
    • For CDN/NUS content, prior decryption is required for full access.
  • Rename your NCCH/NCSD/CIA/NDS/GBA files to proper names:
    • Find this feature inside the A button menu. Proper names include title id, game name, product code and region.
  • Trim NCCH/NCSD/NDS/GBA/FIRM/NAND images:
    • This feature is found inside the A button menu.
    • It allows you to trim excess data from supported file types.
    • Warning: Excess data may not be empty, bonus drives are stored there for NAND images, NCSD card2 images store savedata there, for FIRMs parts of the A9LH exploit may be stored there.
  • Dump 3DS/NDS/DSi type retail game cartridges:
    • Insert the cartridge and take a look inside the C: drive.
    • You may also dump private headers from 3DS game cartridges.
    • The C: drive also gives you read/write access to the saves on the cartridges.
    • Note: For 4GiB cartridges, the last byte is not included in the .3ds file dump. This is due to restrictrions of the FAT32 file system.

NAND handling

  • Directly mount and access NAND dumps or standard FAT images:
    • Press the A button on these files to get the option. You can only mount NAND dumps from the same console.
  • Restore NAND dumps while keeping your A9LH/sighax installation intact:
    • Select Restore SysNAND (safe) from inside the A button menu for NAND dumps.
  • Restore/dump NAND partitions or even full NANDs:
    • Just take a look into the S: (or E:/ I:) drive. This is done the same as any other file operation.
  • Transfer CTRNAND images between systems:
    • Transfer the file located at S:/ctrnand_full.bin (or E:/ I:).
    • On the receiving system, press A, select CTRNAND Options..., then Transfer to NAND.
  • Embed an essential backup right into a NAND dump:
    • This is available in the A button menu for NAND dumps.
    • Essential backups contain NAND header, movable.sed, LocalFriendCodeSeed_B, SecureInfo_A, NAND CID and OTP.
    • If your local SysNAND does not contain an embedded backup, you will be asked to do one at startup.
    • To update the essential SysNAND backup at a later point in time, press A on S:/nand.bin and select NAND image options... -> Update embedded backup.
  • Install an AES key database to your NAND:
    • For aeskeydb.bin files the option is found in aeskeydb.bin options > Install aeskeydb.bin.
    • Only the recommended key database can be installed (see above). With an installed key database, it is possible to run the GodMode9 bootloader completely from NAND.
  • Install FIRM files to your NAND:
    • Found inside the A button menu for FIRM files, select FIRM options > Install FIRM.
    • Use this with caution - installing an incompatible FIRM file will lead to a brick.
    • The FIRMs signature will automagically be replaced with a sighax signature to ensure compatibility.
  • Actually use that extra NAND space:
    • You can set up a bonus drive via the HOME menu, which will be available via drive letter 8:.
    • Only available on systems that have the extra space.
  • Fix certain problems on your NANDs:
    • You can fix CMACs for a whole drive (works on A:, B:, S: and E:) via an entry in the R+A button menu, or even restore borked NAND headers back to a functional state (inside the A button menu of borked NANDs and available for S:/nand_hdr.bin).
    • Recommended only for advanced users.

System file handling

  • Check and fix CMACs (for any file that has them):
    • This option will appear in the A button menu if available for a given file (f.e. system savegames, ticket.db, etc...).
    • This can also be done for multiple files at once if they are marked.
  • Mount ticket.db files and dump tickets:
    • Mount the file via the A button menu.
    • Tickets are sorted into eshop (stuff from eshop), system (system tickets), unknown (typically empty) and hidden (hidden tickets, found via a deeper scan) categories.
    • All tickets displayed are legit, fake tickets are ignored.
  • Inject any NCCH CXI file into Health & Safety:
    • This option is found in the A button menu for any NCCH CXI file. NCCH CXIs are commonly found inside CIAs.
    • Keep in mind there is a (system internal) size restriction on H&S injectable apps.
  • Inject and dump GBA VC saves:
    • Access these options in the A button menu for agbsave.bin on the S: drive.
    • Make sure you start the specific GBA game on your console before dumping or injecting the save.
    • To inject a save, it must be copied to the clipboard.
  • Dump a copy of boot9, boot11 & your OTP:
    • This works on sighax, via boot9strap only. These files are found inside the M: drive and can be copied from there to any other place.

Support file handling

  • Build decTitleKeys.bin/encTitleKeys.bin/seeddb.bin:
    • Press the HOME button, select More... > Build support files.
    • decTitleKeys.bin/encTitleKeys.bin can also be created/merged from tickets, ticket.db and merged from other decTitleKeys.bin/encTitleKeys.bin files via the A button menu.
  • Build, mount, decrypt and encrypt aeskeydb.bin:
    • AES key databases can be merged from other aeskeydb.bin or build from legacy slot??Key?.bin files.
    • Just select one or more files, press A on one of them and then select Build aeskeydb.bin.
    • Options for mounting, decrypting and encrypting are also found in the A button menu.

Dumping games with GodMode9

Dumping games is the act of taking a game from your system or gamecart and copying it into a readable format onto your SD card. Dumping is perfectly legal if you keep the dumps to yourself, however sharing these dumps is piracy and is illegal.

This guide will tell you how to dump games from various formats and for various purposes (by PixelSergey). Dumping 3DS cartriges as .cia files is good if you want to install them to your system. Dumping them as .3ds files is good for emulators. Installed titles cannot be dumped as .3ds files. NDS cartiges can only be dumped as .nds files and cannot be installed (however, you can play them with emulators or flashcarts).

Dumping the RomFS of a game is primarily for romhacking purposess. RomFS is the place where a game stores its data. If dumped and modified, these files can be used with Luma's LayeredFS feature to patch games.

Many instructions here are adapted from Plailect's Godmode9 Usage page. This guide requires Luma3DS, b9s and Godmode9. If you do not have any of those, please follow the guide.

Dumping a 3DS game cartrige as a .3ds file:

  • Insert your gamecart into your console.
  • Boot your console while holding (START) to launch Godmode9.
  • Navigate to [C:] GAMECART.
  • Press (A) on the <titleid>.trim.3ds file in the drive.
  • Select Copy to /gm9/out.
  • Press (START) to save and reboot.
  • Your dump will be in the /gm9/out folder on the SD card.

Dumping a 3DS game cartrige as a .cia file:

  • Insert your gamecart into your console.
  • Boot your console while holding (START) to launch Godmode9.
  • Navigate to [C:] GAMECART.
  • Press (A) on the <titleid>.trim.3ds file in the drive.
  • Select NCSD image options..., then select Build CIA from file.
  • Press (START) to save and reboot.
  • Your dump will be in the /gm9/out folder on the SD card.

Dumping an NDS game cartrige as a .nds file:

  • Insert your gamecart into your console.
  • Boot your console while holding (START) to launch Godmode9.
  • Navigate to [C:] GAMECART.
  • Press (A) on the <titleid>.trim.nds file in the drive.
  • Select Copy to /gm9/out.
  • Press (START) to save and reboot.
  • Your dump will be in the /gm9/out folder on the SD card.

Dumping an installed title as a .cia file:

  • Boot your console while holding (START) to launch Godmode9.
  • Hold (R)+(A) while pointing to [A:] SYSNAND SD to open the drive options.
  • Selct Search for titles.
  • Press (A) to continue.
  • Press (A) on the .tmd file of the game you want to dump.
  • Select TMD file options... then select Build CIA (standard).
  • Your dump will be in the /gm9/out folder on your sd card.

Dumping a system title as a .cia file:

  • Boot your console while holding (START) to launch Godmode9.
  • Hold (R)+(A) while pointing to [1:] SYSNAND CTRNAND to open the drive options.
  • Selct Search for titles.
  • Press (A) to continue.
  • Press (A) on the .tmd file of the game you want to dump.
  • Select TMD file options... then select Build CIA (standard).
  • Your dump will be in the /gm9/out folder on your sd card.

Extracting RomFS from a 3DS game cartrige:

  • Insert your gamecart into your console.
  • Boot your console while holding (START) to launch Godmode9.
  • Navigate to [C:] GAMECART.
  • Press (A) on the <titleid>.trim.3ds file in the drive.
  • Select NCSD image options..., then select Mount image to drive.
  • Press (A) to enter the drive.
  • For each file you want to dump, press (A) while hovering over it and select Copy to /gm9/out.
  • For each folder you want to dump, press (R)+(A) while hovering over it and select Copy to /gm9/out.
  • Press (START) to save and reboot.
  • Your files will be in the /gm9/out folder on the SD card.

Extracting RomFS from an NDS game cartrige:

  • Insert your gamecart into your console.
  • Boot your console while holding (START) to launch Godmode9.
  • Navigate to [C:] GAMECART.
  • Press (A) on the <titleid>.trim.nds file in the drive.
  • Select NDS image options..., then select Mount image to drive.
  • Press (A) to enter the drive.
  • For each file you want to dump, press (A) while hovering over it and select Copy to /gm9/out.
  • For each folder you want to dump, press (R)+(A) while hovering over it and select Copy to /gm9/out.
  • Press (START) to save and reboot.
  • Your files will be in the /gm9/out folder on the SD card.

Extracting RomFS from an installed title:

  • Boot your console while holding (START) to launch Godmode9.
  • Hold (R)+(A) while pointing to [A:] SYSNAND SD to open the drive options.
  • Selct Search for titles.
  • Press (A) to continue.
  • Press (A) on the .tmd file of the game which you want to extract the RomFS from.
  • Select TMD file options... then select Mount CXI/NDS to drive.
  • Press (A) to enter the drive.
  • For each file you want to dump, press (A) while hovering over it and select Copy to /gm9/out.
  • For each folder you want to dump, press (R)+(A) while hovering over it and select Copy to /gm9/out.
  • Press (START) to save and reboot.
  • Your files will be in the /gm9/out folder on the SD card.

Extracting RomFS from a system title:

  • Boot your console while holding (START) to launch Godmode9.
  • Hold (R)+(A) while pointing to [1:] SYSNAND CTRNAND to open the drive options.
  • Selct Search for titles.
  • Press (A) to continue.
  • Press (A) on the .tmd file of the game which you want to extract the RomFS from.
  • Select TMD file options... then select Mount CXI/NDS to drive.
  • Press (A) to enter the drive.
  • For each file you want to dump, press (A) while hovering over it and select Copy to /gm9/out.
  • For each folder you want to dump, press (R)+(A) while hovering over it and select Copy to /gm9/out.
  • Press (START) to save and reboot.
  • Your files will be in the /gm9/out folder on the SD card.

Extracting RomFS from a .cia/.3ds/.nds file:

  • Obtain your game file using one of the methods above.
  • Boot your console while holding (START) to launch Godmode9.
  • Navigate to your game file inside the [0:] SDCARD drive.
  • Press (A) on the game file.
  • Select <type> image options..., then select Mount image to drive.
  • Press (A) to enter the drive.
  • Press (A) on any files or (R)+(A) on any folders you want to dump, then select Copy to /gm9/out.
  • Your files will be in the /gm9/out folder on the SD card.

Converting .3ds files to .cia files:

  • Boot your console while holding (START) to launch Godmode9.
  • Navigate to your .3ds file inside of the [0:] SDCARD drive.
  • Press (A) on the .3ds file.
  • Select NCSD image options... them select Build CIA from file.
  • Your converted .cia file will be in the /gm9/out folder on the SD card.

Controls

A - Confirm prompts, select button (menus), Open submenu for files and open directories (main file view), Switch into edit mode (hexviewer)

R+A - Open submenu (on directories)

B - Cancel, Leave menus without action, Hold to cancel said file operations

X - Delete marked files, R+X to Rename files (main file view)

Y - Copy and paste files, R+Y to create folders and dummy files (main file view)

L - Mark file

L+Right/Left - Mark/unmark all files in a folder

L(hold)+Up/Down - Select multiple files

R - Switch buttons to their secondary function

R+L - Screenshot (works almost anywhere)

R+Left/Right - Switch panes

R+Down - Reload the file listing

Start - Reboot from GodMode9, R+Start to poweroff 3DS

Select - Clear or restores the clipboard (depending on if it's empty or not)

Home - Enter HOME menu, including the scripts/payloads submenus, options for formatting the SD, setting the RTC, etc

Power button - Enter HOME menu (alternative)

R+Up (at startup) - Pauses the GodMode9 boot so that you can stare at the splash screen for a little longer

R+Left - If you have installed GodMode9 as your bootloader, this keycombo enters the bootmenu when you hold on startup (if you built GodMode9 as SALTMODE and have it as a bootloader, the keycombo is simply the Start button)

Screenshots

godmode93.png godmode94.png

godmode95.png godmode96.png

Media

How to Use Godmode9 - to "Dump 3DS Carts to CIA files" & Keep Saves! (Digitally Backup Cartridges) (GameInCanada)

Changelog

v2.1.1

  • [improved] Improved installation of DSiWare games (thanks @Epicpkmn11).
  • [scripting] Faster script loading as well as other improvements and fixes (thanks @aspargas2).
  • [fixed] Fixed a nasty bug when trimming certain DS cart dumps.
  • [fixed] Some smaller bugfixes and general code maintenance.

v2.1.0

  • [new] Unicode support, including a special Unicode font created for GodMode9 (@Epicpkmn11).
  • [new] Support for mounting certs.db, including improvement of certs handling (@luigoalma).
  • [new] Support for SHA-1 checksums (@aspargas2).
  • [new] Raw cart dumper, accessible via R+A on cart drive.
  • [improved] Wider support for flash chips on carts, including ir (@dratini0).
  • [scripting] SDSIZE, SDFREE and NANDFREE global variables.
  • [scripting] Added cartdump command.
  • [fixed] Numerous bugfixes and small improvements, too many to list.

v2.0.0

  • [new] Completely revamped title info, with special info for installed titles, TMDs and CIAs.
  • [new] Initial CARD2 save read support for carts (thanks @dratini0).
  • [improved] Title manager now includes a ticket dumper.
  • [improved] Release ntrboot FIRMs now include scripts (thanks @gholms).
  • [improved] Software keyboard now includes firstrun instructions.
  • [improved/fixed] Various smaller visual improvements and bugfixes.

v1.9.3pre1

  • [new] Completely rewritten MCU event handler (fixes a lot of stuff) (thanks @Wolfvak).
  • [new] Ability to install, build CIA from, verify, identify DSi CDN content (read below).
  • [new] Title manager available via HOME menu (read below).
  • [new] NDS carts can be dumped with secure area encrypted (thanks @mariomadproductions for testing).
  • [new] Gamecart drive G:/ now includes an info text file (thanks @GerbilSoft).
  • [new] Tickets can now be verified, installed and identified.
  • [new] Trimming functionality for GBA rom dumps.
  • [improved] Improved title info functionality, now compatible with more files.
  • [improved] Several improvements to the GM9 MegaScript (thanks @aspargas2).
  • [improved] Several improvements to the game image installer.
  • [improved] Improved CIA builder, with stricter checks for legit builds.
  • [improved] Better handling of special cases in cart dumper (thanks @GerbilSoft).
  • [fixed] Proper seed handling when installing game images to the system.
  • [fixed] Countless smaller fixes and improvements, too many to list.
  • [scripting] 'install' command for installing game images to system.
  • [scripting] Quotes can be escaped (\") in variables.

v1.9.2pre1

  • [new] Mount support for title.db (thanks @aspargas2).
  • [new] Support for handling variable sized tickets (thanks @luigoalma).
  • [improved] Proper mount support for ticket.db (thanks @aspargas2).
  • [improved] Various improvements to the CIA builder, mostly for CIA from NCSD.
  • [improved] Tons of small performance improvements (thanks @Wolfvak).
  • [improved] Much smaller firm size (thanks @Wolfvak).
  • [fixed] Fixed screen init (for real this time) (thanks @Wolfvak).
  • [fixed] Tons of small bug fixes.
  • [preview] Possibility to install NCCH, NCSD (.3DS), DSiWare NDS, CIA, NUS/CDN to the system.

v1.9.1

  • [new] On verification, offer fixing for badly decrypted NCCH/NCSD.
  • [improved] Much faster scrolling speeds in wordwrapped text view.
  • [improved] Largely improved method of GBA VC save injection (thanks @TurdPooCharger).
  • [fixed] Fixed the .BPS code in scripting (thanks @Wolfvak).
  • [fixed] Fixed a crash in the DISA/DIFF handling code (thanks @aspargas2).
  • [fixed] Actually allow decrypting N3DS NATIVE_FIRM on O3DS.
  • [fixed] Last search drive is back again.
  • [fixed] Cart drive checking (don't show empty when it isn't).
  • [fixed] Notification light handling.

v1.9.0

  • [new] Touchscreen support, used for keyboard (manual calibration is possible, but not required).
  • [new] LED support, signaling finished operations when the shell is closed.
  • [new] Detecting shell opened/closed, turn off display to save battery.
  • [new] Brightness configuration (in HOME menu).
  • [new] Support for mounting, reading and writing DISA and DIFF (.db) files (thanks @aspargas2).
  • [new] Allow setting attributes for directories.
  • [new] Read and write support for gamecart saves (thanks @dratini0).
  • [improved] Completely rewritten ARM11 core.
  • [improved] Countless under-the-hood improvements thanks to @Wolfvak.
  • [fixed] A metric fuckton of bugfixes (quoting @Wolfvak here).
  • [scripting] Allow game icons as preview.

Revision changelog.

Credits

This tool would not have been possible without the help of numerous people. Thanks go to (in no particular order):

  • Archshift, for providing the base project infrastructure.
  • Normmatt, for sdmmc.c / sdmmc.h and gamecart code, and for being of great help on countless other occasions.
  • Cha(N), Kane49, and all other FatFS contributors for FatFS.
  • Wolfvak for ARM11 code, FIRM binary launcher, exception handlers, PCX code, Makefile and for help on countless other occasions.
  • SciresM for the help on figuring out RomFS and for boot9strap.
  • SciresM, Myria, Normmatt, TuxSH and hedgeberg for figuring out sighax and giving us access to bootrom.
  • ihaveamac for first developing the simple CIA generation method and for being of great help in porting it.
  • wwylele and aspargas2 for documenting and implementing the DISA, DIFF, and BDRI formats.
  • dratini0 for savefile management, based on TWLSaveTool.
  • b1l1s for the help on figuring out A9LH compatibility.
  • Gelex and AuroraWright for the help on figuring out various things.
  • stuckpixel for the new 6x10 font and help on various things.
  • Al3x_10m for help with countless hours of testing and useful advice.
  • WinterMute for helping with his vast knowledge on everything gamecart related.
  • profi200 for always useful advice and helpful hints on various things.
  • windows-server-2003 for the initial implementation of if-else-goto in .gm9 scripts.
  • Kazuma77 for pushing forward scripting, for testing and for always useful advice.
  • TurdPooCharger for being one of the most meticulous software testers around.
  • JaySea, YodaDaCoda, liomajor, Supster131, imanoob, Kasher_CS and countless others from freenode #Cakey and the GBAtemp forums for testing, feedback and helpful hints.
  • Shadowhand for being awesome and hosting my nightlies.
  • Plailect for putting his trust in my tools and recommending this in The Guide.
  • SirNapkin1334 for testing, bug reports and for hosting the original GodMode9 Discord server.
  • Lilith Valentine for testing and helpful advice.
  • Project Nayuki for qrcodegen.
  • Amazingmax fonts for the Amazdoom font.
  • The fine folks on the official GodMode9 IRC channel and Discord server.
  • The fine folks on freenode #Cakey.
  • All 3dbrew.org editors.

External links

Advertising: