Difference between revisions of "ScePromoterUtil"

From Vita Development Wiki
Jump to navigation Jump to search
 
(6 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
== Module ==
 
== Module ==
  
=== Known NIDs ===
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Version !! Name !! World !! Privilege !! NID
+
! Version !! Name !! World !! Privilege
 
|-
 
|-
| 1.80 || ScePromoterUtil || Non-secure || User || 0xB31C2D5C
+
| 1.80-3.60 || ScePromoterUtil || Non-secure || User
|-
 
| 3.60 || ScePromoterUtil || Non-secure || User || 0x770E22E0
 
 
|}
 
|}
  
Line 21: Line 18:
 
! Version !! Name !! World !! Visibility !! NID
 
! Version !! Name !! World !! Visibility !! NID
 
|-
 
|-
| 1.69 || ScePromoterUtil || Non-secure || User || 0x31F237B6
+
| 1.69-3.60 || ScePromoterUtil || Non-secure || User || 0x31F237B6
 
|}
 
|}
  
 
== ScePromoterUtil ==
 
== ScePromoterUtil ==
 +
 +
  int ScePromoterUtil_0D76CD38(const char *a1, int a2,int a3);
 +
  int ScePromoterUtil_30A36AAF(const char *a1, int a2);
 +
  int ScePromoterUtil_395739DF(int *a1);
 +
  int ScePromoterUtil_59A6CDAE(int *a1);
 +
  int ScePromoterUtil_5FF5CACF(const char *a1, int a2, int a3);
 +
  int ScePromoterUtil_6A547384(const char *a1, int flags, void *a3);
 +
  int ScePromoterUtil_739BC292(const char *a1, int a2, int a3);
 +
  ScePromoterUtil_8494C742: same as scePromoterUtilityPromoteImport
 +
  int ScePromoterUtil_999AD6CE(int *a1, int *a2, int *a3);
 +
  int ScePromoterUtil_B27DA268(const char *a1, void *a2);
 +
  int ScePromoterUtil_D4E87DCB(const char *path);
 +
  int ScePromoterUtil_FDCCBE33(const char *a1); // Promot?
  
 
=== scePromoterUtilityInit ===
 
=== scePromoterUtilityInit ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 1.69-3.60 || 0x93451536
 +
|}
  
 
This sets up the library. Call it immediately after loading it.
 
This sets up the library. Call it immediately after loading it.
  
 +
<source lang="c">int scePromoterUtilityInit(void);</source>
 +
 +
=== scePromoterUtilityExit ===
 
{| class="wikitable"
 
{| class="wikitable"
 +
! Version !! NID
 
|-
 
|-
! Version
+
| 1.69-3.60 || 0xC95D24A6
! NID
 
|-
 
| 1.69
 
| 0x93451536
 
 
|}
 
|}
<source lang="c">int scePromoterUtilityInit(void);</source>
 
  
=== scePromoterUtilityExit ===
+
This shuts down the library. Call it immediately before unloading it.
  
This shuts down the library. Call it immediately before unloading it.
+
<source lang="c">int scePromoterUtilityExit(void);</source>
  
 +
=== scePromoterUtilityDeletePkg ===
 
{| class="wikitable"
 
{| class="wikitable"
 +
! Version !! NID
 
|-
 
|-
! Version
+
| 1.80-3.60 || 0x7D46752F
! NID
 
|-
 
| 1.69
 
| 0xC95D24A6
 
 
|}
 
|}
<source lang="c">int scePromoterUtilityExit(void);</source>
 
  
=== scePromoterUtilityDeletePkg ===
+
Deletes an icon from LiveArea.
  
Deletes an icon from LiveArea.
+
<source lang="c">int scePromoterUtilityDeletePkg(void *unk);</source>
  
 +
=== scePromoterUtilityUpdateLiveArea ===
 
{| class="wikitable"
 
{| class="wikitable"
 +
! Version !! NID
 
|-
 
|-
! Version
+
| 1.80-3.60 || 0x17D73ECA
! NID
 
|-
 
| 1.80
 
| 0x7D46752F
 
 
|}
 
|}
<source lang="c">int scePromoterUtilityDeletePkg(void *unk);</source>
 
 
=== scePromoterUtilityUpdateLiveArea ===
 
  
 
Updates the LiveArea XML.
 
Updates the LiveArea XML.
  
{| class="wikitable"
 
|-
 
! Version
 
! NID
 
|-
 
| 1.80
 
| 0x17D73ECA
 
|}
 
 
<source lang="c">
 
<source lang="c">
 
