[Question] the best way to decrypt and unpack patches and dlc content?

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by ninb, Apr 23, 2015.

  1. ninb
    OP

    ninb Member

    Newcomer
    43
    44
    Apr 23, 2015
    hi here! I need help, what do I use to unpack patches and dlc?

    I've already use sdinfo_gen.py , created all xor files, and applied them to files with padxorer.exe
    so I have decrypted app. What should I do to extract data from them?
     


  2. arbalest876

    arbalest876 Advanced Member

    Newcomer
    54
    5
    Oct 7, 2014
    Switzerland
    1.Get romfs from the decrypted .app file.
    2.Use ctrKeyGen.py to create the xorpad for .app file.
    3.Use padxorer to decrypt romfs.
    4.Use ctrtool to extract datas from decrypted romfs.
     
  3. ninb
    OP

    ninb Member

    Newcomer
    43
    44
    Apr 23, 2015
    uh, thanks for the answer, but you can a little more detail?

    at first, how do I get romfs from app, and then, how do I use ctrtool to extract data?
     
  4. arbalest876

    arbalest876 Advanced Member

    Newcomer
    54
    5
    Oct 7, 2014
    Switzerland
    you can see the help of ctrtool by the command "ctrtool -help"
    to get romfs,the command is "ctrtool xxxx.app --romfs=yyyy",it will save the romfs which named as yyyy.
    to extract data from romfs,the command is "ctrtool -t romfs --romfsdir=xxxx YYYY",YYYY is the name of decrypted romfs.
     
  5. ninb
    OP

    ninb Member

    Newcomer
    43
    44
    Apr 23, 2015
    thank you. I will try it:bow:
     
  6. ninb
    OP

    ninb Member

    Newcomer
    43
    44
    Apr 23, 2015
    ok. I unpacked exefs, but I can not decrypt it...
    I can not get the correct ncchinfo.bin :unsure:
     
  7. arbalest876

    arbalest876 Advanced Member

    Newcomer
    54
    5
    Oct 7, 2014
    Switzerland
    You should drag .app file to ctrKeyGen.py,not exefs or romfs file.
    If it can't create the correct ncchinfo.bin,that means the .app file hasn't be decrypted correctly.
     
  8. Asia81

    Asia81 In my Ecchi World <3

    Member
    5,041
    2,487
    Nov 15, 2014
    France
    Albi
    Same Question.

    I have :
    - Update_SA14.cia
    - 00000004.app
    - title.0004000e.0011c500.content.00000004.app.xorpad

    How can i decrypt it properly ? For extract data
    When i Drag&Drop 00000004.app on ctrKeyGen.py file, i got a bad ncchinfo.bin with nothing inside :
    [​IMG]

    I have tried to decrypt the 00000004.app :
    Padxorer.exe 00000004.app title.0004000e.0011c500.content.00000004.app.xorpad

    I got a 00000004.app.out, and even with this file, i got a bad ncchinfo.bin with nothing inside.

    If i try to extract RomFS.bin from this 00000004.app.out, ctrtool tell me Unknow file :
    ctrtool -x --romfs=RomFS.bin 00000004.app.out

    ----------------------------------------------------------------------------------------------------------------------

    I don't know what i need to do now for extract data from game update...
    Any help ?
     
  9. arbalest876

    arbalest876 Advanced Member

    Newcomer
    54
    5
    Oct 7, 2014
    Switzerland
    Maybe both of you made a same mistake.
    To decrypt the app file,you can't format either SYSNAND or EMUNAND.
    If you have formatted the SYSNAND or EMUNAND,then you will not be able to decrypt the app files installed in EMUNAND.
     
  10. Asia81

    Asia81 In my Ecchi World <3

    Member
    5,041
    2,487
    Nov 15, 2014
    France
    Albi
    Yeah, i have formatted Sys/Emunand.

    I will try to remake an emunand linked.

    My way to decrypt the app file is good or not ?
     
  11. arbalest876

    arbalest876 Advanced Member

    Newcomer
    54
    5
    Oct 7, 2014
    Switzerland
    Thy way is OK,you just need to remake an EMUNAND,and install cia in it.
    After that,you can decrypt the app with xorpad.
    Then,you drag the .app.out file to ctrKeyGen.py,it will create the correct ncchinfo.bin.
     
  12. Asia81

    Asia81 In my Ecchi World <3

    Member
    5,041
    2,487
    Nov 15, 2014
    France
    Albi
    It's working, thanks for your useful help :)
    Now i will make the xorpad for the romfs file :)
     
    arbalest876 likes this.
  13. Asia81

    Asia81 In my Ecchi World <3

    Member
    5,041
    2,487
    Nov 15, 2014
    France
    Albi
    I have decrypted the RomFS, but when i try to extracr it, ihave :
    Error, IVFC segment corrupted
    Error, RomFS corrupted
     
  14. Asia81

    Asia81 In my Ecchi World <3

    Member
    5,041
    2,487
    Nov 15, 2014
    France
    Albi
    ctrtool -x --romfs=EncryptedRomFS.bin 00000004.app.out
    Padxorer.exe EncryptedRomFS.bin 0004000E0011C500.Main.romfs.xorpad
    ctrtool.exe -t romfs --romfsdir=./romfs EncryptedRomFS.bin.out

    And i have :
    Error, IVFC segment corrupted
    Error, RomFS corrupted
     
  15. arbalest876

    arbalest876 Advanced Member

    Newcomer
    54
    5
    Oct 7, 2014
    Switzerland
    Perhaps the ctrtool you used is the old version.It won't get romfs correctly.
    So the romfs can't be decrypted with xorpad.
    You can try getromfs.exe to get romfs.Just drag the .app.out to it,or use command"getromfs xxxx.app.out"
     

    Attached Files:

  16. Asia81

    Asia81 In my Ecchi World <3

    Member
    5,041
    2,487
    Nov 15, 2014
    France
    Albi

    YYEEAAHH
    I love you, thanks for your very useful help :D
     
  17. Asia81

    Asia81 In my Ecchi World <3

    Member
    5,041
    2,487
    Nov 15, 2014
    France
    Albi
    uh, and another question

    You know how i can rebuild a patch/cia ?
     
  18. Asia81

    Asia81 In my Ecchi World <3

    Member
    5,041
    2,487
    Nov 15, 2014
    France
    Albi
    And i have the same problem with ExeFS.

    ctrtool -x --exefs=EncryptedExeFS.bin 00000000.app.out
    MEX.py EncryptedExeFS.bin 0004000000164600.Main.exefs_norm.xorpad 0004000000164600.Main.exefs_7x.xorpad EditedExeFS.xorpad
    (Because it's a SDK7 game, i need to MEX the ExeFS, right ?)
    And with MEX i have :
    .code not found! Did you specify the input files correctly ?
     
  19. cearp

    cearp the ticket master

    Member
    7,511
    4,745
    May 26, 2008
    Tuvalu
    did you fix your problem? i have the same problem, i think i have done everything right but i get .code not found :)

    edit ---- i used -p instead of -x :)
    with -p, mex.py worked
     
  20. Asia81

    Asia81 In my Ecchi World <3

    Member
    5,041
    2,487
    Nov 15, 2014
    France
    Albi
    I will try, thanks for info