How do games get into the Loadiine format?

Discussion in 'Wii U - Hacking & Backup Loaders' started by markmcrobie, Nov 3, 2016.

  1. markmcrobie
    OP

    markmcrobie GBAtemp Fan

    Member
    439
    18
    May 24, 2008
    As I understand it, a .wud is a 1:1 ISO of the original Wii U game disc.

    Loadiine GX2 loads games in the format:

    \Game Name[Game ID]\code
    \Game Name[Game ID]\content
    \Game Name[Game ID]\meta

    WUP Installer loads using:

    \install\*.app
    \install'\*.h3
    \install\title.cert
    \install\title.tik
    \install\title.tmd

    I believe you can extract the WUP Installer format from the .wud file, but how do games get into the Loadiine format? Can we convert between the 3?

    Thanks
     
  2. Hking0036

    Hking0036 GBAtemp Fan

    Member
    397
    194
    Sep 15, 2015
    United States
    Loadiine is decrypted game files dumped with DDD. There's currently no way to dump a full 1:1 disc with normal hardware so most people get the encrypted installable files direct from NUS servers, and dump tickets from NAND.
     
    Exavold likes this.
  3. The Real Jdbye

    The Real Jdbye Always Remember 30/07/08

    Member
    GBAtemp Patron
    The Real Jdbye is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    11,445
    4,759
    Mar 17, 2010
    Norway
    Alola
    WUP Installer format can be decrypted/unpacked into Loadiine ready files.
    Essentially it goes like this:
    Disc -> WUP -> Loadiine
    The conversion process is AFAIK one way only, so you can't convert Loadiine format to WUP Installer format or WUP Installer format back into .wud.
     
  4. markmcrobie
    OP

    markmcrobie GBAtemp Fan

    Member
    439
    18
    May 24, 2008
    Cool, how do you create the Loadiine files from the WUP ones?
     
  5. aljpn91

    aljpn91 Banned

    Banned
    276
    91
    Dec 28, 2015
    with crediar's discU
     
    markmcrobie likes this.
  6. The Real Jdbye

    The Real Jdbye Always Remember 30/07/08

    Member
    GBAtemp Patron
    The Real Jdbye is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    11,445
    4,759
    Mar 17, 2010
    Norway
    Alola
    JNUSTool and NEW NUSGrabber GUI do the downloading/extraction process for you, though I'm not sure how you'd extract files that you already have downloaded. I think CDecrypt can do it. Maybe UWizard as well.
    That's for WUDs.
     
  7. Sumea

    Sumea Disco Ninja Frog

    Member
    1,445
    255
    Aug 16, 2008
    Finland
    Turku
    Short, and dirty by someone who does not actually know THAT well:

    .WUD - Wii U image file. full dumps of currently single layer 25gig discs - Always kept at said 25gig size for sake of preserving them as they are. Also crypted in one way or another, and needs a title key to decrypt. Wii U console probably reads it out from the disc in one way or another, but it cannot be dumped on normal consoles currently, apparently people could do it on dev kits or something, which is how the few WUD dumps have their title keys with them. Overall they also include the ticket files in separate directory/partition/track - I do not know like I said - and maybe some other data maybe I dunno. Because WUD is retained 1:1 copy of the game in it's crypted form, it is somehow possible to convert into NUS format, though do not ask me, ask Crediar about it. I would love an explanation myself how it all works actually..

    Loadiine format is the CONTENT part of a WUD as is. Can also be accessed with kernel access homebrew - thus dumped with DDD or other such tools (there was other ruder ways to dump games first as well) - Loadiine format is just the raw game files as is, the executable being in /code folder with any additional libraries it might need, and data that the game needs in it's own folder. Meta folder is used only to store the game icon seen on main system, menu, load-in screens and sound, seen officially when launching the game - manuals etc. Loadiine needs only the icon usually from this folder.


    To also answer: WUD can be decrypted and dumped into RAW files, giving you "loadiine format" out of a WUD, and it can also be converted into NUS installer format by crediar's tool, by fairy dragon magic for all I know. WUD as is is not being used by anything, not even Wii U Emulator CEMU AFAIK.
     
  8. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    17,666
    8,252
    Oct 27, 2002
    France
    Engine room, learning
    here some tool and what they can do :

    DiscU From Crediar : Can extract a WUD and decrypt all the game files. Since v4.1b it can also extract the encrypted content file without decrypting them. Requires the Disc key to read the disc data. the key is usually provided by release groups. Common key included in 4.1b.
    CDecrypt From Crediar : Decrypt encrypted content files to extracted game files. Requires the encrypted Title key located in a ticket (tik, title.tik). WiiU Common key required in v0.1, included in v0.2.
    NUSGrabber From Crediar : Download encrypted content files from Nintendo Update Server. Requires a TitleID
    JNUSTool From Maschell : NUSgrabber+Cdecrypt combined written in Java (multi platform), it downloads encrypted content from NUS and can also decrypts the files at the same time. It can also decrypt single files without downloading all the encrypted contents. it gets only the data where the file you want is located. Requires Common key and the encrypted title key if no ticket is provided with the download.
    VGMToolbox : Game Music extraction tool, added WUD extraction features, same as DiscU. probably require disc key and common key.


    All other released tools are mostly GUI over these program, or program doing the same thing.


    I'm not sure about this, I haven't read any info about WUD format, but to me it's something like that :

    note:
    Encrypted content = .app, .h3, etc.
    decrypted content = the game files (the one used by loadiine)

    The full Disc is encrypted with a disc key. the key is released at the same time than the WUD by dumper groups.
    When decrypting the disc with the disc key, you get different partitions, or maybe folders. (maybe each partition is encrypted individually with the disc key, instead of the full disc. I don't know)
    Each partition contains encrypted content files (.app, .h3, tmd, certk, tik, etc.). this step used to be in memory only on first DiscU version. it's now possible to save these files.
    Each encrypted content pack is then decrypted using the encrypted title key located in the ticket. I guess the encrypted title key is decrypted with the wiiu common key?

    Wud > disc key > encrypted content > ticket > encrypted title key > Common key > decrypted title key > decrypted content.

    I don't know how the disc key is found or where it's extracted from. It's probably somewhere on the disc, or the console wouldn't be able to read it.

    I'm not sure how much the WiiU common key is used, maybe in more steps?
    I should learn more about cryptology.



    The only way to re-encrypt is to use official SDK tools, until a legal open source method is released. (work in progress to convert homebrew to encrypted content format)
    It would also require the Private key (only Nintendo has it) to sign all files, like the ticket. But now that there's a signature check patch applied to CFW, the private key is not required to make false ticket.
    But user made encrypted files will only work on CFW.

    I don't know if there's a way to convert encrypted content into partition/wud.
    On Wii, the disc format was known and we could do it, maybe it will be possible with wiiu disc format too.
     
  9. Don Jon

    Don Jon GBAtemp Fan

    Member
    447
    178
    Nov 20, 2015
    United States
    its nice to know that it is being looked at as far as reencrypting the loadiine files
    if loadiine can be installed as an official app in the future, do u still need encrypted files?
    i really dont want to redownload all my warez and loadiine has such a beautiful layout
     
  10. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    17,666
    8,252
    Oct 27, 2002
    France
    Engine room, learning
    if you want to keep only one format, WUD (or compressed wud into wux) is the best choice as it can provides all 3 format : full iso, encrypted and decrypted.
    It's also "correctly signed".

    If you keep only loadiine format because in the future it will be possible to encrypt the content, it will be "bad signed".
    At least, between both encrypted and decrypted format, keep the encrypted one from NUS, it's always better to get clean files instead of user's edited or repacked ones.

    so, keep in order :
    WUX : compressed WUD. can be decompressed without altering WUD data. (lossless compression)
    WUD : best to get all possible format from it. Issue is that it's big !, but when converting to Wux it's lossless compression and will compress better than winrar.
    Encrypted content from NUS or extracted from WUD : original and good signed files. can be used as is to install, or can be extracted to get internal files.
    Decrypted content : for loadiine, cafiine, hacks, mods, translation, music/model/texture extraction, etc. that's the least best method for archival purpose. it's good that it's ready to use for any mods or loadiine, but can't be repacked officially with good signature. repacked files will be installable only on CFW (unless there's a signature patch release later at boot time for sysNAND).
     
  11. lafleche

    lafleche GBAtemp Fan

    Member
    377
    81
    Jan 4, 2007
    Netherlands
    @Cyan: as usual on the spot :-)
    At this moment rebuilding my wud collection and compressing them
    Unfortunately the scene stopped releasing WUD's in favor of loadiine format. So the scene releases from 2016 (like lego star wars, batman origins, paper mario) are hopefully being redone *proper* as WUD.

    edit : wad=wud :-)
     
    Last edited by lafleche, Nov 4, 2016
    Cyan likes this.
  12. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    17,666
    8,252
    Oct 27, 2002
    France
    Engine room, learning
    I never took wud files (too big for bad internet connection). NUS files are easy to get, but wud will always be available later (even if hard to find), while NUS version will be discontinued at any given time in the future.
    well, if you want to archive, for the moment choose the one you like or based on its size if it's an issue.
     
  13. lafleche

    lafleche GBAtemp Fan

    Member
    377
    81
    Jan 4, 2007
    Netherlands
    Just to be on the safe side and check (before I delete some loadiine ready versions in favor of the NUS ones)

    As there are still some games not available as 'wud/wux' BUT available as 'Encrypted from NUS'.... Is decrypting the 'nus' version with cdecrypt resulting in a version usable by loadiine?
     
  14. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    17,666
    8,252
    Oct 27, 2002
    France
    Engine room, learning
    yes, that's what lot of users are doing for months to use with loadiine.
    as long as you have the title key, you can decrypt them.

    few titles didn't have a title key due to no WUD dumped, but now that we can extract ticket (and title key) from NAND we can extract the eshops with no WUD dumps.