Custom Install 3DS: Difference between revisions

From GameBrew
No edit summary
m (Text replacement - "|discussion=" to "|donation=")
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox 3DS homebrew
{{Infobox 3DS Homebrews
| title = Custom Install
|title=custom-install
| image = https://dlhb.gamebrew.org/3dshomebrew/backup-your-3ds-sd-card-data-now.jpg|250px
|image=Custominstall5.png
| type = Utilities
|description=Install CIAs to a Nintendo 3DS SD card entirely on PC.
| version = af2bb12
|author=ihaveamac
| licence = Mixed
|lastupdated=2021/07/08
| author = ihaveamac
|type=File Operation
| website = https://gbatemp.net/threads/custom-install-install-cias-to-a-nintendo-3ds-sd-card-entirely-on-pc.551496/
|version=2.1
| download = https://dlhb.gamebrew.org/3dshomebrew/custom-install-af2bb12.rar
|license=Mixed
| source = https://dlhb.gamebrew.org/3dshomebrew/custom-install-af2bb12.rar
|download=https://dlhb.gamebrew.org/3dshomebrews/custominstall.7z
|website=https://gbatemp.net/threads/custom-install-install-cias-to-a-nintendo-3ds-sd-card-entirely-on-pc.551496
|source=https://github.com/ihaveamac/custom-install/releases
|donation=https://ihaveahax.net/view/Donations
}}
}}
<youtube>-</youtube>
custom-install is a Python 3.6+ tool that will install CIA files to a Nintendo 3DS SD card entirely on a PC. This completely bypasses the slow wireless and I/O speeds of the hardware.


=custom-install=
It was initially created late June 2019 as an experimental script to automate the process of a manual title install for Nintendo 3DS.
Experimental script to automate the process of a manual title install for Nintendo 3DS. Originally created late June 2019.


