Difference between revisions of "ScePromoterUtil"

From Vita Development Wiki
Jump to navigation Jump to search
(Swapped Module <-> Library, see revision 1.1 under "Revision History" of "Vita SDK specifications" (https://wiki.henkaku.xyz/vita/File:Vita_SDK_specifications.pdf))
Line 24: Line 24:
 
== ScePromoterUtil ==
 
== ScePromoterUtil ==
  
==== scePromoterUtilityInit ====
+
=== scePromoterUtilityInit ===
  
 
This sets up the library. Call it immediately after loading it.
 
This sets up the library. Call it immediately after loading it.
Line 38: Line 38:
 
<source lang="c">int scePromoterUtilityInit(void);</source>
 
<source lang="c">int scePromoterUtilityInit(void);</source>
  
==== scePromoterUtilityExit ====
+
=== scePromoterUtilityExit ===
  
 
This shuts down the library. Call it immediately before unloading it.
 
This shuts down the library. Call it immediately before unloading it.
Line 52: Line 52:
 
<source lang="c">int scePromoterUtilityExit(void);</source>
 
<source lang="c">int scePromoterUtilityExit(void);</source>
  
==== scePromoterUtilityDeletePkg ====
+
=== scePromoterUtilityDeletePkg ===
  
 
Deletes an icon from LiveArea.
 
Deletes an icon from LiveArea.
Line 66: Line 66:
 
<source lang="c">int scePromoterUtilityDeletePkg(void *unk);</source>
 
<source lang="c">int scePromoterUtilityDeletePkg(void *unk);</source>
  
==== scePromoterUtilityUpdateLiveArea ====
+
=== scePromoterUtilityUpdateLiveArea ===
  
 
Updates the LiveArea XML.
 
Updates the LiveArea XML.
Line 86: Line 86:
 
</source>
 
</source>
  
==== scePromoterUtilityPromotePkg ====
+
=== scePromoterUtilityPromotePkg ===
  
 
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.
Line 100: Line 100:
 
<source lang="c">int scePromoterUtilityPromotePkg(char *path, int unk); // set unk = 0</source>
 
<source lang="c">int scePromoterUtilityPromotePkg(char *path, int unk); // set unk = 0</source>
  
==== scePromoterUtilityPromotePkgWithRif ====
+
=== scePromoterUtilityPromotePkgWithRif ===
  
 
Same as above but also generates a fixed RIF for the installed package.
 
Same as above but also generates a fixed RIF for the installed package.
Line 114: Line 114:
 
<source lang="c">int scePromoterUtilityPromotePkgWithRif(char *path, int unk); // set unk = 0</source>
 
<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.
 
The above two functions happen asynchronously. <code>*state</code> will be set to <code>1</code> when the operation is done.
Line 128: Line 128:
 
<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.
 
After <code>scePromoterUtilityGetState</code> is set to <code>1</code>, this will get the result of the operation.
Line 142: Line 142:
 
<source lang="c">int scePromoterUtilityGetResult(int *res);</source>
 
<source lang="c">int scePromoterUtilityGetResult(int *res);</source>
  
==== scePromoterUtilityRemoveSavedata ====
+
=== scePromoterUtilityRemoveSavedata ===
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 153: Line 153:
 
|}
 
|}
  
==== Promoter Heartbeat ====
+
=== Promoter Heartbeat ===
 
When <code>*beat</code> is non-zero, the promote process is still alive.
 
When <code>*beat</code> is non-zero, the promote process is still alive.
  

Revision as of 18:11, 8 June 2017

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

Known NIDs

Version Name World Privilege NID
1.80 ScePromoterUtil Non-secure User 0xB31C2D5C

Libraries

Known NIDs

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

ScePromoterUtil

scePromoterUtilityInit

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

Version NID
1.69 0x93451536
int scePromoterUtilityInit(void);

scePromoterUtilityExit

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

Version NID
1.69 0xC95D24A6
int scePromoterUtilityExit(void);

scePromoterUtilityDeletePkg

Deletes an icon from LiveArea.

Version NID
1.80 0x7D46752F
int scePromoterUtilityDeletePkg(void *unk);

scePromoterUtilityUpdateLiveArea

Updates the LiveArea XML.

Version NID
1.80 0x17D73ECA
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);

scePromoterUtilityPromotePkg

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

Version NID
1.80 0x716C81F4
int scePromoterUtilityPromotePkg(char *path, int unk); // set unk = 0

scePromoterUtilityPromotePkgWithRif

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

Version NID
1.69 0x86641BC6
int scePromoterUtilityPromotePkgWithRif(char *path, int unk); // set unk = 0

scePromoterUtilityGetState

The above two functions happen asynchronously. *state will be set to 1 when the operation is done.

Version NID
1.69 0xABEC74D2
int scePromoterUtilityGetState(int *state);

scePromoterUtilityGetResult

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

Version NID
1.69 0x49B473F0
int scePromoterUtilityGetResult(int *res);

scePromoterUtilityRemoveSavedata

Version NID
3.60 0xCB0A59B0

Promoter Heartbeat

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

Version NID
3.60 0x395739DF
int promoter_heartbeat(int *beat);