Difference between revisions of "NS services"

From Nintendo Switch Brew
Jump to navigation Jump to search
Line 76: Line 76:
 
| 46 ||
 
| 46 ||
 
|-
 
|-
| 47 || [[#Cmd47]]
+
| 47 || [[#GetFreeSpace]]
 
|-
 
|-
| 48 || [[#Cmd48]]
+
| 48 || [[#GetTotalSpace]]
 
|-
 
|-
 
| 49 ||
 
| 49 ||
Line 235: Line 235:
 
|}
 
|}
  
== Cmd47 ==
+
== GetFreeSpace ==
 
Takes an input media-id that must be 5.
 
Takes an input media-id that must be 5.
  
 
Returns the u64 from [[Content_Manager_services#IContentStorage]] cmd22.
 
Returns the u64 from [[Content_Manager_services#IContentStorage]] cmd22.
  
== Cmd48 ==
+
== GetTotalSpace ==
 
Takes an input media-id that must be 5.
 
Takes an input media-id that must be 5.
  

Revision as of 10:26, 10 June 2017

This is the Switch equivalent of this.

ns:am

Cmd Name
0 #GetTitlesInfo
1
2
3
4
5
6
7
8
9
11
13
16
17
19
21
22
23
25
27
30
31
33
35
36
37
38
39
40
41
42
43
44
45
46
47 #GetFreeSpace
48 #GetTotalSpace
49
52
53
54
55
56
57
58
59
60 GetLanguageIdFromString
61
62
63
64
65
100
101
102
200
201
210
220
300
301
302
303
304
305
306
307
401
402
403
404
405
502
503
504
600
601 #GetTitleInfo1
602
603
604
605
700
701
702
703
704
705
800
801
900
901
902
903
904
905
906
907
908
1000
1001
1200
1300
1301
1302
1400
1500
1501
1502
1503
1600
1700
1800
1801
1802

GetFreeSpace

Takes an input media-id that must be 5.

Returns the u64 from Content_Manager_services#IContentStorage cmd22.

GetTotalSpace

Takes an input media-id that must be 5.

Returns the u64 from Content_Manager_services#IContentStorage cmd23.

GetTitlesInfo

Returns an array of title-info entries using the specified offset and size. No input titleID is passed to this.

Not tested on hw.

GetTitleInfo1

Returns 0x10-byte entries using the specified titleID. Usually only returns 1 entry. Can only return game titles.

Entry structure:

Offset Size Description
0x0 0x1 u8 "type" (String is from web-applet)
0x1 0x1 u8 "installedStorage" / StorageId (String is from web-applet)
0x2 0x2 Padding
0x4 0x4 u32 Title-version
0x8 0x8 u64 titleID

Title Types

Value Description
0x80 Gamecard title / regular application?
0x81 eShop title / demo?

ns:su

ns:dev

Applet IDs

ID Description
0x02 Unknown (throws fatal error 2128-0203)
0x03 Unknown (throws fatal error 2128-0203)
0x04 Unknown (throws fatal error 2128-0203)
0x0C Unknown (blinks the screen)
0x0D Unknown (displays "Checking for free space...")
0x0E ErrorApplet
0x0F NetworkSelect
0x10 PlayerSelect
0x11 Swkbd (on-screen keyboard)
0x14 Ec (ShopN) From ShopN string: "aInfo.appletId == ::nn::applet::AppletId_LibraryAppletShop".
0x15 Album
0x18 Whitelisted web-applet (From whitelisted web-applet string: "aInfo.appletId == ::nn::applet::AppletId_LibraryAppletLoginShare")
0x19 WifiWebAuth (From browser string: "aInfo.appletId == ::nn::applet::AppletId_LibraryAppletWifiWebAuth")

This seems to be the equivalent of this.

args.shimKind

This is from strings and code in whitelisted web-applet.

"args.shimKind() == ::nn::web::common::ShimKind::Lobby || args.shimKind() == ::nn::web::common::ShimKind::Login || args.shimKind() == ::nn::web::common::ShimKind::Share"
shimKind value Description
2 LoginApplet (See above string)
4 ShareApplet (See above string)
6 Wifi
7 LobbyApplet (See above string)