Difference between revisions of "SceShellSvc"

From Vita Development Wiki
Jump to navigation Jump to search
(Thanks to Graphene.)
Line 16: Line 16:
 
! Version !! Name !! World !! Visibility !! NID
 
! Version !! Name !! World !! Visibility !! NID
 
|-
 
|-
| 3.60 || SceShellSvc || Non-secure || User || 0x773242c7
+
| 3.60 || SceShellSvc || Non-secure || User || 0x773242C7
 
|-
 
|-
| 3.60 || SceShellUtil || Non-secure || User || 0xd2b1c8ae
+
| 3.60 || SceShellUtil || Non-secure || User || 0xD2B1C8AE
 
|-
 
|-
| 3.60 || SceShellUtilUketorne || Non-secure || User || 0xa2316143
+
| 3.60 || SceShellUtilUketorne || Non-secure || User || 0xA2316143
 
|-
 
|-
| 3.60 || SceShellUtilLaunchApp || Non-secure || User || 0xa0fd0261
+
| 3.60 || SceShellUtilLaunchApp || Non-secure || User || 0xA0FD0261
 
|-
 
|-
| 3.60 || SceSvcCtrl || Non-secure || User || 0x33e9b101
+
| 3.60 || SceSvcCtrl || Non-secure || User || 0x33E9B101
 
|-
 
|-
| 3.60 || SceIpmi || Non-secure || User || 0xf4e34edb
+
| 3.60 || SceIpmi || Non-secure || User || 0xF4E34EDB
 
|}
 
|}
  
Line 32: Line 32:
  
 
<source lang="C">
 
<source lang="C">
 +
typedef struct SceShellSvcCustomAudioSubParams1 {
 +
int unk_00; // not used (set to 0)
 +
int tracking1;
 +
int tracking2;
 +
} SceShellSvcCustomAudioSubParams1;
 +
 +
typedef struct SceShellSvcCustomAudioSubParams2 {
 +
int flag;
 +
int unk_04;
 +
int unk_08;
 +
int unk_0C;
 +
} SceShellSvcCustomAudioSubParams2;
 +
 +
typedef struct SceShellSvcCustomAudioSubParams3 {
 +
int param1;
 +
int param2;
 +
} SceShellSvcCustomAudioSubParams3;
 +
 +
typedef struct SceShellSvcCustomAudioParams {
 +
void* params1;  // optional params1
 +
SceSize params1Size; // size of optional params1
 +
void* params2; // optional params2
 +
SceSize params2Size; // size of optional params2
 +
void* params3; // optional params3
 +
SceSize params3Size; // size of optional params3
 +
void* params4; // optional params4
 +
SceSize params4Size; // size of optional params4
 +
} SceShellSvcAudioCustomParams;
 +
 
typedef struct SceShellSvcTable {
 
typedef struct SceShellSvcTable {
 
void *pFunc_0x00;
 
void *pFunc_0x00;
Line 38: Line 67:
 
void *pFunc_0x0C;
 
void *pFunc_0x0C;
 
void *pFunc_0x10;
 
void *pFunc_0x10;
int (* sceShutterSoundPlay)(void *obj, int flag, void *a3, int a4_flag, void *a5, void *a6, int a7);
+
int(*sceShellSvcAudioControl)(void *obj, int flag, SceShellSvcAudioCustomParams*, int numOfArg, int *pRes,SceShellSvcAudioCustomParams*, int numOfOut);
 +
void *pFunc_0x18;
 +
int(*sceShellSvcAsyncMethod)(void *obj, int asyncMethodId, .../* more args here */);
 
// more ...
 
// more ...
 
} SceShellSvcTable;
 
} SceShellSvcTable;
 
</source>
 
</source>
  
== common ==
+
== SceShellSvc ==
 +
 
 +
<pre>
 +
3.60:
 +
SceShellSvc_1FAB9A1E
 +
SceShellSvc_7CBF442B
 +
SceShellSvc_8D4F9F2E
 +
