Difference between revisions of "Manu services"

From Nintendo Switch Brew
Jump to navigation Jump to search
Line 8: Line 8:
 
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || [[#InitUsbTransferPipeFsFile|InitUsbTransferPipeFsFile]]
+
| 0 || [[#InitializeUsbTransferPipeFile|InitializeUsbTransferPipeFile]]
 
|-
 
|-
| 1 || [[#FsFile_Exists|FsFile_Exists]]
+
| 1 || [[#IsFileExist|IsFileExist]]
 
|-
 
|-
| 2 || [[#FsFile_Read|FsFile_Read]]
+
| 2 || [[#ReadFile|ReadFile]]
 
|-
 
|-
| 3 || [[#FsFile_Write|FsFile_Write]]
+
| 3 || [[#WriteFile|WriteFile]]
 
|-
 
|-
| 4 || [[#InitUsbTransferPipeRaw|InitUsbTransferPipeRaw]]
+
| 4 || [[#InitializeUsbTransferPipeRaw|InitializeUsbTransferPipeRaw]]
 
|-
 
|-
| 5 || [[#Raw_Read|Raw_Read]]
+
| 5 || [[#ReadRaw|ReadRaw]]
 
|-
 
|-
| 6 || [[#Raw_Write|Raw_Write]]
+
| 6 || [[#WriteRaw|WriteRaw]]
 
|-
 
|-
 
| 7 || [7.0.0+]  
 
| 7 || [7.0.0+]  
 
|-
 
|-
| 8 || [7.0.0+]  
+
| 8 || [14.0.0+]  
 
|}
 
|}
  
Line 35: Line 35:
 
  SerialNumber:  "SerialNumber"
 
  SerialNumber:  "SerialNumber"
  
[[SystemInitializer]] only uses cmd1..cmd3.
+
[7.0.0+] The requests are now configured as:
 +
VID:          0x057E (Nintendo Co., Ltd)
 +
PID:          0x3003
 +
bcdDevice:    0x0100 (1.00)
 +
Manufacturer:  "Nintendo"
 +
Product:      "NintendoSdkManufacturing"
 +
SerialNumber:  "SerialNumber"
  
== InitUsbTransferPipeFsFile ==
+
== InitializeUsbTransferPipeFile ==
Takes an unknown u32 (ID?) and configures a transfer pipe over [[USB_services|usb:ds]] for file access mode.
+
Unofficial name.
  
== FsFile_Exists ==
+
Takes an input u32. No output.
Takes an input path string (type-0x9 buffer), returns 8-bytes for the output u8 flag.
+
 
 +
Configures a transfer pipe over [[USB_services|usb:ds]] for file access mode.
 +
 
 +
== IsFileExist ==
 +
Unofficial name.
 +
 
 +
Takes a type-0x9 input buffer containing a path string. Returns an output u64.
  
 
Checks whether the specified file exists.
 
Checks whether the specified file exists.
Line 47: Line 59:
 
This is "FsFile::Exists" in SystemInitializer.
 
This is "FsFile::Exists" in SystemInitializer.
  
== FsFile_Read ==
+
== ReadFile ==
Takes a type-0x6 output buffer and a type-0x9 input string path buffer, and 3 u64s: <same size value from databuf>, unk, <same size value from databuf>. Where unk is probably offset?
+
Unofficial name.
 +
 
 +
Takes a type-0x6 output buffer, a type-0x9 input buffer containing a path string and three u64s '''OutSize''', '''Offset''' and '''InSize'''. No output.
  
 
Reads data from the specified file.
 
Reads data from the specified file.
  
== FsFile_Write ==
+
== WriteFile ==
Same as FsFile_Read except the databuf is a type-0x5 input buffer.
+
Unofficial name.
 +
 
 +
Takes a type-0x5 output input, a type-0x9 input buffer containing a path string and three u64s '''OutSize''', '''Offset''' and '''InSize'''. No output.
  
 
Writes data to the specified file.
 
Writes data to the specified file.
Line 59: Line 75:
 
SystemInitializer also uses this as "FsFile::Create" with all input u64s set to 0.
 
SystemInitializer also uses this as "FsFile::Create" with all input u64s set to 0.
  
== InitUsbTransferPipeRaw ==
+
== InitializeUsbTransferPipeRaw ==
Takes an unknown u32 (ID?) and configures a transfer pipe over [[USB_services|usb:ds]] for raw access mode.
+
Unofficial name.
 +
 
 +
Takes an input u32. No output.
 +
 
 +
Configures a transfer pipe over [[USB_services|usb:ds]] for raw access mode.
  
== Raw_Read ==
+
== ReadRaw ==
Takes a type-0x6 output buffer and 2 u64s: '''offset''' and '''size'''.
+
Unofficial name.
 +
 
 +
Takes a type-0x6 output buffer and two u64s '''Offset''' and '''Size'''. No output.
  
 
Reads raw data from the device.
 
Reads raw data from the device.
  
== Raw_Write ==
+
== WriteRaw ==
Takes a type-0x5 input buffer and 2 u64s: '''offset''' and '''size'''.
+
Unofficial name.
 +
 
 +
Takes a type-0x5 input buffer and two u64s '''Offset''' and '''Size'''. No output.
  
 
Writes raw data to the device.
 
Writes raw data to the device.
  
 
[[Category:Services]]
 
[[Category:Services]]

Revision as of 22:07, 7 August 2023

Manu ("Manufacturing") services are provided by the 010000000000B14A sysmodule, which is installed at the factory but not on normal retail systems.

manu

This is "nn::manu::IManu".

Cmd Name
0 InitializeUsbTransferPipeFile
1 IsFileExist
2 ReadFile
3 WriteFile
4 InitializeUsbTransferPipeRaw
5 ReadRaw
6 WriteRaw
7 [7.0.0+]
8 [14.0.0+]

All commands are wrappers for usb:ds requests with USB configured as:

VID:           0x057E (Nintendo Co., Ltd)
PID:           0x3000
bcdDevice:     0x0100 (1.00)
Manufacturer:  "Nintendo"
Product:       "NintendoSdkDebugger"
SerialNumber:  "SerialNumber"

[7.0.0+] The requests are now configured as:

VID:           0x057E (Nintendo Co., Ltd)
PID:           0x3003
bcdDevice:     0x0100 (1.00)
Manufacturer:  "Nintendo"
Product:       "NintendoSdkManufacturing"
SerialNumber:  "SerialNumber"

InitializeUsbTransferPipeFile

Unofficial name.

Takes an input u32. No output.

Configures a transfer pipe over usb:ds for file access mode.

IsFileExist

Unofficial name.

Takes a type-0x9 input buffer containing a path string. Returns an output u64.

Checks whether the specified file exists.

This is "FsFile::Exists" in SystemInitializer.

ReadFile

Unofficial name.

Takes a type-0x6 output buffer, a type-0x9 input buffer containing a path string and three u64s OutSize, Offset and InSize. No output.

Reads data from the specified file.

WriteFile

Unofficial name.

Takes a type-0x5 output input, a type-0x9 input buffer containing a path string and three u64s OutSize, Offset and InSize. No output.

Writes data to the specified file.

SystemInitializer also uses this as "FsFile::Create" with all input u64s set to 0.

InitializeUsbTransferPipeRaw

Unofficial name.

Takes an input u32. No output.

Configures a transfer pipe over usb:ds for raw access mode.

ReadRaw

Unofficial name.

Takes a type-0x6 output buffer and two u64s Offset and Size. No output.

Reads raw data from the device.

WriteRaw

Unofficial name.

Takes a type-0x5 input buffer and two u64s Offset and Size. No output.

Writes raw data to the device.