[Tutorial] How to Decrypt, Extract & Rebuild a CIA

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by Asia81, May 12, 2015.

Thread Status:
Not open for further replies.
May 12, 2015
  1. hacksn5s4

    Banned hacksn5s4 Banned

    Joined:
    Aug 12, 2015
    Messages:
    4,332
    Country:
    Australia
    i decypted yokai watch 2 but i can't find the models
     


  2. ForeverEternal

    Member ForeverEternal GBAtemp Regular

    Joined:
    Sep 15, 2016
    Messages:
    127
    Country:
    United States
    Ok, I'm not sure if this is the right thread to ask.

    I've successfully decrypted the eshop app and was able to extract the data with the tool.

    However I cannot decrypt the DLC contents. Attached below is a log with the error.

    I've also attempted to extract the contents without decrypting the file, but I get several files in the form of DecryptedApp.00XX.000000XX and I don't know what to do with them


    Thanks.

    EDIT: Got it, apparently it's not a good idea to decrypt DLC contents dumped from Decrypt9/CIAngel

    EDIT2: Nvm although the files were decrypted successfully. I still get files like this DecryptedApp.00XX.000000XX when running the tool

    EDIT3: All done, had to use ctrtool on those files.
     

    Attached Files:

    • log.txt
      File size:
      10.6 KB
      Views:
      16
    Last edited by ForeverEternal, Oct 22, 2016
  3. Mirkobien

    Newcomer Mirkobien Newbie

    Joined:
    Nov 1, 2016
    Messages:
    8
    Country:
    Chile
    What could the problem be if I followed every direction but the Toolkit says that the extraction was succeeded? No new folders are made, and the program takes about half a second to show the message. Yes, I did install SetupUS
     
  4. Asia81
    OP

    Member Asia81 In my Ecchi World <3

    Joined:
    Nov 15, 2014
    Messages:
    4,612
    Location:
    Albi
    Country:
    France
    Be sure to not write .cia when writting the name.
    Be sure you CIA doesn't have any spaces or special characters like é or à.
    Be sure to have installed the SetupXX (check your program file folder).
    Check you both ProgramFiles folders (32b and 64b) and move the installed folder from one to other (don't guess it's the issue, but well).
     
  5. Mirkobien

    Newcomer Mirkobien Newbie

    Joined:
    Nov 1, 2016
    Messages:
    8
    Country:
    Chile
    Yep, checked all of that, but my computer is a 32-Bit PC, thus I can't change folders. The .cia is called simply "rom", and I do type only the name, without the extension. As I said, I did install SteupXX (US in my case.). I have also tried inputting 'CIA', 'CE' and 'CIAE', all taking me to different commands, however, none of these work.
     
  6. honyo29

    Member honyo29 GBAtemp Fan

    Joined:
    Nov 27, 2014
    Messages:
    301
    Country:
    Indonesia
    similar setup and exact same problem.
    could use version 4.4 no problem. but would really love the straight up build .cia feature.
    if there's an alternate version where everything installed/extracted to the packhack folder (maybe sub folder) so the program just running command and tools from there just like the 4.4 version, that would be neat.
    or are the newer tools just won't work with 32 bit PC?
     
  7. Asia81
    OP

    Member Asia81 In my Ecchi World <3

    Joined:
    Nov 15, 2014
    Messages:
    4,612
    Location:
    Albi
    Country:
    France
    Take ctrtool.exe in the ProgramFiles folder, and copy it to where is your cia (don't move your cia itself in the ProgramFiles folder).

    And run this:
    Code:
    "ctrtool.exe" --content=DecryptedApp NameOfFile.cia
    What is wrote? Any error code?
     
  8. Mirkobien

    Newcomer Mirkobien Newbie

    Joined:
    Nov 1, 2016
    Messages:
    8
    Country:
    Chile
    Yep, apparently an error appears. It roughly translates to "Windows couldn't run this file. Make sure to know which version of Windows you're running (x86 or x64) and ask the developer for your needed version."
     
  9. Asia81
    OP

    Member Asia81 In my Ecchi World <3

    Joined:
    Nov 15, 2014
    Messages:
    4,612
    Location:
    Albi
    Country:
    France
    And you have a 32b computer?
    Will check if I find one
     
  10. Mirkobien

    Newcomer Mirkobien Newbie

    Joined:
    Nov 1, 2016
    Messages:
    8
    Country:
    Chile
    Yep, it's a 32 bit OS.

    [​IMG]
     
  11. Asia81
    OP

    Member Asia81 In my Ecchi World <3

    Joined:
    Nov 15, 2014
    Messages:
    4,612
    Location:
    Albi
    Country:
    France
    Apparently this is a know issue and not due to me.
    Try to check to find a 32bits yourself of ctrtool (should not be that hard), I don't have time for it atm (maybe in the week if you didn't find one before).

    But if @honyo29 have it working in 4.4, maybe you could post it?
    And after just replace ctrtool in the programfiles folder by this one.
     
  12. honyo29

    Member honyo29 GBAtemp Fan

    Joined:
    Nov 27, 2014
    Messages:
    301
    Country:
    Indonesia
    afaik, ctrtool never supports 32bit.
    and your 4.4 hacking tool kit is just a single .exe file (beside the obvious clean.exe), pretty big though (9.6MB). i didn't notice any extracted or installed tools anywhere, it just works right away like portable app.
     
  13. ShawnTRods

    Member ShawnTRods GBAtemp Psycho!

    Joined:
    Mar 26, 2011
    Messages:
    4,307
    Location:
    London
    Country:
    United Kingdom
    Not sure if I am the only one with the problem, because others seem to be doing it just fine.

    After extracting the cia, using the method mentioned and using pk3ds to edit pokemon sun/moon. and then rebuilding the cia with hackingtoolkit3ds, gives a smaller sized cia(usually 7mb smaller than the original sized cia). And when I install sun/moon it shows black screen.

    Extracting the cia and repacking it without changes with pk3ds makes the game load fine.

    (but the thing is everyone is using pk3ds just fine? is it just me or the problems are there with pk3ds?)
    @Asia81
     
    Last edited by ShawnTRods, Dec 6, 2016
  14. Asia81
    OP

    Member Asia81 In my Ecchi World <3

    Joined:
    Nov 15, 2014
    Messages:
    4,612
    Location:
    Albi
    Country:
    France
    Well, there is nothing I can do for you.
    If without any edits edits your game load fine, it's a problem with your edits.
     
  15. ShawnTRods

    Member ShawnTRods GBAtemp Psycho!

    Joined:
    Mar 26, 2011
    Messages:
    4,307
    Location:
    London
    Country:
    United Kingdom
    Hmm weird. Either people aren't testing pk3ds properly :P

    Cuz I can't get anything to work after editing ANYTHING at all with pk3ds
     
  16. valten185

    Newcomer valten185 Newbie

    Joined:
    Dec 10, 2016
    Messages:
    2
    Country:
    France
    I modified my rom S/M with pk3ds but now I want to know how rebuild my rom and if i can use this rom with gateway (o3ds 4.2).

    thanks
     
  17. PR3D4TOR

    Newcomer PR3D4TOR Advanced Member

    Joined:
    Aug 1, 2011
    Messages:
    66
    Country:
    Austria
  18. SahierKHLover

    Member SahierKHLover GBAtemp Regular

    Joined:
    Feb 9, 2016
    Messages:
    289
    Location:
    Guess
    Country:
    United States
    somebody help I followed this tuTORIEL and now I can't install my cia on fbi should I just try devmenu to see if it works?
     
  19. valten185

    Newcomer valten185 Newbie

    Joined:
    Dec 10, 2016
    Messages:
    2
    Country:
    France
    Its possible to have more information about this tutorial because i dont understand... with HBL. Someon can explain me ? Please...
     
  20. Uziumi

    Newcomer Uziumi Advanced Member

    Joined:
    Apr 9, 2011
    Messages:
    80
    Country:
    United States
    Okay. I'm not sure which one I'm doing wrong so I will be posting it both in this topic, and in the other one.
    I've been trying to patch the game to have just 100% Catch Rate and Shiny that isn't Shiny-Locked in Pokémon Moon.

    The 6 times I've tried in the last 4 days isn't working and here are the steps that I've tried

    1. Open up Decrypt9WIP with my Moon Cartridge in the slot.

    2. Dump the game as a CIA.

    3. Then decrypt the CIA with CIA Decryptor (deep)

    4. It says everytime that it's already decrypted and said it was successful.

    5. Move the CIA onto the PC.

    6. Put it into the folder of HackingToolkit3DS

    7. I select CE to extract the CIA file (the tutorial said to type CIA, but it seems the newer version don't have that option)

    7a. It has asked if to compress my code.bin. A few times I've said yes.
    7b. It has asked if to compress my code.bin. A few times I've said no. (The step by step never said if I should say yes or no)

    8. I go into the ExtractedExeFS and get the code.bin file

    9. I take the code.bin, rename it moon.bin, and place it in the SuMo IPS Helper folder.

    10. I take the files from the zipped patches from the patches.rar here on page 1: https://gbatemp.net/threads/batch-tool-to-generate-ips-patches-for-pkmn-su-mo.452178/

    11. I take the 100%Catch.ips and AlwaysShiny.ips and place it into the SuMo IPS Helper folder with the code.bin that I've renamed moon.bin

    12. Press 2 to Generate IPS Patch

    13. Press 3 to Customize Patch

    14. Press any button as it told me to do so.

    15. Press M for Moon.

    16. Say both patches were patched successfully and shows a new .bin called moon_edit.bin

    17. Take the new .bin and rename it code.bin again and place it back into the ExtractedExeFS folder

    18. Head back to HackingToolkid3DS and typed in RFSB

    19. I selected the ExtractedRomFS folder to turn into a RomFS.bin as mentioned on page 1 of here: https://gbatemp.net/threads/tutorial-how-to-decrypt-extract-rebuild-a-cia.388677/

    20. When rebuilding rom is here I've tried multiple things

    20a. I've tried using just the ExtractedRomFS folder as the step by step never said if I needed to use the RomFS.bin or not.
    20b. I've tried using the Rom.FS.bin instrad of the ExtractedRomFS folder
    20c. I've had the program state it would be changing code.bin to .code.bin I've let it and told it to compress the code.bin. I allow it.
    20d. I've had the program state that it would be changing the code.bin to .code.bin. I've let it and told it to compress the code.bin. I then rename it back to code.bin.

    21. I then selected my DecryptedExHeader.bin and made sure that Media CARD2 is checked.

    22. I've changed the serial to CTR-P-BNEA

    23. I hit GO and let it do whatever it needs to do.

    24. It makes a .3ds file that I've told it to name as PKMNMoon.3ds

    25. I open up 3DS Simple Converter after placing the new .3ds file into it's roms folder.

    26. I select the roms folder and made sure FW Spoof is checked.

    27. I allow it to turn it back into a CIA.

    28. I take the new CIA (from the different alternative routes I've taken above) and place it back into my SD card.

    29. I head into FBI and then select the CIA and tell it to install.

    30. CIA finally installed.

    31. After heading back to the main menu, I select the new Moon that shows up.

    32. Black screen forever every time I've tried.




    Can someone please tell me what I'm doing wrong? Because at this point, I feel like I've tried everything.
    I've even tried downloading a CIA from online and it still did the same thing. I'm not sure what to do now.
     
  21. SahierKHLover
    This message by SahierKHLover has been removed from public view by shaunj66, Jan 8, 2017, Reason: Giving away pirated copies of Pokemon in the form of a cia.
    Dec 16, 2016
Thread Status:
Not open for further replies.

Share This Page