In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Difference between revisions of "/dev/es"

From WiiBrew
Jump to navigation Jump to search
(minor updates)
Line 107: Line 107:
 
| style="vertical-align: top;" rowspan="3" |0x01
 
| style="vertical-align: top;" rowspan="3" |0x01
 
| style="vertical-align: top;" rowspan="3" |ES_AddTicket
 
| style="vertical-align: top;" rowspan="3" |ES_AddTicket
| style="vertical-align: top;" rowspan="3" |3
+
| style="vertical ... \n
| style="vertical-align: top;" rowspan="3" |0
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |0x2A4
 
| style="vertical-align: top;" rowspan="3" |ES_AddTicket(const signed_blob *stik, u32 stik_size, const signed_blob *certificates, u32 certificates_size, const signed_blob *crl, u32 crl_size)
 
| style="vertical-align: top;" rowspan="3" |?
 
|- style="background-color: #eee;"
 
|?
 
|?
 
|- style="background-color: #eee;"
 
|?
 
|?
 
|-
 
| style="vertical-align: top;" rowspan="4" |0x02
 
| style="vertical-align: top;" rowspan="4" |ES_AddTitleStart
 
| style="vertical-align: top;" rowspan="4" |4
 
| style="vertical-align: top;" rowspan="4" |0
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" rowspan="4" |ES_AddTitleStart(const signed_blob *stmd, u32 tmd_size, const signed_blob *certificates, u32 certificates_size, const signed_blob *crl, u32 crl_size)
 
| style="vertical-align: top;" rowspan="4" |?
 
|-
 
|?
 
|?
 
|-
 
|?
 
|?
 
|-
 
|?
 
|0x1c
 
|- style="background-color: #eee;"
 
| style="vertical-align: top;" rowspan="2" |0x03
 
| style="vertical-align: top;" rowspan="2" |ES_AddContentStart
 
| style="vertical-align: top;" rowspan="2" |2
 
| style="vertical-align: top;" rowspan="2" |0
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |0x8
 
| style="vertical-align: top;" rowspan="2" |ES_AddContentStart(u64 titleID, u32 cid)
 
| style="vertical-align: top;" rowspan="2" |?
 
|- style="background-color: #eee;"
 
|?
 
|0x4
 
|-
 
| style="vertical-align: top;" rowspan="2" |0x04
 
| style="vertical-align: top;" rowspan="2" |ES_AddContentData
 
| style="vertical-align: top;" rowspan="2" |2
 
| style="vertical-align: top;" rowspan="2" |0
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |0x4
 
| style="vertical-align: top;" rowspan="2" |ES_AddContentData(s32 cfd, u8 *data, u32 data_size)
 
| style="vertical-align: top;" rowspan="2" |?
 
|-
 
|?
 
|?
 
|- style="background-color: #eee;"
 
| style="vertical-align: top;" |0x05
 
| style="vertical-align: top;" |ES_AddContentFinish
 
| style="vertical-align: top;" |1
 
| style="vertical-align: top;" |0
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |0x4
 
| style="vertical-align: top;" |ES_AddContentFinish(u32 cid)
 
| style="vertical-align: top;" |?
 
|-
 
| style="vertical-align: top;" rowspan="1" |0x06
 
| style="vertical-align: top;" rowspan="1" |ES_AddTitleFinish
 
| style="vertical-align: top;" rowspan="1" |0
 
| style="vertical-align: top;" rowspan="1" |0
 
| style="vertical-align: top;" |
 
| style="vertical-align: top;" |
 
| style="vertical-align: top;" rowspan="1" |ES_AddTitleFinish(void)
 
| style="vertical-align: top;" rowspan="1" |?
 
|- style="background-color: #eee;"
 
| style="vertical-align: top;" |0x07
 
| style="vertical-align: top;" |ES_GetDeviceID
 
| style="vertical-align: top;" |0
 
| style="vertical-align: top;" |1
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |0x4
 
| style="vertical-align: top;" |ES_GetDeviceID(u32 *device_id)
 
| style="vertical-align: top;" |?
 
|-
 
| style="vertical-align: top;" rowspan="2" |0x08
 
| style="vertical-align: top;" rowspan="2" |ES_LaunchTitle
 
| style="vertical-align: top;" rowspan="2" |2
 
| style="vertical-align: top;" rowspan="2" |0
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |0x8
 
| style="vertical-align: top;" rowspan="2" |ES_LaunchTitleBackground(u64 titleID, const tikview *view); ES_LaunchTitle(u64 titleID, const tikview *view);
 
| style="vertical-align: top;" rowspan="2" |?
 
|-
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |0xd8
 
|- style="background-color: #eee;"
 
| style="vertical-align: top;" |0x09
 
