SceAppMgr: Difference between revisions

From Vita Development Wiki
Jump to navigation Jump to search
Line 1,310: Line 1,310:
//example: sceAppMgrAppParamGetString(processid, 0xC, buffer,0x10)
//example: sceAppMgrAppParamGetString(processid, 0xC, buffer,0x10)


int sceAppMgrAppParamGetString(int pid, int cmd, char *out_buf, sceAppMgrAppParamGetString_opt* buf_size);
int _sceAppMgrAppParamGetString(int pid, int cmd, char *out_buf, sceAppMgrAppParamGetString_opt* buf_size);
</source>
</source>



Revision as of 15:49, 16 September 2017

Module

Known NIDs

Version Name World Privilege NID
1.69 SceAppMgr Non-secure Kernel 0x69876CDE
3.60 SceAppMgr ? Kernel 0xDBB29DB7

Libraries

Known NIDs

Version Name World Visibility NID
1.69 SceAppMgrForDriver Non-secure Kernel 0xDCE180F8
3.60 SceAppMgrForDriver ? Kernel 0xDCE180F8
1.69 SceAppMgr Non-secure User 0x8AF17416
3.60 SceAppMgr ? User 0x8AF17416
1.69 SceSharedFb Non-secure User 0x32A0442E
3.60 SceSharedFb ? User 0x32A0442E
1.69 SceSharedFbForDriver Non-secure Kernel 0x9B443ECC

SceAppMgrForDriver

sceAppMgrGetSystemDataFile

Version NID
1.69 0xAEC49533

sceAppMgrSaveSafeMemory

Version NID
1.69 0xD366AA44

sceAppMgrLoadSafeMemory

Version NID
1.69 0xFAF3DAAA

Load App by PATH for Kernel

Version NID
1.69 0xB0A37065

Loads a SELF at a given path with optional arguments. Arguments is a null-separated string. Arguments are passed directly to the app as a list of strings (char * const argv[]). Special arguments are listed below.

int opt[52/4] = {0};
opt[0] = sizeof(opt);
int appmgr_load_app(const char *path, const char *arglist, int arglen, int unk1, void *opt, void *unk2);
// sample: appmgr_load_cmd("ux0:temp/installer.self", "-budget\0big\0-nonsuspendable\0-livearea_off\0", 0x2A, 0, opt, NULL);
Argument Param Description
-budget one of "big", "game", "sys", "shell", "small", "mini" App budget (memory allocation I believe)
-memsize decimal number Memory size
-la_type none LiveArea type
-bg none Run in background
-nonsuspendable none Non-suspendable
-titleid string Set title id
-phcontmemsize decimal number Physical cont. memory size
-livearea_off none No LiveArea
-exit_to title id App to resume upon exit
-param string Param
-usecdlg none Use CDRAM (?)

sceAppMgrGameDataMountForDriver

Version NID
3.60 0xCE356B2D
//derived from _sceAppMgrGameDataMount
int sceAppMgrGameDataMountForDriver(char* original_path, char* unk1, char* unk2, char* mount_point)

sceAppMgrUmountForDriver

Version NID
3.60 0xA714BB35

The following mount points can be derived from the code:

  • "photo0:" (0x64)
  • "music0:" (0x69)
  • "video0:" (0x6D)
  • addcont0:
  • addcont1:
 
//derived from _sceAppMgrUmount
int sceAppMgrUmountForDriver(const char *mount_point)

SceAppMgr

Special App IDs

Some functions take an app id as argument. Here are some special ones.

ID Desc
-1 Unknown
-2 Current App
-3 Unknown
-4 Unknown
-5 Unknown
-6 Unknown


_sceAppMgrSaveDataSlotSetStatus

Version NID
1.69 0x30C0CA4

_sceAppMgrGetCoredumpStateForShell

Version NID
1.69 0x3DD7E65

_sceAppMgrAddContMount

Version NID
1.69 0x667E10A

_sceAppMgrGetNameById

Version NID
1.69 0x8E93582

_sceAppMgrUmountByPid

Version NID
1.69 0xA419BC8

_sceAppMgrWorkDirMount

