Homebrew [Release] Vita SMB Client

  • Thread starter Thread starter cy33hc
  • Start date Start date
  • Views Views 6,240
  • Replies Replies 28
  • Likes Likes 8

cy33hc

Well-Known Member
Member
Joined
Sep 29, 2020
Messages
219
Reaction score
301
Trophies
1
Age
52
XP
1,807
Country
Canada
https://github.com/cy33hc/vita-smb-client

Simple SMB Client App for Vita for connecting to remote Windows Shares, Linux SMB Shares and NAS SMB shares to transfer files back and forth. Ported from the PS4 version https://github.com/cy33hc/ps4-smb-client

screenshot.jpg
 
https://github.com/cy33hc/vita-smb-client

Simple SMB Client App for Vita for connecting to remote Windows Shares, Linux SMB Shares and NAS SMB shares to transfer files back and forth. Ported from the PS4 version https://github.com/cy33hc/ps4-smb-client

View attachment 344863
I had some problems building the ps4 one iirc. I'd have to go through the process again to see what they were. I was going through wsl2. is there a particular wsl distro you need to use? or openorbis version?
 
I had some problems building the ps4 one iirc. I'd have to go through the process again to see what they were. I was going through wsl2. is there a particular wsl distro you need to use? or openorbis version?
I don't use WSL. I'm on linuxmint 20.0.4/ Did you build the dependencies first?

Also use the OPENORBIS SDK from pacbrew. It nicely downloads everything including many prebuilt portlibs.

https://github.com/cy33hc/ps4-openssl/blob/OpenSSL_1_1_1-ps4/README_PS4.md
https://github.com/cy33hc/libsmb2/blob/ps4/README_PS4.md
 
  • Like
Reactions: godreborn
I don't use WSL. I'm on linuxmint 20.0.4/ Did you build the dependencies first?

Also use the OPENORBIS SDK from pacbrew. It nicely downloads everything including many prebuilt portlibs.