typedef struct {
 
typedef struct {
Line 87: Line 85:
 
int scePromoterUtilityUpdateLiveArea(promoter_la_update_t *args);
 
int scePromoterUtilityUpdateLiveArea(promoter_la_update_t *args);
 
</source>
 
</source>
 +
 +
=== scePromoterUtilityUpdateUpgradableStatus ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x82E69783
 +
|}
  
 
=== scePromoterUtilityPromotePkg ===
 
=== scePromoterUtilityPromotePkg ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 1.80-3.60 || 0x716C81F4
 +
|}
  
 
Installs the extracted content at <code>path</code> to the right location and add a LiveArea icon.
 
Installs the extracted content at <code>path</code> to the right location and add a LiveArea icon.
  
 +
<source lang="c">int scePromoterUtilityPromotePkg(char *path, int unk); // set unk = 0</source>
 +
 +
=== scePromoterUtilityPromotePkgWithRif ===
 
{| class="wikitable"
 
{| class="wikitable"
 +
! Version !! NID
 
|-
 
|-
! Version
+
| 1.69-3.60 || 0x86641BC6
! NID
 
|-
 
| 1.80
 
| 0x716C81F4
 
 
|}
 
|}
<source lang="c">int scePromoterUtilityPromotePkg(char *path, int unk); // set unk = 0</source>
 
  
=== scePromoterUtilityPromotePkgWithRif ===
+
Same as scePromoterUtilityPromotePkg but also generates a fixed RIF for the installed package.
  
Same as above but also generates a fixed RIF for the installed package.
+
<source lang="c">int scePromoterUtilityPromotePkgWithRif(char *path, int unk); // set unk = 0</source>
  
 +
=== scePromoterUtilityPromoteImport ===
 
{| class="wikitable"
 
{| class="wikitable"
 +
! Version !! NID
 
|-
 
|-
! Version
+
| 3.60 || 0x4B37808F
! NID
+
|}
 +
 
 +
=== scePromoterUtilityGetSize ===
 +
{| class="wikitable"
 +
! Version !! NID
 
|-
 
|-
| 1.69
+
| 3.60 || 0x1F5EA997
| 0x86641BC6
 
 
|}
 
|}
<source lang="c">int scePromoterUtilityPromotePkgWithRif(char *path, int unk); // set unk = 0</source>
 
  
 
=== scePromoterUtilityGetState ===
 
=== scePromoterUtilityGetState ===
 
The above two functions happen asynchronously. <code>*state</code> will be set to <code>1</code> when the operation is done.
 
 
 
{| class="wikitable"
 
{| class="wikitable"
 +
! Version !! NID
 
|-
 
|-
! Version
+
| 1.69-3.60 || 0xABEC74D2
! NID
 
|-
 
| 1.69
 
| 0xABEC74D2
 
 
|}
 
|}
 +
 +
The scePromoterUtilityPromotePkg and scePromoterUtilityPromotePkgWithRif functions happen asynchronously. <code>*state</code> will be set to <code>1</code> when the operation is done.
 +
 
<source lang="c">int scePromoterUtilityGetState(int *state);</source>
 
<source lang="c">int scePromoterUtilityGetState(int *state);</source>
  
 
=== scePromoterUtilityGetResult ===
 
=== scePromoterUtilityGetResult ===
 
After <code>scePromoterUtilityGetState</code> is set to <code>1</code>, this will get the result of the operation.
 
 
 
{| class="wikitable"
 
{| class="wikitable"
 +
! Version !! NID
 
|-
 
|-
! Version
+
| 1.69-3.60 || 0x49B473F0
! NID
 
|-
 
| 1.69
 
| 0x49B473F0
 
 
|}
 
|}
 +
 +
After scePromoterUtilityGetState is set to <code>1</code>, this will get the result of the operation.
 +
 
<source lang="c">int scePromoterUtilityGetResult(int *res);</source>
 
<source lang="c">int scePromoterUtilityGetResult(int *res);</source>
  
 
=== scePromoterUtilityRemoveSavedata ===
 
=== scePromoterUtilityRemoveSavedata ===
 +
{| class="wikitable"
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0xCB0A59B0
 +
|}
  
 +
=== scePromoterUtilityCheckExist ===
 
{| class="wikitable"
 
{| class="wikitable"
 +
! Version !! NID
 
|-
 
|-
! Version
+
| 3.60 || 0xBA9871E5
! NID
 
|-
 
| 3.60
 
| 0xCB0A59B0
 
 
|}
 
|}
  
 
=== Promoter Heartbeat ===
 
=== Promoter Heartbeat ===
When <code>*beat</code> is non-zero, the promote process is still alive.
 
 
 