| style="vertical-align: top;" |ES_OpenContent
 
| style="vertical-align: top;" |1
 
| style="vertical-align: top;" |0
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |0x4
 
| style="vertical-align: top;" |ES_OpenContent(u16 index)
 
| style="vertical-align: top;" |?
 
|-
 
| style="vertical-align: top;" rowspan="2" |0x0A
 
| style="vertical-align: top;" rowspan="2" |ES_ReadContent
 
| style="vertical-align: top;" rowspan="2" |1
 
| style="vertical-align: top;" rowspan="2" |1
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |0x4
 
| style="vertical-align: top;" rowspan="2" |ES_ReadContent(s32 cfd, u8 *data, u32 data_size)
 
| style="vertical-align: top;" rowspan="2" |?
 
|-
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |?
 
|- style="background-color: #eee;"
 
| style="vertical-align: top;" |0x0B
 
| style="vertical-align: top;" |ES_CloseContent
 
| style="vertical-align: top;" |1
 
| style="vertical-align: top;" |0
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |0x4
 
| style="vertical-align: top;" |ES_CloseContent(s32 cfd)
 
| style="vertical-align: top;" |?
 
|-
 
| style="vertical-align: top;" rowspan="1" |0x0C
 
| style="vertical-align: top;" rowspan="1" |ES_GetOwnedTitlesCount
 
| style="vertical-align: top;" rowspan="1" |0
 
| style="vertical-align: top;" rowspan="1" |1
 
| style="vertical-align: top;" |u32* count
 
| style="vertical-align: top;" |0x4
 
| style="vertical-align: top;" rowspan="1" |ES_GetNumOwnedTitles(u32 *cnt)
 
| style="vertical-align: top;" rowspan="1" |?
 
|- style="background-color: #eee;"
 
| style="vertical-align: top;" rowspan="2" |0x0D
 
| style="vertical-align: top;" rowspan="2" |ES_GetOwnedTitles
 
| style="vertical-align: top;" rowspan="2" |1
 
| style="vertical-align: top;" rowspan="2" |1
 
| style="vertical-align: top;" |u32* count
 
| style="vertical-align: top;" |0x4
 
| style="vertical-align: top;" rowspan="2" |ES_GetOwnedTitles(u64 *titles, u32 cnt)
 
| style="vertical-align: top;" rowspan="2" |?
 
|- style="background-color: #eee;"
 
| style="vertical-align: top;" |u64 titles[]
 
| style="vertical-align: top;" |[count]*0x8
 
|-
 
| style="vertical-align: top;" |0x0E
 
| style="vertical-align: top;" |ES_GetTitlesCount
 
| style="vertical-align: top;" |0
 
| style="vertical-align: top;" |1
 
| style="vertical-align: top;" |u32* count
 
| style="vertical-align: top;" |0x4
 
| style="vertical-align: top;" |ES_GetNumTitles(u32 *cnt)
 
| style="vertical-align: top;" |Sets the u32 pointed to by ''count'' to the number of titles on the system under /title.
 
|- style="background-color: #eee;"
 
| style="vertical-align: top;" rowspan="2" |0x0F
 
| style="vertical-align: top;" rowspan="2" |ES_GetTitles
 
| style="vertical-align: top;" rowspan="2" |1
 
| style="vertical-align: top;" rowspan="2" |1
 
| style="vertical-align: top;" |u32* count
 
| style="vertical-align: top;" |0x4
 
| style="vertical-align: top;" rowspan="2" |ES_GetTitles(u64 *titles, u32 cnt)
 
| style="vertical-align: top;" rowspan="2" |Fills out ''buffer'' with at most ''count'' 8 byte title ids of titles on the system under /title. It also update ''count'' for the number of title its copied.
 
|- style="background-color: #eee;"
 
|u64 buffer[]
 
|[count]*0x8
 
|-
 
| style="vertical-align: top;" rowspan="2" |0x10
 
| style="vertical-align: top;" rowspan="2" |ES_GetTitleContentsCount
 
| style="vertical-align: top;" rowspan="2" |1
 
| style="vertical-align: top;" rowspan="2" |1
 
| style="vertical-align: top;" |u64 title_id
 
| style="vertical-align: top;" |0x8
 
| style="vertical-align: top;" rowspan="2" |ES_GetTitleContentsCount(u64 titleID, u32 *num)
 
| style="vertical-align: top;" rowspan="2" |Gets the number of contents from the tmd. It checks that the contents are present in the title's private content directory or linked via /shared1/content.map
 
|-
 
|u32* count
 
|0x4
 
|- style="background-color: #eee;"
 
| style="vertical-align: top;" rowspan="3" |0x11
 