Version NID
1.69 0xC49659E

Example from store_checkout_plugin.

This creates a mount point that can be used as a filesystem. The known working values for param1 are (0xC8 0xC9 0xCB 0xCC 0xCE).

_sceAppMgrWorkDirMount(0xCC,buffer)

Example from sqlite_vsh.

_sceAppMgrWorkDirMount(0xC8,buffer)

sceAppMgrQuitApp

Version NID
1.69 0xDD747FB

_sceAppMgrSaveDataSlotSetParam

Version NID
1.69 0xE216486

_sceAppMgrAcquireSoundOutExclusive3

Version NID
1.69 0x13ED8FFD

_sceAppMgrCheckRifGD

Version NID
1.69 0x15D7CA34
3.60 0x15D7CA34

checks game data rif from \license\app\

typedef struct _sceAppMgrCheckRifGD_opt //size is 0x08
{
  uint32_t unk_0;
  uint32_t unk_4;
}_sceAppMgrCheckRifGD_opt

//path is a temporary mount point acquired with _sceAppMgrGameDataMount
//dest should be buffer of size 0x70
int _sceAppMgrCheckRifGD(char* path, void* dest, _sceAppMgrCheckRifGD_opt* opt);

_sceAppMgrSaveDataSlotDelete

Version NID
1.69 0x191CF6B1

_sceAppMgrConvertVs0UserDrivePath

Version NID
1.69 0x19B76D11

Example from libssl.

//example: SceAppMgrUser_ADAA658E_sceMgrConvertVs0userDrivePath("vs0:sys/external",mountname,length)

int sceAppMgrConvertVs0UserDrivePath(const char *path, char outpath[length], int length);

Pass in a non-restricted vs0: path and an empty buffer and the buffer will be filled with the path of a temporary mount point.

__sceAppMgrGetAppState

Version NID
1.69 0x210C0046

_sceAppMgrGetStatusById

Version NID
1.69 0x211D9558

_sceAppMgrReceiveNotificationRequestForShell

Version NID
1.69 0x21A86141

_sceAppMgrGetAppParam

Version NID
1.69 0x258C3E3C

_sceAppMgrForceUmount

Version NID
1.69 0x2598EC8A

_sceAppMgrGetAppParam2

Version NID
1.69 0x26D43923

_sceAppMgrGetPidListForShell

Version NID
1.69 0x29AC9DF0

sceAppMgrReleaseSoundOutExclusive2

Version NID
1.69 0x2BB68701

_sceAppMgrAppUmount

Version NID
1.69 0x2FB40418

sceAppMgrEnableCoredumpForTest

Version NID
1.69 0x32FD0B99

sceAppMgrGetAppIdByAppId

Version NID
1.69 0x332C9D98

_sceAppMgrCaptureFrameBufDMAC

Version NID
1.69 0x34170882

_sceAppMgrLoopBackMount

Version NID
1.69 0x3493CDFA

sceAppMgrIsOtherAppPresent

Version NID
1.69 0x371F6F81

_sceAppMgrLaunchAppByUri

Version NID
1.69 0x37CE3984

sceAppMgrNotifyLiveBoardModeForShell

Version NID
1.69 0x389F048D

sceAppMgrReleaseSoundOutExclusive

Version NID
1.69 0x3BA41199

_sceAppMgrTrophyMountById

Version NID
1.69 0x3DFC9410

sceAppMgrEnablePrioritizingSystemChat

Version NID
1.69 0x3E1FAB92

sceAppMgrSendLiveBoardMode

Version NID
1.69 0x3E4AC082

_sceAppMgrReceiveEventNum

Version NID
1.69 0x3EEEC172

sceAppMgrDestroyOtherApp

Version NID
1.69 0x3EF143BF

_sceAppMgrGetCurrentBgmState2

Version NID
1.69 0x3F7B9BB5

sceAppMgrActivateApp

Version NID
1.69 0x43631508

sceAppMgrAcquireBgmPortForMusicPlayer

Version NID
1.69 0x44EC36FA

_sceAppMgrGameDataMount

