- 1 NIM user service "nim:u"
- 2 NIM server service "nim:s"
- 3 NIM server service "nim:aoc"
- 4 NIM service "nim:ndm"
- 5 kagiya server
- 6 New3DS
- 7 HTTPS requests
- 8 Sysupdate checking process
- 9 NIM System_SaveData
NIM user service "nim:u"
|0x00010000||Related to starting a sysupdate?|
|0x00050000||This obtains an event handle. Home Menu will check whether a system update is available when this event is triggered.|
NIM server service "nim:s"
|0x00060080||The input at cmdreq[1-2] is an u64 titleID. This writes an u8 to cmdreply. It's unknown what exactly the eShop application uses this for, it only uses this command for apps which are installed(checked via AM probably). In those cases, it seems the outval for this command(with result-code=0) is normally 0?|
|0x0022....||AccountDeleteTitleETicketsSOAP. The SOAP request is sent only after the ticket for the specified titleID has been successfully deleted.|
NIM server service "nim:aoc"
NIM service "nim:ndm"
The nim system module communicates with a server called kagiya (kagiya-ctr.cdn.nintendo.net or kagiya-dev-ctr.cdn.nintendo.net for development units). It provides the 9.6 crypto seed in binary form for any given title ID under (HTTPS) kagiya-ctr.cdn.nintendo.net/title/0x%16llx/ext_key?country=%s, where %16llx is the title ID and %s is a country code as used in the eShop.
NIM module only uses CheckNew3DS for determining what heap sizes to use, in two functions. One is for the size of the 0x08000000 vmem heap, the other is probably for some buffer allocated on that heap. The New3DS version of these sizes are 0x1C000-bytes larger than the Old3DS sizes here.
During startup NIM-module creates two RootCertChains with HTTPC. Both of these only contain the same default cert with ID 0x3. The first RootCertChain is used with NetUpdateSOAP. Requests such as the "notifications.json" page don't use these RootCertChains(in this case just default certID 0xB is used).
There are exactly 3 types of network SOAP requests used with NetUpdateSOAP by NIM module, described below. This URL contained in NIM module itself is only used with GetSystemTitleHash. The other requests use an identical URL loaded from an ECommerceSOAP response instead.
See also here.
Returns the current sysupdate title-listing. This also contains the SystemTitleHash returned by GetSystemTitleHash.
Returns the current SystemTitleHash for the current sysupdate title-listing.
Returns the Base64-encoded cetk for each specified TitleId entry.
This is only used when installing new titles. This means with CDN system-updates, tickets are never installed except when a title is being installed for the first time. For example, a system on the latest system-version that was only ever updated via CDN has the same NATIVE_FIRM ticket installed from the factory.
Sysupdate checking process
This section describes the process used when checking whether a sysupdate is required.
First the GetSystemTitleHash SOAP request is done. Then the SystemTitleHash in savedata hash.dat is compared with the received one. If they match and the SystemTitleHash flag is set to value 0x03, it will immediately return that no sysupdate is required. Otherwise it will start the GetSystemUpdate SOAP request handling.
The GetSystemUpdate SOAP request contains a titlelist of all NAND system-titles. For GetSystemUpdate response parsing, it compares each SOAP title_entry with the NAND system titlelist. If a SOAP titleID isn't found in the NAND titlelist, this means NAND is missing a new title and hence a sysupdate is required for installing that title. If a NAND title_entry-version is less than the SOAP title_entry-version, this means the title needs updated and hence a sysupdate is required.
At least one <TitleVersion> entry with valid data in the GetSystemUpdate response is required.
The titleIDs sent in the GetSystemUpdate SOAP request are decimal, while the titleIDs in the response are hex.
|0x60||0x1||u8 flag used with the SystemTitleHash. 0x01 = latest sysupdate isn't installed as of last SOAP requests, 0x03 = latest sysupdate is installed as of last SOAP requests.|
|0x61||0x21||ASCII hex SystemTitleHash, including NUL-terminator. This is the latest SystemTitleHash which NIM module received from SOAP.|