| style="vertical-align: top;" rowspan="3" |ES_GetTitleContents
 
| style="vertical-align: top;" rowspan="3" |2
 
| style="vertical-align: top;" rowspan="3" |1
 
| style="vertical-align: top;" |u64 title_id
 
| style="vertical-align: top;" |0x8
 
| style="vertical-align: top;" rowspan="3" |No
 
| style="vertical-align: top;" rowspan="3" |Fills out ''content_ids'' with the content ids from the title's tmd. It checks if the contents are present in the title's private content directory or linked via /shared1/content.map
 
|- style="background-color: #eee;"
 
|u32* count
 
|0x4
 
|- style="background-color: #eee;"
 
|u32 content_ids[]
 
|[count]*0x4
 
|-
 
| style="vertical-align: top;" rowspan="2" |0x12
 
| style="vertical-align: top;" rowspan="2" |ES_GetNumTicketViews
 
| style="vertical-align: top;" rowspan="2" |1
 
| style="vertical-align: top;" rowspan="2" |1
 
| style="vertical-align: top;" |u64 title_id
 
| style="vertical-align: top;" |0x8
 
| style="vertical-align: top;" rowspan="2" |ES_GetNumTicketViews(u64 titleID, u32 *cnt)
 
| style="vertical-align: top;" rowspan="2" |?
 
|-
 
|u32* count
 
|0x4
 
|- style="background-color: #eee;"
 
| style="vertical-align: top;" rowspan="3" |0x13
 
| style="vertical-align: top;" rowspan="3" |ES_GetTicketViews
 
| style="vertical-align: top;" rowspan="3" |2
 
| style="vertical-align: top;" rowspan="3" |1
 
| style="vertical-align: top;" |u64 title_id
 
| style="vertical-align: top;" |0x8
 
| style="vertical-align: top;" rowspan="3" |ES_GetTicketViews(u64 titleID, tikview *views, u32 cnt)
 
| style="vertical-align: top;" rowspan="3" |?
 
|- style="background-color: #eee;"
 
|u32* count
 
|0x4
 
|- style="background-color: #eee;"
 
|tikview_t ticketviews[]
 
|[count]*0xd8
 
|-
 
| style="vertical-align: top;" rowspan="2" |0x14
 
| style="vertical-align: top;" rowspan="2" |ES_GetTmdViewSize
 
| style="vertical-align: top;" rowspan="2" |1
 
| style="vertical-align: top;" rowspan="2" |1
 
| style="vertical-align: top;" |u64 title_id
 
| style="vertical-align: top;" |0x8
 
| style="vertical-align: top;" rowspan="2" |ES_GetTMDViewSize(u64 titleID, u32 *size)
 
| style="vertical-align: top;" rowspan="2" |?
 
|-
 
|u32* count
 
|0x4
 
|- style="background-color: #eee;"
 
| style="vertical-align: top;" rowspan="3" |0x15
 
| style="vertical-align: top;" rowspan="3" |ES_GetTmdView
 
| style="vertical-align: top;" rowspan="3" |2
 
| style="vertical-align: top;" rowspan="3" |1
 
| style="vertical-align: top;" |u64 title_id
 
| style="vertical-align: top;" |0x8
 
| style="vertical-align: top;" rowspan="3" |ES_GetTMDView(u64 titleID, u8 *data, u32 size)
 
| style="vertical-align: top;" rowspan="3" |?
 
|- style="background-color: #eee;"
 
|u32* count
 
|0x4
 
|- style="background-color: #eee;"
 
|tmdiew_t tmdview
 
|[count]
 
|-
 
| style="vertical-align: top;"|0x16
 
| style="vertical-align: top;"|ES_GetConsumption
 
| style="vertical-align: top;"|1
 
| style="vertical-align: top;"|2
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|No
 
| style="vertical-align: top;"|?
 
|-
 
|-
 
| style="vertical-align: top;"|0x17
 
| style="vertical-align: top;"|ES_DELETETITLE
 
| style="vertical-align: top;"|1
 
| style="vertical-align: top;"|0
 
| style="vertical-align: top;"|u64 titleID
 
| style="vertical-align: top;"|0x8
 
| style="vertical-align: top;"|ES_DeleteTitle(u64 titleID)
 
| style="vertical-align: top;"|?
 
|-
 
  
|-
+
== What Is Your Legacy? Living A Meaningful life ==
| style="vertical-align: top;"|0x18
 
| style="vertical-align: top;"|ES_DeleteTicket
 
| style="vertical-align: top;"|1
 
| style="vertical-align: top;"|0
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|ES_DeleteTicket(const tikview *view)
 
| style="vertical-align: top;"|?
 
|-
 
|-
 