Version NID
1.69 0x454EB183
3.60 0x454EB183
typedef struct _sceAppMgrGameDataMount_opt //size is 0x18
{
  char* mount_point;
  uint32_t unk_4;
  uint32_t unk_8;
  uint32_t unk_C;
  uint32_t unk_10;
  uint32_t unk_14;
}_sceAppMgrGameDataMount_opt;

int _sceAppMgrGameDataMount(char* original_path, char* unk1, char* unk2, _sceAppMgrGameDataMount_opt* opt)

_sceAppMgrGetStatusByName

Version NID
1.69 0x46998AFC

Example from store_checkout_plugin.

_sceAppMgrGetStatusByName(0,buffer)

_sceAppMgrGetPfsDrive

Version NID
1.69 0x46B208D4

_sceAppMgrCaptureFrameBufIFTU

Version NID
1.69 0x4799F0F7

_sceAppMgrLaunchAppByUri2

Version NID
1.69 0x4B45EAC0

sceAppMgrGetActivateApp

Version NID
1.69 0x4C1183C2

_sceAppMgrLaunchAppByNameForShell

Version NID
1.69 0x4C3B5BB8

_sceAppMgrBgdlGetQueueStatus

Version NID
1.69 0x5075AE28

_sceAppMgrGetDevInfo

Version NID
1.69 0x52766019

Example from store_checkout_plugin.

_sceAppMgrGetDevInfo("ux0:", buffer, resultbuf)

sceAppMgrDump

Version NID
1.69 0x527795E8

sceAppMgrFinishCoredumpForShell

Version NID
1.69 0x52FF63D1

_sceAppMgrSaveDataUmount

Version NID
1.69 0x53623420

sceAppMgrLaunchAppCancel

Version NID
1.69 0x5369BC0A

sceAppMgrDestroyOtherAppByPidForShell

Version NID
1.69 0x5420D23C

_sceAppMgrSendEvent

Version NID
1.69 0x5432E51D

sceAppMgrDestroyAppByAppId

Version NID
1.69 0x54368A0B

_sceAppMgrGetRawPathOfApp0ByPidForShell

Version NID
1.69 0x550422F9

_sceAppMgrGetAppMgrState

Version NID
1.69 0x55C60D20

_sceAppMgrWorkDirMountById

Version NID
1.69 0x58E4CC90

sceAppMgrEnableDuckingOnSystemChat

Version NID
1.69 0x5AB230DE

_sceAppMgrGetParam

Version NID
1.69 0x5FF430E8

Example from webcore.

_sceAppMgrGetParam(0xFFFFFFFE,buffer)

sceAppMgrGetProcessIdByAppIdForShell

Version NID
1.69 0x63FAC2A9

_sceAppMgrGetSaveDataInfo

Version NID
1.69 0x6C52A377

_sceAppMgrAcidDirSet

Version NID
1.69 0x6CBCBE1A

_sceAppMgrGetAppInfo

Version NID
1.69 0x6E65D746

_sceAppMgrReceiveSystemEvent

Version NID
1.69 0x7240375B

sceAppMgrSetBgmSubPriority

Version NID
1.69 0x7333C2F1

_sceAppMgrSaveDataSlotGetParam

Version NID
1.69 0x74D789E2

sceAppMgrDeclareSystemChatApp

Version NID
1.69 0x77EE891D

_sceAppMgrSaveDataSlotInit

Version NID
1.69 0x79689A1D

_sceAppMgrGameDataMountWithPatch

Version NID
1.69 0x7A239EDC

_sceAppMgrGetRawPathOfApp0ByAppIdForShell

Version NID
1.69 0x7D210054

sceAppMgrIsDevelopmentMode

Version NID
1.69 0x7D4F8F83

_sceAppMgrIsCameraActive

Version NID
1.69 0x7F0C9410

_sceAppMgrGetCurrentBgmState

Version NID
1.69 0x81569A58

_sceAppMgrReleaseSoundOutExclusive3

Version NID
1.69 0x82C924AD

sceAppMgrGrowMemory

Version NID
1.69 0x842FCE8C

_sceAppMgrGetUserDirPath

Version NID
1.69 0x84B138BF