SceShellSvc_A0B067AC
 +
SceShellSvc_B452A177
 +
SceShellSvc_BD4161B0
 +
SceShellSvc_D943CE15
 +
SceShellSvc_E91AEAD4
 +
SceShellSvc_FB03FBC9
 +
</pre>
 +
 
 +
=== sceShellSvcGetSvcObj ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0xB31E7F1C
 +
|}
 +
 
 +
This is a guessed name. Temp name was sceShellSvcGetTable.
 +
 
 +
<source lang="C">SceShellSvcTable** sceShellSvcGetSvcObj(void);</source>
 +
 
 +
== SceShellUtil ==
 +
 
 +
<pre>
 +
3.60:
 +
SceShellUtil_01141995
 +
SceShellUtil_03201F4B
 +
SceShellUtil_0B066FAD
 +
SceShellUtil_0E7EAD89
 +
SceShellUtil_29DB95D1
 +
SceShellUtil_3219A1C0
 +
SceShellUtil_48C7E8F8
 +
SceShellUtil_4A234ABB
 +
SceShellUtil_5C5373B9
 +
SceShellUtil_6430C45E
 +
SceShellUtil_6F730976
 +
SceShellUtil_71C21A8C
 +
SceShellUtil_7A2CC043
 +
SceShellUtil_8CAAB23B
 +
SceShellUtil_9A83AC60
 +
SceShellUtil_9B0EE918
 +
SceShellUtil_B67A0C68
 +
SceShellUtil_CE35B2B8
 +
SceShellUtil_D71D8245
 +
SceShellUtil_E701BA71
 +
SceShellUtil_EC5881A5
 +
SceShellUtil_F75C684D
 +
SceShellUtil_F979148A
 +
SceShellUtil_FB612CA8
 +
SceShellUtil_FD521712
 +
</pre>
 +
 
 +
=== sceShellUtilSetSystemLanguage ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x040997D6
 +
|}
 +
 
 +
It takes about 5 seconds to apply.
 +
 
 +
<source lang="C">int sceShellUtilSetSystemLanguage(int languageId);</source>
 +
 
 +
=== sceShellUtilSetBGMMode ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0xB65B60CA
 +
|}
 +
 
 +
<source lang="C">
 +
// 0 to disable, 1 to enable BackGround Music
 +
int sceShellUtilSetBGMMode(int mode);
 +
</source>
 +
 
 +
=== sceShellUtilSetBtIconMode ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x8B69AD27
 +
|}
 +
 
 +
<source lang="C">
 +
// 0 to hide, 1 to show BlueTooth icon
 +
int sceShellUtilSetBtIconMode(int mode);
 +
</source>
 +
 
 +
=== sceShellUtilSetAirplaneIconMode ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x96BBF91B
 +
|}
 +
 
 +
<source lang="C">
 +
// 0 to hide, 1 to show airplane icon
 +
int sceShellUtilSetAirplaneIconMode(int mode);
 +
</source>
 +
 
 +
=== sceShellUtilSetTimeText ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x40DFAC6B
 +
|}
 +
 
 +
Sets text in time display, UTF-16 (remains until reboot?).
 +
 
 +
<source lang="C">sceShellUtilSetTimeText(char* a1, char* text);</source>
 +
 
 +
=== sceShellUtilShutdown ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x8F2F143D
 +
|}
 +
 
 +
Another possible name is sceShellUtilRequestPowerOff.
 +
 
 +
<source lang="C">int sceShellUtilShutdown(int a1);</source>
 +
 
 +
=== sceShellUtilReboot ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x636544FB
 +
|}
 +
 
 +
Another possible name is sceShellUtilRequestReboot.
 +
 
 +
<source lang="C">int sceShellUtilReboot(int a1);</source>
 +
 
 +
=== sceShellUtilRequestRebootWithError ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0xBB54D049
 +
|}
 +
 
 +
It shows "A serious error has occured" message before rebooting.
 +
 
 +
