Browse Source

Better build explanation

new-home-ui v1.7.2
Hardcore Sushi 4 months ago
Signed by: hardcoresushi
GPG Key ID: 007F84120107191E
  1. 47
  2. 4
  3. 9
  4. 2


@ -8,7 +8,7 @@ It currently only works with [gocryptfs]( b
<img src="" height="500">
# Disclamer
# Disclaimer
DroidFS is provided "as is", without any warranty of any kind.
It shouldn't be considered as an absolute safe way to store files.
DroidFS cannot protect you from screen recording apps, keyloggers, apk backdooring, compromised root accesses, memory dumps etc.
@ -48,7 +48,7 @@ It is strongly recommended to read the documentation of a feature before enablin
You can download DroidFS from [F-Droid]( or from the "Releases" section in the repo.
APKs availables here are signed with my PGP key available on keyservers:
APKs available here are signed with my PGP key available on keyservers:
`gpg --keyserver hkp:// --recv-keys 007F84120107191E` \
Fingerprint: `BD5621479E7B74D36A405BE8007F84120107191E` \
@ -88,11 +88,16 @@ DroidFS use some parts of the original gocryptfs code, which is designed to run
# Build
Most of the original gocryptfs code was used as is (written in Go) and compiled to native code. That's why you need [Go]( and the [Android Native Development Kit (NDK)]( to build DroidFS from source.
#### Install Requirements
- [Android Studio](
- [Android NDK and CMake]( (OpenSSL build fails with NDK versions higher than v22. It should pass with NDK v21.4.7075529 and lower)
- [Go]( (on debian: `$ sudo apt-get install golang-go`)
#### Install dependencies
On debian:
$ sudo apt-get install build-essential pkg-config libssl-dev
Install [Go](
$ sudo apt-get install golang-go
You also need to install the Android SDK build tools and the [Android NDK](
#### Download Sources
@ -123,28 +128,32 @@ $ cd app/ffmpeg
$ git clone --depth=1
#### Build
First, we need to install some dependencies:
$ sudo apt-get install libcrypto++-dev libssl-dev pkg-config
#### Generate a keystore
APKs must be signed to be installed on an Android device. If you don't already have a keystore, you can generate one by running:
And also Go dependencies:
$ keytool -genkey -keystore <output file> -alias <key alias> -keyalg EC -validity 10000
$ go get
Then, retrieve your Android NDK installation path, usually someting like "/home/\<user\>/Android/SDK/ndk/\<NDK version\>". We can now build libgocryptfs:
#### Build
Retrieve your Android NDK installation path, usually something like "/home/\<user\>/Android/SDK/ndk/\<NDK version\>". Now you can build libgocryptfs:
$ cd DroidFS/app/libgocryptfs
$ env ANDROID_NDK_HOME="<your ndk path>" OPENSSL_PATH="./openssl-1.1.1m" ./
And also FFmpeg:
Then FFmpeg:
$ cd app/ffmpeg
$ env ANDROID_NDK_HOME="<your ndk path>" ./ ffmpeg
Then, open the DroidFS project with Android Studio. \
If a device (virtual or physical) is connected, just click on "Run". \
If you want to generate a signed APK, you can follow this [post](
Finally, compile the app:
$ ./gradlew assembleRelease
If the build succeeds, you will find the unsigned APKs in `app/build/outputs/apk/release/`. You need to sign them in order to install the app:
$ apksigner sign --out droidfs.apk -v --ks <keystore> app/build/outputs/apk/release/<unsigned apk file>
Now you can install `droidfs.apk` on your device.
# Third party code
Thanks to these open source projects that DroidFS uses:


@ -14,8 +14,8 @@ android {
applicationId "sushi.hardcore.droidfs"
minSdkVersion 21
targetSdkVersion 29
versionCode 21
versionName "1.7.1"
versionCode 22
versionName "1.7.2"
ndk {
abiFilters "x86", "x86_64", "armeabi-v7a", "arm64-v8a"


@ -1,9 +1,11 @@
if [ -z ${ANDROID_NDK_HOME+x} ]; then
echo "Error: \$ANDROID_NDK_HOME is not defined."
echo "Error: \$ANDROID_NDK_HOME is not defined." >&2
exit 1
elif [ $# -lt 1 ]; then
echo "Usage: $0 <FFmpeg source directory> [<ABI>]"
echo "Usage: $0 <FFmpeg source directory> [<ABI>]" >&2
exit 1
compile_for_arch() {
@ -76,7 +78,8 @@ else
mkdir -p build/$1/libavformat build/$1/libavcodec build/$1/libavutil &&
cp $FFMPEG_DIR/libavformat/*.h $FFMPEG_DIR/libavformat/ build/$1/libavformat &&
cp $FFMPEG_DIR/libavcodec/*.h $FFMPEG_DIR/libavcodec/ build/$1/libavcodec &&
cp $FFMPEG_DIR/libavutil/*.h $FFMPEG_DIR/libavutil/ build/$1/libavutil
cp $FFMPEG_DIR/libavutil/*.h $FFMPEG_DIR/libavutil/ build/$1/libavutil ||
exit 1
export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH


@ -1 +1 @@
Subproject commit b232bb782605eb0c6b23aef5f7ea56fd5bd3b7fd
Subproject commit 1da2407a614f17a3c64d14ee34fb41e081db9a71