https://github.com/cy33hc/ps4-openssl/blob/OpenSSL_1_1_1-ps4/README_PS4.md
https://github.com/cy33hc/libsmb2/blob/ps4/README_PS4.md
thanks, but I get this error, building libsmb2:
godreborn@GODREBORN-LAPTOP:~/libsmb2/build$ make
[ 2%] Building C object lib/CMakeFiles/smb2.dir/aes.c.obj
[ 4%] Building C object lib/CMakeFiles/smb2.dir/aes128ccm.c.obj
In file included from /home/godreborn/libsmb2/lib/aes128ccm.c:35:
/home/godreborn/libsmb2/include/portable-endian.h:106:11: fatal error: 'sys/endian.h' file not found
# include <sys/endian.h>
^~~~~~~~~~~~~~
1 error generated.
make[2]: *** [lib/CMakeFiles/smb2.dir/build.make:90: lib/CMakeFiles/smb2.dir/aes128ccm.c.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:98: lib/CMakeFiles/smb2.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Post automatically merged:

I forgot to mention that that file exists on my system, but it's in /usr/include . I tried creating a symlink to /usr/include/sys , but it didn't work, still can't find it.
 
Last edited by godreborn,
thanks, but I get this error, building libsmb2:
godreborn@GODREBORN-LAPTOP:~/libsmb2/build$ make
[ 2%] Building C object lib/CMakeFiles/smb2.dir/aes.c.obj
[ 4%] Building C object lib/CMakeFiles/smb2.dir/aes128ccm.c.obj
In file included from /home/godreborn/libsmb2/lib/aes128ccm.c:35:
/home/godreborn/libsmb2/include/portable-endian.h:106:11: fatal error: 'sys/endian.h' file not found
# include <sys/endian.h>
^~~~~~~~~~~~~~
1 error generated.
make[2]: *** [lib/CMakeFiles/smb2.dir/build.make:90: lib/CMakeFiles/smb2.dir/aes128ccm.c.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:98: lib/CMakeFiles/smb2.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Post automatically merged:

I forgot to mention that that file exists on my system, but it's in /usr/include . I tried creating a symlink to /usr/include/sys , but it didn't work, still can't find it.
Here's the build instructions for libsmb2. You need to be in the PS4 branch.
https://github.com/cy33hc/libsmb2/blob/ps4/README_PS4.md
 
  • Like
Reactions: godreborn
yeah, I used that but it can't find sys/endian.h.
it is there. I think you didn't source the ps4vars.sh before executing openorbis-cmake. If you don't source the ps4vars.sh then you won't have the correct include folders in cmake.

```
source /opt/pacbrew/ps4/openorbis/ps4vars.sh
mkdir build; cd build
openorbis-cmake -DCMAKE_INSTALL_PREFIX=$OPENORBIS/usr ..
```
1672343404498.png

Post automatically merged:

So... it's like opposite FTP?
Not really. It's for accessing Windows Shares. I assume you know what Windows Shares are.
 
  • Like
Reactions: godreborn
it is there. I think you didn't source the ps4vars.sh before executing openorbis-cmake. If you don't source the ps4vars.sh then you won't have the correct include folders in cmake.

```
source /opt/pacbrew/ps4/openorbis/ps4vars.sh
mkdir build; cd build
openorbis-cmake -DCMAKE_INSTALL_PREFIX=$OPENORBIS/usr ..
```
View attachment 344976
Post automatically merged:


Not really. It's for accessing Windows Shares. I assume you know what Windows Shares are.
alright, I got past that error, but I get this one now:
[ 38%] Building CXX object CMakeFiles/ps4_smb_client.dir/source/main.cpp.obj
[ 42%] Building C object CMakeFiles/ps4_smb_client.dir/source/orbis_jbc.c.obj
/home/godreborn/ps4-smb-client/source/orbis_jbc.c:6:10: fatal error: 'libjbc.h' file not found
#include <libjbc.h>
^~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/ps4_smb_client.dir/build.make:188: CMakeFiles/ps4_smb_client.dir/source/orbis_jbc.c.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/ps4_smb_client.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
 
alright, I got past that error, but I get this one now:
[ 38%] Building CXX object CMakeFiles/ps4_smb_client.dir/source/main.cpp.obj
[ 42%] Building C object CMakeFiles/ps4_smb_client.dir/source/orbis_jbc.c.obj
/home/godreborn/ps4-smb-client/source/orbis_jbc.c:6:10: fatal error: 'libjbc.h' file not found
#include <libjbc.h>
^~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/ps4_smb_client.dir/build.make:188: CMakeFiles/ps4_smb_client.dir/source/orbis_jbc.c.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/ps4_smb_client.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Oh. I forgot to update the build instructions after add jailbreak from sandbox code. You need 1 more dependency built and install into OPENORBIS SDK folder. This one it a bit tricky, because it uses a custom OPENORBIS SDK with Makefile that references build_rules.mk which doesn't exists in the nornal SDK. I forgot where I found it. I'll attach mine a later to this post

https://github.com/bucanero/ps4-libjbc
 
Oh. I forgot to update the build instructions after add jailbreak from sandbox code. You need 1 more dependency built and install into OPENORBIS SDK folder. This one it a bit tricky, because it uses a custom OPENORBIS SDK with Makefile that references build_rules.mk which doesn't exists in the nornal SDK. I forgot where I found it. I'll attach mine a later to this post

https://github.com/bucanero/ps4-libjbc
crap, while trying to fix the issue, I get the same original error of the endian.h being missing.
 
not sure what the problem is, but I get that same error as before, and I did include the source line:L

Code:
godreborn@GODREBORN-LAPTOP:~$ git clone --recursive https://github.com/cy33hc/libsmb2
Cloning into 'libsmb2'...
remote: Enumerating objects: 3262, done.
remote: Counting objects: 100% (322/322), done.
remote: Compressing objects: 100% (162/162), done.
remote: Total 3262 (delta 191), reused 263 (delta 155), pack-reused 2940
Receiving objects: 100% (3262/3262), 1.17 MiB | 4.88 MiB/s, done.
Resolving deltas: 100% (2453/2453), done.
godreborn@GODREBORN-LAPTOP:~$ cd libsmb2
godreborn@GODREBORN-LAPTOP:~/libsmb2$ sudo chmod guo+x /opt/pacbrew/ps4/openorbis/ps4vars.sh
godreborn@GODREBORN-LAPTOP:~/libsmb2$ source /opt/pacbrew/ps4/openorbis/ps4vars.sh
godreborn@GODREBORN-LAPTOP:~/libsmb2$ mkdir build; cd build
godreborn@GODREBORN-LAPTOP:~/libsmb2/build$ openorbis-cmake -DCMAKE_INSTALL_PREFIX=$OPENORBIS/usr ..
-- The C compiler identification is Clang 13.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/pacbrew/ps4/openorbis/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Could NOT find GSSAPI (missing: GSSAPI_LIBRARY GSSAPI_INCLUDE_DIR)
-- Found OpenSSL: /opt/pacbrew/ps4/openorbis/usr/lib/libcrypto.a (found version "1.1.1t")
-- Looking for arpa/inet.h
-- Looking for arpa/inet.h - found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for gssapi/gssapi.h
-- Looking for gssapi/gssapi.h - not found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for netdb.h
-- Looking for netdb.h - found
-- Looking for netinet/in.h
-- Looking for netinet/in.h - found
-- Looking for netinet/tcp.h
-- Looking for netinet/tcp.h - found
-- Looking for net/if.h
-- Looking for net/if.h - found
-- Looking for poll.h
-- Looking for poll.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for sys/filio.h
-- Looking for sys/filio.h - not found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - found
-- Looking for sys/socket.h
-- Looking for sys/socket.h - found
-- Looking for sys/sockio.h
-- Looking for sys/sockio.h - not found
-- Looking for sys/statvfs.h
-- Looking for sys/statvfs.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/sysmacros.h
-- Looking for sys/sysmacros.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sys/uio.h
-- Looking for sys/uio.h - found
-- Looking for sys/vfs.h
-- Looking for sys/vfs.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for utime.h
-- Looking for utime.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Performing Test HAVE_SOCKADDR_LEN
-- Performing Test HAVE_SOCKADDR_LEN - Success
-- Performing Test HAVE_SOCKADDR_STORAGE
-- Performing Test HAVE_SOCKADDR_STORAGE - Success
-- Looking for makedev
-- Looking for makedev - not found
-- Looking for makedev
-- Looking for makedev - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/godreborn/libsmb2/build
godreborn@GODREBORN-LAPTOP:~/libsmb2/build$ make
[  2%] Building C object lib/CMakeFiles/smb2.dir/aes.c.obj
[  4%] Building C object lib/CMakeFiles/smb2.dir/aes128ccm.c.obj
In file included from /home/godreborn/libsmb2/lib/aes128ccm.c:35:
/home/godreborn/libsmb2/include/portable-endian.h:106:11: fatal error: 'sys/endian.h' file not found
#       include <sys/endian.h>
                ^~~~~~~~~~~~~~
1 error generated.
make[2]: *** [lib/CMakeFiles/smb2.dir/build.make:90: lib/CMakeFiles/smb2.dir/aes128ccm.c.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:98: lib/CMakeFiles/smb2.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

endian.h is in the include folder, but not in sys or bits (tried a symlink with sys, which bypassed it)
Post automatically merged:

I got libjbc installed. I think bucanero gave me that build file a few days ago:

godreborn@GODREBORN-LAPTOP:~$ sudo rm -r ps4-libjbc
godreborn@GODREBORN-LAPTOP:~$ git clone --recursive https://github.com/cy33hc/ps4-libjbc
Cloning into 'ps4-libjbc'...
remote: Enumerating objects: 53, done.
remote: Counting objects: 100% (53/53), done.
remote: Compressing objects: 100% (46/46), done.
remote: Total 53 (delta 22), reused 28 (delta 7), pack-reused 0
Receiving objects: 100% (53/53), 15.27 KiB | 2.18 MiB/s, done.
Resolving deltas: 100% (22/22), done.
godreborn@GODREBORN-LAPTOP:~$ cp /mnt/c/Users/GODREBORN/desktop/build_rules.mk /opt/pacbrew/ps4/openorbis/
cp: cannot create regular file '/opt/pacbrew/ps4/openorbis/build_rules.mk': Permission denied
godreborn@GODREBORN-LAPTOP:~$ sudo cp /mnt/c/Users/GODREBORN/desktop/build_rules.mk /opt/pacbrew/ps4/openorbis/
godreborn@GODREBORN-LAPTOP:~$ cd ps4-libjbc
godreborn@GODREBORN-LAPTOP:~/ps4-libjbc$ make install
jailbreak.c
kernelrw.c
utils.c
libjbc.a
Copying...
'libjbc.h' -> '/opt/pacbrew/ps4/openorbis/include/libjbc.h'
cp: cannot create regular file '/opt/pacbrew/ps4/openorbis/include/libjbc.h': Permission denied
make: *** [Makefile:73: install] Error 1
godreborn@GODREBORN-LAPTOP:~/ps4-libjbc$ sudo -E make install
make[1]: '/home/godreborn/ps4-libjbc/libjbc.a' is up to date.
Copying...
'libjbc.h' -> '/opt/pacbrew/ps4/openorbis/include/libjbc.h'
'libjbc.a' -> '/opt/pacbrew/ps4/openorbis/lib/libjbc.a'
lib installed!
 
Last edited by godreborn,
not sure what the problem is, but I get that same error as before, and I did include the source line:L

Code:
godreborn@GODREBORN-LAPTOP:~$ git clone --recursive https://github.com/cy33hc/libsmb2
Cloning into 'libsmb2'...
remote: Enumerating objects: 3262, done.
remote: Counting objects: 100% (322/322), done.
remote: Compressing objects: 100% (162/162), done.
remote: Total 3262 (delta 191), reused 263 (delta 155), pack-reused 2940
Receiving objects: 100% (3262/3262), 1.17 MiB | 4.88 MiB/s, done.
Resolving deltas: 100% (2453/2453), done.
godreborn@GODREBORN-LAPTOP:~$ cd libsmb2
godreborn@GODREBORN-LAPTOP:~/libsmb2$ sudo chmod guo+x /opt/pacbrew/ps4/openorbis/ps4vars.sh
godreborn@GODREBORN-LAPTOP:~/libsmb2$ source /opt/pacbrew/ps4/openorbis/ps4vars.sh
godreborn@GODREBORN-LAPTOP:~/libsmb2$ mkdir build; cd build
godreborn@GODREBORN-LAPTOP:~/libsmb2/build$ openorbis-cmake -DCMAKE_INSTALL_PREFIX=$OPENORBIS/usr ..
-- The C compiler identification is Clang 13.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/pacbrew/ps4/openorbis/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Could NOT find GSSAPI (missing: GSSAPI_LIBRARY GSSAPI_INCLUDE_DIR)
-- Found OpenSSL: /opt/pacbrew/ps4/openorbis/usr/lib/libcrypto.a (found version "1.1.1t")
-- Looking for arpa/inet.h
-- Looking for arpa/inet.h - found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for gssapi/gssapi.h
-- Looking for gssapi/gssapi.h - not found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for netdb.h
-- Looking for netdb.h - found
-- Looking for netinet/in.h
-- Looking for netinet/in.h - found
-- Looking for netinet/tcp.h
-- Looking for netinet/tcp.h - found
-- Looking for net/if.h
-- Looking for net/if.h - found
-- Looking for poll.h
-- Looking for poll.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for sys/filio.h
-- Looking for sys/filio.h - not found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - found
-- Looking for sys/socket.h
-- Looking for sys/socket.h - found
-- Looking for sys/sockio.h
-- Looking for sys/sockio.h - not found
-- Looking for sys/statvfs.h
-- Looking for sys/statvfs.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/sysmacros.h
-- Looking for sys/sysmacros.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sys/uio.h
-- Looking for sys/uio.h - found
-- Looking for sys/vfs.h
-- Looking for sys/vfs.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for utime.h
-- Looking for utime.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Performing Test HAVE_SOCKADDR_LEN
-- Performing Test HAVE_SOCKADDR_LEN - Success
-- Performing Test HAVE_SOCKADDR_STORAGE
-- Performing Test HAVE_SOCKADDR_STORAGE - Success
-- Looking for makedev
-- Looking for makedev - not found
-- Looking for makedev
-- Looking for makedev - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/godreborn/libsmb2/build
godreborn@GODREBORN-LAPTOP:~/libsmb2/build$ make
[  2%] Building C object lib/CMakeFiles/smb2.dir/aes.c.obj
[  4%] Building C object lib/CMakeFiles/smb2.dir/aes128ccm.c.obj
In file included from /home/godreborn/libsmb2/lib/aes128ccm.c:35:
/home/godreborn/libsmb2/include/portable-endian.h:106:11: fatal error: 'sys/endian.h' file not found
#       include <sys/endian.h>
                ^~~~~~~~~~~~~~
1 error generated.
make[2]: *** [lib/CMakeFiles/smb2.dir/build.make:90: lib/CMakeFiles/smb2.dir/aes128ccm.c.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:98: lib/CMakeFiles/smb2.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

endian.h is in the include folder, but not in sys or bits (tried a symlink with sys, which bypassed it)
ok. My sys/endian.sh just reference the #include <endian.h>. So that's fine.
 
  • Like
Reactions: godreborn
ok. My sys/endian.sh just reference the #include <endian.h>. So that's fine.
it's in there, but it seems to look for sys/endian.h and bits/endian.h, not sure if they're the same files or if I should make a symlink to both as both folders are present:

1672347754379.png
 
it's in there, but it seems to look for sys/endian.h and bits/endian.h, not sure if they're the same files or if I should make a symlink to both as both folders are present:

View attachment 344995
The content of sys/endian.h is this. Its the same as you symlink it. Both works.

#include <endian.h>
 
  • Like
Reactions: godreborn
The content of sys/endian.h is this. Its the same as you symlink it. Both works.

#include <endian.h>
it made it past the error, but this happened:

[ 14%] Building C object lib/CMakeFiles/smb2.dir/errors.c.obj
/home/godreborn/libsmb2/lib/errors.c:1111:24: error: use of undeclared identifier 'ENODATA'
return ENODATA;
 

Site & Scene News

Popular threads in this forum