<source lang="C">int sceShellUtilRequestRebootWithError(int safeModeType, int errorCode, int errorMessageType);</source>
 +
 
 +
=== sceShellUtilTextClipboardGetUsedSize ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0xD0DDEDBC
 +
|}
 +
 
 +
This function returns size of the data that was written to clipboard with [[#sceShellUtilTextClipboardWrite]].
 +
 
 +
<source lang="C">unsigned int sceShellUtilTextClipboardGetUsedSize(void);</source>
 +
 
 +
=== sceShellUtilTextClipboardWrite ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0xC4810C56
 +
|}
 +
 
 +
<source lang="C">
 +
/*
 +
  data - pointer to the data to write
 +
  size - size of data to write. Must not exceed 0x1FFD.
 +
*/
  
sceShellSvcShutterSoundPlay can be used to play shutter sound only.
+
=== sceShellUtilTextClipboardRead ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x1B186905
 +
|}
  
 
<source lang="C">
 
<source lang="C">
int sceShellSvcShutterSoundPlay(void){
+
/*
void *(* SceShellSvc_B31E7F1C)(void);
+
  data - pointer to the buffer where the read data will be placed
void *ptr;
+
  size - size of data to read
 +
  [out] textlen - length actually read
 +
*/
 +
 
 +
int sceShellUtilTextClipboardRead(void* data, SceSize size, SceSize *textlen);
 +
</source>
 +
 
 +
int sceShellUtilTextClipboardWrite(const void* data, SceSize size);
 +
</source>
 +
 
 +
=== sceShellUtilInitEvents ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0xE8AD11EC
 +
|}
 +
 
 +
=== sceShellUtilRegisterEventHandler ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x7B5EDFE7
 +
|}
 +
 
 +
=== sceShellUtilLock ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0xA9537233
 +
|}
 +
 
 +
=== sceShellUtilUnlock ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x21A6CF54
 +
|}
 +
 
 +
== SceShellUtilUketorne ==
 +
 
 +
<pre>
 +
3.60:
 +
SceShellUtilUketorne_0C73C5E0
 +
SceShellUtilUketorne_154D9067
 +
SceShellUtilUketorne_156FEACF
 +
SceShellUtilUketorne_A4C2ACFC
 +
SceShellUtilUketorne_B98FC611
 +
SceShellUtilUketorne_FB551721
 +
SceShellUtilUketorne_FDC48BBE
 +
</pre>
 +
 
 +
== SceShellUtilLaunchApp ==
 +
 
 +
=== sceShellUtilLaunchApp ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x5372EEDB
 +
|}
 +
 
 +
This is a guessed name.
 +
 
 +
<source lang="C">int sceShellUtilLaunchApp(void *some_struct);</source>
  
int arg_a3 = 0, arg_a5[2];
+
== SceSvcCtrl ==
  
arg_a5[0] = 0;
+
<pre>
arg_a5[1] = 0; // sound type?
+
3.60:
 +
SceSvcCtrl_077F8AF1
 +
SceSvcCtrl_683998F2
 +
SceSvcCtrl_8BEB8B7C
 +
SceSvcCtrl_B21BE499
 +
</pre>
  
taiGetModuleExportFunc("SceShellSvc", 0xFFFFFFFF, 0xB31E7F1C, (uintptr_t *)&SceShellSvc_B31E7F1C);
+
== SceIpmi ==
  
ptr = SceShellSvc_B31E7F1C();
+
== Common ==
  
((SceShellSvcTable *)(*(uint32_t *)ptr))->sceShutterSoundPlay(ptr, 0x140000, &arg_a3, 1, arg_a5, 0, 0);
+
sceShellSvcShutterSoundPlay can be used to play shutter sound only.
  
 +
<source lang="C">
 +
int sceShellSvcShutterSoundPlay(void){
 +
int arg_a3 = 0, arg_a5[2];
 +
arg_a5[0] = 0;
 +
arg_a5[1] = 0; // sound type?
 +
SceShellSvcTable *table = *sceShellSvcGetSvcObj();
 +
table->sceShellSvcAudioControl(ptr, 0x140000, &arg_a3, 1, arg_a5, 0, 0);
 
return 0;
 
return 0;
 
}
 
}

