Hacking UStealth - Wii U 'Format Disk' Nag workaround :)

mive

Well-Known Member
Member
Joined
Jul 19, 2018
Messages
252
Trophies
0
Age
40
XP
598
Country
Germany
For people who dont have or use windows I've made a simple python script which does the same (writing either 55 AA or 55 AB to last two bytes of mbr). (thx to jarjar123)
Code:
mv@mv-pc:~/MyStuff/WiiU_Hide_Disk$ lsblk 
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 119,2G  0 disk 
├─sda1   8:1    0   209M  0 part /boot
├─sda3   8:3    0  80,7G  0 part /
└─sda4   8:4    0    38G  0 part 
sdb      8:16   0 465,8G  0 disk 
├─sdb1   8:17   0    95G  0 part 
└─sdb3   8:19   0 370,8G  0 part /media/Datengrab
sdc      8:32   1   7,6G  0 disk 
└─sdc1   8:33   1   7,6G  0 part 
mv@mv-pc:~/MyStuff/WiiU_Hide_Disk$ ./py_wiiu_hide_disk.py -h
usage: py_wiiu_hide_disk.py [-h] -d DEVICE [--hide] [--unhide] [--skip-hwinfo]

optional arguments:
  -h, --help            show this help message and exit
  -d DEVICE, --device DEVICE
                        device path (e.g. /dev/sdc)
  --hide                hide drive
  --unhide              unhide drive
  --skip-hwinfo         skip hwinfo check
mv@mv-pc:~/MyStuff/WiiU_Hide_Disk$ sudo ./py_wiiu_hide_disk.py -d /dev/sdc --hide
disk:                                                           
  /dev/sdc             Verbatim STORE N GO
/dev/sdc correct disk (y/Y)? y
wrote 55 to offset 1FE (decimal 510)
wrote AB to offset 1FF (decimal 511)
drive /dev/sdc hidden
mv@mv-pc:~/MyStuff/WiiU_Hide_Disk$ lsblk 
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 119,2G  0 disk 
├─sda1   8:1    0   209M  0 part /boot
├─sda3   8:3    0  80,7G  0 part /
└─sda4   8:4    0    38G  0 part 
sdb      8:16   0 465,8G  0 disk 
├─sdb1   8:17   0    95G  0 part 
└─sdb3   8:19   0 370,8G  0 part /media/Datengrab
sdc      8:32   1   7,6G  0 disk 
mv@mv-pc:~/MyStuff/WiiU_Hide_Disk$ sudo ./py_wiiu_hide_disk.py -d /dev/sdc --unhide --skip-hwinfo
wrote 55 to offset 1FE (decimal 510)
wrote AA to offset 1FF (decimal 511)
drive /dev/sdc unhidden
mv@mv-pc:~/MyStuff/WiiU_Hide_Disk$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 119,2G  0 disk 
├─sda1   8:1    0   209M  0 part /boot
├─sda3   8:3    0  80,7G  0 part /
└─sda4   8:4    0    38G  0 part 
sdb      8:16   0 465,8G  0 disk 
├─sdb1   8:17   0    95G  0 part 
└─sdb3   8:19   0 370,8G  0 part /media/Datengrab
sdc      8:32   1   7,6G  0 disk 
└─sdc1   8:33   1   7,6G  0 part

https://gist.github.com/vetzki/645e09c38221da4e6ddd45f4443c6261
 
  • Like
Reactions: raflos

Brand Newman

Well-Known Member
Member
Joined
Apr 29, 2014
Messages
559
Trophies
2
Age
43
Website
twitter.com
XP
3,376
Country
France
injecting games on WiiU menu does not use vWii mode nor vWii HDD at all. injected channels are installed on WiiU HDD, the one which is not hidden to wiiU.
that's all the purpose of this tool : to be able to plug both HDD at the same time.
- WiiU HDD seen by WiiU mode only (vWii hdd being hidden)
- vWii HDD seen by vWii compatible homebrew (WiiU hdd being incompatible is ignored by most homebrew)
Hello everyone. I was wondering if any of you encountered the following issue : when I have both vWii and WiiU HDD connected, and want to use an app like VBAGX, Snes9xGx, etc., the app seems to try to access the WiiU one as "USB" instead of the vWii, and thus crashes. If I only connect the vWii HDD to the WiiU, the problem is gone. If I invert the HDD (vWii one being on USB1), there is no crash but GenplusGx can't access USB. Seems to me that using USB0 is better, but unless I remove the WiiU HDD everytime, I can't seem to access the apps. Any chance one of you encountered the issue ? Does it seem logical to you that these apps would mount USB1 first when two HDD are connected ? Thank you in advance for your answers.
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,650
Country
France
the USB Port order is dependent to the IOS currently loaded in memory to be used by the running app.
if you use IOS58, the ports are seen/mounted/accessed in reversed order : Port1 before Port0
if you use a cIOS (d2x only on vWii) then it's seen in incremental order : Port 0 before Port1

