Question Extract NCA files from Update

Discussion in 'Switch - ROM Hacking, Saves, Translations & Tools' started by Pedro250, Nov 16, 2019.

  1. Pedro250
    OP

    Pedro250 Advanced Member

    Newcomer
    4
    Sep 12, 2009
    Hi, i am trying to extract Pokemon Lets Go Pikachu RomFS files to edit them with pkNX but i am having a problem.

    This is my folder:
    [​IMG]
    As you can see i have hactool, my keys file (got it with LockPickRCM from my V9.0.1 switch), the NCA-NSP-XCI_TO_LayeredFS v 1.6.4 that i got here on GBATemp and two folders:

    - Base with all folder that i extract from the stock game nsp
    [​IMG]

    - Update with all folder that i extracted from the 1.0.2 update
    [​IMG]

    The base.nca and update.nca are just copies of the bigger files in each folder.

    So far so good but when i try to extract the update to get the romfs files (the base game i can extract without problem and get all the exefs and romfs files) i get this error:
    [​IMG]
    I already tried a bunch of different applications that i got here on GBATemp but i all ways get this error. I can get the exefs files for the update but not the romfs files.

    I am doing anything wrong?
     
  2. masagrator

    masagrator The developper

    Member
    11
    Oct 14, 2018
    Poland
    Yes, you need to put decrypted NCA from base for update. Update doesn't contain romfs files, but diffs.
    So you need to decrypt Base NCA with --plaintext and use it in --basenca
     
  3. Pedro250
    OP

    Pedro250 Advanced Member

    Newcomer
    4
    Sep 12, 2009
    Hi, thanks.

    I did as you said and decrypted the base game nca.
    I also tested the decrypted file to be sure it is decrypted by trying to extract it without a key and it worked so the base.nca is not the issue.

    Then i used this command:

    hactool.exe -k keys.ini --titlekey=77xxxxxxxxxxxxxxxxxxxxxxxxxxxx83 --basenca="base.nca" --section1="romfs.bin" --exefsdir="exefs" "update.nca"

    The titlekey is the key from the update, not the base game, cloud that be the problem? I got it from the .tik file in the update.nsp extracted files.


    This is what i get:
    [​IMG]

    Again i get the exefs for the update but not the romfs files.

    I know i am doing somethign wrong, just not where.
     
    Last edited by Pedro250, Nov 16, 2019
  4. masagrator

    masagrator The developper

    Member
    11
    Oct 14, 2018
    Poland
    Why you are extracting it to bin? Just use --romfsdir
    Put titlekey after basenca command
    And you are using latest build of hactool or latest release? Last release is outdated.

    — Posts automatically merged - Please don't double post! —

    Here you have compiled build that is compatible with latest games
    https://github.com/SciresM/hactool/files/3317509/hactool.zip
     
  5. Pedro250
    OP

    Pedro250 Advanced Member

    Newcomer
    4
    Sep 12, 2009
    EDIT
    Its working now, turns out that, because i decrypt it with the old hactool, it didn't do it properly. I decrypt it with the hactool that you provided and it worked. Thanks for the help.
    _________________________________________________________________________________________________________________________________________

    I used the hacktool that you provided and made the changes you suggested.
    This is the line now:

    hactool.exe -k keys.ini --basenca="base.nca" --titlekey=77xxxxxxxxxxxxxxxxxxxxxxxxxxxx83 --romfsdir="romfs" --exefsdir="exefs" "update.nca"

    It was working fine util about half of the extractio when this happened:
    [​IMG]

    Also i noted that in the extracted update nsp folder there are two nca files about the same size. I am using the largest one (one with 33 643 KB) but there is also one with 23 632 KB. Could that also be needed for this?

    Do i need to decrypt the update nca also?
     
    Last edited by Pedro250, Nov 16, 2019
Quick Reply
Draft saved Draft deleted
Loading...