Revision as of 21:00, 12 September 2022

Module

Version World Privilege
1.69-3.60 Non-secure User

Libraries

Known NIDs

Version Name World Visibility NID
3.60 SceShellSvc Non-secure User 0x773242C7
3.60 SceShellUtil Non-secure User 0xD2B1C8AE
3.60 SceShellUtilUketorne Non-secure User 0xA2316143
3.60 SceShellUtilLaunchApp Non-secure User 0xA0FD0261
3.60 SceSvcCtrl Non-secure User 0x33E9B101
3.60 SceIpmi Non-secure User 0xF4E34EDB

Types

typedef struct SceShellSvcCustomAudioSubParams1 {
	int unk_00; // not used (set to 0)
	int tracking1;
	int tracking2;
} SceShellSvcCustomAudioSubParams1;

typedef struct SceShellSvcCustomAudioSubParams2 {
	int flag;
	int unk_04;
	int unk_08;
	int unk_0C;
} SceShellSvcCustomAudioSubParams2;

typedef struct SceShellSvcCustomAudioSubParams3 {
	int param1;
	int param2;
} SceShellSvcCustomAudioSubParams3;

typedef struct SceShellSvcCustomAudioParams {
	void* params1;  	// optional params1
	SceSize params1Size; 	// size of optional params1
	void* params2; 		// optional params2
	SceSize params2Size;	// size of optional params2
	void* params3;		// optional params3
	SceSize params3Size;	// size of optional params3
	void* params4;		// optional params4
	SceSize params4Size;	// size of optional params4
} SceShellSvcAudioCustomParams;

typedef struct SceShellSvcTable {
	void *pFunc_0x00;
	void *pFunc_0x04;
	void *pFunc_0x08;
	void *pFunc_0x0C;
	void *pFunc_0x10;
	int(*sceShellSvcAudioControl)(void *obj, int flag, SceShellSvcAudioCustomParams*, int numOfArg, int *pRes,SceShellSvcAudioCustomParams*, int numOfOut);
	void *pFunc_0x18;
	int(*sceShellSvcAsyncMethod)(void *obj, int asyncMethodId, .../* more args here */);
	// more ...
} SceShellSvcTable;

SceShellSvc

3.60:
SceShellSvc_1FAB9A1E
SceShellSvc_7CBF442B
SceShellSvc_8D4F9F2E
SceShellSvc_A0B067AC
SceShellSvc_B452A177
SceShellSvc_BD4161B0
SceShellSvc_D943CE15
SceShellSvc_E91AEAD4
SceShellSvc_FB03FBC9

sceShellSvcGetSvcObj

Version NID
3.60 0xB31E7F1C

This is a guessed name. Temp name was sceShellSvcGetTable.

SceShellSvcTable** sceShellSvcGetSvcObj(void);

SceShellUtil

3.60:
SceShellUtil_01141995
SceShellUtil_03201F4B
SceShellUtil_0B066FAD
SceShellUtil_0E7EAD89
SceShellUtil_29DB95D1
SceShellUtil_3219A1C0
SceShellUtil_48C7E8F8
SceShellUtil_4A234ABB
SceShellUtil_5C5373B9
SceShellUtil_6430C45E
SceShellUtil_6F730976
SceShellUtil_71C21A8C
SceShellUtil_7A2CC043
SceShellUtil_8CAAB23B
SceShellUtil_9A83AC60
SceShellUtil_9B0EE918
SceShellUtil_B67A0C68
SceShellUtil_CE35B2B8
SceShellUtil_D71D8245
SceShellUtil_E701BA71
SceShellUtil_EC5881A5
SceShellUtil_F75C684D
SceShellUtil_F979148A
SceShellUtil_FB612CA8
SceShellUtil_FD521712

sceShellUtilSetSystemLanguage

Version NID
3.60 0x040997D6