_sceAppMgrGetVs0UserModuleDrive

Version NID
1.69 0x85589E87

sceAppMgrExitToLiveboardForGameApp

Version NID
1.69 0x89D1DA55

_sceAppMgrPeekLaunchParamForShell

Version NID
1.69 0x8CC3DC46

_sceAppMgrLaunchAppByPath4

Version NID
1.69 0x8FE4F651

sceAppMgrSetBgmSubPriorityForSystemChat

Version NID
1.69 0x90E42B4D

_sceAppMgrAppDataMountById

Version NID
1.69 0x9275414A

_sceAppMgrCheckSaveDataMounted

Version NID
1.69 0x947A95CA

_sceAppMgrSaveDataMount

Version NID
1.69 0x95A6B1BF

sceAppMgrInfoBarOpen

Version NID
1.69 0x97B80C01

sceAppMgrInfoBarClose

Version NID
1.69 0x9A60BED4

_sceAppMgrGetRawPath

Version NID
1.69 0x9FB3E2C8

Example from silk in 1.80

sceAppMgrGetRawPath(unknown,buffer,0x101);

sceAppMgrSetInfobarStateForShellByPid

Version NID
1.69 0xA3314B2B

_sceAppMgrSaveDataDataRemove

Version NID
1.69 0xA579A39E

_sceAppMgrReceiveEvent

Version NID
1.69 0xA90546F4

_sceAppMgrDrmOpen

Version NID
1.69 0xAA5B3A37

sceAppMgrAcquireBgmPortWithPriority

Version NID
1.69 0xAAED7419

_sceAppMgrGetFgAppInfo

Version NID
1.69 0xAC9968B7

sceAppMgrAcquireSoundOutExclusive

Version NID
1.69 0xACB48075

sceAppMgrReleaseBtrm

Version NID
1.69 0xACDCE4DB

sceAppMgrSetInfobarState

Version NID
1.69 0xAD9022A1

sceAppMgrGetSystemDataFile

Version NID
1.69 0xAEC49533

_sceAppMgrLaunchAppByName2

Version NID
1.69 0xAEF06983

_sceAppMgrSystemParamGetString

Version NID
1.69 0xAF5F9497

_sceAppMgrSaveDataSlotGetStatus

Version NID
1.69 0xAF8258D4

sceAppMgrSetAppProtectionModeOnMemoryShortage

Version NID
1.69 0xAF8C7FFB

sceAppMgrAcquireBgmPort

Version NID
1.69 0xAFCEAB96

_sceAppMgrSetPowerSaveMode

Version NID
1.69 0xB0ECB9C2

_sceAppMgrPhotoUmount

Version NID
1.69 0xB2EA376F

_sceAppMgrSystemParamDateTimeGetConf

Version NID
1.69 0xB7F95389

_sceAppMgrSaveDataDataSave

Version NID
1.69 0xB81777B7

sceAppMgrAcquireSoundOutExclusive2

Version NID
1.69 0xB9365442

_sceAppMgrDeclareShellProcess2

Version NID
1.69 0xBDF15BDC

_sceAppMgrGetStatusByAppId

Version NID
1.69 0xBF4213A3

Example from store_checkout_plugin.

_sceAppMgrGetStatusByAppId(0xFFFFFFFE,buffer)

_sceAppMgrGetIdByName

Version NID
1.69 0xC311CC17

_sceAppMgrGetVs0UserDataDrive

Version NID
1.69 0xC361C084

_sceAppMgrSaveDataSlotCreate

Version NID
1.69 0xC48833AA

_sceAppMgrCaptureFrameBufDMACByAppId

Version NID
1.69 0xC698385C

_sceAppMgrLaunchAppByName2ForShell

Version NID
1.69 0xC6BA9596

_sceAppMgrGetMediaTypeFromDriveByPid

Version NID
1.69 0xC7566C46

_sceAppMgrGetMediaTypeFromDrive

Version NID
1.69 0xC8D32206

_sceAppMgrContentInstallPeriodStop

Version NID
1.69 0xC9854E6E

Example from store_checkout_plugin. Parameters are uncertain.