| style="vertical-align: top;"|0x19
 
| style="vertical-align: top;"|ES_DIGetTmdViewSize
 
| style="vertical-align: top;"|1
 
| style="vertical-align: top;"|0
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|No
 
| style="vertical-align: top;"|?
 
|-
 
|-
 
| style="vertical-align: top;"|0x1A
 
| style="vertical-align: top;"|ES_DIGetTmdViewSize
 
| style="vertical-align: top;"|2
 
| style="vertical-align: top;"|1
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|No
 
| style="vertical-align: top;"|?
 
|-
 
|-
 
| style="vertical-align: top;"|0x1B
 
| style="vertical-align: top;"|ES_DiGetTicketView
 
| style="vertical-align: top;"|1
 
| style="vertical-align: top;"|1
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|No
 
| style="vertical-align: top;"|?
 
|-
 
|-
 
| style="vertical-align: top;"|0x1C
 
| style="vertical-align: top;"|ES_DiVerify
 
| style="vertical-align: top;"|4
 
| style="vertical-align: top;"|2
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|ES_Identify(const signed_blob *certificates, u32 certificates_size, const signed_blob *stmd, u32 tmd_size, const signed_blob *sticket, u32 ticket_size, u32 *keyid)
 
| style="vertical-align: top;"|?
 
|-
 
|-
 
| style="vertical-align: top;"|0x1D
 
| style="vertical-align: top;"|ES_GetTitleDir
 
| style="vertical-align: top;"|1
 
| style="vertical-align: top;"|1
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|ES_GetDataDir(u64 titleID,char *filepath)
 
| style="vertical-align: top;"|?
 
|-
 
|-
 
| style="vertical-align: top;"|0x1E
 
| style="vertical-align: top;"|ES_GetDeviceCert
 
| style="vertical-align: top;"|1
 
| style="vertical-align: top;"|0
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|ES_GetDeviceCert(u8 *outbuf)
 
| style="vertical-align: top;"|?
 
|-
 
  
|-
+
I want the world to be better because I was here. I want my life, I want my work, my family, I want it to mean something and if you are not making someone elses life better then you are wasting your time Will Smith
| style="vertical-align: top;"|0x1F
 
| style="vertical-align: top;"|ES_GetDeviceCert
 
| style="vertical-align: top;"|6
 
| style="vertical-align: top;"|0
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|ES_ImportBoot(const signed_blob *tik, u32 tik_size,const signed_blob *tik_certs,u32 tik_certs_size,const signed_blob *tmd,u32 tmd_size,const signed_blob *tmd_certs,u32 tmd_certs_size,const u8 *content,u32 content_size)
 
| style="vertical-align: top;"|?
 
|-
 
|-
 
| style="vertical-align: top;"|0x20
 
| style="vertical-align: top;"|ES_GetTitleId
 
| style="vertical-align: top;"|0
 
| style="vertical-align: top;"|1
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|ES_GetTitleID(u64 *titleID)
 
| style="vertical-align: top;"|?
 
|-
 
|-
 
| style="vertical-align: top;"|0x21
 
| style="vertical-align: top;"|ES_SetUid
 
| style="vertical-align: top;"|1
 
| style="vertical-align: top;"|0
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|ES_SetUID(u64 uid)
 
| style="vertical-align: top;"|?
 
|-
 
| style="vertical-align: top;" |0x22
 
| style="vertical-align: top;" |ES_DeleteTitleContent
 
| style="vertical-align: top;" |1
 
| style="vertical-align: top;" |0
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |ES_DeleteTitleContent(u64 titleID)
 
| style="vertical-align: top;" |Deletes all files containing the substring "app" in a title's content directory (/title/xxxxxxxx/yyyyyyyy/content).
 
|-
 
| style="vertical-align: top;" |0x23
 
| style="vertical-align: top;" |ES_SeekContent
 
| style="vertical-align: top;" |3
 
| style="vertical-align: top;" |0
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |s32 ES_SeekContent(s32 cfd, s32 where, s32 whence)
 
| style="vertical-align: top;" |?
 
|-
 
| style="vertical-align: top;" |0x24
 
| style="vertical-align: top;" |ES_OpenTitleContent
 
| style="vertical-align: top;" |3
 
| style="vertical-align: top;" |0
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |s32 ES_OpenTitleContent(u64 titleID, tikview *views, u16 index)
 
| style="vertical-align: top;" |?
 
|-
 
| style="vertical-align: top;" |0x25
 
| style="vertical-align: top;" |ES_LaunchBC
 
| style="vertical-align: top;" |0
 
| style="vertical-align: top;" |0
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |No
 
| style="vertical-align: top;" |?
 
|-
 
| style="vertical-align: top;" |0x38
 