It takes about 5 seconds to apply.

int sceShellUtilSetSystemLanguage(int languageId);

sceShellUtilSetBGMMode

Version NID
3.60 0xB65B60CA
// 0 to disable, 1 to enable BackGround Music
int sceShellUtilSetBGMMode(int mode);

sceShellUtilSetBtIconMode

Version NID
3.60 0x8B69AD27
// 0 to hide, 1 to show BlueTooth icon
int sceShellUtilSetBtIconMode(int mode);

sceShellUtilSetAirplaneIconMode

Version NID
3.60 0x96BBF91B
// 0 to hide, 1 to show airplane icon
int sceShellUtilSetAirplaneIconMode(int mode);

sceShellUtilSetTimeText

Version NID
3.60 0x40DFAC6B

Sets text in time display, UTF-16 (remains until reboot?).

sceShellUtilSetTimeText(char* a1, char* text);

sceShellUtilShutdown

Version NID
3.60 0x8F2F143D

Another possible name is sceShellUtilRequestPowerOff.

int sceShellUtilShutdown(int a1);

sceShellUtilReboot

Version NID
3.60 0x636544FB

Another possible name is sceShellUtilRequestReboot.

int sceShellUtilReboot(int a1);

sceShellUtilRequestRebootWithError

Version NID
3.60 0xBB54D049

It shows "A serious error has occured" message before rebooting.

int sceShellUtilRequestRebootWithError(int safeModeType, int errorCode, int errorMessageType);

sceShellUtilTextClipboardGetUsedSize

Version NID
3.60 0xD0DDEDBC

This function returns size of the data that was written to clipboard with #sceShellUtilTextClipboardWrite.

unsigned int sceShellUtilTextClipboardGetUsedSize(void);

sceShellUtilTextClipboardWrite

Version NID
3.60 0xC4810C56
/*
  data - pointer to the data to write
  size - size of data to write. Must not exceed 0x1FFD.
*/

=== sceShellUtilTextClipboardRead ===
{| class="wikitable"
! Version !! NID
|-
| 3.60 || 0x1B186905
|}

<source lang="C">
/*
  data - pointer to the buffer where the read data will be placed
  size - size of data to read
  [out] textlen - length actually read
*/

int sceShellUtilTextClipboardRead(void* data, SceSize size, SceSize *textlen);

int sceShellUtilTextClipboardWrite(const void* data, SceSize size); </source>

sceShellUtilInitEvents

Version NID
3.60 0xE8AD11EC

sceShellUtilRegisterEventHandler

Version NID
3.60 0x7B5EDFE7

sceShellUtilLock

Version NID
3.60 0xA9537233

sceShellUtilUnlock

Version NID
3.60 0x21A6CF54

SceShellUtilUketorne

3.60:
SceShellUtilUketorne_0C73C5E0
SceShellUtilUketorne_154D9067
SceShellUtilUketorne_156FEACF
SceShellUtilUketorne_A4C2ACFC
SceShellUtilUketorne_B98FC611
SceShellUtilUketorne_FB551721
SceShellUtilUketorne_FDC48BBE

SceShellUtilLaunchApp

sceShellUtilLaunchApp

Version NID
3.60 0x5372EEDB

This is a guessed name.

int sceShellUtilLaunchApp(void *some_struct);

SceSvcCtrl

3.60:
SceSvcCtrl_077F8AF1
SceSvcCtrl_683998F2
SceSvcCtrl_8BEB8B7C
SceSvcCtrl_B21BE499

SceIpmi

Common

sceShellSvcShutterSoundPlay can be used to play shutter sound only.

int sceShellSvcShutterSoundPlay(void){
	int arg_a3 = 0, arg_a5[2];
	arg_a5[0] = 0;
	arg_a5[1] = 0; // sound type?
	SceShellSvcTable *table = *sceShellSvcGetSvcObj();
	table->sceShellSvcAudioControl(ptr, 0x140000, &arg_a3, 1, arg_a5, 0, 0);
	return 0;
}