neurodroid / cryptonite

EncFS and TrueCrypt on Android
GNU General Public License v2.0
204 stars 49 forks source link

EncFS 1.8.1/master #98

Open BlueMax opened 9 years ago

BlueMax commented 9 years ago

Hi, can we give it a new try? I know encfs 1.7.5 was problematic but many things have changed (Android 5.1.1, updated bionic/libc, encfs 1.8.1/master,..). I think encfs master branch (20.Aug+) would be best. Regarding to Github readme the master branch is not the dev branch and should be stable. I can test the binaries on Android 5.1.1/CM12.1.

What do you think?

viche12345 commented 8 years ago

Hi, I know it's been a while, but did you have any luck testing this new binary? I'm also on Android 5.1/CM 12.1 and somehow am having a very similar issue as yours way before, #85, where encfs suddenly stops after some file operations, requiring a remount.

Is 1.8.1 any better?

BlueMax commented 8 years ago

I cannot compile it. Neurodroid needs to publish a new build first.

neurodroid commented 8 years ago

I've patched encfs 1.8.1 and updated FUSE. Unfortunately I don't have the resources to build and publish binaries for development versions any longer. You'll have to build them yourself. Updated build instructions are here: https://github.com/neurodroid/cryptonite/wiki/Build-Instructions Let me know how it goes.

viche12345 commented 8 years ago

Unfortunately, I didn't get very far. I've set up the NDK and toolchain, but I'm stuck at the Boost instructions. $ ./build.sh ‘../user-config.jam’ -> ‘./tools/build/v2/user-config.jam’ ./build.sh: line 5: bjam: command not found

BlueMax commented 8 years ago

I've compiled boost 1.6.0 with clang38 successfully. I don't say its working, just that it compiles without errors so far. :) 1) Use boost 1.6.0 official source 2) ./bootstrap.sh 3) Replace project-config.jam with file below. Change settings accordingly. 4) Start compiling with: b2 link=static runtime-link=static toolset=clang | tee log.txt I'm not sure if this all make sense or is correct. This is still WIP.

clang must be in path. I have defined this:

export NDK=/home/user/Android/android-ndk-20160101
export PATH=~/Android/android-ndk-20160101/toolchains/llvm/bin:$PATH
export CROSS_COMPILE=llvm-
export SYSROOT=$NDK/platforms/android-21/arch-arm
export CC="clang --sysroot=$SYSROOT"
export CFLAGS="-O3 -mtune=cortex-a15 -mfpu=neon-vfpv4 -mfloat-abi=softfp"
export CXXFLAGS="${CFLAGS}"
export CXX="clang++ --sysroot=$SYSROOT"

project-config.jam:

# Boost.Build Configuration
# Automatically generated by bootstrap.sh

import option ;
import feature ;

# Compiler configuration. This definition will be used unless
# you already have defined some toolsets in your user-config.jam
# file.

using clang : arm : clang++ :
<compileflags>--target=thumbv7-none-linux-androideabi
<compileflags>--sysroot=/home/user/Android/android-ndk-20160101/platforms/android-21/arch-arm
<compileflags>-O3
<compileflags>-march=armv7-a
<compileflags>-mthumb
<compileflags>-mcpu=cortex-a15
<compileflags>-mfpu=neon-vfpv4
<compileflags>-mfloat-abi=softfp
<compileflags>-ffast-math
<compileflags>-fno-strict-aliasing
<compileflags>-std=c++11
<compileflags>-DNDEBUG
<compileflags>-I/home/user/Android/android-ndk-20160101/platforms/android-21/arch-arm/usr/include
<compileflags>-I/home/user/Android/android-ndk-20160101/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include
<compileflags>-I/home/user/Android/android-ndk-20160101/sources/cxx-stl/gnu-libstdc++/include
;

project : default-build <toolset>gcc ;

# List of --with-<library> and --without-<library>
# options. If left empty, all libraries will be built.
# Options specified on the command line completely
# override this variable.
libraries =  --with-serialization ;

# These settings are equivivalent to corresponding command-line
# options.
option.set prefix : /home/user/encfs/boost ;
option.set exec-prefix : /home/user/encfs/boost ;
option.set libdir : /home/user/encfs/boost/lib ;
option.set includedir : /home/user/encfs/boost/include ;

# Stop on first error
option.set keep-going : false ;

@neurodroid Not sure if that reflects your actual build environment but your gcc wrapper scripts show armv5 and at least Boost armv7. Mixing up (linking) different ABIs should better be avoided. Could lead to funny things.

neurodroid commented 8 years ago

@BlueMax Thanks for looking into this. Will test 1.60.0 soon. There are two wrapper scripts, agcc and agcc-vfp. I've abandoned agcc with the latest commits. agcc-vfp builds for arm-v7a but doesn't use all optimisations under the sun - Tegra 2 for example doesn't support the full neon instruction set.

neurodroid commented 8 years ago

@viche12345 I've updated boost to 1.60.0 and fixed the build toolchain (2c7c36b). Please test.