knowing that, you can understand that homebrew check port 1 first if they use IOS58+AHB option from HBC, or from a channel, therefore it tries to mount the drive located there first.
if there is no code to "understand" that WiiU HDD exists and should be skipped, then the homebrew don't find the partition and the files on it.


seeing you post in the "Ustealth" thread, I support your HDD is using that feature and is set to stealth mode.
it means that the homebrew you are using also require to recognize such HDD signature as valid, or else it will not work either.


So, you have lot of combination to take in account :
- current used IOS
- whether the HDD is stealth or not
- Whether the homebrew you run is coded for Ustealth or not
- whether the homebrew you run is coded to skip drives with incompatible table signature or not (to skip the WiiU HDD if plugged in a "first mounted" order)
- the order you connect the HDD

knowing all that, you can understand why something doesn't work. you might want to find an updated homebrew if the version you use is not compatible to one of these points.

edit:
I didn't have time to complete my answer earlier today, so here it is:

Usually, the drive order is as follow :

vWii HDD on USB port 0 (because if you have Wii games on it, it'll require cIOS. and like I said, cIOS mounted port0 first)
vWii HDD is Ustealth'd to prevent asking to format when accessing WiiU Menu. but some homebrew might not work with that feature. if needed, you can un-hide the drive, but be careful to not reply "yes, I want to ERASE the drive" 3 times.... because yes, you have to actually confirm LOT of time before losing your data. it's like you asked for it if you manage to format it, you can't format it accidentally! unless you are stressed and randomly press screen displayed buttons out of fear, few times the wrong one in a row...
vWii HDD needs additional power supply (usb port1 with ycable, or external power)
WiiU HDD connected to an above port. Port 1 if free, or a front port otherwise.


If you launch a homebrew which use IOS58, and therefore mounts the WiiU HDD first, but doesn't check the partition table (some homebrew just look at the partition, not the table, for example usbgx forwarder) then it'll try to mount it and fail. it'll not skip it to try the next HDD in line.
if that's the case, you have to unplug the WiiU hdd (easy if you plug it on front) and the vWii will now be the "first seen" in decremental port order.
Yes, that's not the best to get up and walk to the console, but that's the fastest solution.



Now, if you want to plug the drive in the reverse order :
that's possible ! but reallly not recommended.
vWii will init first on vWii homebrew (good), but you'll need a special d2x cIOS which is compatible with Port1, but has lot of software and hardware compatibility issues. once that cIOS is installed, it's not enough, you need to tell your homebrew to use it in order to see port1, and hope your homebrew has code to skip wiiu hdd (port0 is seen first, when using cIOS).
 
Last edited by Cyan,
  • Like
Reactions: Brand Newman

Brand Newman

Well-Known Member
Member
Joined
Apr 29, 2014
Messages
559
Trophies
2
Age
43
Website
twitter.com
XP
3,376
Country
France
"Bonsoir mon ami" :lol:... First of all, thank you Cyan, for always answering and trying to find solutions to our problems. I confirm that both my HDD have additional power supply, and that my configuration is vWii = USB0 and WiiU = USB1.

You're right, trying to switch the HDD didn't do any good, but I did notice one thing though : when I launch an app through the homebrew channel (instead of a forwarder) and the HDD is connected to port 1, then the app works flawlessly, which confirms what you wrote about IOS58+AHB checking the drives on inverted order.

But then I can't get access to the Wii games anymore (unless I install a special d2x cIOS, which I do not want, judging from what you wrote).

So yes, I suppose I could unplug the WiiU HDD (perhaps through some USB switch?), but I still have my original Wii to make copies of my Game Cube games, and I don't think it's worth the effort (all I wanted was to take advantage of the slighty crispier image from the Wii U) : I will therefore stick with the Wii, and use the Wii U only for Wii U games.

But thank you again for your time : "merci de ta réponse, et à la prochaine !"
 
Last edited by Brand Newman,

ClarkDV

Member
Newcomer
Joined
Jun 19, 2019
Messages
19
Trophies
0
Age
28
XP
91
Country
United States
For people who dont have or use windows I've made a simple python script which does the same (writing either 55 AA or 55 AB to last two bytes of mbr). (thx to jarjar123)


every time I run this I get

Traceback (most recent call last):

File "./py_wiiu_hide_disk.py", line 128, in <module>

main(create_parser())

File "./py_wiiu_hide_disk.py", line 114, in main

check_dev(args.device)

File "./py_wiiu_hide_disk.py", line 77, in check_dev

if os.st.S_ISBLK(os.stat(dev).st_mode) is False:

AttributeError: 'module' object has no attribute 'st'

Now I am a rookie to this stuff, but I have the disk path correct and don't know why else I'd be getting this error. Please let me know if you have any tips! Thanks.
 

mive

Well-Known Member
Member
Joined
Jul 19, 2018
Messages
252
Trophies
0
Age
40
XP
598
Country
Germany
@ClarkDV
can you show output of
Code:
python -V

and
Code:
python -c '
import os
import sys
device = sys.argv[1]
print(os.stat(device))
' <<< - "/dev/sda"

# adjust /dev/sda to your usb device

?
 
Last edited by mive,

ClarkDV

Member
Newcomer
Joined
Jun 19, 2019
Messages
19
Trophies
0
Age
28
XP
91
Country
United States
@ClarkDV
can you show output of
Code:
python -V

and
Code:
python -c '
import os
import sys
device = sys.argv[1]
print(os.stat(device))
' <<< - "/dev/sda"

# adjust /dev/sda to your usb device

?

version 2.7.10

iMac2:WiiU_Hide_Disk salami$ python -c '
> import os
> import sys
> device = sys.argv[1]
> print(os.stat(device))
> ' <<< - "/dev/disc3"

Traceback (most recent call last):
File "<string>", line 5, in <module>
OSError: [Errno 2] No such file or directory: '/dev/disc3'

--------------------- MERGED ---------------------------

I'm on mac if that changes anything.
 

mive

Well-Known Member
Member
Joined
Jul 19, 2018
Messages
252
Trophies
0
Age
40
XP
598
Country
Germany
you need python version 3 instead of 2

if you already have this installed and still encounter this error, change first line from #!/usr/bin/env python to #!/path/to/python3 (e.g. #!/usr/bin/python3 )

Sorry for this, I should have used env python3 to avoid such error
 

ClarkDV

Member
Newcomer
Joined
Jun 19, 2019
Messages
19
Trophies
0
Age
28
XP
91
Country
United States
you need python version 3 instead of 2

if you already have this installed and still encounter this error, change first line from #!/usr/bin/env python to #!/path/to/python3 (e.g. #!/usr/bin/python3 )

Sorry for this, I should have used env python3 to avoid such error

That was it! Thank you!
 

ClarkDV

Member
Newcomer
Joined
Jun 19, 2019
Messages
19
Trophies
0
Age
28
XP
91
Country
United States
@mive so now my Wii isn't detecting the drive at all. whether hidden or unhidden. All my files are still there according to my Mac. When I go to hide it, it says "hwinfo seems not installed".

Additionally, when I plug my USB HDD drive back into my mac, it shows up right away, and isn't hidden like before when I used to use Ustealth on PC.
 

mive

Well-Known Member
Member
Joined
Jul 19, 2018
Messages
252
Trophies
0
Age
40
XP
598
Country
Germany
@ClarkDV
hwinfo is probably linux only, also the "hwinfo seems not installed" message can be ignored. You can also use --skip-hwinfo parameter to avoid the check at all.

Can you show the full terminal ouput?

(Unfortunately, I dont have a apple device and can't test myself)

Also can you dd the mbr (first 512 bytes )of any disk device and test if it would work with this "file"

e.g.
Code:
mv@mv-pc:~$ sudo dd if=/dev/sda of=~/TEST_MBR bs=512 count=1
1+0 records in
1+0 records out
512 bytes copied, 0.000158375 s, 3.2 MB/s
mv@mv-pc:~$ cp TEST_MBR TEST_MBR_UNCHANGED
mv@mv-pc:~$ hexdump TEST_MBR|tail -n 2
00001f0 ffff fe07 ffff 5800 0a1b 5000 04be aa55
0000200
mv@mv-pc:~$ py_wiiu_hide_disk.py --device ~/TEST_MBR --hide
please restart as root
mv@mv-pc:~$ sudo py_wiiu_hide_disk.py --device ~/TEST_MBR --hide
/home/mv/TEST_MBR is not a block device. Are you sure this is the right path (y/Y)? y
/home/mv/TEST_MBR correct disk (y/Y)? y                        
wrote 55 to offset 1FE (decimal 510)
wrote AB to offset 1FF (decimal 511)
drive /home/mv/TEST_MBR hidden
mv@mv-pc:~$ hexdump TEST_MBR|tail -n 2
00001f0 ffff fe07 ffff 5800 0a1b 5000 04be ab55
0000200
mv@mv-pc:~$ diff TEST_MBR TEST_MBR_UNCHANGED
Binary files TEST_MBR and TEST_MBR_UNCHANGED diffe

edit:
also do you have sudo on mac ?
 
Last edited by mive,

ClarkDV

Member
Newcomer
Joined
Jun 19, 2019
Messages
19
Trophies
0
Age
28
XP
91
Country
United States
@mive

iMac2:WiiU_Hide_Disk salami$ sudo ./py_wiiu_hide_disk.py -d /dev/disk3s1 --hide --skip-hwinfo
/dev/disk3s1 seems to be a partition. Are you sure you want to continue (y/Y)? y
wrote 55 to offset 1FE (decimal 510)
wrote AB to offset 1FF (decimal 511)
drive /dev/disk3s1 hidden


iMac2:~ salami$ cp TEST_MBR TEST_MBR_UNCHANGED
iMac2:~ salami$ hexdump TEST_MBR|tail -n 2
00001f0 00 00 00 00 00 00 00 00 ac 01 b9 01 00 00 55 ab
0000200

Now when I try to run the next line it shows this:

iMac2:~ salami$ sudo py_wiiu_hide_disk.py --device ~/TEST_MBR --hide
Password:
sudo: py_wiiu_hide_disk.py: command not found

I don't really know where to go from here.

Yes, I think I must have sudo, the command works and I have to put a password in and such.
 

ClarkDV

Member
Newcomer
Joined
Jun 19, 2019
Messages
19
Trophies
0
Age
28
XP
91
Country
United States
Ok so now I'm just getting command not found no matter what. I don't know why. I didn't change the name of the python script or anything.
 

mive

Well-Known Member
Member
Joined
Jul 19, 2018
Messages
252
Trophies
0
Age
40
XP
598
Country
Germany
the command not found error is becuase the location where you have py_wiiu_hide_disk.py isn't in PATH

first time it worked because you used, sudo ./py_wiiu_hide_disk.py ....
not sudo py_wiiu_hide_disk.py

so you have to either use sudo /absolute/path/to/py_wiiu__hide_disk.py (e.g. ./ to specify current folder) or add the according folder to PATH (e.g. if py_wiiu_hide_disk is in ~ [home folder] you could use export PATH=$PATH:/path/to/your/home/folder [this is only temporarily until you close terminal])

to the no working issue:

are you sure you specify the whole disk and not just the fat partition? (disk3s1 seems to be a partition)
do you have lsblk command? if yes can you show output ? (*)
if no can you show dmesg after you plug in the usb device?

(*) edit:
Code:
diskutil list
seems to be a mac equivalent
https://apple.stackexchange.com/questions/107953/list-all-devices-connected-lsblk-for-mac-os-x
 
Last edited by mive,

Blesmore

Well-Known Member
Newcomer
Joined
Mar 27, 2019
Messages
53
Trophies
0
Age
124
XP
235
Country
United States
I run Wiixplorer from the first post, the one patched by cyan, but it doesn't see the usb hard drive.

USBloadergx sees the hard drive instead
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,650
Country
France
no, there's no way to have partition on WiiU, that's how the WiiU works : destroy the partition information !
and that's how Ustealth work : fake a destructed partition while still there, so the wiiU stop asking to format it and doesn't destroy the partitions to replace them with encrypted WiiU format.

if you format a drive to WiiU format, it'll destroy and encrypt the entire drive, including the partition table (where partitions are defined) removing the possibility to have partitions.
 
  • Like
Reactions: jaladhjin

Danimalzpwn3

Well-Known Member
Member
Joined
Oct 12, 2019
Messages
154
Trophies
0
Age
25
Location
America
XP
468
Country
United States
Really cool apps, quick and easy. The problem I see how its setup, for instance, like wiiflow, the app itself, works, but once you try to use an emulator for instance Atari 7800 the file cannot be found. Hopefully in the future a solution is provided, moving onto SD is not a solution under the sole fact is that the point of having a flash drive is for all ROMS to be held on there. Once again, great plugin, wish it still allows games to be playable
 

raflos

Member
Newcomer
Joined
Nov 7, 2017
Messages
22
Trophies
0
Age
34
XP
156
Country
United States
The source code has a mistake in it that results in it showing a success message even if it was unable to write to the device.
Code:
if (bufVerify[intBps - 1] == bufToWrite[intBps - 2])
Should be:
Code:
if (bufVerify[intBps - 1] != bufToWrite[intBps - 1])

With my 64gb Sandisk Cruzer fit (usb 2.0) I'm getting a write error '5' ERROR_ACCESS_DENIED using Ustealth with the fixed source code. (Got it working by cleaning with diskpart and formatting following this guide)
 
Last edited by raflos,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: 24,000 hmmmm lol