Taking basic stuff from ihaveamac/wiiu-things and CETK (title.tik) creation from giwty/FunKii-UI.
wiiu_cdndownload.py
- Download titles from Nintendo CDN, including cetk (ticket). Generate CETK keys when extracted key is available.wiiu_decrypt.py
- Decrypt titles from Nintendo CDN; requires Wii U Common Key, plus given encrypted titlekey if there is no CETK file. Run it from inside a downloaded title folder.wiiu_extract.py
- Extract contents from titles. Run it from inside a decrypted title folder.--dump-info
- Print lots more info.--full-paths
- Show full paths in output.--no-extract
- Don't extract files, only show info.--all
- Show all files, including those with 0x80 bitmask in type (which probably means deleted file). only useful for title updates.
wiiu_titlekeys.py
- Generate a formatted JSON file with all the known keys.--cemu
- Generates a text key list for use with CEMU.
Run wiiu_titlekeys.py
without parameters:
$ wiiu_titlekeys.py
Generating key lists from http://vault.titlekeys.ovh/json structure...
Formatted json: titlekeys.json
The formatted JSON file is required for the download of titles with wiiu_cdndownload.py
.
Run wiiu_cdndownload.py
with the ID of the title as the main parameter. You can get the list of IDs from the title database. The ID must not contain the dash ("-").
For example, for Axiom Verge:
$ wiiu_cdndownload.py 0005000010200800
Processing title 0005000010200800: Axiom Verge
Downloading TMD (title.tmd)...
Contents: 11
Total size: 0xA4D0000 (164.8125 MiB)
Getting CETK (title.tik)...
Generating a fake one from encrypted key: FA463EA133416E47D027909CE6428FE4
Fake CETK requires custom firmware.
Writing cert (title.cert)...
Downloading: 00000000.app... 100.0% 65536 / 65536 (0.0625) MiB)
Downloading: 00000001.app... 100.0% 32768 / 32768 (0.03125) MiB)
Downloading: 00000002.app... 100.0% 32768 / 32768 (0.03125) MiB)
Downloading: 00000003.app... 100.0% 196608 / 196608 (0.1875) MiB)
Downloading: 00000003.h3... 100.0% 20 / 20
Downloading: 00000004.app... 100.0% 11730944 / 11730944 (11.1875) MiB)
Downloading: 00000004.h3... 100.0% 20 / 20
Downloading: 00000005.app... 100.0% 1114112 / 1114112 (1.0625) MiB)
Downloading: 00000005.h3... 100.0% 20 / 20
Downloading: 00000006.app... 100.0% 1114112 / 1114112 (1.0625) MiB)
Downloading: 00000006.h3... 100.0% 20 / 20
Downloading: 00000007.app... 100.0% 18153472 / 18153472 (17.3125) MiB)
Downloading: 00000007.h3... 100.0% 20 / 20
Downloading: 00000008.app... 100.0% 2162688 / 2162688 (2.0625) MiB)
Downloading: 00000008.h3... 100.0% 20 / 20
Downloading: 00000009.app... 100.0% 29425664 / 29425664 (28.0625) MiB)
Downloading: 0000000a.app... 100.0% 108789760 / 108789760 (103.75) MiB)
Downloading: 0000000a.h3... 100.0% 20 / 20
You will get a folder with the title contents.
Go inside the folder of the downloaded title and run wiiu_decript.py
:
$ cd Axiom\ Verge/
$ wiiu_decrypt.py
Title ID: 0005000010200800
Encrypted Titlekey: FA463EA133416E47D027909CE6428FE4
Decrypted Titlekey: 717BB4B425EB299C3E0749FB7B36B48E
Decrypting 00000000... 100.0% 65536 / 65536 (0.0625 MiB)
Decrypting 00000001... 100.0% 32768 / 32768 (0.03125 MiB)
Decrypting 00000002... 100.0% 32768 / 32768 (0.03125 MiB)
Decrypting 00000003... Chunk 3 / 3 (0.1875 MiB)
Decrypting 00000004... Chunk 179 / 179 (11.1875 MiB)
Decrypting 00000005... Chunk 17 / 17 (1.0625 MiB)
Decrypting 00000006... Chunk 17 / 17 (1.0625 MiB)
Decrypting 00000007... Chunk 277 / 277 (17.3125 MiB)
Decrypting 00000008... Chunk 33 / 33 (2.0625 MiB)
Decrypting 00000009... 100.0% 29425664 / 29425664 (28.0625 MiB)
Decrypting 0000000a... Chunk 1660 / 1660 (103.75 MiB)
In the same folder, run wiiu_extract.py
. You will see some header information and then a list of files being extracted.
$ wiiu_extract.py
FST header file: 00000000.app.dec
unknown: 0x20
exheader count: 11
#0 (0)
- DiscOffset?: 0x00000000
- Unknown2: 0x00000000
- TitleID: 0x0000000000000000
- GroupID: 0x00000000
- Flags?: 0x0000
[...]
* code
- app.xml
- AxiomVerge.rpx
- cos.xml
* content
- app.xml
* Content
* Areas
- Area1.xml
- Area2.xml
[..]
* meta
- bootDrcTex.tga
- bootLogoTex.tga
- bootMovie.h264
- bootSound.btsnd
- bootTvTex.tga
- CERO_ja.jpg
[...]
All the extracted files will be in these three folders:
$ du -hs code/ content/ meta
29M code/
106M content/
7.2M meta
Delete the decrypted archives and the extracted contents:
$ rm -fr *.dec code/ content/ meta/