| style="vertical-align: top;" |? (ES_DeleteSharedContent)
 
| style="vertical-align: top;" |1
 
| style="vertical-align: top;" |0
 
| style="vertical-align: top;" |u8 sha1[]
 
| style="vertical-align: top;" |0x14
 
| style="vertical-align: top;" |?
 
| style="vertical-align: top;" |Deletes the content file from /shared1 with the given sha1 checksum. It aborts if the tmd of an essential system title references the content. It rebuilds content.map after, removing the entry for the deleted file.
 
|-
 
| style="vertical-align: top;" rowspan="2" |0x3e
 
| style="vertical-align: top;" rowspan="2" |?
 
| style="vertical-align: top;" rowspan="2" |2
 
| style="vertical-align: top;" rowspan="2" |0
 
| style="vertical-align: top;" |u64 title_id
 
| style="vertical-align: top;" |0x8
 
| style="vertical-align: top;" rowspan="2" |?
 
| style="vertical-align: top;" rowspan="2" |Deletes a specific content from a title's private content directory.
 
|-
 
|u32 content_id
 
|0x4
 
|- style="background-color: #eee;"
 
| style="vertical-align: top;"|0x3f
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|0
 
| style="vertical-align: top;"|0
 
| style="vertical-align: top;"|
 
| style="vertical-align: top;"|
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|returns -1017
 
|-
 
| style="vertical-align: top;" rowspan="2" |0x40
 
| style="vertical-align: top;" rowspan="2" |?
 
| style="vertical-align: top;" rowspan="2" |1
 
| style="vertical-align: top;" rowspan="2" |1
 
| style="vertical-align: top;" |tikview_t ticketview
 
| style="vertical-align: top;" |0xd8
 
| style="vertical-align: top;" rowspan="2" |?
 
| style="vertical-align: top;" rowspan="2" |Copies the ticket associated with ''ticketview'' into ''ticket_buffer'' based on some access checks [currently unknown ticket offsets +0x1e8 to +0x1ef, +0x1f0.]
 
|-
 
|tik_t ticket_buffer
 
|0x2a4
 
|- style="background-color: #eee;"
 
| style="vertical-align: top;"|0x45
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|0
 
| style="vertical-align: top;"|0
 
| style="vertical-align: top;"|
 
| style="vertical-align: top;"|
 
| style="vertical-align: top;"|?
 
| style="vertical-align: top;"|Used by system menu 4.2 to check if the wii is a region changed Korean wii. returns -1017 if the keys are not found. see [[Error_003]]
 
