Since Native Client SDK is deprecated, this tool no longer works
Shared network folder (SFTP) is originally developed by Yoichiro Tanaka and provides the ability to access a SFTP server directly from the ChromeOS Files app. My fork has improved the design of the user-interface, to provide a more native look-and-feel. To do so, the front-end build system have been moved from bower, grunt to npm, webpack to make use of React and the Material-UI components. The fork is merged with the original repo.
Shared network folder (SFTP) is a Chrome App, therefore explicitly build for ChromeOS systems. Chrome Apps can be created with common web technologies such as HTML5, CSS, and JavaScript to deliver an experience comparable of a native application. To extent the power of these technologies, Chrome delivers a Native Client SDK to compile C and C++ code in the browser efficiently and securely, independent of the user’s operating system. Shared network folder (SFTP) makes use of libssh2 which has been ported to the Native Client environment to establish a file share connection over SSH (i.e. SFTP; SSH File Transfer Protocol). The compiled code is part of the app, and communicates with the web technologies back and forth.
Please visit the documentation, to get more insights of the app structure.
To build the app, you need a 1) build system to compile the app's Native Client code, and a 2) front-end build system to build the app itself.
npm
command is included to your global $PATH
environment variable. cd ~
git clone https://github.com/tjibbevanderlaan/chromeos-filesystem-sftp.git
cd chromeos-filesystem-sftp
To compile the app's Native Client code (/src/nativeclient_src), you will need the Native Client SDK, depot_tools and the ported libssh2 library from webports.
nack_sdk.zip
. You can extract the archive in any directory you want, however, in this guide I will use the directory ~/buildutils/
. Consequently, the extracted files can be found in ~/buildutils/nacl_sdk
.cd ~/buildutils/nacl_sdk
./naclsdk update
Subsequently, add the absolute path of the installed sdk-directory (e.g. pepper_49
) to the environment variables $PATH
and $NACL_SDK_ROOT
:
export PATH=~/buildutils/nacl_sdk/pepper_49:$PATH
export NACL_SDK_ROOT=~/buildutils/nacl_sdk/pepper_49
Resolve certificate error Unfortunately, I ran into a certificate error SSL: CERTIFICATE_VERIFY_FAILED
. You can temporary bypass the certificate verification by modifying download.py
, within $NACL_SDK_ROOT/nacl_sdk/sdk_tools
, as suggested by https://groups.google.com/forum/#!topic/native-client-discuss/sh-9sA6LHjw. Make sure that you do not download malicious software!
request = fancy_urllib.FancyRequest(url)
request = fancy_urllib.FancyRequest(url.replace("https://", "http://"))
./naclsdk update
command again!webports
, you will need depot_tools
. Clone the depot_tools
repository by using these commands:
cd ~/buildutils
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
$PATH
environment variable.
export PATH=~/buildutils/depot_tools:$PATH
gclient
command included in the depot_tools
:
cd ~/buildutils
mkdir webports
cd webports
gclient config --name=src https://chromium.googlesource.com/webports/
gclient sync
Compile the libssh2 C library in the webports
directory with the command below. The ./make_all.sh
command compiles the libraries for all suitable architectured (e.g. i686, x86_64, arm, pnacl).
cd ~/buildutils/webports/src
./make_all.sh libssh2
Resolve issue 'missing testfile' During the postbuild of libssh2, the testfile ssh2.nexe
could not be found. I'm not sure if this is a correct fix, but it works; modify the the buildfile of the webported libssh2 as follows:
build.sh
located at ~/buildutils/webports/src/ports/libssh2/
EXECUTABLES="tests/ssh2${NACL_EXEEXT}"
to EXECUTABLES="example/ssh2${NACL_EXEEXT}"
Resolve issue 'qemu-arm cannot open shared library' While testing the glibc-compat
binary for arm architectures, the qemu-arm
application (part of the NaCl SDK) is used, but fails. Installing qemu
yourself fixes the issue.
qemu
by yourself:
sudo apt-get install qemu
qemu
provided by Native Client SDK, by renaming the binary:
cd $NACL_SDK_ROOT/tools
mv qemu-arm qemu-arm-bak
cd ~/chromeos-filesystem-sftp
cd src/nacl_src
make CONFIG=Release
/src/clang-newlib
.cd ~/chromeos-filesystem-sftp
npm install
/src/clang-newlib
./dist
and specified in /webpack.config.js
.
npm run build
Because the app is a Chrome App and not a Chrome Extension, the app can only be opened on Chrome OS devices!
/dist
) to an accessible local directory on your ChromeOS device, for example ~/Downloads/dist
.chrome://extensions
.You can find more information on https://developer.chrome.com/apps/first_app#load.
While the app is working, there are still some features which could be improved.
chrome.storage.local
. While they are not accessible by other apps, it seems not the most secure solution.All files are licensed under the BSD license. See the LICENSE file for details. Copyright 2018 Tjibbe van der Laan Copyright 2015-2016 Yoichiro Tanaka