ROM Hack [LINUX+MAC] redTools - redNAND-emuNAND converter

nastys

ナースティス
OP
Member
Joined
Aug 5, 2014
Messages
1,730
Trophies
0
Age
26
Location
Earth
XP
1,794
Country
Italy
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.

Download from MEGA
Contribute on GitHub
Contributors: nastys, xerpi
 
  • Like
Reactions: Melon__Bread

naxil

Well-Known Member
Member
Joined
Oct 26, 2011
Messages
846
Trophies
1
XP
665
Country
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?
 

nastys

ナースティス
OP
Member
Joined
Aug 5, 2014
Messages
1,730
Trophies
0
Age
26
Location
Earth
XP
1,794
Country
Italy
and why the other tools ask for root password and never ask it? is not more simple launch the program with sudo ./emunandtools?
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.
 

xerpi

Well-Known Member
Member
Joined
Dec 25, 2011
Messages
212
Trophies
1
Age
28
Location
Barcelona
XP
1,329
Country
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!
 
  • Like
Reactions: nastys

nastys

ナースティス
OP
Member
Joined
Aug 5, 2014
Messages
1,730
Trophies
0
Age
26
Location
Earth
XP
1,794
Country
Italy
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!
Alright, I'll create a GIT once I'm done adding "CFW Mode" to ETM ;)
 

nastys

ナースティス
OP
Member
Joined
Aug 5, 2014
Messages
1,730
Trophies
0
Age
26
Location
Earth
XP
1,794
Country
Italy
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!
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 ;)
 
  • Like
Reactions: xerpi

xerpi

Well-Known Member
Member
Joined
Dec 25, 2011
Messages
212
Trophies
1
Age
28
Location
Barcelona
XP
1,329
Country
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 ;)

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.
 
  • Like
Reactions: nastys

nastys

ナースティス
OP
Member
Joined
Aug 5, 2014
Messages
1,730
Trophies
0
Age
26
Location
Earth
XP
1,794
Country
Italy
I've just sent you a pull request (try it before merging because I'm not sure if it works, but it should :D).
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...
 

xerpi

Well-Known Member
Member
Joined
Dec 25, 2011
Messages
212
Trophies
1
Age
28
Location
Barcelona
XP
1,329
Country
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...


Oh yeah, I know what I did wrong, I'll update the pull request in a moment.
 
  • Like
Reactions: nastys

nastys

ナースティス
OP
Member
Joined
Aug 5, 2014
Messages
1,730
Trophies
0
Age
26
Location
Earth
XP
1,794
Country
Italy
Oh yeah, I know what I did wrong, I'll update the pull request in a moment.
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...)
 

xerpi

Well-Known Member
Member
Joined
Dec 25, 2011
Messages
212
Trophies
1
Age
28
Location
Barcelona
XP
1,329
Country
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...)


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.
 
  • Like
Reactions: nastys

nastys

ナースティス
OP
Member
Joined
Aug 5, 2014
Messages
1,730
Trophies
0
Age
26
Location
Earth
XP
1,794
Country
Italy
  • Like
Reactions: xerpi

nastys

ナースティス
OP
Member
Joined
Aug 5, 2014
Messages
1,730
Trophies
0
Age
26
Location
Earth
XP
1,794
Country
Italy
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 :)
 

nastys

ナースティス
OP
Member
Joined
Aug 5, 2014
Messages
1,730
Trophies
0
Age
26
Location
Earth
XP
1,794
Country
Italy
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]...
 
  • Like
Reactions: xerpi

naxil

Well-Known Member
Member
Joined
Oct 26, 2011
Messages
846
Trophies
1
XP
665
Country
Italy
people here palatine finally run after i have start it without L 1 time... after that ctrclient works good!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: good night