Rednand dump sd with dd question

Discussion in 'Wii U - Hacking & Backup Loaders' started by roots, Nov 1, 2016.

  1. roots
    OP

    roots Advanced Member

    Newcomer
    79
    33
    Nov 9, 2015
    France
    hello can someone say to me if a total dump of the sd( after rednand dump) with dd is safe enough or does i have to dump it with sdnandextractor on windows?
    i've used dd in=/dev/mmc of=nand.bin
    this 64gb file can generate the 3 .bin files like sdnandextractor right?
     
  2. Netfreak25

    Netfreak25 Newbie

    Newcomer
    9
    11
    Dec 21, 2015
    Swaziland
    -this 64gb is a complete dump of the device, just make sure you are not only dumping a partition you have to dump the device.
    -as it is a complete dump its a save backup
    -those 3x .bin files are data somewhere in this 64gb image yes

    if you need those 3x .bin files you have to set the proper boundary instead of dumping it completely.

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

    i am just running a few tests
     
  3. Netfreak25

    Netfreak25 Newbie

    Newcomer
    9
    11
    Dec 21, 2015
    Swaziland
    Linux/OSX dumping instructions
    No warranty but this should work for 32gb (and if adjusted for 8gb) wiiu and dump slc, slccmt and mlc into the current directory.

    You need to know:
    - The device name of the SD card in your system
    - What kind of WiiU you are using (8GB or 32GB)

    What you should do/adjust:
    - You need to change the source to your device (not partition 1 on the device)
    - If you want to backup the dump from an 8GB wiiu change "MLCSIZE=$MLCSIZE32" to "MLCSIZE=$MLCSIZE8"
    - Unmount the first partition of the sdcard (if mounted)
    - Add relative or absolute path to destination directory if wanted
    - Add shebang if wanted
    - Make it executable
    - Run the script


    The Script:
    SOURCE=/dev/disk2
    DESTINATION=.
    BLOCKSIZE=512

    INITIALSKIP=655360
    SLCSIZE=536870912
    SLCCMPTSIZE=536870912
    MLCSIZE32=31784435712
    MLCSIZE8=7818182656

    MLCSIZE=$MLCSIZE32

    #Offset calculation
    SLCCOUNT=`expr $SLCSIZE / $BLOCKSIZE`
    SLCCMPTCOUNT=`expr $SLCCMPTSIZE / $BLOCKSIZE`
    MLCCOUNT=`expr $MLCSIZE / $BLOCKSIZE`

    SLCSKIP=`expr $INITIALSKIP / $BLOCKSIZE`
    SLCCMPTSKIP=`expr $SLCSKIP + $SLCCOUNT`
    MLCSKIP=`expr $SLCCMPTSKIP + $SLCCMPTCOUNT`

    #dumping SLC
    echo "dumping SLC"
    dd bs=$BLOCKSIZE if=$SOURCE of=$DESTINATION/slc.full.img count=$SLCCOUNT skip=$SLCSKIP

    #dumping SLCCMPT
    echo "dumping SLCCMPT"
    dd bs=$BLOCKSIZE if=$SOURCE of=$DESTINATION/slccmpt.full.img count=$SLCCMPTCOUNT skip=$SLCCMPTSKIP

    #dumping MLC
    echo "dumping MLC"
    dd bs=$BLOCKSIZE if=$SOURCE of=$DESTINATION/mlc.full.img count=$MLCCOUNT skip=$MLCSKIP

    I've checked that the shasum from both methods are the same!

    Btw. it probably makes sense to make the start-stopbits for each image a constant instead of calculating them.
    I added blocksize as a variable as it could improve writespeed not using the default.
    Might also be usefull to use variables for the output filenames.
     
    Last edited by Netfreak25, Nov 3, 2016
  4. KuraudoSutoraifu

    KuraudoSutoraifu Advanced Member

    Newcomer
    76
    23
    May 6, 2016
    Gambia, The
    @Netfreak25 You, Sir, are a saint! :D Exactly what I was looking for.
     
    Netfreak25 likes this.
  5. Netfreak25

    Netfreak25 Newbie

    Newcomer
    9
    11
    Dec 21, 2015
    Swaziland
    I updated the code and made a noob friendlier script out of it

    - added a function to prevent overwriting existing files
    - added status for dd if available

    Usage: ./wiiu_rednand_extractor.sh [TYPE] [MODE] [SOURCE] [DESTINATION]
    type 8gb, 32gb
    mode all, slc, slccmpt, mlc
    source absolute path to source
    destination absolute path to destination


    All arguments except destination are mandatory
    If you don't pass the destination parameter it will use the current directory

    E.g.: ./wiiu_rednand_extractor.sh 32gb all /dev/zero /tmp/

    Warning: Spoilers inside!
     

    Attached Files:

    Last edited by Netfreak25, Nov 4, 2016
    Bicet, hippy dave and thaikhoa like this.
  6. roots
    OP

    roots Advanced Member

    Newcomer
    79
    33
    Nov 9, 2015
    France
    so nice man you rules
     
  7. Bicet

    Bicet Newbie

    Newcomer
    8
    1
    Mar 25, 2010
    Italy
    Thanks a lot for the script :)