{| class="wikitable"
 
{| class="wikitable"
 +
! Version !! NID
 
|-
 
|-
! Version
+
| 3.60 || 0x395739DF
! NID
 
|-
 
| 3.60
 
| 0x395739DF
 
 
|}
 
|}
 +
 +
When <code>*beat</code> is non-zero, the promote process is still alive.
 +
 
<source lang="c">int promoter_heartbeat(int *beat);</source>
 
<source lang="c">int promoter_heartbeat(int *beat);</source>
  
 +
[[Category:ARM]]
 +
[[Category:Usermode]]
 
[[Category:Modules]]
 
[[Category:Modules]]
[[Category:Userland]]
+
[[Category:Library]]

Latest revision as of 21:24, 1 May 2023

ScePromoterUtil is a wrapper for SceShellSvc calls that install applications to LiveArea. Specifically, it takes contents decrypted and extracted from packages and moves them to the right directory and adds an icon to LiveArea.

Module

Version Name World Privilege
1.80-3.60 ScePromoterUtil Non-secure User

Libraries

Known NIDs

Version Name World Visibility NID
1.69-3.60 ScePromoterUtil Non-secure User 0x31F237B6

ScePromoterUtil

 int ScePromoterUtil_0D76CD38(const char *a1, int a2,int a3);
 int ScePromoterUtil_30A36AAF(const char *a1, int a2);
 int ScePromoterUtil_395739DF(int *a1);
 int ScePromoterUtil_59A6CDAE(int *a1);
 int ScePromoterUtil_5FF5CACF(const char *a1, int a2, int a3);
 int ScePromoterUtil_6A547384(const char *a1, int flags, void *a3);
 int ScePromoterUtil_739BC292(const char *a1, int a2, int a3);
 ScePromoterUtil_8494C742: same as scePromoterUtilityPromoteImport
 int ScePromoterUtil_999AD6CE(int *a1, int *a2, int *a3);
 int ScePromoterUtil_B27DA268(const char *a1, void *a2);
 int ScePromoterUtil_D4E87DCB(const char *path);
 int ScePromoterUtil_FDCCBE33(const char *a1); // Promot?

scePromoterUtilityInit

Version NID
1.69-3.60 0x93451536

This sets up the library. Call it immediately after loading it.

int scePromoterUtilityInit(void);

scePromoterUtilityExit

Version NID
1.69-3.60 0xC95D24A6

This shuts down the library. Call it immediately before unloading it.

int scePromoterUtilityExit(void);

scePromoterUtilityDeletePkg

Version NID
1.80-3.60 0x7D46752F

Deletes an icon from LiveArea.

int scePromoterUtilityDeletePkg(void *unk);

scePromoterUtilityUpdateLiveArea

Version NID
1.80-3.60 0x17D73ECA

Updates the LiveArea XML.

typedef struct {
    char titleid[12]; // target app
    char path[128]; // directory of extracted LA update data
} promoter_la_update_t;
int scePromoterUtilityUpdateLiveArea(promoter_la_update_t *args);

scePromoterUtilityUpdateUpgradableStatus

Version NID
3.60 0x82E69783

scePromoterUtilityPromotePkg

Version NID
1.80-3.60 0x716C81F4

Installs the extracted content at path to the right location and add a LiveArea icon.

int scePromoterUtilityPromotePkg(char *path, int unk); // set unk = 0

scePromoterUtilityPromotePkgWithRif

Version NID
1.69-3.60 0x86641BC6

Same as scePromoterUtilityPromotePkg but also generates a fixed RIF for the installed package.

int scePromoterUtilityPromotePkgWithRif(char *path, int unk); // set unk = 0

scePromoterUtilityPromoteImport

Version NID
3.60 0x4B37808F

scePromoterUtilityGetSize

Version NID
3.60 0x1F5EA997

scePromoterUtilityGetState

Version NID
1.69-3.60 0xABEC74D2

The scePromoterUtilityPromotePkg and scePromoterUtilityPromotePkgWithRif functions happen asynchronously. *state will be set to 1 when the operation is done.

int scePromoterUtilityGetState(int *state);

scePromoterUtilityGetResult

Version NID
1.69-3.60 0x49B473F0

After scePromoterUtilityGetState is set to 1, this will get the result of the operation.

int scePromoterUtilityGetResult(int *res);

scePromoterUtilityRemoveSavedata

Version NID
3.60 0xCB0A59B0

scePromoterUtilityCheckExist

Version NID
3.60 0xBA9871E5

Promoter Heartbeat

Version NID
3.60 0x395739DF

When *beat is non-zero, the promote process is still alive.

int promoter_heartbeat(int *beat);