|}
 
  
== /dev/es error codes ==
+
[[http://goodvillenews.com/What-Is-Your-Legacy-Living-A-Meaningful-life-oBtnrB.html What Is Your Legacy? Living A Meaningful life]]
{{stub}}
 
{| class="wikitable"
 
|-
 
! Error code
 
! POSIX equivalent
 
! Notes
 
|-
 
| -106
 
|  ?
 
| Invalid TMD when using ES_OpenContent or <marcan> HUGHLALUGH SOMETHING FUCKED UP AND I'M NOT TELLING, or access denied
 
|-
 
| -1009
 
| EIO
 
| Read failure (short read)
 
|-
 
| -1010
 
| EIO
 
| Write failure (short write)
 
|-
 
| -1012
 
|  ?
 
| Invalid signature type
 
|-
 
| -1015
 
| ?
 
| Invalid value for byte at 0x180 in ticket (valid:0,1,2)
 
|-
 
| -1017
 
| EINVAL
 
| Wrong IN or OUT size, wrong size for a part of the vector, vector alignment problems, non-existant ioctl
 
|-
 
| -1020
 
| ?
 
| ConsoleID mismatch
 
|-
 
| -1022
 
| ?
 
| Content did not match hash in TMD
 
|-
 
| -1024
 
| ENOMEM
 
| Memory allocation failure
 
|-
 
| -1026
 
| EACCESS
 
| Incorrect access rights
 
|-
 
| -1028
 
| ENOENT
 
| No ticket installed
 
|-
 
| -1029
 
| ?
 
| Installed Ticket/TMD is invalid
 
|-
 
| -1035
 
| ?
 
| Title with a higher version is already installed
 
|-
 
| -1036
 
| ?
 
| Required sysversion(IOS) is not installed
 
|-
 
| -2008
 
| EINVAL
 
| Invalid parameter(s)
 
|-
 
| -2011
 
| ?
 
| Signature check failed
 
|-
 
| -2013
 
| ?
 
| Keyring is full (contains 0x20 keys)
 
|-
 
| -2014
 
| ?
 
| Bad hash length (!= 20)
 
|-
 
| -2016
 
| ?
 
| unaligned data
 
|-
 
| -4100
 
| ?
 
| Wrong Ticket-, Cert size or invalid Ticket-, Cert data
 
|}
 
  
[[Category:IOS API documentation]]
+
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 +
 
 +
== A Bicycle Nomad Prepares for Re-entry ==
 +
 
 +
In 2010, Manjula Martin and her partner set out to see the world the old-fashioned way: by bicycle. With little money, no itinerary, gadgets or training, they traversed five countries and 3,500 miles and discovered a world filled with generosity. In this article, Manjula Martin describes the transition from bike to home with four rules for re-entry that are strikingly authentic, grounded, and universal.
 +
 
 +
[[http://goodvillenews.com/A-Bicycle-Nomad-Prepares-for-Re-entry-S6sLCO.html A Bicycle Nomad Prepares for Re-entry]]
 +
 
 +
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 +
 
 +
== 9-yr-old Helps Disabled Brother Finish Triathlons ==
 +
 
 +
Over the weekend, brothers Cayden and Connor Long joined hundreds of other children as they competed in the first annual New England Kids Triathlon in Cambridge. The boys did not win the event -- they didnt even come close. But that didnt stop them from winning hearts across the Internet. The Long brothers are not your typical triathletes. Six-year-old Cayden has cerebral palsy and can neither walk nor talk. But thanks to the dedication of his older brother, Connor, the young boy has participated in several triathlons. A touching video
 +
 
 +
[[http://goodvillenews.com/9-yr-old-Helps-Disabled-Brother-Finish-Triathlons-mozmuF.html 9-yr-old Helps Disabled Brother Finish Triathlons]]
 +
 
 +
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 +
 
 +
== Refugee Turned Entrepreneur Uplifts Women Abroad ==
 +
 
 +
While some retailers have struggled in the recession, Amber Chand, an online retailer of items made by women living in war-torn countries, is experiencing success."As the economy was going into a downturn during the holiday season, which is my primary season, I noticed actually that my company was increasing in terms of sales and revenues, and we grew by 22 percent," says Chand.
 +
 
 +
[[http://goodvillenews.com/Refugee-Turned-Entrepreneur-Uplifts-Women-Abroad-w0ETyF.html Refugee Turned Entrepreneur Uplifts Women Abroad]]
 +
 
 +
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 +
 
 +
== The Way of the Peaceful Parent ==
 +
 
 +
The Way is only learned by walking it. Here are the steps I recommend:* Greet your child each morning with a smile, a hug, a loving Good Morning! This is how we would all like to be greeted each day.
 +
 
 +
[[http://goodvillenews.com/The-Way-of-the-Peaceful-Parent-sdV8KN.html The Way of the Peaceful Parent]]
 +
 
 +
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]

Revision as of 06:36, 5 August 2012


The ES (ETicket Services) is responsible for the security of Wii, making it OUR enemy! Along with the rest of IOS, this is generally considered a "private interface" -- game developers never call any of these functions directly.

Most of these are now implemented in libogc -- see http://devkitpro.svn.sourceforge.net/viewvc/devkitpro/trunk/libogc/libogc/es.c?view=log.

Please feel free to submit patches to implement the remaining functions.

Known ES Functions

ios_ioctlv( fd, 0x01, 3, 0, vec); // ES_AddTicket(const signed_blob *stik, u32 stik_size, const signed_blob *certificates, u32 certificates_size, const signed_blob *crl, u32 crl_size)
ios_ioctlv( fd, 0x02, 4, 0, vec); // ES_AddTitleStart(const signed_blob *stmd, u32 tmd_size, const signed_blob *certificates, u32 certificates_size, const signed_blob *crl, u32 crl_size)
ios_ioctlv( fd, 0x03, 2, 0, vec); // ES_AddContentStart(u64 titleID, u32 cid)
ios_ioctlv( fd, 0x04, 2, 0, vec); // ES_AddContentData(s32 cfd, u8 *data, u32 data_size)
ios_ioctlv( fd, 0x05, 1, 0, vec); // ES_AddContentFinish(u32 cid)
ios_ioctlv( fd, 0x06, 0, 0, vec); // ES_AddTitleFinish(void)
ios_ioctlv( fd, 0x07, 0, 1, vec); // ES_GetDeviceID
ios_ioctlvReboot(fd, 0x08, 2, 0, vec); // ES_LaunchTitle(u64 titleID, const tikview *view)
ios_ioctlv( fd, 0x09, 1, 0, vec);  // ES_OpenContent(u16 index)
ios_ioctlv( fd, 0x0A, 1, 1, vec); // ES_ReadContent(s32 cfd, u8 *data, u32 data_size)
ios_ioctlv( fd, 0x0B, 1, 0, vec); // ES_CloseContent(s32 cfd)
ios_ioctlv( fd, 0x0C, 0, 1, vec); // ES_GetOwnedTitlesCount
ios_ioctlv( fd, 0x0D, 1, 1, vec); // ES_GetOwnedTitles
ios_ioctlv( fd, 0x0E, 0, 1, vec); // ES_GetTitlesCount
ios_ioctlv( fd, 0x0F, 1, 1, vec); // ES_GetTitles
ios_ioctlv( fd, 0x10, 1, 1, vec); // ES_GetTitleContentsCount
ios_ioctlv( fd, 0x11, 2, 1, vec); // ES_GetTitleContent
ios_ioctlv( fd, 0x12, 1, 1, vec); // ES_GetNumTicketViews(u64 titleID, u32 *cnt)
ios_ioctlv( fd, 0x13, 2, 1, vec); // ES_GetTicketViews(u64 titleID, tikview *views, u32 cnt)
ios_ioctlv( fd, 0x14, 1, 1, vec); // ES_GetTmdViewSize
ios_ioctlv( fd, 0x15, 2, 1, vec); // ES_GetTmdView
ios_ioctlv( fd, 0x16, 1, 2, vec); // ES_GetConsumption
ios_ioctlv( fd, 0x17, 1, 0, vec); // ES_DeleteTitle
ios_ioctlv( fd, 0x18, 1, 0, vec); // ES_DeleteTicket
ios_ioctlv( fd, 0x19, 1, 1, vec); // ES_DIGetTmdViewSize( u8 *TMD, u32 *TMDViewSize )
ios_ioctlv( fd, 0x1A, 2, 1, vec); // ES_DiGetTmdView
ios_ioctlv( fd, 0x1B, 1, 1, vec); // ES_DiGetTicketView
ios_ioctlv( fd, 0x1C, 4, 2, vec); // ES_DiVerify
ios_ioctlv( fd, 0x1D, 1, 1, vec); // ES_GetDataDir
ios_ioctlv( fd, 0x1E, 0, 1, vec); // ES_GetDeviceCert(u8 *outbuf)
ios_ioctlv( fd, 0x1F, 6, 0, vec); // ES_ImportBoot( const signed_blob *tik, u32 tik_size, const signed_blob *tik_certs, u32 tik_certs_size, const signed_blob *tmd, u32 tmd_size, const signed_blob *tmd_certs, u32 tmd_certs_size, const u8 *content, u32 content_size )
ios_ioctlv( fd, 0x20, 0, 1, vec); // ES_GetTitleId
ios_ioctlv( fd, 0x21, 1, 0, vec); // ES_SetUid
ios_ioctlv( fd, 0x22, 1, 0, vec); // ES_DeleteTitleContent(u64 titleID) - deletes all files containing 'app' in a /title/xxxxxxxx/yyyyyyyy/content
ios_ioctlv( fd, 0x23, 3, 0, vec); // ES_SeekContent
ios_ioctlv( fd, 0x24, 3, 0, vec); // ES_OpenTitleContent(u64 titleID, const tikview *view, u16 index)
ios_ioctlv( fd, 0x25, 0, 0, vec); // ES_LaunchBC(void)
ios_ioctlv( fd, 0x26, 1, 1, vec); // ES_ExportTitleInit
ios_ioctlv( fd, 0x27, 2, 0, vec); // ES_ExportContentBegin
ios_ioctlv( fd, 0x28, 1, 1, vec); // ES_ExportContentData
ios_ioctlv( fd, 0x29, 1, 0, vec); // ES_ExportContentEnd
ios_ioctlv( fd, 0x2A, 0, 0, vec); // ES_ExportTitleDone(void)
ios_ioctlv( fd, 0x2B, 1, 0, vec); // ES_AddTmd
ios_ioctlv( fd, 0x2C, 3, 2, vec); // ES_Encrypt(u32 keynum, u8 *iv, u8 *source, u32 size, u8 *dest)
ios_ioctlv( fd, 0x2D, 3, 2, vec); // ES_Decrypt(u32 keynum, u8 *iv, u8 *source, u32 size, u8 *dest)
ios_ioctlv( fd, 0x2E, 0, 1, vec); // ES_GetBoot2Version(u32 *version)
ios_ioctlv( fd, 0x2F, 0, 0, vec); // ES_AddTitleCancel(void)
ios_ioctlv( fd, 0x30, 1, 2, vec); // ES_Sign(u8 *source, u32 size, u8 *sig, u8 *certs)
ios_ioctlv( fd, 0x31, 3, 0, vec); // ES_VerifySign
// the following functions are only available in IOS28+
ios_ioctlv( fd, 0x32, 1, 1, vec); // ES_GetStoredContentCount
ios_ioctlv( fd, 0x33, 2, 1, vec); // ES_GetStoredContent
ios_ioctlv( fd, 0x34, 1, 1, vec); // ES_GetStoredTmdSize
ios_ioctlv( fd, 0x35, 2, 1, vec); // ES_GetStoredTmd
ios_ioctlv( fd, 0x36, 0, 1, vec); // ES_GetSharedContentCount
ios_ioctlv( fd, 0x37, 1, 1, vec); // ES_GetSharedContents
ios_ioctlv( fd, 0x38, 1, 0, vec); // ?(ES_DeleteSharedContent)
ios_ioctlv( fd, 0x39, 0, 1, vec); // ES_GetDiTmdSize
ios_ioctlv( fd, 0x3A, 1, 1, vec); // ES_GetDiTmd
ios_ioctlv( fd, 0x3B, 4, 2, vec); // Unknown ... calls ES_DiVerify 
ios_ioctlv( fd, 0x3C, 2, 1, vec); // ES_SetupStreamKey ... calls ES_DiVerify(tikview,tmd,u32) 
ios_ioctlv( fd, 0x3D, 0, 1, vec); // ES_DeleteStreamKey ... wrapper for syscall 5c
// the following functions are only available in IOS37+ but not in IOS38
ios_ioctlv( fd, 0x3E, 2, 0, vec); // Unknown ... Deletes a content from a title's private directory
// the following functions are only available in IOS37v3609+ but not in IOS38
ios_ioctlv( fd, 0x3F, ?, ?, vec); // non-existant ioctl why? ... because.
ios_ioctlv( fd, 0x40, 1, 1, vec); // Unknown -- takes in a ticket?
// the following functions are only available in IOS56+
ios_ioctlv( fd, 0x41, 1, 1, vec); // Unknown -- retrieves a key?
ios_ioctlv( fd, 0x42, 2, 0, vec); // Unknown -- something with a key?
// the following functions are only available in IOS56v5405+/IOS57v5661+/IOS61v5405+/IOS70+ Please check (I thought it was a rule never add new functions existing IOS)
ios_ioctlv( fd, 0x43, 1, 1, vec); // Unknown -- something with a ticket and maybe a ".tv1" file?
ios_ioctlv( fd, 0x44, 2, 1, vec); // Unknown -- similar to ioctl 43
ios_ioctlv( fd, 0x45, 0, 0, vec); // Unknown ... korean-common-key check

/dev/es IOS_Ioctlv

number name in count out count vec entry target vec entry size [bytes] libogc prototype Description
0x00 ? ? ? ? ? ? returns -1017 non-existant ioctl
0x01 ES_AddTicket style="vertical ... \n

What Is Your Legacy? Living A Meaningful life

I want the world to be better because I was here. I want my life, I want my work, my family, I want it to mean something and if you are not making someone elses life better then you are wasting your time Will Smith

[What Is Your Legacy? Living A Meaningful life]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

A Bicycle Nomad Prepares for Re-entry

In 2010, Manjula Martin and her partner set out to see the world the old-fashioned way: by bicycle. With little money, no itinerary, gadgets or training, they traversed five countries and 3,500 miles and discovered a world filled with generosity. In this article, Manjula Martin describes the transition from bike to home with four rules for re-entry that are strikingly authentic, grounded, and universal.

[A Bicycle Nomad Prepares for Re-entry]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

9-yr-old Helps Disabled Brother Finish Triathlons

Over the weekend, brothers Cayden and Connor Long joined hundreds of other children as they competed in the first annual New England Kids Triathlon in Cambridge. The boys did not win the event -- they didnt even come close. But that didnt stop them from winning hearts across the Internet. The Long brothers are not your typical triathletes. Six-year-old Cayden has cerebral palsy and can neither walk nor talk. But thanks to the dedication of his older brother, Connor, the young boy has participated in several triathlons. A touching video

[9-yr-old Helps Disabled Brother Finish Triathlons]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

Refugee Turned Entrepreneur Uplifts Women Abroad

While some retailers have struggled in the recession, Amber Chand, an online retailer of items made by women living in war-torn countries, is experiencing success."As the economy was going into a downturn during the holiday season, which is my primary season, I noticed actually that my company was increasing in terms of sales and revenues, and we grew by 22 percent," says Chand.

[Refugee Turned Entrepreneur Uplifts Women Abroad]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

The Way of the Peaceful Parent

The Way is only learned by walking it. Here are the steps I recommend:* Greet your child each morning with a smile, a hug, a loving Good Morning! This is how we would all like to be greeted each day.

[The Way of the Peaceful Parent]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]