sceAppMgrContentInstallPeriodStop()

_sceAppMgrSendSystemEvent

Version NID
1.69 0xCEAF12B6

Example from store_checkout_plugin.

_sceAppMgrSendSystemEvent(0,0x10000006)

_sceAppMgrSendSystemEvent(0,0x10000004)

_sceAppMgrAppMount

Version NID
1.69 0xCF1C0C0C

sceAppMgrSetSystemImposeState

Version NID
1.69 0xD16B91B5

sceAppMgrDestroyApp

Version NID
1.69 0xD18F8DDD

sceAppMgrSaveSafeMemory

Version NID
1.69 0xD366AA44

_sceAppMgrCaptureFrameBufByAppId

Version NID
1.69 0xD3787750

sceAppMgrSetEnablePrioritizeSystemChat

Version NID
1.69 0xD4078CC0

sceAppMgrSetInfobarStateForCommonDialog

Version NID
1.69 0xD6758B4E

_sceAppMgrSendSystemEvent2

Version NID
1.69 0xD70D5EEC

sceAppMgrAcquireBtrm

Version NID
1.69 0xD752695D

sceAppMgrRestoreBgmSettingForShell

Version NID
1.69 0xD9BCC50C

_sceAppMgrLaunchAppByName

Version NID
1.69 0xDAC0AF12

_sceAppMgrLoadExec

Version NID
1.69 0xDC2F23E0

_sceAppMgrContentInstallPeriodStart

Version NID
1.69 0xDC478FB1

Example from store_checkout_plugin. Parameters are uncertain.

sceAppMgrContentInstallPeriodStart()

sceAppMgrDestroyOtherAppByAppIdForShell

Version NID
1.69 0xDC70C5F7

_sceAppMgrAppParamGetInt

Version NID
1.69 0xDC7F8DE5

_sceAppMgrLaunchAppByName2ndStage

Version NID
1.69 0xDEDD2AED

_sceAppMgrReceiveShellEvent

Version NID
1.69 0xE0DADF51

sceAppMgrIsGameBudgetAppPresent

Version NID
1.69 0xE134F5A0

sceAppMgrQuitForNonSuspendableApp

Version NID
1.69 0xE3F719A0

sceAppMgrRestoreDisplaySettingForShell

Version NID
1.69 0xE455922D

sceAppMgrGrowMemory2

Version NID
1.69 0xE4CE2CB5

_sceAppMgrDrmClose

Version NID
1.69 0xE4CE4A0C

_sceAppMgrMmsMount

Version NID
1.69 0xE56A2E1B

_sceAppMgrSetBackRenderPortOwner

Version NID
1.69 0xE8357021

_sceAppMgrPhotoMount

Version NID
1.69 0xE98E9C52

_sceAppMgrLoopBackFormat

Version NID
1.69 0xEA307D2C

_sceAppMgrGetBudgetInfo

Version NID
1.69 0xEACF2237

Example from webcore

SceAppMgrUser_5F00F261(&struct_of_size_0x88)

_sceAppMgrDestroyAppByName

Version NID
1.69 0xEB318002

sceAppMgrSuspendUntilActivated

Version NID
1.69 0xECEC7F90

_sceAppMgrInstallDirMount

Version NID
1.69 0xED37D810

_sceAppMgrGetBootParam

Version NID
1.69 0xEEFBC756

_sceAppMgrAppParamGetString

Version NID
1.69 0xEF34CA42
3.60 0xEF34CA42

This is used to retrieve SFO information. The cmd probably corresponds to and index of SFO entries. See the examples for which entries they may be. Example from store_checkout_plugin.

typedef struct sceAppMgrAppParamGetString_opt
{
   int32_t length;
   int32_t unk_4;
   int32_t unk_8;
   int32_t unk_C;
}sceAppMgrAppParamGetString_opt;

//example: sceAppMgrAppParamGetString(processid, 0xC, buffer,0x10)

int _sceAppMgrAppParamGetString(int pid, int cmd, char *out_buf, sceAppMgrAppParamGetString_opt* buf_size);

On WebKit:

0xC - return current process application name.

