3DS:Cleaninty: Difference between revisions

From Hacks Guide Wiki
(further wording revisions, clarify EShopRegionChange, add mention of WSL)
(first eshopregionchange had wrong file name)
Line 85: Line 85:
# <code>cleaninty ctr CheckReg -C soap_target.json</code>
# <code>cleaninty ctr CheckReg -C soap_target.json</code>
#* The CheckReg commands are not necessary if you are already certain the donor and target are in the same region.
#* The CheckReg commands are not necessary if you are already certain the donor and target are in the same region.
# <code>cleaninty ctr EShopRegionChange -C soapee.json -r (new eShop region - required) -c  (country in chosen region - usually required) -l (language in chosen region/country - optional)</code>
# <code>cleaninty ctr EShopRegionChange -C soap_target.json -r (new eShop region - required) -c  (country in chosen region - usually required) -l (language in chosen region/country - optional)</code>
#* If this succeeds, '''stop here'''. The next two commands are only needed if this one fails.
#* If this succeeds, '''stop here'''. The next two commands are only needed if this one fails.
# <code>cleaninty ctr SysTransfer -s soap_target.json -t soap_donor.json</code>
# <code>cleaninty ctr SysTransfer -s soap_target.json -t soap_donor.json</code>

Revision as of 11:30, 28 February 2024

cleaninty is a PC tool used to communicate with Nintendo's SOAP servers. For a 3DS, these servers deal with managing eShop accounts, downloading eShop titles, and system transfers. It is also the tool used for what is informally known as a "SOAP Transfer".

Overview

There are two parts of a 3DS that give it a unique ID to Nintendo's eShop servers: its serial number and its otp.bin. If these are pulled out of the console and used somewhere else, they can be used to imitate the console - meaning Nintendo's servers can act on commands without the console doing anything on its end.
However, the files cannot communicate on their own, and a connection to Nintendo's servers that acts identically to a console is still needed. That is the purpose of cleaninty.

The reason this allows for changing eShop regions easily, and at infinite range, are as follows:

  • Ease of Use: Tickets for both system software & purchased apps are stored on Nintendo's servers, and some of these tickets are 'sticky' - they refuse to be deleted when trying to delete the console's eShop account. (The most common sticky tickets are from preinstalled games and the Mii Plaza 3.x update.) The only way to remove these tickets is to transfer them to another console, and this part can be made far easier if a donor console is used to collect the tickets.
  • Infinite Range: System transfers are effectively divided into two parts: the content transfer (done entirely on consoles), and the NNID/title transfer (done entirely on servers).
    On an actual console, these two must be done at the same time - but if cleaninty sends the commands for a server transfer, the consoles are never told to do the content transfer & Nintendo has no way of checking that a content transfer actually happened. (Technically, this also means a Manual Movable Transfer is the exact opposite of a SOAP transfer.)


Features

When given the unique data (otp.bin and either SecureInfo.bin or the serial number & eShop region data) of a console and the required basic constants, cleaninty can act as the console it's given and do the following:

  • GenJson: Compiles the console's data into a single JSON file. This JSON is required for all other commands except RecoverIVS.
  • CheckReg: Obtains the console's eShop status and any titles attached to its eShop account, then updates the JSON file if any differences in the data are found.
  • SysTransfer: Moves the eShop titles of the source console to the target console. This is the secondary part of what is known informally as a "SOAP Transfer".
    • A successful use of this command triggers a 7-day cooldown on system transfers for both consoles, the same as a full system transfer.
  • NNIDTransfer: (Still experimental. Use with caution.) Moves only the NNIDs of the source console to the target console. This is not affected by system transfer cooldowns and does not trigger one.
  • LastTransfer: Provides the date&time of the given console's last system transfer, the number of transfers it has ever done, and the time at which the current transfer cooldown will expire if there is one active.
  • GetIVS: Obtains the console's movable.sed from the SOAP servers, if the servers have a stored copy.
  • SetIVS: Uploads the chosen JSON's stored movable.sed to the SOAP servers. This will overwrite the current stored movable.
  • RecoverIVS: Tries to recover a console's movable.sed from only its raw otp.bin and eShop region data.
  • EShopDelete: Deletes the target console's eShop account.
  • EShopRegionChange: Attempts to delete and then recreate the target console's eShop account for the entered region. This is the main part of a "SOAP Transfer", but after a successful SysTransfer the console will do this automatically.
  • ETickets/ETicketDownload/ETikTitleDownload: Lists all owned eShop tickets / downloads all tickets / downloads the titles attached to all tickets, respectively, from the given console's eShop account.


Installation

Instructions for installation & setup are on the GitHub page, but the installation instructions may need to be interpreted for your OS.

A guide to legally deriving the AES Constant, "C", can be found on this page.

OOjs UI icon information-destructive.svg The AES Constant, along with all other constants used by cleaninty, are copyrighted data. Obtaining them from your own console is fine, but do not share the constants with anyone else.

Windows

Don't bother trying to use cleaninty through Command Prompt or PowerShell. Windows has OpenSSL disabled in its curl.exe, but cleaninty requires OpenSSL to function. Working around this issue manually is obnoxious and not worth the time spent.

Instead, there are two options:

  1. Install a Linux distro through WSL and then install cleaninty inside the WSL instance using the macOS/Linux instructions.
  2. Install msys2 and then install cleaninty inside the msys2 instance using the below instructions.

To install cleaninty inside msys2, open the terminal mingw64.exe that is inside the msys2 installation folder, then run the following two commands one at a time:

  • pacman -Syu mingw-w64-x86_64-python mingw-w64-x86_64-python-defusedxml mingw-w64-x86_64-python-cryptography mingw-w64-x86_64-python-pycurl
  • python -m pip install cleaninty

Once this is completed, from here on out you will need to open the terminal mingw64.exe to use cleaninty.

OOjs UI icon information-progressive.svg Be aware that when using cleaninty through msys2, the place it will look in to find boot9.bin, SSLCertificates, and ctr_constants.json is a folder named 3ds inside your msys2 home folder.

macOS and Linux

First, ensure you have a python version of 3.7 or newer. You can check if your python version is new enough by opening a terminal and running the command python3 --version.

For the method that involves pip, you can follow the instructions on the GitHub page with no modifications.

For the method that involves setup.py, it is recommended to obtain the source code via the command git clone https://github.com/luigoalma/cleaninty.git. This will guarantee the files are in the correct layout.


Usage

There is no graphical interface for cleaninty. All commands are ran through the command line.

Command line

The commands are the same on all operating systems. Run cleaninty ctr (command) --help for information on an individual command's syntax.

As an example, the minimum list of commands needed to set up two consoles' data and perform a SOAP transfer between them would be as follows:

  1. cleaninty ctr GenJson --otp otp.bin --secureinfo secinfo.bin --out soap_donor.json
  2. cleaninty ctr GenJson --otp otp1.bin --secureinfo secinfo1.bin --out soap_target.json
  3. cleaninty ctr CheckReg -C soap_donor.json
  4. cleaninty ctr CheckReg -C soap_target.json
    • The CheckReg commands are not necessary if you are already certain the donor and target are in the same region.
  5. cleaninty ctr EShopRegionChange -C soap_target.json -r (new eShop region - required) -c (country in chosen region - usually required) -l (language in chosen region/country - optional)
    • If this succeeds, stop here. The next two commands are only needed if this one fails.
  6. cleaninty ctr SysTransfer -s soap_target.json -t soap_donor.json
  7. cleaninty ctr EShopRegionChange -C soap_target.json -r (new eShop region - required) -c (country in chosen region - usually required) -l (language in chosen region/country - optional)