
Show HN: XFiles – FOSS File Manager and Archiver with Root Support for Android - _pgp_
https://github.com/pgp/XFiles
======
tenryuu
The amount of hassle there is to actually get a view of this without
installing it is quite a bullshit task.

From the readme, you have to navigate to an entirely different repo, which
contains only contains a handful of preview files.

Even then, they are all gifs, so if you wanted static content you're out of
luck, as gifs are pretty much the incorrect format for lengthy content such as
this. Files average 6-10MB each, so if you're actually on mobile, github won't
preview them (how nice, they think of my data plan).

Consider ShareX
[[https://github.com/ShareX/ShareX](https://github.com/ShareX/ShareX)], who
quite some time ago did strip out their entire readme for putting more
information on their own website, but they still have a gif showing a majority
functions from their application. It's less than 200kb, because someone
decided to optimise their content to an acceptable extent

~~~
_pgp_
Thank you for your suggestion, I'll add some static previews in the main repo
README.

------
sascha_sl
calling it XFiles when it doesn't run on X, ahhh, that really irks me for some
reason...

~~~
_pgp_
actually, the native library does use X11 for showing the hashview window on
Unix systems :D

------
_pgp_
The project was born by the need to centralize in one application several
file-explorer related capabilities, since I used to use: \- jrummy's Root
Browser for generic file management:
[https://play.google.com/store/apps/details?id=com.jrummyapps...](https://play.google.com/store/apps/details?id=com.jrummyapps.rootbrowser.classic)
\- RAR for Android for compressed archive support:
[https://play.google.com/store/apps/details?id=com.rarlab.rar](https://play.google.com/store/apps/details?id=com.rarlab.rar)
\- AndFTP for SFTP transfers:
[https://play.google.com/store/apps/details?id=lysesoft.andft...](https://play.google.com/store/apps/details?id=lysesoft.andftp)
\- Superbeam for device-to-device transfers (till four years ago, the app was
broken since Android 5) Moreover, I don't like ads very much, and each of
these applications (at least in their free flavours) are ad-supported, so I
started building my own application with the needed features.

The main dependencies the app uses are: \- The Botan TLS library, for checksum
support, private key generation for SFTP identities, and for establishing a
TLS channel for device-to-device file exchange:
[https://botan.randombit.net/](https://botan.randombit.net/) \- p7zip 16.0.2
(with a few modifications) for archive management:
[http://p7zip.sourceforge.net/](http://p7zip.sourceforge.net/) \- SSHJ, for
SFTP client support:
[https://github.com/hierynomus/sshj](https://github.com/hierynomus/sshj) \-
Apache MINA for exposing a FTP server, if it's needed to share files with
other platforms not running the app: [https://mina.apache.org/ftpserver-
project/index.html](https://mina.apache.org/ftpserver-project/index.html) \-
Apache Commons lang for escaping urls in the builtin HTTP server
implementation (same purpose of the FTP server):
[https://commons.apache.org/proper/commons-
lang/](https://commons.apache.org/proper/commons-lang/) \- (work in progress)
SMBJ, for SMB client support for accessing remote shared folders on Windows:
[https://github.com/hierynomus/smbj](https://github.com/hierynomus/smbj)

The main features are: \- File explorer for local filesystems, with dual
backend, namely the Java API-based one, and a native one relying on an
external C++ executable (Roothelper) that can be run as root if root
permissions are available; \- Supported file ops: copy, move (cut/copy +
paste) for local, copy supports interactive file conflict resolution on local
filesystems; copy only for remote file transfer; soft and hard linking where
supported, mkdir, create file (both empty and with random content and custom
size) \- List view and grid view visualization, two-tab main browser view
(ViewPager, slide from one tab to the other), with multi-step sort feature
(e.g. sort first by date descending, then by name ascending, etc...) \- Multi-
selection feature, also with a continuous variant (similar to what you would
do on PC by holding down left mouse button, opening a selection rectangle, and
moving till needed items are selected); select all/none/unselect
all/none/filter selection options as well \- Compressed archive listing and
extraction (7Z,ZIP,TAR,GZ,BZ2,XZ,CAB,RAR), and creation (7Z,TAR,ZIP), with
some archiving options (password, encrypt filenames, compression level) \-
Hashing support, even for multiple files and multiple hashes at once, for the
following checksums: MD5, SHA1, SHA2 variants (SHA256,SHA512...), SHA3
variants, Blake2B-256 \- Remote device to device file/folder sharing for
Android, via a custom application protocol (XFiles Remote Explorer, XRE)
backed by TLS with end-to-end visual verification (like the one Telegram does
for private chats and VoIP calls in order to ensure MITM-proof end-to-end
encryption, essentially a visual hash) \- Search files feature, only by name
for now (search-within-content feature is planned) \- A favorite manager for
storing locations, both on local and on remote filesystems (XRE,SFTP) \- An
integrated URL downloader with customizable destination path and filename \- A
widget for XRE server, and "Share with..." protocol handling, for making
device-to-device sharing more immediate and ergonomic See the Demos page for a
quick idea of the GUI and what can be done with the app (animated GIFs
illustrating use cases):
[https://github.com/pgp/XFilesDemos](https://github.com/pgp/XFilesDemos)

Some consideration about the native component, Roothelper, which source is
hosted on a separate repo:
[https://github.com/pgp/XFilesRootHelper](https://github.com/pgp/XFilesRootHelper)
\- It is a local file operations server running on Unix Domain Sockets, the
Java code of the Android app communicates with it through a client class,
which sends op requests and receives op results, and incremental progress for
file transfers. I didn't use JNI because of the lack of the possibility of
operating as root user, and in general because I believe JNI is a heavy
interface layer (not talking so much about performance, but rather about code
readability). \- This executable also implements the remote transfer feature
via TLS, and hence it can be run in two modes, ordinary (recive commands via
local socket, not available if building for Windows), and standalone -- by
exposing a XRE server for exchanging files with Android devices running the
app. \- It has been written with portability in mind, it actually builds and
works on Windows 7 and above (x64 only, but you can play with the build
scripts in order to allow also 32-bit builds), Linux x64, OSX x64 (tested on
High Sierra, XQuartz is recommended), FreeBSD, and iOS (built just for
testing, running it in a terminal emulator, on iOS 6.1, not tested on more
recent devices). Of course, the Android supported ABIs are x86, x64, armv7,
armv8a (the apk embeds all the four library variants). Build scripts are cmake
based for any platform (CMakeLists.txt), with the exception of Android for
which Android.mk legacy build system is used. My choice of the TLS library
went on Botan, because it was the only one I managed to build successfully on
all the above-mentioned platforms (I really had a lot of trouble with OpenSSL
build attempts...)

This product, being born for personal use, and only in a second moment re-
thought for the community, is still in alpha stage, so use it with caution on
sensitive files. For this reason you won't find it neither on the Play Store
nor on F-Droid; however, the prebuilt, self-signed APK is available in the
Releases section of the Github page:
[https://github.com/pgp/XFiles/releases](https://github.com/pgp/XFiles/releases)

~~~
fock
Do you have some pictures of the UI (which is arguably the worst thing about
most OS file managers for android)? From the spec-sheet this looks great!

~~~
_pgp_
You can find the UI in the GIFs that illustrate some uses cases in the Demos
repo: [https://github.com/pgp/XFilesDemos](https://github.com/pgp/XFilesDemos)

I want to emphasize that I'm not an Android UI expert, so the solutions
implemented for some UI interactions may seem a little tricky.

~~~
Tistron
Can't view those pictures with my phone, github says they're too big.

~~~
0xdeadb00f
Spoof desktop and it works fine. There's an option in the context menu in
Firefox. Not sure about Chrome or Safari though.

~~~
Tistron
Thanks, didn't occur to me that they meant view size and not file size.

~~~
out_of_protocol
File size probably, limit for mobile view is different from desktop's

------
stewbrew
In the app store there already are several called xfiles - remember the TV
series with the same name? There is also the x-plore file explorer. Maybe they
reconsider the project's name.

