[Release] GodMode9 Scripts Megathread

Discussion in '3DS - Homebrew Development and Emulators' started by 8BitWonder, Aug 25, 2017.

  1. Leafgreen26

    Leafgreen26 GBAtemp Regular

    Member
    4
    Jul 17, 2017
    United States
    I think that we all need to give this man a round of applause. Not only for the countless hours it must have taken him to discover and verify all of this, but because of how long it must have taken him to type and format this entire post all for the purpose of infroming us to practice safe injecting, among a lot of other things. Also, you should probably add a TL;DR.
     
    Nutez and TurdPooCharger like this.
  2. TurdPooCharger

    TurdPooCharger Meh

    Member
    11
    Jan 1, 2018
    United States
    I'm on it. Still editing the post as I go.
     
  3. Leafgreen26

    Leafgreen26 GBAtemp Regular

    Member
    4
    Jul 17, 2017
    United States
    Damn dude. Just damn. :)
     
  4. TurdPooCharger

    TurdPooCharger Meh

    Member
    11
    Jan 1, 2018
    United States
    Re-posted as it'll probably make its way here. I'll pass due to lack of title key expertise.

    https://github.com/d0k3/GodMode9/issues/342
     
  5. d0k3

    d0k3 3DS Homebrew Legend

    Member
    13
    Dec 3, 2004
    Germany
    Something else entirely - as a lot of ou may have noticed, GM9 scripting is in some dire need for proper documentation. I think a Wiki may be a good way to solve this, so I set up this GitHub issue to discuss the further course of action. Maybe some of you guys are willing to help me with that. To be honest, you guys do actually know more about the scripting quirks than me :D.
     
    8BitWonder likes this.
  6. TurdPooCharger

    TurdPooCharger Meh

    Member
    11
    Jan 1, 2018
    United States
    Homebrew Checker

    Credit goes to:
    • @d0k3 - For fulfilling my very niche command request. And to boot, he did it in a really quick too quick neck breaking pace, workaround time frame creating them. I wanted this, but now the keyboard bacons (yes, food bacon) for moAr GM9 scripts. Argrghgugghh!! :cry:
    • TitleDB.com - For the supplied information
    ... What is it this time? This better be good.
    Presenting a script no one was asking for in the first place and probably almost no one needs or wants either:
    • Homebrew Checker.gm9
    This script was written to test and validate two new gm9 script commands, fget and fset, in the guise of checking your CIA files against a homebrew database.

    If your selected CIA file is a known homebrew title, you get output information about its Name, Description, Author, Title ID, and Product ID. If it's not a known homebrew title, you're either warned what kind of CIA file it is, or that the selected title is unknown if it's a legitimate game/title-type CIA.

    You wrote this just to mess around with two commands? KISS, learn it.
    Sometimes the easy way is great if you're in a pinch. This was created as a means to be creative in testing out those new commands as normal testing procedures, IMO, can be a real chore. I wanted to put them to real practice while cooking up a script that might be useful to some 3DS users.

    And if that wasn't thorough or stringent enough for controlling testing variables, a second test script was eventually written in making sure fget and fset weren't doing anything they weren't suppose to. You can find that other one over at GM9 GitHub here (look for fget_fset_debug.zip), which is better in studying how these new commands work.

    Lastly, the real tertiary reason I wrote this is, you guessed it, for another gm9 script. Details of why this script was created can be read starting at post #992 here.

    Hey! Your script is broken. This doesn't work on GodMode9 v1.6.3.
    Stable v1.6.3 release don't have fget and fset command. You'll need the latest nightly found here. There's a good chance the official debut of these two commands will find their way in the v1.6.4 release.
     

    Attached Files:

    d0k3 likes this.
  7. matt!

    matt! GBAtemp Fan

    Member
    4
    Nov 20, 2009
  8. TurdPooCharger

    TurdPooCharger Meh

    Member
    11
    Jan 1, 2018
    United States
  9. matt!

    matt! GBAtemp Fan

    Member
    4
    Nov 20, 2009
    Thanks I used Cthulhu app
     
  10. twithtots

    twithtots Newbie

    Newcomer
    1
    Jul 27, 2018
    United States
    I've scoured this post ... hopefully all of it as best that I can ... and haven't been able to see an answer. Is there a script to dump all installed SD titles at once to CIA's? Or are we stuck having to do them one at a time? I'm very sorry if I missed this in the thread here.

    Thanks!
     
  11. TurdPooCharger

    TurdPooCharger Meh

    Member
    11
    Jan 1, 2018
    United States
    Oh, you sweet summer child. Lol.

    Hold the L-shoulder button and highlight select everything in yellow to do mass CIA building.
     
  12. SirBlueVFX

    SirBlueVFX Newbie

    Newcomer
    1
    May 6, 2017
    Venezuela
    Venezuela
    Add this.

    It is to verify the version of SigHax / Boot9Strap.
    Thanks.
     

    Attached Files:

    Last edited by SirBlueVFX, Aug 26, 2018
    NFates, TurdPooCharger and 8BitWonder like this.
  13. 8BitWonder
    OP

    8BitWonder Small Homebrew Dev

    Member
    10
    Jan 23, 2016
    United States
    47 4F 54 20 45 45 4D
    Added, thank you for this. :)
    I was hoping someone would make either a tool or script to do this for some time.
     
    matt! and SirBlueVFX like this.
  14. TurdPooCharger

    TurdPooCharger Meh

    Member
    11
    Jan 1, 2018
    United States
    Leaving this here since I haven't figured out if GodMode9 already has a built-in feature that does this or if an automated method is feasible in coding.

    For anyone who wants to tackles writing a GM9 script that batch converts RAW Villain3DS downloads into CIA.

    There's a way to convert a single title with an output name as tmd.cia

    I'm not quite sure how to go about outputting multiple titles with unique names.

    Example
    Folder with Title ID 0004008c001bc600 outputs in gm9/out as 0004008c001bc600.cia

    ****

    I'm sitting out on this one due to a backlog of projects. Have fun with it!

    Edit - This script would be really niche because of the end of CDN downloaders and rarity of raw precursor CIA files. Probably not a long term usage of a gm9 script.
     
    Last edited by TurdPooCharger, Sep 13, 2018
  15. TurdPooCharger

    TurdPooCharger Meh

    Member
    11
    Jan 1, 2018
    United States
    CTRTransfer (Type D9)

    Credit goes to:
    • @d0k3 - The CTRTransfer from both GodMode9 and Decrypt9WIP are the foundations that this script is built upon.
    • @Quantumcat - Helped saved the day solving someone's terribly softbricked o2DS with the power of Decrypt9.
      • This led to learning firsthand what those differences are between the two programs in how they perform it.
      • She also shared the title id for Nintendo 3DS Camera for AUS region.
    • @AnalogMan - His Lazarus3DS and related NAND gm9 scripts are major influences in understanding key aspects about 3DS firmware recovery.
    • @Namesnipe - Shared the neat knowledge that individual tickets can be backed up from the ticket.db.
    • @CodyWGamer - Showcased that the [S:] SYSNAND VIRTUAL isn't something to be trifled with if one does not treat that drive with caution and care.
    • @KleinesSinchen - Demonstrated and verified that the twln.bin and twlp.bin partitions can be super bricked.
      • This interesting knowledge was the final piece of the puzzle in making this script possible by showing that parts of the NAND are manually reflashable (perhaps too easily).
    • BpyH64 - Found a way to quickly install 3DS titles using dummy CIAs. I borrowed his idea from the .cmd CMACs research.
    • And many partners in crime busting all sorts of 3DS bricks and issues. While we can't fix them all, we sure as hell do solve a lot of 'em.
    ***
    ***

    Here's a detailed crash course about this subject:
    TL;DR - Basically, CTRTransfer is like a universal SysNAND image used for recovering from softbricks and region changing the firmware.
    If you're familiar with computer operating systems, this is similar to Windows Recovery and Mac Time Machine (?).

    ***

    What is this?
    This is a gm9 script for performing a variation of Decrypt9 CTRTransfer. Homebrew 3DS users are likely to be more familiar with standard or (built-in) GodMode9 CTRTransfer. While both types are used for repairing or region changing the 3DS firmware, there are stark differences in how they go about changing or correcting the CTRNAND.

    Decrypt9 Method
    • A few console unique files such as the movable.sed, configsave.bin, LocalFriendCodeSeed_B, and SecureInfo_A/B are first extracted from the CTRNAND drive. Afterwards, Decrypt9 (the program) flashes the entire raw donor CTRNAND *.bin image file onto the CTRNAND partition. Those backed up files are moved back in the drive to their respective locations and CMAC hash corrections are done throughout such as for the *.db datebase files and user's extdata + sysdata.
    GodMode9 Method
    • GodMode9 (the program) selectively replaces only the titles folder and *.db files. This is to surgically fix the broken system apps while keeping the rest of the user's personal and console unique files intact. Once these folders and files are replaced as needed, this is followed by CMAC hash corrections for those *.db files.
    To put this into a comparable life analogy of the two, GM9 CTRTransfer is like replacing worn houseware parts, patching holes for stone walls to a structurally sound but very old house, and renovating its dainty decorations, flooring, and walls. D9 CTRTransfer is like removing your furnishings and personal belongs out of the house, knocking that house down because it's deemed too decrepit, building a replica in its place, and then moving as much of your stuff back in, assuming you haven't forgotten leaving behind anything before the teardown.

    GodMode9 is the safer and less intrusive of the two while fixing most general softbricks. Although Decrypt9 is arguably more effective at dealing with severe softbricks, the older app's implementation fails to back up and restore crucial files such as hardware calibration HWCAL0.DAt and HWCAL1.DAt, personal legit tickets, and [seed|nag|friend|nnid|etc.]save.bin.

    With those differences in mind, this script was created with the goal of combining the Decrypt9 approach of flashing a clean slate CTRNAND drive while also maintaining as much of the user's original setup like that of GodMode9.


    Bricks that this can fix.
    1. Files and folders that are partially or fully deleted off the [1:] SYSNAND CTRNAND.
      • For whatever reason, the 3DS or 2DS system you have had its setup accidentally erased. Perhaps you bought/received yours prehacked from a previous owner who was neglectful. As long as something called the essential.exefs is present and has not been tampered with, it's possible to create a fresh firmware setup.
      • Empty CTRNAND.
    2. The [1:] SYSNAND CTRNAND is missing.
      • Let's imagine you experienced a catastrophic softbrick which required remedying the issue by restoring the SysNAND with a personal image backup. However, luck would have it that the one and only SysNAND *.bin image you kept was trashed by an unknowingly fake SD card. To add further insult to injury, during your restoration of the corrupted image, your system has a very old and untrustworthy battery that dies on you during mid-restore. This incident bricks the CTRNAND partition where GodMode9 doesn't even acknowledge the presence of the drive. Again, this is recoverable so long as the essential.exefs is present and hasn't been tampered with.
      • Missing CTRNAND.
    3. Strange '?' files that are stubbornly stuck in CTRNAND or cannot be deleted/replaced by conventional means.
      • Despite H2testw checking the SD card for issues, updating the custom firmware & 3DS firmware, and troubleshooting for any and all hardware issues, your system has unexplainable boot issues, poor GUI functionality, or random crashes. You (surprise, surprise!) don't have the benefit of a clean, backed up SysNAND *.bin image to recovery from. Attempts at using standard CTRTransfer are not providing favorable results. You may very well have a broken file allocation table at hand. If those damaged files are limited to replaceable or non-unique items, this script will try maintaining anything that's salvageable.
      • 2DS softlocks or crashes when trying to launch anything from the home menu [post #84]
      • The '?' files.

    Safety Features & Process Overview

    This script...
    1. Checks against itself if GodMode9 is a recent enough version that's capable of using these script functions:
      • Code:
        fget
        fset
    2. Determines if the system in question can be identified as either "Old" or "New" before proceeding.
    3. Exits out much earlier and mentions if CTRNAND images are missing at the specified input directory.
      • Update March-21-2019: Version 1.1 allows you to continue using the script with a reminder instead of a hard exit.
    4. Asks upfront for write permissions to work in the [1:] SYSNAND CTRNAND and [S:] SYSNAND VIRTUAL/ctrnand_full.bin.
    5. Looks for the accompanying *.sha file that's goes with the CTRNAND *.bin image.
    6. Verifies that the *.sha file is of the correct size and acceptable region code.
    7. Spot checks two offsets to determine whether the CTRNAND image is the correct FULL kind versus FAT/unknown.
    8. Rejects the selected CTRNAND image if it's meant for the other system type (O3DS vs N3DS).
    9. Measures the CTRNAND image size to make sure it's the correct exact size for the system type.
    10. Measures the size of S:/ctrnand_full.bin to see if it's the expected partition size.
    11. Mounts the CTRNAND image to check that it is an intact image.
    12. Writes a 1 GB dummy file onto the SD card and then deletes it so that there's enough free space to work with.
    13. Compares CTRNAND image hash against its *.sha file.
    14. Backs-up the user's entire CTRNAND setup, except for the titles folder.
    15. Backs-up the DSiWare titles as CIA and save files.
      • CTRTransfer makes TWLN titles forgotten due to changing out the title.db.
    16. Flashes the CTRNAND image to S:/ctrnand_full.bin without the option to cancel.
    17. Backs-up the system tickets from the donor CTRNAND image.
      • This is done to keep the user's original ticket.db.
    18. Deletes the donor's essential files in preparation of cleanly restoring the user's setup.
    19. Restores the user's setup back to the CTRNAND drive, except for certain *.db files.
    20. Image mounts the backup essential.exefs and restores any of these five if missing.
      • LocalFriendCodeSeed_B, HWCAL0.DAt, HWCAL1.DAt, movable.sed, SecureInfo_A
    21. Examines the SecureInfo_A|B against the *.sha file if region changing is undertaken.
    22. If region changing is intended, defaults _A, creates & edits _B and copies _B to _C.
      • A - original, B - region edited (for Recovery Mode), C - a copy of B (for HOME Menu)
    23. Fixes the entire 1:/ drive's CMACs.
    24. Asks to Rosalina menu inject Homebrew Launcher to Nintendo 3DS Camera.

    Instructions

    1. Copy everything off your SD card onto a computer.
    2. Reformat the card in [FAT32 format | 32 KB cluster size | Primary Partition | MBR disk] with Windows File Explorer, guiformat if bigger than 32 GB, or MiniTool Partition Wizard (free edition).
    3. Test the empty card for hardware problems with H2testw (Windows), F3 (Linux), or F3X (Mac).
      • :!: A fake or faulty SD card will cause a secondary brick where the user's setup is permanently corrupted when backed up.
    4. Delete the *.h2w test files if the card checks out fine. If the card was found to have issues, replace it and go back to step 1.
    5. Either move back your main setup or create a temporary test setup on the card.
      • (1) (Optional) Here's a starter kit for reference and convenience.
      • (2) Your setup must have GodMode9 (v1.8.0 or newer) and the 3DSX versions of FBI, faketik, and Cthulhu.
      • (3) The script requires a minimum 1 GB of free space.
    6. Put the CTRTransfer files of choice at:
      • sdmc:/gm9/in/11.5.0-38X_ctrtransfer_x3ds.bin
      • sdmc:/gm9/in/11.5.0-38X_ctrtransfer_x3ds.bin.sha
    7. Put the script at:
      • sdmc:/gm9/scripts/CTRTransfer (Type D9).gm9
    8. Unless it's really bad, backup the SysNAND for extra safety even if it is currently bricked.
    9. GodMode9 → (HOME) button → Scripts...CTRTransfer (Type D9).
      • The rest of the script will be self-explanatory.
    10. During script run, :!: do not press and hold the (B) button when the DSiWare games are being dumped and especially for the system tickets.
      • These are the two sections I could not idiot proof. If you try to cancel building a DSiWare CIA, it'll ask you to try again with the choice to cancel. For the system tickets, the script will fail to completely mount ticket.db.
    11. If region changing the 3DS firmware and there are no system titles shown in HOME Menu, launch the camera applet → Nintendo 3DS Camera → Homebrew Launcher.
      • If you choose to Rosalina menu inject it yourself...
    12. Install the system tickets and DSiWare CIAs with FBI. Restore tickets for nonlegit titles with faketik. If you have a lot of games, unwrap them all with Cthulhu.
      • FBI, faketik, Cthulhu
    13. Update to the latest firmware version in Recovery Mode or System Settings.
    14. Go back to the script to restore the DSiWare saves.
    15. See if the DSiWare games launch with their saves. Check if DS(i) mode is broken. You may need to follow up with:
      • [3ds.hacks.guide] DSi / DS functionality is broken after completing the guide *
      • * March-12, 2019: At the time of writing this, the hacks.guide has/had outdated CIAs for the Old 3DS TWL_FIRM and New 3DS TWL_FIRM.
      • For firmware 11.9.0-42, look in FBI → Titles. The TWL_FIRM should be:
        • 0004013800000102
          • Old_3DS TWL_FIRM
          • Version: 10864 (10.39.0)
          • Product Code: CTR-P-CTAP
        • 0004013820000102
          • New_3DS TWL_FIRM
          • Version: 10962 (10.45.2)
          • Product Code: CTR-P-CTAP
      • If the TWL_FIRM was found to be outdated, try again in updating the firmware in System Settings or Recovery Mode even if it is already on 11.9.
      • Update April-27, 2019: CIA copies of the other four (4) TWL system titles can be obtained at https://quantumcat1.github.io/troubleshooting.
        • 00048005484E4441
          • DS Download Play
          • Version: 1024 (1.0.0)
          • Product Code: dlplay
        • 0004800542383841
          • Nintendo DSi™
          • Version: 2048 (2.0.0)
          • Product Code: DS INTERNET
        • 0004800F484E4841
          • Nintendo DS Cart Whitelist
          • Version: 11264 (11.0.0)
          • Product Code: <blank>
        • 0004800F484E4C41
          • TWL Version Data
          • Version: 0 (0.0.0)
          • Product Code: <blank>

    FBI errors 0xD8E08066 and 0xD8E0806C
    • 0xD8E08066 - The system tickets may fail to install due to something called the certs.db (certificates). Your setup at one point either corrupted it or erased & regenerated that file with a dummy nonfunctional copy. A replacement copy borrowed from the CTRTransfer image would then be required. The script can replace that file if you come across this issue. Do not use this option if the problem doesn't exist; certs.db is partially involved with transiting 3DS online play.
      • 0xD8E08066 - Tickets
    • 0xD8E0806C - The backed up DSiWare titles may fail to install. This is likely to occur if the CTRTransfer was used to region change the firmware. To fix this, install a different DSiWare *.cia file that's not from that backed up set. I have no clue why this hiccup occurs...
      • 0xD8E0806C - DSiWare CIAs

    Additional Features:


    Finding and restoring the KeyY.

    If you have the Nintendo 3DS folder backed up from a previous profile that was removed from (1) Format System Memory and (2) NOT involved in a System Transfer, this script can brute force up to 256 iterations finding the lost KeyY in the movable.sed linked to a specific <ID0> subfolder. To read more how this works,
    Assuming the rest of the KeyY string is correct, finding the 0x118 hex counter that matches the target <ID0> can take up to 1.5 hour to complete or as little as 1 minute. This depends on the search order (this script looks backwards, ex: 03 → 02) versus value of the "correct" hex counter relative to the starting search value (ex, "correct" value is 04 but script is looking backwards, which will take a long time to find and calculate).

    Update March-21-2019:
    Version 1.1 includes backing up the user's original sysnand ctrnand data profile if the KeyY is fixed. :!: Changing the KeyY will automatically delete the 1:/data/<ID0> that's in place due to mismatch in encryption upon the next HOME Menu boot. This would force the user to create a new profile. The script provides the option to correct the 1:/data/<ID0> to the new KeyY. However, certain previous items like Friends List will be corrupted; the Friend Code is directly derived from KeyY.

    Update May-21-2019: Version 1.3 does bi-directional searching where it splits the effort in looking both backwards (ex: 03 → 02) and forwards (ex: 03 → 04). There is now the option to quit the search run by pressing and holding the (B) button long enough. A 200 MB free space safety check was implement in case the data folder is backed up.


    ***

    Backing up the DSiWare CIAs and saves only.
    Update March-21-2019: Version 1.1 - You can use this script for the ease of moving or importing nonlegit DSiWare titles and their saves involved in System Transfer or library duping.
    Update April-27-2019: Version 1.2 - The TWL system titles are no longer backed up in order to prevent reinstalling bad copies. This is to prevent bricking the DS mode with fake tickets.
    Update May-21-2019: Version 1.3 - Saves are no longer restored by mass dumping everything so as to not leave behind orphaned files. Saves are individually restored by cross checking for installed titles.


    ***

    Relisting or rebuilding the 3DS database files.

    In the event the title.db and import.db found in 0:/Nintendo 3DS/<ID0>/<ID1>/dbs are corrupted, all games, DLCs, and updates would be forgotten.
    • HOME Menu: <blank>
    • System Settings → Data Management → Nintendo 3DS → [Software|Downloadable Content]: <blank> | For missing tickets, this can be fixed with faketik.
    • FBI → Titles: SD titles in green do not appear.
    • GodMode9: They can still be found when doing [A:] SYSNAND SD → Hold (R)-shoulder and press (A) Search for titles...
    • Signs of Damaged Database

    You can rebuild the list with one of these three options.
    • Option (A) - Quick
    • Option (B) - Full
    • Option (C) - Manual

    :!: General Warnings
    1. (Re-)installing a CIA over a previously installed game will overwrite and delete its save currently in place. The Rebuild 3DS Database options were designed to fix the import.db and title.db without losing the saves and to keep whatever legit tickets you might have acquired from real Nintendo eShop purchases and updates.

    2. During the options' script runs, do not press the (B) button. There is no way to idiot proof the CIA building process. If you press (B) button, you are forced to manually rebuild those titles into CIAs if they were interrupted. Just plug the 3DS system to a AC charger, flip the clam shell closed to let the script do its thing, and leave it alone. Except for Option (C) and if everything goes smoothly without error, the script will turn off the 3DS/2DS to let you know to move onto the next part.

    3. Each option has two parts (1 - starting , 2 - finalizing) with an intermediate step of installing CIAs. Do not mix and match the parts between different options.

    4. Certain games have anti-cheat save protection that will erase itself if tampering or swapping is detected.
    Two well known examples include:
    • Animal Crossing: New Leaf (including Welcome Amiibo edition)
    • Super Smash Bros. for 3DS
    To bypass or reset the secure value, either:
    • (1) Backup & restore the saves with Checkpoint/JKSM.
    • (2) Delete the secure values for games that are known to have this using FBI. Do not try to delete the secure value for games that don't have it.
    • Deleting secure value in FBI.

    # ~ # ~ #

    Option (A) - Quick
    The fastest of the three where dummy CIAs are generated, and all installed titles (saves included) are relocated offside to a temporary title_<ID0> folder. Once the dummy CIAs are installed:
    1. The original ticket.db is restored to keep the user's real tickets in place.
    2. To prevent accidental reinstallations of the dummy CIAs, the cias (dummy)_<ID0> folder is deleted.
    3. The titles are moved back to the title folder.
    4. Their individual *.cmd header CMACs are corrected.
    :!: A minimum 256 MB of free space is required when making the dummy CIAs.
    :!: Installing dummy DLCs with lots of contents can make FBI appear to crash or become stuck frozen. However, the progress is rather really slow for these titles. Look at the top row's moving clock for proof; be patient and don't force shut off!
    :!: The sizes and blocks will be reported wrong in FBI and System Settings. There's no away around this annoyance except to use or redo rebuilding the database with one of the other two options.
    (Quick) vs (Full & Manual): sizes, blocks

    :teach: If curiosity got the better of you, where you completed both parts (1a) Generate Dummy CIAs and (2a) Restore Setup, and you want to restore your SD setup just like how it was before having started Option (A), this is entirely reversible with the backed up files found in dbs_cmd_<ID0> folder.
    I made a mistake using this... What to do?

    # ~ # ~ #

    Option (B) - Full
    This is the slowest option when rebuilding the database. Alongside with Option (C), however, the final reported sizes and blocks in FBI and System Settings will be correct. For each title that is successfully backed up as a CIA, its <TID LOW> subfolder within title/<TID HIGH> folder will be deleted. In case of errors, outside files and titles that aren't made into CIAs are not deleted but moved over to a collection title_<ID0> folder for your later examination. If found, saves are decrypted and extracted to a separate saves_<ID0> folder regardless if their parent games were built into a CIA.

    Once the CIAs are backed up, and the titles are reinstalled:
    1. The original ticket.db is restored to keep the user's real tickets in place.
    2. The saves are individually restored depending if the parent games were found to be reinstalled.
    :!: A minimum 4 GB of free space is required to account for building the largest possible CIAs.
    :!: To avoid misuse or misunderstanding, option (B) requires a certain action outside of the script. Read the option description on what to do before using (1b) Backup CIAs & Saves.
    :arrow: Unlike Option (A), the cias (proper)_<ID0> output folder is left alone. You can keep copies of those backed up CIAs on your computer.
    :arrow: If your SD card has less free space than the total amount of all the CIAs, use:
    • FBI → cias (proper)_<ID0><current directory> → Install and delete all CIAs

    # ~ # ~ #

    Option (C) - Manual
    In case your SD card does not have 4 GB of free space, or you already have all your games, DLCs, and updates previously backed up as CIAs, this option requires your due diligence supplying a 1-to-1 collection of CIAs for all the titles installed in the Nintendo 3DS folder. A simple installed_titles_list.txt can be cross referenced by TitleIDs against those found at:
    Once the saves are backed up, and the titles are reinstalled:
    1. The original ticket.db is restored to keep the user's real tickets in place.
    2. The saves are individually restored depending if the parent games were found to be reinstalled.
    :!: A minimum 512 MB of free space is required when backing up the saves.
    :arrow: Unlike Option (B), you're not tasked to do anything outside of the script.
    :arrow: The title folder will be left as-is once the saves are copied.
    :arrow: The two (2) DB files do not necessarily have to bad. While not recommended compared to Checkpoint or JKSM, you can use (1c) Backup Saves to extract copies of your (decrypted) saves. On a different 3DS system with a cloned SD setup, you can use the (2c) Restore Saves (with minor naming adjustments to saves_<ID0> folder) if you intend to import over the saves. Just make sure you remove the ticket.db out of saves_<ID0> if the saves are going on a different system!!

    ***

    Remapping the Rosalina menu button combo.
    If your 3DS system has broken buttons where the default { (L)-shoulder + (DOWN) d-pad + (SELECT) } can't be used, the combo can be remapped with one of these choices:
    • (L)-shoulder
    • (R)-shoulder
    • (Y)
    • (X)
    • (START)
    • (SELECT)
    • (UP) d-pad
    • (DOWN) d-pad
    Once you can gain access to Rosalina menu, change the combo preference:
    • Miscellaneous options... → Change the menu combo → <input your new combo> → Save settings

    ***

    Some details of this script, what it does, and why. Ending comment.
    • For "best" case brick scenarios where nothing is missing, this script will only replace import.db, title.db, and titles folder.
    • In the 1:/ drive, only data, dbs, fastboot3ds, fixdata, private, ro, rw, ticket, title, tmp, __journal.nn_, and boot.firm will be backed up. Everything else will be overwritten/deleted.
    • The user's original ticket.db is kept in place so that personal legit tickets can still be individually dumped if the user chooses to do so later.
      • GodMode9 does not appear to recognize personal legit tickets installed on a different or replacement ticket.db.
    • However, universal legit tickets like system titles can be installed on any ticket.db and still be recognized by GodMode9 .
    • Due to the two bulletin points above, this is the reason why Homebrew Launcher is injected in Nintendo 3DS Camera in order to install those system tickets in a round about way.
      • With that said, this script isn't appropriate for those region changing the firmware with broken shoulder buttons and broken cameras.
    • Anyone examining the script's code might be baffled as to why certain sections may seem very redundant. Let's just say trial and error has made this deliberately overprotective as possible.
    • This script wasn't made with speed in mind. Besides, repairing a firmware softbrick isn't a race. Much of the script has comments with pauses so anyone using the script can know what's going on at a given moment.
    • While I hope this script finds good use to those who may need it, I also wish that no one finds himself or herself of having to do so in the first place. But, shit happens.
     
    Last edited by TurdPooCharger, May 26, 2019
    annson24, NFates, Eix and 7 others like this.
  16. Quantumcat

    Quantumcat Dead and alive

    Moderator
    20
    GBAtemp Patron
    Quantumcat is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Nov 23, 2014
    Australia
    Canberra, Australia
    Very impressive, nice work!!
     
  17. KleinesSinchen

    KleinesSinchen The backup reminder

    Member
    7
    Mar 28, 2018
    Germany
    @TurdPooCharger
    Don't know what to say to this. Speechless. So I just repeat:
    Will try to read (and maybe understand?) the script later today.
     
    TurdPooCharger likes this.
  18. CodyWGamer

    CodyWGamer GBAtemp Regular

    Member
    2
    Dec 10, 2018
    United States
    glad to be your test monkey XD



    EDIT: So what can i do with this new software now? I managed to install it and now i want to know what else it's capable of... I read your WHOLE thread and want to know what else it can do... can it MCU unbrick my ds mode
     
    Last edited by CodyWGamer, Mar 13, 2019
  19. TurdPooCharger

    TurdPooCharger Meh

    Member
    11
    Jan 1, 2018
    United States
    To be clear, the script is technically an add-on to the actual software, GodMode9. Because you already attempted a specialized form of (CTR+TWL)Transfer that's closely related to D9 CTRTransfer, this script won't fix your very strange DS(i) mode brick. As was explained in PM, MCU bricks (if assuming yours is MCU related) is for all intents and purposes, permanent and not fixable.
     
  20. NFates

    NFates Wants to understand™

    Member
    6
    Mar 13, 2016
    Dominican Republic
    Probably home.
    Almost two days late, but...
    I tried my best to understand all the technicalities. The fact I think I did so with most shows the write-up (your nightmare) was a success. So,
     
    Last edited by NFates, Mar 15, 2019 - Reason: Added a comma because I'm picky
    Quantumcat and TurdPooCharger like this.
Loading...