libctru
v2.4.1
|
AM (Application Manager) service. More...
#include <3ds/services/fs.h>
Go to the source code of this file.
Data Structures | |
struct | AM_TitleEntry |
Contains basic information about a title. More... | |
struct | AM_PendingTitleEntry |
struct | AM_TWLPartitionInfo |
Information about the TWL NAND partition. More... | |
struct | AM_ContentInfo |
Contains information about a title's content. More... | |
Enumerations | |
enum | { AM_STATUS_MASK_INSTALLING = BIT(0) , AM_STATUS_MASK_AWAITING_FINALIZATION = BIT(1) } |
Pending title status mask values. More... | |
enum | AM_InstallStatus { AM_STATUS_ABORTED = 0x0002 , AM_STATUS_SAVED = 0x0003 , AM_STATUS_INSTALL_IN_PROGRESS = 0x0802 , AM_STATUS_AWAITING_FINALIZATION = 0x0803 } |
Pending title status values. More... | |
enum | { AM_DELETE_PENDING_NON_SYSTEM = BIT(0) , AM_DELETE_PENDING_SYSTEM = BIT(1) } |
Pending title deletion flags. More... | |
enum | AM_ContentInfoFlags { AM_CONTENT_DOWNLOADED = BIT(0) , AM_CONTENT_OWNED = BIT(1) } |
Title ContentInfo flags. More... | |
Functions | |
Result | amInit (void) |
Initializes AM. This doesn't initialize with "am:app", see amAppInit(). | |
Result | amAppInit (void) |
Initializes AM with a service which has access to the amapp-commands. This should only be used when using the amapp commands, not non-amapp AM commands. | |
void | amExit (void) |
Exits AM. | |
Handle * | amGetSessionHandle (void) |
Gets the current AM session handle. | |
Result | AM_GetTitleCount (FS_MediaType mediatype, u32 *count) |
Gets the number of titles for a given media type. More... | |
Result | AM_GetTitleList (u32 *titlesRead, FS_MediaType mediatype, u32 titleCount, u64 *titleIds) |
Gets a list of title IDs present in a mediatype. More... | |
Result | AM_GetTitleInfo (FS_MediaType mediatype, u32 titleCount, u64 *titleIds, AM_TitleEntry *titleInfo) |
Gets a list of details about installed titles. More... | |
Result | AM_GetTicketCount (u32 *count) |
Gets the number of tickets installed on the system. More... | |
Result | AM_GetTicketList (u32 *ticketsRead, u32 ticketCount, u32 skip, u64 *ticketIds) |
Gets a list of tickets installed on the system. More... | |
Result | AM_GetPendingTitleCount (u32 *count, FS_MediaType mediatype, u32 statusMask) |
Gets the number of pending titles on this system. More... | |
Result | AM_GetPendingTitleList (u32 *titlesRead, u32 titleCount, FS_MediaType mediatype, u32 statusMask, u64 *titleIds) |
Gets a list of pending titles on this system. More... | |
Result | AM_GetPendingTitleInfo (u32 titleCount, FS_MediaType mediatype, u64 *titleIds, AM_PendingTitleEntry *titleInfo) |
Gets information about pending titles on this system. More... | |
Result | AM_GetDeviceId (u32 *deviceID) |
Gets a 32-bit device-specific ID. More... | |
Result | AM_ExportTwlBackup (u64 titleID, u8 operation, void *workbuf, u32 workbuf_size, const char *filepath) |
Exports DSiWare to the specified filepath. More... | |
Result | AM_ImportTwlBackup (Handle filehandle, u8 operation, void *buffer, u32 size) |
Imports DSiWare from the specified file. More... | |
Result | AM_ReadTwlBackupInfo (Handle filehandle, void *outinfo, u32 outinfo_size, void *workbuf, u32 workbuf_size, void *banner, u32 banner_size) |
Reads info from the specified DSiWare export file. More... | |
Result | AM_GetTWLPartitionInfo (AM_TWLPartitionInfo *info) |
Retrieves information about the NAND TWL partition. More... | |
Result | AM_StartCiaInstall (FS_MediaType mediatype, Handle *ciaHandle) |
Initializes the CIA install process, returning a handle to write CIA data to. More... | |
Result | AM_StartDlpChildCiaInstall (Handle *ciaHandle) |
Initializes the CIA install process for Download Play CIAs, returning a handle to write CIA data to. More... | |
Result | AM_CancelCIAInstall (Handle ciaHandle) |
Aborts the CIA install process. More... | |
Result | AM_FinishCiaInstall (Handle ciaHandle) |
Finalizes the CIA install process. More... | |
Result | AM_FinishCiaInstallWithoutCommit (Handle ciaHandle) |
Finalizes the CIA install process without committing the title to title.db or tmp*.db. More... | |
Result | AM_CommitImportPrograms (FS_MediaType mediaType, u32 titleCount, bool temp, const u64 *titleIds) |
Commits installed CIAs. More... | |
Result | AM_DeleteTitle (FS_MediaType mediatype, u64 titleID) |
Deletes a title. More... | |
Result | AM_DeleteAppTitle (FS_MediaType mediatype, u64 titleID) |
Deletes a title, provided that it is not a system title. More... | |
Result | AM_DeleteTicket (u64 ticketId) |
Deletes a ticket. More... | |
Result | AM_DeletePendingTitle (FS_MediaType mediatype, u64 titleId) |
Deletes a pending title. More... | |
Result | AM_DeletePendingTitles (FS_MediaType mediatype, u32 flags) |
Deletes pending titles. More... | |
Result | AM_DeleteAllPendingTitles (FS_MediaType mediatype) |
Deletes all pending titles. More... | |
Result | AM_InstallNativeFirm (void) |
Installs the current NATIVE_FIRM title to NAND (firm0:/ & firm1:/) | |
Result | AM_InstallFirm (u64 titleID) |
Installs a NATIVE_FIRM title to NAND. More... | |
Result | AM_GetTitleProductCode (FS_MediaType mediatype, u64 titleId, char *productCode) |
Gets the product code of a title. More... | |
Result | AM_GetTitleExtDataId (u64 *extDataId, FS_MediaType mediatype, u64 titleId) |
Gets the ext data ID of a title. More... | |
Result | AM_GetCiaFileInfo (FS_MediaType mediatype, AM_TitleEntry *titleEntry, Handle fileHandle) |
Gets an AM_TitleEntry instance for a CIA file. More... | |
Result | AM_GetCiaIcon (void *icon, Handle fileHandle) |
Gets the SMDH icon data of a CIA file. More... | |
Result | AM_GetCiaDependencies (u64 *dependencies, Handle fileHandle) |
Gets the title ID dependency list of a CIA file. More... | |
Result | AM_GetCiaMetaOffset (u64 *metaOffset, Handle fileHandle) |
Gets the meta section offset of a CIA file. More... | |
Result | AM_GetCiaCoreVersion (u32 *coreVersion, Handle fileHandle) |
Gets the core version of a CIA file. More... | |
Result | AM_GetCiaRequiredSpace (u64 *requiredSpace, FS_MediaType mediaType, Handle fileHandle) |
Gets the free space, in bytes, required to install a CIA file. More... | |
Result | AM_GetCiaMetaSection (void *meta, u32 size, Handle fileHandle) |
Gets the full meta section of a CIA file. More... | |
Result | AM_InitializeExternalTitleDatabase (bool overwrite) |
Initializes the external (SD) title database. More... | |
Result | AM_QueryAvailableExternalTitleDatabase (bool *available) |
Queries whether the external title database is available. More... | |
Result | AM_InstallTicketBegin (Handle *ticketHandle) |
Begins installing a ticket. More... | |
Result | AM_InstallTicketAbort (Handle ticketHandle) |
Aborts installing a ticket. More... | |
Result | AM_InstallTicketFinish (Handle ticketHandle) |
Finishes installing a ticket. More... | |
Result | AM_InstallTitleBegin (FS_MediaType mediaType, u64 titleId, bool unk) |
Begins installing a title. More... | |
Result | AM_InstallTitleStop (void) |
Stops installing a title, generally to be resumed later. | |
Result | AM_InstallTitleResume (FS_MediaType mediaType, u64 titleId) |
Resumes installing a title. More... | |
Result | AM_InstallTitleAbort (void) |
Aborts installing a title. | |
Result | AM_InstallTitleFinish (void) |
Finishes installing a title. | |
Result | AM_CommitImportTitles (FS_MediaType mediaType, u32 titleCount, bool temp, const u64 *titleIds) |
Commits installed titles. More... | |
Result | AM_InstallTmdBegin (Handle *tmdHandle) |
Begins installing a TMD. More... | |
Result | AM_InstallTmdAbort (Handle tmdHandle) |
Aborts installing a TMD. More... | |
Result | AM_InstallTmdFinish (Handle tmdHandle, bool unk) |
Finishes installing a TMD. More... | |
Result | AM_CreateImportContentContexts (u32 contentCount, u16 *contentIndices) |
Prepares to import title contents. More... | |
Result | AM_InstallContentBegin (Handle *contentHandle, u16 index) |
Begins installing title content. More... | |
Result | AM_InstallContentStop (Handle contentHandle) |
Stops installing title content, generally to be resumed later. More... | |
Result | AM_InstallContentResume (Handle *contentHandle, u64 *resumeOffset, u16 index) |
Resumes installing title content. More... | |
Result | AM_InstallContentCancel (Handle contentHandle) |
Cancels installing title content. More... | |
Result | AM_InstallContentFinish (Handle contentHandle) |
Finishes installing title content. More... | |
Result | AM_ImportCertificates (u32 cert1Size, void *cert1, u32 cert2Size, void *cert2, u32 cert3Size, void *cert3, u32 cert4Size, void *cert4) |
Imports up to four certificates into the ticket certificate chain. More... | |
Result | AM_ImportCertificate (u32 certSize, void *cert) |
Imports a certificate into the ticket certificate chain. More... | |
Result | AM_CommitImportTitlesAndUpdateFirmwareAuto (FS_MediaType mediaType, u32 titleCount, bool temp, u64 *titleIds) |
Commits installed titles, and updates FIRM if necessary. More... | |
Result | AM_DeleteAllDemoLaunchInfos (void) |
Resets play count of all installed demos by deleting their launch info. | |
Result | AM_DeleteAllTemporaryTitles (void) |
Deletes temporary titles. | |
Result | AM_DeleteAllExpiredTitles (FS_MediaType mediatype) |
Deletes all expired titles. More... | |
Result | AM_DeleteAllTwlTitles (void) |
Deletes all TWL titles. | |
Result | AMAPP_GetDLCContentInfoCount (u32 *count, FS_MediaType mediatype, u64 titleID) |
Gets the number of content index installed under the specified DLC title. More... | |
Result | AMAPP_ListDLCContentInfos (u32 *contentInfoRead, FS_MediaType mediatype, u64 titleID, u32 contentInfoCount, u32 offset, AM_ContentInfo *contentInfos) |
Gets content infos installed under the specified DLC title. More... | |
AM (Application Manager) service.
anonymous enum |
anonymous enum |
enum AM_ContentInfoFlags |
enum AM_InstallStatus |
Aborts the CIA install process.
ciaHandle | CIA handle to cancel. |
Result AM_CommitImportPrograms | ( | FS_MediaType | mediaType, |
u32 | titleCount, | ||
bool | temp, | ||
const u64 * | titleIds | ||
) |
Commits installed CIAs.
mediaType | Location of the titles to finalize. |
titleCount | Number of titles to finalize. |
temp | Whether the titles being finalized are in the temporary database. |
titleIds | Title IDs to finalize. |
Result AM_CommitImportTitles | ( | FS_MediaType | mediaType, |
u32 | titleCount, | ||
bool | temp, | ||
const u64 * | titleIds | ||
) |
Commits installed titles.
mediaType | Location of the titles to finalize. |
titleCount | Number of titles to finalize. |
temp | Whether the titles being finalized are in the temporary database. |
titleIds | Title IDs to finalize. |
Result AM_CommitImportTitlesAndUpdateFirmwareAuto | ( | FS_MediaType | mediaType, |
u32 | titleCount, | ||
bool | temp, | ||
u64 * | titleIds | ||
) |
Commits installed titles, and updates FIRM if necessary.
mediaType | Location of the titles to finalize. |
titleCount | Number of titles to finalize. |
temp | Whether the titles being finalized are in the temporary database. |
titleIds | Title IDs to finalize. |
Prepares to import title contents.
contentCount | Number of contents to be imported. |
contentIndices | Indices of the contents to be imported. |
Result AM_DeleteAllExpiredTitles | ( | FS_MediaType | mediatype | ) |
Deletes all expired titles.
mediatype | Media type to delete from. |
Result AM_DeleteAllPendingTitles | ( | FS_MediaType | mediatype | ) |
Deletes all pending titles.
mediatype | Media type to delete from. |
Result AM_DeleteAppTitle | ( | FS_MediaType | mediatype, |
u64 | titleID | ||
) |
Deletes a title, provided that it is not a system title.
mediatype | Media type to delete from. |
titleID | ID of the title to delete. |
Result AM_DeletePendingTitle | ( | FS_MediaType | mediatype, |
u64 | titleId | ||
) |
Deletes a pending title.
mediatype | Media type to delete from. |
titleId | ID of the pending title to delete. |
Result AM_DeletePendingTitles | ( | FS_MediaType | mediatype, |
u32 | flags | ||
) |
Deletes pending titles.
mediatype | Media type to delete from. |
flags | Flags used to select pending titles. |
Deletes a ticket.
titleID | ID of the ticket to delete. |
Result AM_DeleteTitle | ( | FS_MediaType | mediatype, |
u64 | titleID | ||
) |
Deletes a title.
mediatype | Media type to delete from. |
titleID | ID of the title to delete. |
Result AM_ExportTwlBackup | ( | u64 | titleID, |
u8 | operation, | ||
void * | workbuf, | ||
u32 | workbuf_size, | ||
const char * | filepath | ||
) |
Exports DSiWare to the specified filepath.
titleID | TWL titleID. |
operation | DSiWare operation type. |
workbuf | Work buffer. |
workbuf_size | Work buffer size, must be >=0x20000. |
filepath | UTF-8 filepath(converted to UTF-16 internally). |
Finalizes the CIA install process.
ciaHandle | CIA handle to finalize. |
Finalizes the CIA install process without committing the title to title.db or tmp*.db.
ciaHandle | CIA handle to finalize. |
Gets the core version of a CIA file.
[out] | coreVersion | Pointer to output the core version to. |
fileHandle | Handle of the CIA file. |
Gets the title ID dependency list of a CIA file.
dependencies | Buffer to store dependency title IDs in. Must be of size 0x300 bytes. |
fileHandle | Handle of the CIA file. |
Result AM_GetCiaFileInfo | ( | FS_MediaType | mediatype, |
AM_TitleEntry * | titleEntry, | ||
Handle | fileHandle | ||
) |
Gets an AM_TitleEntry instance for a CIA file.
mediatype | Media type that this CIA would be installed to. | |
[out] | titleEntry | Pointer to write the AM_TitleEntry instance to. |
fileHandle | Handle of the CIA file. |
Gets the SMDH icon data of a CIA file.
icon | Buffer to store the icon data in. Must be of size 0x36C0 bytes. |
fileHandle | Handle of the CIA file. |
Gets the meta section offset of a CIA file.
[out] | metaOffset | Pointer to output the meta section offset to. |
fileHandle | Handle of the CIA file. |
Gets the full meta section of a CIA file.
meta | Buffer to store the meta section in. |
size | Size of the buffer. Must be greater than or equal to the actual section data's size. |
fileHandle | Handle of the CIA file. |
Result AM_GetCiaRequiredSpace | ( | u64 * | requiredSpace, |
FS_MediaType | mediaType, | ||
Handle | fileHandle | ||
) |
Gets the free space, in bytes, required to install a CIA file.
[out] | requiredSpace | Pointer to output the required free space to. |
mediaType | Media type to check free space needed to install to. | |
fileHandle | Handle of the CIA file. |
Gets a 32-bit device-specific ID.
deviceID | Pointer to write the device ID to. |
Result AM_GetPendingTitleCount | ( | u32 * | count, |
FS_MediaType | mediatype, | ||
u32 | statusMask | ||
) |
Gets the number of pending titles on this system.
[out] | count | Pointer to output the pending title count to. |
mediatype | Media type of pending titles to count. | |
statusMask | Bit mask of status values to include. |
Result AM_GetPendingTitleInfo | ( | u32 | titleCount, |
FS_MediaType | mediatype, | ||
u64 * | titleIds, | ||
AM_PendingTitleEntry * | titleInfo | ||
) |
Gets information about pending titles on this system.
titleCount | Number of pending titles to read. |
mediatype | Media type of pending titles to get information on. |
titleIds | IDs of the titles to get information about. |
titleInfo | Buffer to output the retrieved pending title info to. |
Result AM_GetPendingTitleList | ( | u32 * | titlesRead, |
u32 | titleCount, | ||
FS_MediaType | mediatype, | ||
u32 | statusMask, | ||
u64 * | titleIds | ||
) |
Gets a list of pending titles on this system.
[out] | titlesRead | Pointer to output the number of read pending titles to. |
titleCount | Number of pending titles to read. | |
mediatype | Media type of pending titles to list. | |
statusMask | Bit mask of status values to include. | |
titleIds | Buffer to output the retrieved pending title IDs to. |
Gets the number of tickets installed on the system.
[out] | count | Pointer to output the ticket count to. |
Gets a list of tickets installed on the system.
[out] | ticketsRead | Pointer to output the number of read tickets to. |
ticketCount | Number of tickets to read. | |
skip | Number of tickets to skip. | |
ticketIds | Buffer to output the retrieved ticket IDs to. |
Result AM_GetTitleCount | ( | FS_MediaType | mediatype, |
u32 * | count | ||
) |
Gets the number of titles for a given media type.
mediatype | Media type to get titles from. | |
[out] | count | Pointer to write the title count to. |
Result AM_GetTitleExtDataId | ( | u64 * | extDataId, |
FS_MediaType | mediatype, | ||
u64 | titleId | ||
) |
Gets the ext data ID of a title.
[out] | extDataId | Pointer to output the ext data ID to. |
mediatype | Media type of the title. | |
titleID | ID of the title. |
Result AM_GetTitleInfo | ( | FS_MediaType | mediatype, |
u32 | titleCount, | ||
u64 * | titleIds, | ||
AM_TitleEntry * | titleInfo | ||
) |
Gets a list of details about installed titles.
mediatype | Media type to get titles from. |
titleCount | Number of titles to list. |
titleIds | List of title IDs to retrieve details for. |
titleInfo | Buffer to write AM_TitleEntry's to. |
Result AM_GetTitleList | ( | u32 * | titlesRead, |
FS_MediaType | mediatype, | ||
u32 | titleCount, | ||
u64 * | titleIds | ||
) |
Gets a list of title IDs present in a mediatype.
[out] | titlesRead | Pointer to output the number of read titles to. |
mediatype | Media type to get titles from. | |
titleCount | Number of title IDs to get. | |
titleIds | Buffer to output the retrieved title IDs to. |
Result AM_GetTitleProductCode | ( | FS_MediaType | mediatype, |
u64 | titleId, | ||
char * | productCode | ||
) |
Gets the product code of a title.
mediatype | Media type of the title. | |
titleID | ID of the title. | |
[out] | productCode | Pointer to output the product code to. (length = 16) |
Result AM_GetTWLPartitionInfo | ( | AM_TWLPartitionInfo * | info | ) |
Retrieves information about the NAND TWL partition.
[out] | info | Pointer to output the TWL partition info to. |
Imports a certificate into the ticket certificate chain.
certSize | Size of the certificate. |
cert | Data of the certificate. |
Result AM_ImportCertificates | ( | u32 | cert1Size, |
void * | cert1, | ||
u32 | cert2Size, | ||
void * | cert2, | ||
u32 | cert3Size, | ||
void * | cert3, | ||
u32 | cert4Size, | ||
void * | cert4 | ||
) |
Imports up to four certificates into the ticket certificate chain.
cert1Size | Size of the first certificate. |
cert1 | Data of the first certificate. |
cert2Size | Size of the second certificate. |
cert2 | Data of the second certificate. |
cert3Size | Size of the third certificate. |
cert3 | Data of the third certificate. |
cert4Size | Size of the fourth certificate. |
cert4 | Data of the fourth certificate. |
Imports DSiWare from the specified file.
filehandle | FSUSER file handle. |
operation | DSiWare operation type. |
buffer | Work buffer. |
size | Buffer size, must be >=0x20000. |
Result AM_InitializeExternalTitleDatabase | ( | bool | overwrite | ) |
Initializes the external (SD) title database.
overwrite | Overwrites the database if it already exists. |
Begins installing title content.
[out] | contentHandle | Pointer to output a handle to write content data to. |
index | Index of the content to install. |
Cancels installing title content.
contentHandle | Handle of the installation to finalize. |
Finishes installing title content.
contentHandle | Handle of the installation to finalize. |
Resumes installing title content.
[out] | contentHandle | Pointer to output a handle to write content data to. |
[out] | resumeOffset | Pointer to write the offset to resume content installation at to. |
index | Index of the content to install. |
Stops installing title content, generally to be resumed later.
contentHandle | Handle of the installation to abort. |
Installs a NATIVE_FIRM title to NAND.
Accepts 0004013800000002 or 0004013820000002 (N3DS).
titleID | Title ID of the NATIVE_FIRM to install. |
Aborts installing a ticket.
ticketHandle | Handle of the installation to abort. |
Begins installing a ticket.
[out] | ticketHandle | Pointer to output a handle to write ticket data to. |
Finishes installing a ticket.
ticketHandle | Handle of the installation to finalize. |
Result AM_InstallTitleBegin | ( | FS_MediaType | mediaType, |
u64 | titleId, | ||
bool | unk | ||
) |
Begins installing a title.
mediaType | Destination to install to. |
titleId | ID of the title to install. |
unk | Unknown. (usually false) |
Result AM_InstallTitleResume | ( | FS_MediaType | mediaType, |
u64 | titleId | ||
) |
Resumes installing a title.
mediaType | Destination to install to. |
titleId | ID of the title to install. |
Aborts installing a TMD.
tmdHandle | Handle of the installation to abort. |
Begins installing a TMD.
[out] | tmdHandle | Pointer to output a handle to write TMD data to. |
Finishes installing a TMD.
tmdHandle | Handle of the installation to finalize. |
unk | Unknown. (usually true) |
Result AM_QueryAvailableExternalTitleDatabase | ( | bool * | available | ) |
Queries whether the external title database is available.
[out] | available | Pointer to output the availability status to. |
Result AM_ReadTwlBackupInfo | ( | Handle | filehandle, |
void * | outinfo, | ||
u32 | outinfo_size, | ||
void * | workbuf, | ||
u32 | workbuf_size, | ||
void * | banner, | ||
u32 | banner_size | ||
) |
Reads info from the specified DSiWare export file.
This can only be used with DSiWare exported with certain operation value(s).
filehandle | FSUSER file handle. |
outinfo | Output info buffer. |
outinfo_size | Output info buffer size. |
workbuf | Work buffer. |
workbuf_size | Work buffer size. |
banner | Output banner buffer. |
banner_size | Output banner buffer size. |
Result AM_StartCiaInstall | ( | FS_MediaType | mediatype, |
Handle * | ciaHandle | ||
) |
Initializes the CIA install process, returning a handle to write CIA data to.
mediatype | Media type to install the CIA to. | |
[out] | ciaHandle | Pointer to write the CIA handle to. |
Initializes the CIA install process for Download Play CIAs, returning a handle to write CIA data to.
[out] | ciaHandle | Pointer to write the CIA handle to. |
Result AMAPP_GetDLCContentInfoCount | ( | u32 * | count, |
FS_MediaType | mediatype, | ||
u64 | titleID | ||
) |
Gets the number of content index installed under the specified DLC title.
[out] | count | Pointer to output the number of content indices to. |
mediatype | Media type of the title. | |
titleID | Title ID to retrieve the count for (high-id is 0x0004008C). |
Result AMAPP_ListDLCContentInfos | ( | u32 * | contentInfoRead, |
FS_MediaType | mediatype, | ||
u64 | titleID, | ||
u32 | contentInfoCount, | ||
u32 | offset, | ||
AM_ContentInfo * | contentInfos | ||
) |
Gets content infos installed under the specified DLC title.
[out] | contentInfoRead | Pointer to output the number of content infos read to. |
mediatype | Media type of the title. | |
titleID | Title ID to retrieve the content infos for (high-id is 0x0004008C). | |
contentInfoCount | Number of content infos to retrieve. | |
offset | Offset from the first content index the count starts at. | |
[out] | contentInfos | Pointer to output the content infos read to. |