Hacking WBFUSE (WBFS for FUSE)

Cypherdias

Well-Known Member
Newcomer
Joined
Mar 31, 2009
Messages
60
Trophies
0
XP
49
Country
United States
Tried it out, but don't get it to mount my partition properly. This is what I get:

./wbfuse /dev/sdc1 testwbfs
Initializing WBFS Partition...
ERROR: Invalid WBFS partition.

./wbfuse /dev/sdc testwbfs
Initializing WBFS Partition...
hd num sector doesn't match: Success

Also tried it with sudo (just for the case), but that didn't help me either. The wbfs-tool as well as the Wii itself find the HDD without any problems:

wbfs -p /dev/sdc1 ls
using /dev/sdc
RM3P01 Metroid Prime 3: Corruption 4.09G
ROBPPL Obscure 2 3.58G
[...]

Any idea?
 

torito21

Member
OP
Newcomer
Joined
Aug 5, 2007
Messages
13
Trophies
0
XP
31
Country
Cypherdias said:
Tried it out, but don't get it to mount my partition properly. This is what I get:

./wbfuse /dev/sdc1 testwbfs
Initializing WBFS Partition...
ERROR: Invalid WBFS partition.
Any idea?

You need root privileges. Try "sudo adduser username disk", then reboot and mount it normally without sudo.
 

Venko

Well-Known Member
Member
Joined
Feb 16, 2007
Messages
159
Trophies
0
Location
England
XP
264
Country
Looks great. I'm a GNU/Linux user so I can take advantage of this. It's a real shame about the limitation concerning file sizes though, as madhutter says, it heavily decreases the number of games that can be stored using it.
 

torito21

Member
OP
Newcomer
Joined
Aug 5, 2007
Messages
13
Trophies
0
XP
31
Country
Version 0.7 released.

Changelog:
* Several bugs fixed.
* 64 bits support.

Includes the original wbfs app ported to 64 bits.

Download links on the first post.
 

djtaz

PM's Full - Wadder Me
Member
Joined
Sep 21, 2008
Messages
2,997
Trophies
0
Age
51
Website
Visit site
XP
101
Country
At least this can get the png images onto the drive - id like to see all PNG images stored next to the ISO so that the loaders can read the images from the drives instead of the SD cards - this is a start
 

proms

New Member
Newbie
Joined
Apr 11, 2009
Messages
4
Trophies
0
XP
30
Country
Taiwan
torito21 said:
Version 0.7 released.

Thank for your development. Now I can easy manage my wbfs. This program is very great. If this program can execute in window, I think it will be wonderful!!

I can't compile the version 0.7 in my linux (SLAMD64). I get some error message show as below:

Code:
gcc -Wall -W -Ilibwbfs -I. -DLARGE_FILES -D_FILE_OFFSET_BITS=64 -c wbfuse.c -o wbfuse.o 
wbfuse.c:235: warning: unused parameter 'data'
wbfuse.c:250: warning: unused parameter 'path'
wbfuse.c:309: warning: unused parameter 'offset'
wbfuse.c:309: warning: unused parameter 'fi'
wbfuse.c:335: warning: unused parameter 'fi'
wbfuse.c:360: warning: unused parameter 'mode'
wbfuse.c:360: warning: unused parameter 'dev'
wbfuse.c:400: warning: unused parameter 'fi'
wbfuse.c:428: warning: unused parameter 'fi'
wbfuse.c:497: warning: unused parameter 'path'
wbfuse.c:497: warning: unused parameter 'd'
wbfuse.c:497: warning: unused parameter 'fi'
wbfuse.c:505: warning: unused parameter 'fi'
wbfuse.c: In function 'main':
wbfuse.c:697: error: 'struct fuse_operations_compat2' has no member named 'readdir'
wbfuse.c:698: warning: assignment from incompatible pointer type
wbfuse.c:699: warning: assignment from incompatible pointer type
wbfuse.c:700: warning: assignment from incompatible pointer type
wbfuse.c:701: warning: assignment from incompatible pointer type
wbfuse.c:702: error: 'struct fuse_operations_compat2' has no member named 'destroy'
wbfuse.c:704: warning: assignment from incompatible pointer type
wbfuse.c:705: warning: assignment from incompatible pointer type
wbfuse.c:725: error: too many arguments to function 'fuse_main_compat2'
wbfuse.c:666: warning: unused variable 'usr_options'
wbfuse.c:665: warning: unused variable 'opt'
make: *** [wbfuse.o] Error 1

First I add "#define FUSE_USE_VERSION 26" into the "wbfuse.c". I will get other error message show as below:

CODEgcc -Wall -W -Ilibwbfs -I. -static wbfuse.o tools.o bn.o ec.o disc_usage_table.o libwbfs.o libwbfs_linux.o wiidisc.o rijndael.o -lcrypto -lfuse -lpthread -ldl -lrt -o wbfuse
/usr/lib64/gcc/x86_64-slamd64-linux/4.2.4/../../../../lib64/libfuse.a(fuse.o): In function `fuse_load_so_name':
/mnt/data/Download/Linux/myLinux/Base/file_system/fuse-2.7.4/lib/fuse.c:165: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib64/gcc/x86_64-slamd64-linux/4.2.4/../../../../lib64/libpthread.a(pthread_cond_timedwait.o): In function `pthread_cond_timedwait':
(.text+0xa7): undefined reference to `__vdso_clock_gettime'
collect2: ld returned 1 exit status
make: *** [wbfuse] Error 1

Second I remove "LDFLAGS = -static" in the makefile. Then I can compile it and execute it.

Could I remove "LDFLAGS = -static" in the makefile?
 

torito21

Member
OP
Newcomer
Joined
Aug 5, 2007
Messages
13
Trophies
0
XP
31
Country
proms said:
Second I remove "LDFLAGS = -static" in the makefile. Then I can compile it and execute it.

Could I remove "LDFLAGS = -static" in the makefile?

Your problem can be fixed changing #define FUSE_USE_VERSION 21 to #define FUSE_USE_VERSION 26 in /usr/include/fuse/fuse.h .
I don't know why fuse uses the old api by default. :S

But, don't worry, the dynamic compilation (-static flag removed) should work ok too.
 

proms

New Member
Newbie
Joined
Apr 11, 2009
Messages
4
Trophies
0
XP
30
Country
Taiwan
torito21 said:
Your problem can be fixed changing #define FUSE_USE_VERSION 21 to #define FUSE_USE_VERSION 26 in /usr/include/fuse/fuse.h .
I don't know why fuse uses the old api by default. :S

But, don't worry, the dynamic compilation (-static flag removed) should work ok too.

Thank for your reply!

When I don't give any parameter to wbfuse, I will get a error message.

Code:
bash-3.1# ./wbfuse
Initializing WBFS Partition...
????????? (segmentation fault)

Would you please change below source code in wbfuse.c?
CODEÂÂÂÂprintf("Initializing WBFS Partition...\n");
ÂÂÂÂint back = initFuseWbfs(argv[1]);
ÂÂÂÂif (back) {
ÂÂÂÂÂÂÂÂprintf("ERROR: Invalid WBFS partition.\n");
ÂÂÂÂÂÂÂÂreturn -1;
ÂÂÂÂ}
ÂÂÂÂprintf("OK\n");
ÂÂÂÂ/*ÂÂÂÂOptionsÂÂÂÂ */
ÂÂÂÂ
ÂÂÂÂif (argc
 

proms

New Member
Newbie
Joined
Apr 11, 2009
Messages
4
Trophies
0
XP
30
Country
Taiwan
When I terminate to copy a image, I will get some strange file in the target partition.

QUOTE said:
bash-3.1# ls -al
?? 4
drw-rw-rw- 2 root root 0 2006-12-08 08:00 .
drwxr-xr-x 16 root root 4096 2009-04-12 03:03 ..
-rw-rw-rw- 1 root root 524288000 2006-12-08 08:00 Let'sTAP [R2UJ8P].iso
-rw-rw-rw- 1 root root 2122317824 2006-12-08 08:00 SpongeBob06 [RQ4E78].iso
-rw-rw-rw- 1 root root 2122317824 2006-12-08 08:00 SpongeBob06 [RQ4E78].iso
-rw-rw-rw- 1 root root 2122317824 2006-12-08 08:00 SpongeBob06 [RQ4E78].iso
 

torito21

Member
OP
Newcomer
Joined
Aug 5, 2007
Messages
13
Trophies
0
XP
31
Country
Version 0.8 released.

Changelog:
* Minor bug fixes.
* Added an option to scrub images (-s option)
* Added an option to scrub previously written to the partition (rename to "scrub"(without quotes)).

Thanks for the bug reports.

About the mac port... I don't have a Mac xD
 

AllWiidUp

Well-Known Member
Newcomer
Joined
Dec 17, 2008
Messages
84
Trophies
0
XP
31
Country
Canada
torito21 said:
Version 0.8 released.

Changelog:
* Minor bug fixes.
* Added an option to scrub images (-s option)
* Added an option to scrub previously written to the partition (rename to "scrub"(without quotes)).

Thanks for the bug reports.

About the mac port... I don't have a Mac xD

Please add the delete corruption issue fix:

http://gbatemp.net/index.php?showtopic=147969&st=0
 

Dwaalspoor98

Well-Known Member
Member
Joined
May 28, 2003
Messages
217
Trophies
2
Age
43
Location
Earth
Website
Visit site
XP
1,640
Country
Netherlands
Thank you for the hard work and Linux support, this makes me happy
wink.gif
 

METZElmaennchen

New Member
Newbie
Joined
Apr 19, 2009
Messages
1
Trophies
0
XP
1
Country
Gambia, The
Hello!
Tried out your nice tool.
After setting the FUSE_USE_VERSION flag it compiled great on Jaunty 9.04
smile.gif

Just added a little udev rule and it gets mounted on the fly when I plugin the drive.

Thanks a lot !
 

derek.mf

Member
Newcomer
Joined
Apr 21, 2009
Messages
5
Trophies
0
XP
7
Country
France
Hi,

Firstly, thanks for your great work, it is very useful and so more intuitive than any "GUI" or command line tool (even if, as a Linux user, command line is not a problem
wink.gif
).

But (sorry, there is a "but"), I found a bug.

I explain you all I made and the context :

Distribution : Fedora Core 9.
WBFuse version used : "wbfuse_0_8_2b_i386"
Installation :
- All binaries are owned by root.
- I set the SUID on the binaries (root #> chmod u+s *)
-----------------------------------------------------------------------
Mount command used : ./wbfuse /dev/sdb1 $HOME/wbfs_part
Initializing WBFS Partition...
Number of files found: 2
OK
Image scrubbing enabled (all partitions).
Wii ISO found: Call of Duty (Wii) UK/FR [RVYP52].iso
Wii ISO found: Okami [ROWP08].iso
-----------------------------------------------------------------------

But when I make :

-----------------------------------------------------------------------
ls -l ~/wbfs_part
ls: ne peut accéder /home/me/wbfs_part/Call of Duty (Wii) UK/FR [RVYP52].iso: Aucun fichier ou dossier de ce type
total 0
-????????? ? ? ? ? ? Call of Duty (Wii) UK/FR [RVYP52].iso
-rw-rw-rw- 1 me me 4699979776 déc 8 2006 Okami [ROWP08].iso
-----------------------------------------------------------------------

The error message could be translated as :
ls: cannot access /home/me/wbfs_part/Call of Duty (Wii) UK/FR [RVYP52].iso: No such file or directory
The file does not appear in nautilus.

Is it due to the game name ?
I use my external hdd on my Wii with USB Loader v1.1 and this game is found and can be launched without problems.

I will try to have a look at your code but if you can try to fix this, would be great
wink.gif


One more time, thanks a lot for your work.

derek.mf
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • AncientBoi @ AncientBoi:
    How are you doing today K3Nv2?
  • AncientBoi @ AncientBoi:
    You did? By whom?
  • AncientBoi @ AncientBoi:
    Ohh, Don't tell me lEOTck did it to you? :O:sad:
  • BakerMan @ BakerMan:
    nah we all know luke is who leo's smashing
    +1
  • AncientBoi @ AncientBoi:
    Oh :shit:! And I didn't get to 📽️ it! :angry::sad::cry: :hateit:
  • BakerMan @ BakerMan:
    GUYS I JUST FOUND OUT THAT ULTERIOR MOTIVES WAS FOUND YESTERDAY, AND IT WAS FROM P O R N 💀😭
    +1
  • AncientBoi @ AncientBoi:
    😱 .............................. :evil::tpi::evil:
  • Xdqwerty @ Xdqwerty:
    Good afternoon
  • Xdqwerty @ Xdqwerty:
    @BakerMan, what's ulterior motives?
  • zeith_7 @ zeith_7:
    it was a lostwave song
  • Xdqwerty @ Xdqwerty:
    @zeith_7, 1) what's lostwave? 2) give context
  • zeith_7 @ zeith_7:
    lostwaves are like songs that became lost
  • zeith_7 @ zeith_7:
    they are partially or never found
  • zeith_7 @ zeith_7:
    ulterior motives is one of the internets lostwaves
  • Xdqwerty @ Xdqwerty:
    Ok read the Wikipedia article
  • zeith_7 @ zeith_7:
    and basically people were trying to find it for a while after a post with the lost songs only snippet
  • Xdqwerty @ Xdqwerty:
    @zeith_7, and an obscure norp film had the song
  • zeith_7 @ zeith_7:
    correct
  • zeith_7 @ zeith_7:
    the orginal snippet was from a pirated verison of the film basically
  • zeith_7 @ zeith_7:
    or so i think
  • zeith_7 @ zeith_7:
    i never expected it to get discovered this year/month
  • K3Nv2 @ K3Nv2:
    Lol this neighbor "I'm always hearing him shit" I'm sorry would you like my shits to be more settle
    +1
  • BakerMan @ BakerMan:
    never bring a knife to a gunfight, but bringing a gun to a knife fight is suggested
    BakerMan @ BakerMan: never bring a knife to a gunfight, but bringing a gun to a knife fight is suggested