[LINUX+MAC] redTools - redNAND-emuNAND converter

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

  1. nastys
    OP

    nastys ナースティス

    Member
    1,487
    864
    Aug 5, 2014
    Italy
    Earth
    Preview.png
    Version 2.0

    redTools is a tool that converts an emuNAND backup to a redNAND backup and vice versa.
    A redNAND backup is used to restore it to the SD card using programs that don't support redNAND directly. For example, if you want to setup the Palantine CFW, you need to format the emuNAND using the Gateway Launcher, backup your NAND or your emuNAND as usually, then convert the backup to a redNAND one and finally restore it using dd or Emunand Tool Max (BTW, I plan to support redNAND directly in this one since version 1.3, it features a new CFW Mode, which handles the conversion automatically :lol:).
    If you just want to backup/restore your redNAND, you don't need this. You only need this to switch between emuNAND and redNAND, or to decrypt the redNAND.

    It can't be ported to Windows due to the lack of dd... sorry.

    Changes:
    2.0​
    • Progress bar, code optimizations and Windows support (thanks to xerpi)
    1.1​
    • Removed file size check
    Licensed under GNU GPL v3.

    [​IMG]Download from MEGA
    [​IMG]Contribute on GitHub
    Contributors: nastys, xerpi
     
    Melon__Bread likes this.
  2. FM360

    FM360 Kappa

    Member
    266
    152
    Mar 8, 2015
    Afghanistan
    North Korea
    Please give us a mac port
     
  3. nastys
    OP

    nastys ナースティス

    Member
    1,487
    864
    Aug 5, 2014
    Italy
    Earth
    It already supports OS X, I just forgot to take a screenshot...
     
    FM360 likes this.
  4. nastys
    OP

    nastys ナースティス

    Member
    1,487
    864
    Aug 5, 2014
    Italy
    Earth
    Version 1.1 released!
    • Removed file size check
     
  5. naxil

    naxil GBAtemp Advanced Fan

    Member
    740
    96
    Oct 26, 2011
    Italy
    the tool make a .rnd file,,, why not the .bin? and why the other tools ask for root password and never ask it? is not more simple launch the program with sudo ./emunandtools?
     
  6. nastys
    OP

    nastys ナースティス

    Member
    1,487
    864
    Aug 5, 2014
    Italy
    Earth
    I used a different extension to distinguish the two types of NAND, but it's actually a bin file. You can even rename it to .bin...
     
  7. nastys
    OP

    nastys ナースティス

    Member
    1,487
    864
    Aug 5, 2014
    Italy
    Earth
    ETM should only ask for your password once.
    If you want to run it without entering your password, run the following command in a terminal and log out:
    Code:
    sudo adduser $USER disk
    redTools does not require root access, as it only converts a file.
     
  8. xerpi

    xerpi GBAtemp Regular

    Member
    167
    448
    Dec 25, 2011
    Barcelona
    You can make it compatible with Windows (and more platforms) by changing the runShellCommand("rm...") with QFile::remove or something similar, and the runShellCommand("dd...") with libc file I/O operations (open, write, read, etc).
    In summary, you should get rid of runShellCommand.
    I can help you if you wish, but it would be nice if you create a Git (on github for example) repository.

    Other than that, it looks really good!
     
    nastys likes this.
  9. nastys
    OP

    nastys ナースティス

    Member
    1,487
    864
    Aug 5, 2014
    Italy
    Earth
    Alright, I'll create a GIT once I'm done adding "CFW Mode" to ETM ;)
     
  10. naxil

    naxil GBAtemp Advanced Fan

    Member
    740
    96
    Oct 26, 2011
    Italy
    nastys! cfw run!!!! now its time for ctr lient.exe program!
     
  11. nastys
    OP

    nastys ナースティス

    Member
    1,487
    864
    Aug 5, 2014
    Italy
    Earth
    I created a repository for redTools and one for Emunand Tool Max.
    If you think you can improve one of these programs, please send me a pull request ;)
     
    xerpi likes this.
  12. xerpi

    xerpi GBAtemp Regular

    Member
    167
    448
    Dec 25, 2011
    Barcelona
    I've just sent you a pull request (try it before merging because I'm not sure if it works, but it should :D).

    EDIT: I've sent another commit adding a progressbar.
     
    nastys likes this.
  13. nastys
    OP

    nastys ナースティス

    Member
    1,487
    864
    Aug 5, 2014
    Italy
    Earth
    I tried converting emuNAND -> redNAND -> emuNAND but the file size and the md5sum are different...
    But converting an emuNAND to a redNAND works fine (and faster :lol:).
    Also, you forgot to add your copyright at the top...
     
  14. xerpi

    xerpi GBAtemp Regular

    Member
    167
    448
    Dec 25, 2011
    Barcelona

    Oh yeah, I know what I did wrong, I'll update the pull request in a moment.
     
    nastys likes this.
  15. nastys
    OP

    nastys ナースティス

    Member
    1,487
    864
    Aug 5, 2014
    Italy
    Earth
    I forgot to mention that the indents should be like this:
    Code:
    {
    -----{
    ----------{
    ----------}
    -----}
    }  
    not like this:
    Code:
    {
    ----------{
    ---------------{
    ---------------}
    ----------}
    }  
    (if you press CTRL+I on Qt Creator, it corrects them...)
     
  16. xerpi

    xerpi GBAtemp Regular

    Member
    167
    448
    Dec 25, 2011
    Barcelona

    I've changed spaces to TABS (which is more widely accepted: https://www.kernel.org/doc/Documentation/CodingStyle) so you can change the TAB size to your preferred size, and there's no need to mess with spaces.
    Just change TAB size to 2 or 4 on your editor, and it'll be fine.
     
    nastys likes this.
  17. nastys
    OP

    nastys ナースティス

    Member
    1,487
    864
    Aug 5, 2014
    Italy
    Earth
    Alright, I changed the indent size to 8 (tab size was already 8 :unsure: )
    Now auto-indent works fine :D
     
    xerpi likes this.
  18. nastys
    OP

    nastys ナースティス

    Member
    1,487
    864
    Aug 5, 2014
    Italy
    Earth
    xerpi It works perfectly! Thanks a lot :lol:
    I'm going to release the next version later today or tomorrow.
    I'll build it for Windows too :)
     
  19. nastys
    OP

    nastys ナースティス

    Member
    1,487
    864
    Aug 5, 2014
    Italy
    Earth
    Version 2.0 released for GNU/Linux, OS X and Windows :lol:
    How do I change the title of the thread? I think I should replace [LINUX+MAC] with [RELEASE]...
     
    xerpi likes this.
  20. naxil

    naxil GBAtemp Advanced Fan

    Member
    740
    96
    Oct 26, 2011
    Italy
    people here palatine finally run after i have start it without L 1 time... after that ctrclient works good!