Results 1 to 4 of 4

Thread: Betwiin .10 Beta by Bushing +others

  1. #1
    Junior Member
    Join Date
    Dec 2008
    Posts
    57
    Thanks
    3
    Thanked 348 Times in 16 Posts

    Exclamation Betwiin .10 Beta by Bushing +others

    Betwiin is a tool that will let you convert NAND dumps from one Wii to run on another

    Directions for use:

    * Copy input dump file to input/flash.bin.
    * Copy input keys to input/.
    * Copy output keys to output/.
    * Run betwiin.py, wait several minutes.
    * Take output file from output/flash.bin and use as appropriate.
    Betwiin - WiiBrew

    Code:
    Betwiin, first public release, 8/2009
    By bushing (bushing@gmail.com / http://hackmii.com)
    
    This here is betwiin, a NAND flash conversion tool for Wii NAND
    images.  It can re-encrypt and re-HMAC the per-console unique parts of
    a NAND dump from one Wii such that it will run on a second one, with
    the following caveats:
    
    1) The version of boot1 you flash to a NAND chip must match the
    original one that shipped with that Wii.  No exceptions.
    
    2) The version of boot2 must be equal to or greated than the one most
    recently installed on that Wii.
    
    3) No handling of bad blocks is performed; if your target NAND chip
    has a bad block that hits an important file required for system
    startup, I suggest you find a differente donor dump to start from.
    
    This code is licensed to you under the terms of the GNU General Public
    License, version 2, available at
    http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
    
    This code represented many, many hours of hard work to generate, and
    could not have been done without the help of segher, marcan and gray.
    Per the GPL, you are free to use, modify and (in some cases)
    redistribute it, but I won't refuse any PayPal donations to the above
    email address, either. :)
    
    Directions for use:
    
    Copy input dump file to input/flash.bin.  Copy input keys to input/.
    Copy output keys to output/.  Run betwiin.py, wait several minutes.
    Take output file from output/nand.bin and use as appropriate.
    
    For more information, see http://www.wiibrew.org/wiki/Betwiin
    
    -bushing

  2. #2
    Senior Member
    Retired WiiHacks Staff
    Dogeggs's Avatar
    Join Date
    Jan 2009
    Location
    South UK
    Posts
    3,186
    Thanks
    78
    Thanked 9,872 Times in 865 Posts
    looks very useful this one!! going to have to start getting everyone to dump their keys...

  3. #3
    New Member
    Join Date
    Dec 2009
    Posts
    43
    Thanks
    15
    Thanked 2 Times in 2 Posts
    Nice, really need this now But a quick question if I may.

    I have the keys and the nand dump of a good system and the keys of bad system.

    They bad keys I have named nand-key and put into the output folder and the good keys I have named nand-key and put in the input folder, together with flash.bin being the good dump.

    Now, when I run it with ActivePython 2.6, it creates the empty output bin and starts filling this, I then see my memory rise to over 2gb (was 500mb when the conversion started) and then Python crashes with a MemoryError.

    Can anyone tell me what I'm doing wrong ?

    PythonWin 2.6.4 (r264:75706, Jan 22 2010, 16:41:54) [MSC v.1500 32 bit (Intel)] on win32.
    Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information.
    >>> Creating empty output image:
    Copying boot1 / boot2:
    Updating cluster 0 (block 0)
    Updating cluster 1 (block 0)
    Updating cluster 2 (block 0)
    Updating cluster 3 (block 0)
    Updating cluster 4 (block 0)
    Updating cluster 5 (block 0)
    Updating cluster 6 (block 0)
    Updating cluster 7 (block 0)
    Updating cluster 8 (block 1)
    Updating cluster 9 (block 1)
    Updating cluster a (block 1)
    Updating cluster b (block 1)
    Updating cluster c (block 1)
    Updating cluster d (block 1)
    Updating cluster e (block 1)
    Updating cluster f (block 1)
    Updating cluster 10 (block 2)
    Updating cluster 11 (block 2)
    Updating cluster 12 (block 2)
    Updating cluster 13 (block 2)
    Updating cluster 14 (block 2)
    Updating cluster 15 (block 2)
    Updating cluster 16 (block 2)
    Updating cluster 17 (block 2)
    Updating cluster 18 (block 3)
    Updating cluster 19 (block 3)
    Updating cluster 1a (block 3)
    Updating cluster 1b (block 3)
    Updating cluster 1c (block 3)
    Updating cluster 1d (block 3)
    Updating cluster 1e (block 3)
    Updating cluster 1f (block 3)
    Updating cluster 20 (block 4)
    Updating cluster 21 (block 4)
    Updating cluster 22 (block 4)
    Updating cluster 23 (block 4)
    Updating cluster 24 (block 4)
    Updating cluster 25 (block 4)
    Updating cluster 26 (block 4)
    Updating cluster 27 (block 4)
    Updating cluster 28 (block 5)
    Updating cluster 29 (block 5)
    Updating cluster 2a (block 5)
    Updating cluster 2b (block 5)
    Updating cluster 2c (block 5)
    Updating cluster 2d (block 5)
    Updating cluster 2e (block 5)
    Updating cluster 2f (block 5)
    Updating cluster 30 (block 6)
    Updating cluster 31 (block 6)
    Updating cluster 32 (block 6)
    Updating cluster 33 (block 6)
    Updating cluster 34 (block 6)
    Updating cluster 35 (block 6)
    Updating cluster 36 (block 6)
    Updating cluster 37 (block 6)
    Updating cluster 38 (block 7)
    Updating cluster 39 (block 7)
    Updating cluster 3a (block 7)
    Updating cluster 3b (block 7)
    Updating cluster 3c (block 7)
    Updating cluster 3d (block 7)
    Updating cluster 3e (block 7)
    Updating cluster 3f (block 7)
    Superblock @ 7f00: 9bd2
    Calculated HMAC: 0000 F9 05 C5 08 E0 44 A5 80 F8 32 F9 D6 BA DA BD D5 .....D...2......
    0010 18 5F B2 1B ._..

    Stored HMAC: 0000 AA 13 B4 A1 0F A0 DE 7C 57 AE 09 CC CD 8B 6E BA .......|W.....n.
    0010 30 90 98 0C 0...

    Superblock @ 7f10: 9bc3
    Calculated HMAC: 0000 F8 E1 02 79 7B DE 81 20 B5 3C E4 9B 01 61 30 F5 ...y{.. .<...a0.
    0010 05 A3 BC 14 ....

    Stored HMAC: 0000 D9 47 EB A0 EF DD 1B 79 00 A4 3A C3 FE 98 1A 55 .G.....y..:....U
    0010 B5 FC 1C F5 ....

    Superblock @ 7f20: 9bc4
    Calculated HMAC: 0000 53 F7 CD 47 DE AB 22 ED 3A 4E D2 68 5C 76 65 65 S..G..".:N.h.vee
    0010 5D DD A7 4A ]..J

    Stored HMAC: 0000 1F 2E 30 5F 3C 11 71 60 F6 B1 3D F9 14 DA 76 3F ..0_<.q`..=...v?
    0010 23 27 B8 0F #'..

    Superblock @ 7f30: 9bc5
    Calculated HMAC: 0000 C5 D5 C7 53 83 D8 9E 66 8C 71 3F 1B C8 F2 7A 22 ...S...f.q?...z"
    0010 93 11 D2 66 ...f

    Stored HMAC: 0000 A5 2A AA 0B 4A 7F 45 44 06 46 F6 D6 77 4C 88 34 .*..J.ED.F..wL.4
    0010 63 26 E9 9F c&..

    Superblock @ 7f40: 9bc6
    Calculated HMAC: 0000 5C 55 70 F6 A8 41 89 0B 2D 7C D0 7A 03 91 5B 56 .Up..A..-|.z..[V
    0010 31 50 A4 56 1P.V

    Stored HMAC: 0000 67 C0 B6 1B FE 7B 1E C7 3A 52 14 21 74 F1 62 20 g....{..:R.!t.b
    0010 2B 78 2B 61 +x+a

    Superblock @ 7f50: 9bc7
    Calculated HMAC: 0000 F2 F6 BC D5 DE F6 9B 68 8C 38 57 30 FA 05 02 D1 .......h.8W0....
    0010 7D 2F 88 7A }/.z

    Stored HMAC: 0000 DC 39 29 F0 B7 85 EF 98 56 A7 B2 F7 6C 9C 59 89 .9).....V...l.Y.
    0010 3C 96 DD 22 <.."

    Superblock @ 7f60: 9bc8
    Calculated HMAC: 0000 8D EF C7 04 4C 6F 6D A9 AC 15 78 35 C6 27 CE DD ....Lom...x5.'..
    0010 B2 5D C5 F4 .]..

    Stored HMAC: 0000 91 95 87 9B 47 8F 99 E5 C9 C1 77 24 CB 7B C8 19 ....G.....w$.{..
    0010 28 AF 17 E3 (...

    Superblock @ 7f70: 9bc9
    Calculated HMAC: 0000 36 20 C2 39 79 E1 62 42 B4 E3 13 89 CD 86 FF 6E 6 .9y.bB.......n
    0010 F3 52 C0 2F .R./

    Stored HMAC: 0000 44 6E 6C 2F 06 4A 83 8F BA D5 F0 BE 94 83 9C 15 Dnl/.J..........
    0010 32 9A 86 EC 2...

    Superblock @ 7f80: 9bca
    Calculated HMAC: 0000 F5 E6 98 03 8B 8D 05 59 30 E5 0D CA 34 A2 4A 56 .......Y0...4.JV
    0010 44 18 D3 6F D..o

    Stored HMAC: 0000 CC 82 C3 D1 2C 60 42 73 4F 52 5D 3A 28 7C 58 20 ....,`BsOR]|X
    0010 BF CA 24 58 ..$X

    Superblock @ 7f90: 9bcb
    Calculated HMAC: 0000 B8 84 41 83 2F FD 75 68 09 ED 2E 16 FB B7 CE FB ..A./.uh........
    0010 AF 22 CF C5 ."..

    Stored HMAC: 0000 F4 28 18 F7 85 FC 35 9A 98 8E A2 0B F9 78 69 41 .(....5......xiA
    0010 F0 4A 1A 7A .J.z

    Superblock @ 7fa0: 9bcc
    Calculated HMAC: 0000 91 98 32 A0 05 63 A6 3F 27 E5 7E FA 10 35 27 CE ..2..c.?'.~..5'.
    0010 AF AA E3 B7 ....

    Stored HMAC: 0000 2D 4F 8D 11 32 0D DF 78 DC EF 0C 0F B7 DB 75 7C -O..2..x......u|
    0010 EC 04 F4 0D ....

    Superblock @ 7fb0: 9bcd
    Calculated HMAC: 0000 64 79 FD 65 92 B2 46 82 20 07 4C C3 F0 A4 59 D8 dy.e..F. .L...Y.
    0010 95 F3 D6 C6 ....

    Stored HMAC: 0000 B5 42 4C F2 6B A0 E1 07 EF 1F 3A 12 4B 12 19 68 .BL.k.....:.K..h
    0010 4D 76 E0 85 Mv..

    Superblock @ 7fc0: 9bce
    Calculated HMAC: 0000 A8 51 4D 31 71 3B 55 6B 73 60 1C 71 1F 28 A1 79 .QM1q;Uks`.q.(.y
    0010 4A 08 CF 0F J...

    Stored HMAC: 0000 F0 55 8A 5C CA 56 11 EE FD 63 EF 8F CA C2 90 25 .U...V...c.....%
    0010 6F 7E 2A 54 o~*T

    Superblock @ 7fd0: 9bcf
    Calculated HMAC: 0000 85 A2 4B 42 06 8C 8E 55 22 B9 4C 10 F8 67 5C AF ..KB...U".L..g..
    0010 B9 59 37 E7 .Y7.

    Stored HMAC: 0000 DC 50 42 59 A2 4C 16 49 5A D6 D4 D3 DC 7E FA BF .PBY.L.IZ....~..
    0010 71 36 D5 40 q6.@

    Superblock @ 7fe0: 9bd0
    Calculated HMAC: 0000 FA 76 81 F7 A9 6C C4 85 8B 80 A6 41 C5 69 AE C9 .v...l.....A.i..
    0010 86 CE D9 99 ....

    Stored HMAC: 0000 F8 98 F7 EC 2D 92 A3 AB 99 21 9C 2C 0E 38 5E E3 ....-....!.,.8^.
    0010 4D 24 EE DD M$..

    Superblock @ 7ff0: 9bd1
    Calculated HMAC: 0000 B3 77 11 A7 45 B5 A6 F1 FD 65 0E 16 07 9C 01 03 .w..E....e......
    0010 35 DB C5 A0 5...

    Stored HMAC: 0000 A3 1B 8C 38 98 9A C9 70 33 10 33 63 33 4D 58 C6 ...8...p3.3c3MX.
    0010 B7 86 13 64 ...d

    highest superblock: 0 / 0
    Updating cluster 0 (block 0)
    Updating cluster 1 (block 0)
    Updating cluster 2 (block 0)
    Updating cluster 3 (block 0)
    Updating cluster 4 (block 0)
    Updating cluster 5 (block 0)
    Updating cluster 6 (block 0)
    Updating cluster 7 (block 0)
    Updating cluster 8 (block 1)
    Updating cluster 9 (block 1)
    Updating cluster a (block 1)
    Updating cluster b (block 1)
    Updating cluster c (block 1)
    Updating cluster d (block 1)
    Updating cluster e (block 1)
    Updating cluster f (block 1)
    Traceback (most recent call last):
    File "C:\Python26\Lib\SITE-P~1\PYTHON~1\pywin\framework\scriptutils.py", line 325, in RunScript
    exec codeObject in __main__.__dict__
    File "C:\asg\betwiin\betwiin.py", line 65, in <module>
    recur_copyclusters(SFFS_entry(latest_superblock.fs t, latest_superblock.fat, 0, ""))
    File "C:\asg\betwiin\betwiin.py", line 12, in recur_copyclusters
    for c in entry.children():
    File "C:\asg\betwiin\nand.py", line 424, in children
    retval.append(retval[-1].sibling())
    MemoryError
    >>>
    Thanks !

    edit : never mind, the problem was pebkac.. I was using the keys.bin I got from the bootmii dumps. But that's not correct as I learned. I need to open up Wiinand and load the bootmii dump and then extract nand-key and nand-hmac. I'll leave this post here for users as stupid as me, feel free to delete it to avoid clutter

    Thanks again for this great app !
    Last edited by allsystemsgo; 03-01-2010 at 03:12 AM. Reason: resolved

  4. #4
    New Member
    Join Date
    Aug 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by allsystemsgo View Post
    Nice, really need this now But a quick question if I may.

    I have the keys and the nand dump of a good system and the keys of bad system.

    They bad keys I have named nand-key and put into the output folder and the good keys I have named nand-key and put in the input folder, together with flash.bin being the good dump.

    Now, when I run it with ActivePython 2.6, it creates the empty output bin and starts filling this, I then see my memory rise to over 2gb (was 500mb when the conversion started) and then Python crashes with a MemoryError.

    Can anyone tell me what I'm doing wrong ?



    Thanks !

    edit : never mind, the problem was pebkac.. I was using the keys.bin I got from the bootmii dumps. But that's not correct as I learned. I need to open up Wiinand and load the bootmii dump and then extract nand-key and nand-hmac. I'll leave this post here for users as stupid as me, feel free to delete it to avoid clutter

    Thanks again for this great app !

    THANK YOU SO MUCH FOR THIS! Had i not known, I probably would've spent another three hours smacking my head against the wall XD

    Anyways, the reason why I'm posting up here is because even after doing all that, I kept running into an error. However, I found that it was because I kept getting an error saying my file-size was not divisible by 2112. When i checked the math, my backup ended up being only 1 KB over, which meant that it was a valid backup. So, for those of you still running into problems, try this:

    1. Right-click the nand.py file and click Edit with IDLE (or just open it up in an editor)
    2. Find where they do the check for 2112 (If you're using IDLE, just Ctrl-F and search for 2112). It should look something like this:

    if self.fsize % 2112 != 0:
    raise ValueError("File size not divisible by 2112")

    3. Just add the comment symbol (in python, its #) in front of both of the lines, and WHAM! It should work like a charm now. =]

    Hopes this helps anyone who was frustrated because their backups ended up being 1 KB over -_-

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •