3DS:Cleaninty: Difference between revisions
From Hacks Guide Wiki
More actions
SOAP is a protocol, not a server |
Sneaky... |
||
| Line 16: | Line 16: | ||
'''cleaninty''' is a PC tool used to communicate with Nintendo eShop servers, using the [[wikipedia:SOAP|SOAP]] protocol. 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". | '''cleaninty''' is a PC tool used to communicate with Nintendo eShop servers, using the [[wikipedia:SOAP|SOAP]] protocol. 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 == | ==Overview== | ||
SOAP transfers involve complex functionality. As a result, the following explanation has been divided into two versions: a simplified user-end version, and the technical version. | SOAP transfers involve complex functionality. As a result, the following explanation has been divided into two versions: a simplified user-end version, and the technical version. | ||
<br>If you do not care about the technical side of things, you may skip that part, and will still be able to understand how to use cleaninty itself. | <br>If you do not care about the technical side of things, you may skip that part, and will still be able to understand how to use cleaninty itself. | ||
| Line 77: | Line 77: | ||
== Features == | ==Features== | ||
When the required constants have been supplied through <code>SetupConstants</code> and you have the unique data (<code>otp.bin</code> and either <code>SecureInfo_A</code> or the serial number) of a console, cleaninty can act as that console and do the following: | When the required constants have been supplied through <code>SetupConstants</code> and you have the unique data (<code>otp.bin</code> and either <code>SecureInfo_A</code> or the serial number) of a console, cleaninty can act as that console and do the following: | ||
* <code>GenJson</code>: Compiles the console's data into a single JSON file. This JSON is required for all other commands except <code>RecoverIVS</code>. | *<code>GenJson</code>: Compiles the console's data into a single JSON file. This JSON is required for all other commands except <code>RecoverIVS</code>. | ||
* <code>CheckReg</code>: Obtains the console's eShop status, eShop region, and any titles attached to its eShop account, then updates the JSON file with the new data. | *<code>CheckReg</code>: Obtains the console's eShop status, eShop region, and any titles attached to its eShop account, then updates the JSON file with the new data. | ||
* <code>SysTransfer</code>: Moves the eShop titles of the source console to the target console. This is the only needed command for a SOAP transfer if the console has legacy tickets. | *<code>SysTransfer</code>: Moves the eShop titles of the source console to the target console. This is the only needed command for a SOAP transfer if the console has legacy tickets. | ||
** A successful use of this command triggers a 7-day cooldown on system transfers for both consoles, the same as a full system 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. | ||
* <code>NNIDTransfer</code>: <u>(Still experimental. Use with caution.)</u> Moves only the NNIDs of the source console to the target console. This is not affected by system transfer cooldowns and does not trigger a cooldown. | *<code>NNIDTransfer</code>: <u>(Still experimental. Use with caution.)</u> Moves only the NNIDs of the source console to the target console. This is not affected by system transfer cooldowns and does not trigger a cooldown. | ||
* <code>LastTransfer</code>: 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. | *<code>LastTransfer</code>: 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. | ||
* <code>GetIVS</code>: Downloads the console's stored copy of <code>movable.sed</code> from the SOAP servers, if they have one. | *<code>GetIVS</code>: Downloads the console's stored copy of <code>movable.sed</code> from the SOAP servers, if they have one. | ||
* <code>SetIVS</code>: Uploads the chosen JSON's stored <code>movable.sed</code> to the SOAP servers. This will overwrite the current stored movable. | *<code>SetIVS</code>: Uploads the chosen JSON's stored <code>movable.sed</code> to the SOAP servers. This will overwrite the current stored movable. | ||
* <code>RecoverIVS</code>: Tries to recover a console's <code>movable.sed</code> using only its raw <code>otp.bin</code> and eShop region data. | *<code>RecoverIVS</code>: Tries to recover a console's <code>movable.sed</code> using only its raw <code>otp.bin</code> and eShop region data. | ||
* <code>EShopDelete</code>: Deletes the target console's eShop account. This is the secondary part of a SOAP transfer if the console has no legacy tickets, as the console will then automatically register an account in the correct region when it next accesses the eShop. | *<code>EShopDelete</code>: Deletes the target console's eShop account. This is the secondary part of a SOAP transfer if the console has no legacy tickets, as the console will then automatically register an account in the correct region when it next accesses the eShop. | ||
* <code>EShopRegionChange</code>: 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 if the console has no legacy tickets, but an <code>EShopDelete</code> should still be done afterward. | *<code>EShopRegionChange</code>: 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 if the console has no legacy tickets, but an <code>EShopDelete</code> should still be done afterward. | ||
* <code>ETickets</code>/<code>ETicketDownload</code>/<code>ETikTitleDownload</code>: Lists all owned eShop tickets / downloads all tickets / downloads the titles attached to all tickets, respectively, from the given console's eShop account. | *<code>ETickets</code>/<code>ETicketDownload</code>/<code>ETikTitleDownload</code>: Lists all owned eShop tickets / downloads all tickets / downloads the titles attached to all tickets, respectively, from the given console's eShop account. | ||
== Installation == | ==Installation== | ||
Instructions for installation & setup are {{GitHub|luigoalma/cleaninty#Installing|on the GitHub page}}, but the installation instructions may need to be interpreted for your OS. | Instructions for installation & setup are {{GitHub|luigoalma/cleaninty#Installing|on the GitHub page}}, but the installation instructions may need to be interpreted for your OS. | ||
Regardless of your OS, you will need a 3DS with both custom firmware and [[3DS:GodMode9|GodMode9]] installed to dump all of the files required to do <code>SetupConstants</code>. The vast majority of them are dumped using [https://raw.githubusercontent.com/luigoalma/cleaninty/master/gm9scripts/ExtractSystemElements.gm9 ExtractSystemElements.gm9], but | Regardless of your OS, you will need a 3DS with both custom firmware and [[3DS:GodMode9|GodMode9]] installed to dump all of the files required to do <code>SetupConstants</code>. The vast majority of them are dumped using [https://raw.githubusercontent.com/luigoalma/cleaninty/master/gm9scripts/ExtractSystemElements.gm9 ExtractSystemElements.gm9], but the [[wikipedia:Advanced_Encryption_Standard|AES]] Constant "C" is found using the full set of instructions [https://3ds.goombi.fr/convertMii/0x31.html on this page]. | ||
{{critical|The AES Constant, along with all other constants used by cleaninty, are copyrighted data. Obtaining them from your own console(s) is fine, but '''do not''' share the constants with anyone else.}} | {{critical|The AES Constant, along with all other constants used by cleaninty, are copyrighted data. Obtaining them from your own console(s) is fine, but '''do not''' share the constants with anyone else.}} | ||
{{info|These constants are the same on all consoles. Once one set is dumped, you will not need to redump in the future unless you lose access to them.}} | {{info|These constants are the same on all consoles. Once one set is dumped, you will not need to redump in the future unless you lose access to them.}} | ||
=== Windows === | ===Windows=== | ||
Don't bother trying to install cleaninty on Windows directly. Windows has OpenSSL disabled in its <code>curl.exe</code>, but cleaninty requires OpenSSL to function. Working around this issue manually is obnoxious and not worth the time spent. | Don't bother trying to install cleaninty on Windows directly. Windows has OpenSSL disabled in its <code>curl.exe</code>, but cleaninty requires OpenSSL to function. Working around this issue manually is obnoxious and not worth the time spent. | ||
Instead, there are two options: | Instead, there are two options: | ||
# Install a Linux distro through [https://learn.microsoft.com/en-us/windows/wsl/install WSL] and then install cleaninty inside the WSL instance using the macOS/Linux instructions. (This is the simpler path, and WSL is useful for many other things. If you choose this instead of msys2, it is recommended that you also install the {{GitHub|microsoft/terminal|Windows Terminal}}.) | #Install a Linux distro through [https://learn.microsoft.com/en-us/windows/wsl/install WSL] and then install cleaninty inside the WSL instance using the macOS/Linux instructions. (This is the simpler path, and WSL is useful for many other things. If you choose this instead of msys2, it is recommended that you also install the {{GitHub|microsoft/terminal|Windows Terminal}}.) | ||
# Install [https://www.msys2.org/ msys2] and then install cleaninty inside the msys2 instance using the below instructions. | #Install [https://www.msys2.org/ msys2] and then install cleaninty inside the msys2 instance using the below instructions. | ||
To install cleaninty inside msys2, open the terminal <code>mingw64.exe</code> that is inside the msys2 installation folder, then run the following two commands one at a time: | To install cleaninty inside msys2, open the terminal <code>mingw64.exe</code> that is inside the msys2 installation folder, then run the following two commands one at a time: | ||
* <code>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</code> | *<code>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</code> | ||
* <code>python -m pip install cleaninty</code> | *<code>python -m pip install cleaninty</code> | ||
Once this is completed, from here on out you will need to open the msys2 <code>mingw64.exe</code> terminal to use cleaninty. | Once this is completed, from here on out you will need to open the msys2 <code>mingw64.exe</code> terminal to use cleaninty. | ||
| Line 120: | Line 120: | ||
{{info|Be aware that when using cleaninty through msys2, the place it will look in to find <code>boot9.bin</code>, <code>SSLCertificates</code>, and <code>ctr_constants.json</code> is a folder named <code>3ds</code> inside your msys2 <code>home</code> folder.}} | {{info|Be aware that when using cleaninty through msys2, the place it will look in to find <code>boot9.bin</code>, <code>SSLCertificates</code>, and <code>ctr_constants.json</code> is a folder named <code>3ds</code> inside your msys2 <code>home</code> folder.}} | ||
=== macOS and Linux === | ===macOS and Linux=== | ||
First, ensure you have Python 3.7 or newer. You can check if your Python version is new enough by opening a terminal and running the command <code>python3 --version</code>. If you do not, install a compatible version from either your package manager or [https://www.python.org/downloads/ the Python website]. | First, ensure you have Python 3.7 or newer. You can check if your Python version is new enough by opening a terminal and running the command <code>python3 --version</code>. If you do not, install a compatible version from either your package manager or [https://www.python.org/downloads/ the Python website]. | ||
| Line 128: | Line 128: | ||
By default, the latest version of cryptography will be installed, which does not work with cleaninty. You should install the latest compatible version, 43.0.3, with <code>pip</code>. | By default, the latest version of cryptography will be installed, which does not work with cleaninty. You should install the latest compatible version, 43.0.3, with <code>pip</code>. | ||
== Usage == | ==Usage== | ||
{{critical|Make sure the files for all consoles you compile into a json are accurate before using them in cleaninty, or else the commands may affect a different console than they "should be" affecting (or simply fail outright). | {{critical|Make sure the files for all consoles you compile into a json are accurate before using them in cleaninty, or else the commands may affect a different console than they "should be" affecting (or simply fail outright). | ||
| Line 136: | Line 136: | ||
There is no graphical interface for cleaninty. All commands are ran through the command line. | There is no graphical interface for cleaninty. All commands are ran through the command line. | ||
=== Manual command line === | ===Manual command line=== | ||
The commands are the same on all operating systems. Run <code>cleaninty ctr (command) --help</code> for information on an individual command's syntax. | The commands are the same on all operating systems. Run <code>cleaninty ctr (command) --help</code> 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: | 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: | ||
# <code>cleaninty ctr GenJson --otp otp.bin --secureinfo secinfo.bin --out soap_donor.json</code> | #<code>cleaninty ctr GenJson --otp otp.bin --secureinfo secinfo.bin --out soap_donor.json</code> | ||
# <code>cleaninty ctr GenJson --otp otp1.bin --secureinfo secinfo1.bin --out soap_target.json</code> | #<code>cleaninty ctr GenJson --otp otp1.bin --secureinfo secinfo1.bin --out soap_target.json</code> | ||
# <code>cleaninty ctr CheckReg -C soap_donor.json</code> | #<code>cleaninty ctr CheckReg -C soap_donor.json</code> | ||
# <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 have the same region. | #*The CheckReg commands are not necessary if you are already certain the donor and target have the same region. | ||
# <code>cleaninty ctr EShopRegionChange -C soap_target.json -r (eShop region) -c (eShop country - not required if region is JPN/KOR/CHN)</code> | #<code>cleaninty ctr EShopRegionChange -C soap_target.json -r (eShop region) -c (eShop country - not required if region is JPN/KOR/CHN)</code> | ||
#* You can use any region/country for this command other than the one listed in the <code>soap_target.json</code>'s <code>CheckReg</code>. | #*You can use any region/country for this command other than the one listed in the <code>soap_target.json</code>'s <code>CheckReg</code>. | ||
# Depending on whether the EShopRegionChange was successful or not, only do '''one''' of the following commands. | #Depending on whether the EShopRegionChange was successful or not, only do '''one''' of the following commands. | ||
<tabber> | <tabber> | ||
|-|Succeeded= | |-|Succeeded= | ||
| Line 162: | Line 162: | ||
=== Autosoap script === | ===Autosoap script=== | ||
{{warning|Although this script is far simpler to use than manually inputting commands, errors may still occur during edge cases. Knowledge of the command line will still likely be required to debug if this occurs.}} | {{warning|Although this script is far simpler to use than manually inputting commands, errors may still occur during edge cases. Knowledge of the command line will still likely be required to debug if this occurs.}} | ||