0x8 - return "gda" on webkit


On PSM Dev

Cmd Output
0x6 IP9100-PCSI00007_00-PSSUITEDEV000000
0x7
0x8 gd
0x9 PlayStationArMobile Development Assistant
0xA PSM Dev
0xC PCSI00007
0x64 IP9100-PCSI00007_00-PSSUITEDEV000000
0x65 PlayStationArMobile Development Assistant

_sceAppMgrAppDataMount

Version NID
1.69 0xF07B816E

Example from silk in 1.80

This is some kind of mount command. Use SceAppMgrUser_5E375921 to unmount this.

SceAppMgrUser_291AFBDC(0x64,mount_name_buffer)

Known working ids:

_sceAppMgrAppDataMount(0x64) returned 0x0 (photo0:)

_sceAppMgrAppDataMount(0x65) returned 0x0 (ad11c3da9df2eb:)

_sceAppMgrAppDataMount(0x66) returned 0x0 (ad859bcae16a94:)

_sceAppMgrAppDataMount(0x67) returned 0x0 (ada11cda8a9f0b:)

_sceAppMgrAppDataMount(0x69) returned 0x0 (music0:)

_sceAppMgrSaveDataGetQuota

Version NID
1.69 0xF28A426B

_sceAppMgrCaptureFrameBufIFTUByAppId

Version NID
1.69 0xF29E0732

sceAppMgrReleaseBgmPort

Version NID
1.69 0xF3717E37

_sceAppMgrSendNotificationRequest

Version NID
1.69 0xF42E27AD

_sceAppMgrUpdateSaveDataParam

Version NID
1.69 0xF4703412

_sceAppMgrSetBgmProxyApp

Version NID
1.69 0xF6B093BC

sceAppMgrSetInfobarStateForShellByAppId

Version NID
1.69 0xF7DFE96E

_sceAppMgrTrophyMount

Version NID
1.69 0xF8B80AC2

_sceAppMgrCaptureFrameBuf

Version NID
1.69 0xFA21A020

sceAppMgrLoadSafeMemory

Version NID
1.69 0xFAF3DAAA

sceAppMgrReceiveShellEventNum

Version NID
1.69 0xFB67BABD

_sceAppMgrOverwriteLaunchParamForShell

Version NID
1.69 0xFDE9A3E3

sceAppMgrDeactivateApp

Version NID
1.69 0xFFA093D9

_sceAppMgrUmount

Version NID
1.69 0xFFCA54E0
3.60 0xFFCA54E0

Example from store_checkout_plugin.

This is the unmount command for the mount point created with SceAppMgrUser_9B3BB24D.

This unmount command is also called in pair with _sceAppMgrGameDataMount (454EB183) from SceShell.

//max size of mount_point is 0x10 bytes including null
int _sceAppMgrUmount(const char *mount_point)

sceAppMgrIsGameProgram

Version NID
1.69 0xFFF8F7F0

SceSharedFb

sceSharedFbSetShellRenderPort

Version NID
1.69 0xB81B10F

sceSharedFbSetRenderingOrderForTest

Version NID
1.69 0xD2B21AE

sceSharedFbClose

Version NID
1.69 0x33DA3428

sceSharedFbUpdateProcess

Version NID
1.69 0x3889ACF8

sceSharedFbUpdateProcessEnd

Version NID
1.69 0x565A9AB6

sceSharedFbGetRenderingInfo

Version NID
1.69 0x61FEEDFA

sceSharedFbBegin

Version NID
1.69 0x72067C6B

sceSharedFbGetInfo

Version NID
1.69 0x819954FB

sceSharedFbGetShellRenderPort

Version NID
1.69 0xAC49FC1D

_sceSharedFbOpen

Version NID
1.69 0xB358E1B6

sceSharedFbDelete

Version NID
1.69 0xBE5A1A81

sceSharedFbCreate

Version NID
1.69 0xD6C643B5

sceSharedFbUpdateProcessBegin

Version NID
1.69 0xF9754AD9

sceSharedFbEnd

Version NID
1.69 0xFC5A62B6

SceSharedFbForDriver