== Summary==
==Installation==
1. Dump boot9.bin and movable.sed from a 3DS system.
===Requirements===
* [https://github.com/ihaveamac/3DS-rom-tools/wiki/SeedDB-list seeddb.bin] - Required for newer games (2015+) that use seeds.
* [https://ihaveamac.github.io/dump.html boot9.bin and moveable.sed] - Dumped from a 3DS system.
* [https://github.com/ihaveamac/custom-install/releases/download/v2.1b4/custom-install-standalone.zip custom-install-standalone] - For Windows user, it includes GUI for simpler process and custom-install-finalize.
* [https://github.com/ihaveamac/custom-install/archive/module-newer-gui.zip custom-install-module] - For Windows/macOS/Linux user, to be used with Python (or setup your own GUI).
* [https://github.com/ihaveamac/custom-install/releases/download/v2.1b4/custom-install-finalize.3dsx custom-install-finalize] - Installs a ticket, plus a seed if required. Provided as a separate download primarily for non-Windows users.


2. Install pycryptodomex:
===Setup for Linux===
* Linux users must build [https://github.com/wwylele/save3ds wwylele/save3ds] and place save3ds_fuse in <code>bin/linux</code>.
* Install [https://www.rust-lang.org/tools/install rust using rustup], then compile with: <code>cargo build</code>. The compiled binary is located in <code>target/debug/save3ds_fuse</code>, copy it to <code>bin/linux</code>.
* (Optional) [https://github.com/ihaveamac/custom-install#gui-setup GUI setup].


* Windows: `py -3 -m pip install --user --upgrade pycryptodomex`
===Building standalone===
* Using a 32-bit version of Python is recommended to build a version to be distributed. Please refer to the [https://github.com/ihaveamac/custom-install#building-windows-standalone readme from repo].


* macOS/Linux: `python3 -m pip install --user --upgrade pycryptodomex`
==User guide==
===Usage summary===
* Use custom-install on your laptop/pc and install titles onto the micro SD (with boot9+movable).
* After it's finished, re-insert to 3DS and run custom-install-finalize at the end to insert the ticket and seed for it to show on the Home Menu.
* You can use the Windows standalone with GUI for simpler process, or setup your own enviroment (for Windows 32/Linux/macOS).


3. Download the repo ([zip link](https://github.com/ihaveamac/custom-install/archive/master.zip) or `git clone`)
===Windows standalone===
* Extract custom-install and copy over custom-install-finalize.3dsx to the 3ds folder on your SD card.
* Run ci-gui to bring up the custom-install GUI.
* Select your SD card root, boot9, seeddb, and movable.sed files (in some cases these will be automatically selected for you).
* Add the CIA files and click <code>Start install</code>.
* Once it's finished, start up the Homebrew Launcher and run custom-install-finalize to finish the process.


4. Run `custom-install.py` with boot9.bin, movable.sed, path to the SD root, and CIA files to install (see Usage section).
===With installed Python===
* Download the [https://github.com/ihaveamac/custom-install/archive/module-newer-gui.zip repo] (or <code>git clone</code>) and extract custom-install.
* Download [https://github.com/ihaveamac/custom-install/releases custom-install-finalize.3dsx] and copy over to the 3ds folder of your SD card.
* Put boot9.bin, seeddb.bin and movable.sed to the root of the custom-install folder (see also [https://www.gamebrew.org/wiki/Custom_Install_3DS#Additional_notes Additional notes]).
* Paste the .cia files you want to install to the root of the custom-install folder.
* Install the packages:
** For Windows, double-click <code>windows-install-dependencies.py</code>
** Alternate manual method <code>py -3 -m pip install --user -r requirements-win32.txt</code>
** For macOS/Linux, <code>python3 -m pip install --user -r requirements.txt</code>
* Run <code>custominstall.py</code> with boot9.bin, movable.sed, path to the SD root, and CIA files to install:
** Use <code>-h</code> to view arguments. Insert the following code (with some examples below).
** <code>py -3 custom-install.py -b boot9.bin -m movable.sed --sd *yoursdcarddiskletter:\* *yourgamename*.cia *yourgamename*.cia</code>
** <code>py -3 custominstall.py -b boot9.bin -m movable.sed --sd E:\ file.cia file2.cia</code>
** <code>python3 custominstall.py -b boot9.bin -m movable.sed --sd /Volumes/GM9SD file.cia file2.cia</code>
** <code>python3 custominstall.py -b boot9.bin -m movable.sed --sd /media/GM9SD file.cia file2.cia</code>
* Wait for install. Once it's finished, start up the Homebrew Launcher and run custom-install-finalize to finish the process.


5. Download and use [custom-install-finalize](https://github.com/ihaveamac/custom-install/releases) on the 3DS system to finish the install.
'''Note:''' For Windows users, enabling Add Python 3.X to PATH is not required. Python is installed with the py launcher by default.


== Setup==
===Additional notes===
Linux users must build [wwylele/save3ds](https://github.com/wwylele/save3ds) and place `save3ds_fuse` in `bin/linux`.
movable.sed can be provided with <code>-m</code> or <code>--movable</code>.


movable.sed is required and can be provided with `-m` or `--movable`.
boot9 can be placed in one of the following places:
* <code>-b</code> or <code>--boot9</code> argument (if set)
* <code>BOOT9_PATH</code> environment variable (if set)
* <code>%APPDATA%\3ds\boot9.bin</code> (Windows-specific)
* <code>~/Library/Application Support/3ds/boot9.bin</code> (macOS-specific)
* <code>~/.3ds/boot9.bin</code>
* <code>~/3ds/boot9.bin</code>


boot9 is needed:
SeedDB is checked in order of:
* `-b` or `--boot9` argument (if set)
* <code>-s</code> or <code>--seeddb</code> argument (if set)
* `BOOT9_PATH` environment variable (if set)
* <code>SEEDDB_PATH</code> environment variable (if set)
* `%APPDATA%\3ds\boot9.bin` (Windows-specific)
* <code>%APPDATA%\3ds\seeddb.bin</code> (Windows-specific)
* `~/Library/Application Support/3ds/boot9.bin` (macOS-specific)
* <code>~/Library/Application Support/3ds/seeddb.bin</code> (macOS-specific)
* `~/.3ds/boot9.bin`
* <code>~/.3ds/seeddb.bin</code>
* `~/3ds/boot9.bin`
* <code>~/3ds/seeddb.bin</code>
 
If you get an error during installation, you'll have to manually delete the partially installed title from the SD card (Nintendo 3DS -> {id0} -> {id1} -> title -> {first half of Title ID} -> {second half of Title ID}), or delete other things to make enough space, then try again.
 
==Screenshots==
https://dlhb.gamebrew.org/3dshomebrews/custominstall3.png
https://dlhb.gamebrew.org/3dshomebrews/custominstall4.png
 
==Changelog==
'''custom-install 2.1 & finalize 1.6 2021/09/13'''


A [SeedDB](https://github.com/ihaveamac/3DS-rom-tools/wiki/SeedDB-list) is needed for newer games (2015+) that use seeds.
custom-install 2.1:
SeedDB is checked in order of:
* Installs are written to a visible temporary folder before being moved into place. If an install fails in the middle, it won't leave a half-written title buried in the Nintendo 3DS folder
* `SEEDDB_PATH` environment variable (if set)
* All titles are loaded and parsed at the beginning so a broken one won't stop the others
* `%APPDATA%\3ds\seeddb.bin` (Windows-specific)
* Title contents are verified during install and an error is shown if verification fails
* `~/Library/Application Support/3ds/seeddb.bin` (macOS-specific)
* Titles that succeeded and failed to be installed are shown at the end
* `~/.3ds/seeddb.bin`
* Free space is checked to make sure all titles can be installed
* `~/3ds/seeddb.bin`
* cifinish.bin is loaded and checked for corruption early (if it exists), which can happen if an issue exists on the SD card filesystem.
* CDN contents can be installed directly
* File list replaced with a column list that shows Title ID and title name, and is sorted alphabetically
* Show a warning if more than 300 applications (not all titles, but executable ones) are detected
* Create title.db and import.db if missing (#40)
* Auto-set boot9.bin and seeddb.bin if found in SD:/gm9/out (movable.sed was already detected this way): #43 Thanks @Jisxu!
* Show an error if id0 isn't found (#49)
* Force reading save3ds_fuse output as UTF-8 all the time (hopefully fixing issues on Windows systems that aren't set to English)
 
custom-install-finalize 1.6:
* Delete cifinish.bin if no errors occurred during ticket install.
* Skip installing tickets for titles that don't need it: #46 #47 Thanks @TimmSkiller.
 
'''custom-install 2.1b4 & finalize 1.6 2021/07/08'''
 
custom-install 2.1b4:
* Show 300 application warning with the cli script.
* This fixes a minor issue with an exception being raised at the end (but it didn't actually affect anything) [https://github.com/ihaveamac/custom-install/issues/42 #42]
* Auto-set boot9.bin and seeddb.bin if found in SD:/gm9/out (movable.sed was already detected this way) [https://github.com/ihaveamac/custom-install/pull/43 #43] Thanks @Jisxu.
* Force reading save3ds_fuse output as UTF-8 all the time.
* This should hopefully fix [https://github.com/ihaveamac/custom-install/issues/41 #41] but haven't been fully tested. In particular this seems to affect Windows systems set to Chinese.
 
custom-install-finalize 1.6:
* Skip installing tickets for titles that don't need it [https://github.com/ihaveamac/custom-install/issues/46 #46] [https://github.com/ihaveamac/custom-install/pull/47 #47] Thanks @TimmSkiller.
 
'''custom-install 2.1b3 2021/03/09'''
* Show a warning if more than 300 applications (not all titles, but executable ones) are detected.
* Create title.db and import.db if missing [https://github.com/ihaveamac/custom-install/issues/40 #40].
* Fix CDN content install.
* Require pyctr==0.4.6 and comtypes==1.1.8 (only relevant to non-standalone build users).
 
'''custom-install 2.1b2 2021/02/13'''
* Fix selected boot9 and seeddb not working for adding titles & require boot9 to be loaded before adding any titles.
* Show current status on each title's line.


== Usage==
'''custom-install 2.1b1 2021/02/10'''
Use `-h` to view arguments.


==Examples:==
custom-install 2.1b1:
* Installs are written to a visible temporary folder before being moved into place. If an install fails in the middle, it won't leave a half-written title buried in the Nintendo 3DS folder.
* CDN contents can be installed directly.
* Title contents are verified during install and an error is shown if verification fails.
* Titles that succeeded and failed to be installed are shown at the end.
* All titles are loaded and parsed at the beginning so a broken one won't stop the others.
* Certain kinds of titles such as DSiWare and duplicate files are blocked.
* This doesn't yet stop two files with the same Title ID however! This only stops adding the same file twice.
* Free space is checked to make sure all titles can be installed.
* cifinish.bin is loaded and checked for corruption early (if it exists), which can happen if an issue exists on the SD card filesystem.
* File list replaced with a column list that shows Title ID and title name, and is sorted alphabetically.


* py -3 custom-install.py -b boot9.bin -m movable.sed --sd E:\ file.cia file2.cia
custom-install-finalize 1.5:
* python3 custom-install.py -b boot9.bin -m movable.sed --sd /Volumes/GM9SD file.cia file2.cia
* Delete cifinish.bin if no errors occurred during ticket install.
* python3 custom-install.py -b boot9.bin -m movable.sed --sd /media/GM9SD file.cia file2.cia


==License/Credits==
==Credits==
`pyctr/` is from [ninfs `d994c78`](https://github.com/ihaveamac/ninfs/tree/d994c78acf5ff3840df1ef5a6aabdc12ca98e806/ninfs/pyctr).
* [[Save3DS]] is used to interact with the Title Database (details in bin/README).
* Thanks to nek0bit for redesigning <code>custominstall.py</code> to work as a module, and for implementing an earlier GUI.
* Thanks to LyfeOnEdge from the [https://brewtools.dev brewtools Discord] for designing the second version of the GUI. Special thanks to CrafterPika and archbox for testing.
* Thanks to BpyH64 for [https://github.com/d0k3/GodMode9/issues/340#issuecomment-487916606 researching how to generate the cmacs].


[save3ds by wwylele](https://github.com/wwylele/save3ds) is used to interact with the Title Database (details in `bin/README`).
==External links==
* Author's website - https://ihaveahax.net
* Author's Discord - https://discord.gg/YVuFUrs
* GitHub - https://github.com/ihaveamac/custom-install
* GBAtemp - https://gbatemp.net/threads/custom-install-install-cias-to-a-nintendo-3ds-sd-card-entirely-on-pc.551496


Thanks to @BpyH64 for [researching how to generate the cmacs](https://github.com/d0k3/GodMode9/issues/340#issuecomment-487916606).
[[Category:3DS homebrew applications]]
[[Category:Homebrew utility applications on 3DS]]
[[Category:PC utilities for 3DS homebrew]]
[[Category:Support the author]]

Latest revision as of 13:28, 13 August 2023

custom-install
Custominstall5.png
General
Authorihaveamac
TypeFile Operation
Version2.1
LicenseMixed
Last Updated2021/07/08
Links
Download
Website
Source
Support Author

custom-install is a Python 3.6+ tool that will install CIA files to a Nintendo 3DS SD card entirely on a PC. This completely bypasses the slow wireless and I/O speeds of the hardware.

It was initially created late June 2019 as an experimental script to automate the process of a manual title install for Nintendo 3DS.

Installation

Requirements

Setup for Linux

  • Linux users must build wwylele/save3ds and place save3ds_fuse in bin/linux.
  • Install rust using rustup, then compile with: cargo build. The compiled binary is located in target/debug/save3ds_fuse, copy it to bin/linux.
  • (Optional) GUI setup.

Building standalone

  • Using a 32-bit version of Python is recommended to build a version to be distributed. Please refer to the readme from repo.

User guide

Usage summary

  • Use custom-install on your laptop/pc and install titles onto the micro SD (with boot9+movable).
  • After it's finished, re-insert to 3DS and run custom-install-finalize at the end to insert the ticket and seed for it to show on the Home Menu.
  • You can use the Windows standalone with GUI for simpler process, or setup your own enviroment (for Windows 32/Linux/macOS).

Windows standalone

  • Extract custom-install and copy over custom-install-finalize.3dsx to the 3ds folder on your SD card.
  • Run ci-gui to bring up the custom-install GUI.
  • Select your SD card root, boot9, seeddb, and movable.sed files (in some cases these will be automatically selected for you).
  • Add the CIA files and click Start install.
  • Once it's finished, start up the Homebrew Launcher and run custom-install-finalize to finish the process.

With installed Python

  • Download the repo (or git clone) and extract custom-install.
  • Download custom-install-finalize.3dsx and copy over to the 3ds folder of your SD card.
  • Put boot9.bin, seeddb.bin and movable.sed to the root of the custom-install folder (see also Additional notes).
  • Paste the .cia files you want to install to the root of the custom-install folder.
  • Install the packages:
    • For Windows, double-click windows-install-dependencies.py
    • Alternate manual method py -3 -m pip install --user -r requirements-win32.txt
    • For macOS/Linux, python3 -m pip install --user -r requirements.txt
  • Run custominstall.py with boot9.bin, movable.sed, path to the SD root, and CIA files to install:
    • Use -h to view arguments. Insert the following code (with some examples below).
    • py -3 custom-install.py -b boot9.bin -m movable.sed --sd *yoursdcarddiskletter:\* *yourgamename*.cia *yourgamename*.cia
    • py -3 custominstall.py -b boot9.bin -m movable.sed --sd E:\ file.cia file2.cia
    • python3 custominstall.py -b boot9.bin -m movable.sed --sd /Volumes/GM9SD file.cia file2.cia
    • python3 custominstall.py -b boot9.bin -m movable.sed --sd /media/GM9SD file.cia file2.cia
  • Wait for install. Once it's finished, start up the Homebrew Launcher and run custom-install-finalize to finish the process.

Note: For Windows users, enabling Add Python 3.X to PATH is not required. Python is installed with the py launcher by default.

Additional notes

movable.sed can be provided with -m or --movable.

boot9 can be placed in one of the following places:

  • -b or --boot9 argument (if set)
  • BOOT9_PATH environment variable (if set)
  • %APPDATA%\3ds\boot9.bin (Windows-specific)
  • ~/Library/Application Support/3ds/boot9.bin (macOS-specific)
  • ~/.3ds/boot9.bin
  • ~/3ds/boot9.bin

SeedDB is checked in order of:

  • -s or --seeddb argument (if set)
  • SEEDDB_PATH environment variable (if set)
  • %APPDATA%\3ds\seeddb.bin (Windows-specific)
  • ~/Library/Application Support/3ds/seeddb.bin (macOS-specific)
  • ~/.3ds/seeddb.bin
  • ~/3ds/seeddb.bin

If you get an error during installation, you'll have to manually delete the partially installed title from the SD card (Nintendo 3DS -> {id0} -> {id1} -> title -> {first half of Title ID} -> {second half of Title ID}), or delete other things to make enough space, then try again.

Screenshots

custominstall3.pngcustominstall4.png

Changelog

custom-install 2.1 & finalize 1.6 2021/09/13

custom-install 2.1:

  • Installs are written to a visible temporary folder before being moved into place. If an install fails in the middle, it won't leave a half-written title buried in the Nintendo 3DS folder
  • All titles are loaded and parsed at the beginning so a broken one won't stop the others
  • Title contents are verified during install and an error is shown if verification fails
  • Titles that succeeded and failed to be installed are shown at the end
  • Free space is checked to make sure all titles can be installed
  • cifinish.bin is loaded and checked for corruption early (if it exists), which can happen if an issue exists on the SD card filesystem.
  • CDN contents can be installed directly
  • File list replaced with a column list that shows Title ID and title name, and is sorted alphabetically
  • Show a warning if more than 300 applications (not all titles, but executable ones) are detected
  • Create title.db and import.db if missing (#40)
  • Auto-set boot9.bin and seeddb.bin if found in SD:/gm9/out (movable.sed was already detected this way): #43 Thanks @Jisxu!
  • Show an error if id0 isn't found (#49)
  • Force reading save3ds_fuse output as UTF-8 all the time (hopefully fixing issues on Windows systems that aren't set to English)

custom-install-finalize 1.6:

  • Delete cifinish.bin if no errors occurred during ticket install.
  • Skip installing tickets for titles that don't need it: #46 #47 Thanks @TimmSkiller.

custom-install 2.1b4 & finalize 1.6 2021/07/08

custom-install 2.1b4:

  • Show 300 application warning with the cli script.
  • This fixes a minor issue with an exception being raised at the end (but it didn't actually affect anything) #42
  • Auto-set boot9.bin and seeddb.bin if found in SD:/gm9/out (movable.sed was already detected this way) #43 Thanks @Jisxu.
  • Force reading save3ds_fuse output as UTF-8 all the time.
  • This should hopefully fix #41 but haven't been fully tested. In particular this seems to affect Windows systems set to Chinese.

custom-install-finalize 1.6:

  • Skip installing tickets for titles that don't need it #46 #47 Thanks @TimmSkiller.

custom-install 2.1b3 2021/03/09

  • Show a warning if more than 300 applications (not all titles, but executable ones) are detected.
  • Create title.db and import.db if missing #40.
  • Fix CDN content install.
  • Require pyctr==0.4.6 and comtypes==1.1.8 (only relevant to non-standalone build users).

custom-install 2.1b2 2021/02/13

  • Fix selected boot9 and seeddb not working for adding titles & require boot9 to be loaded before adding any titles.
  • Show current status on each title's line.

custom-install 2.1b1 2021/02/10

custom-install 2.1b1:

  • Installs are written to a visible temporary folder before being moved into place. If an install fails in the middle, it won't leave a half-written title buried in the Nintendo 3DS folder.
  • CDN contents can be installed directly.
  • Title contents are verified during install and an error is shown if verification fails.
  • Titles that succeeded and failed to be installed are shown at the end.
  • All titles are loaded and parsed at the beginning so a broken one won't stop the others.
  • Certain kinds of titles such as DSiWare and duplicate files are blocked.
  • This doesn't yet stop two files with the same Title ID however! This only stops adding the same file twice.
  • Free space is checked to make sure all titles can be installed.
  • cifinish.bin is loaded and checked for corruption early (if it exists), which can happen if an issue exists on the SD card filesystem.
  • File list replaced with a column list that shows Title ID and title name, and is sorted alphabetically.

custom-install-finalize 1.5:

  • Delete cifinish.bin if no errors occurred during ticket install.

Credits

  • Save3DS is used to interact with the Title Database (details in bin/README).
  • Thanks to nek0bit for redesigning custominstall.py to work as a module, and for implementing an earlier GUI.
  • Thanks to LyfeOnEdge from the brewtools Discord for designing the second version of the GUI. Special thanks to CrafterPika and archbox for testing.
  • Thanks to BpyH64 for researching how to generate the cmacs.

External links

Advertising: