Comments (19)
From [email protected] on May 16, 2012 13:02:36
While I can reproduce this error, I have no idea what is causing it. Maybe the busybox/bionic flavour of df can't deal with nodev mounts? How exactly do you "mount bind" to the encfs mount point?
from cryptonite.
From [email protected] on May 16, 2012 13:11:46
mount -o bind /mnt/encfs/bilder /mnt/sdcard/DCIM
from cryptonite.
From [email protected] on May 31, 2012 14:01:04
"mount -o bind' seems to work for some users (see issue #28 ) while df fails so that I'm not sure whether the df problem is related at all. What's the error message when you try to execute "mount -o bind'?
from cryptonite.
From [email protected] on June 01, 2012 09:37:43
mount bind works. the only problem is the camera app refused to work when i bind the dcim folder. i think becaus it cannot stat the free space.
from cryptonite.
From [email protected] on September 13, 2012 08:34:07
Problem located not in cryptonite itself, but in .../encfs-1.7.4/encfs/encfs.cpp: encfs_statfs() function.
This handler not implemented for Android and do nothing, just return status -EIO.
As result system can't get statfs data for encfs mount point and can't show free space on the volume. Many programs can't handle this situation.
If you do replacement(converter) code from missing function statvfs() to statfs() function from Android NDK and try recompiled encfs binary, you'll see df command show stats now.
I'm perform some tests with this code:
...
#include <sys/vfs.h>
...
// statfs works even if encfs is detached..
int encfs_statfs(const char *path, struct statvfs *st)
{
EncFS_Context *ctx = context();
int res = -EIO;
//ifndef ANDROID //TODO: find equivalent for Android
try
{
(void)path; // path should always be '/' for now..
rAssert( st != NULL );
string cyName = ctx->rootCipherDir;
rLog(Info, "doing statfs of %s", cyName.c_str());
struct statfs buf;
memset(&buf,0,sizeof(buf));
res = statfs(cyName.c_str(), &buf);
//res = statvfs( cyName.c_str(), st );
if(!res)
{
st->f_bsize=buf.f_bsize;
st->f_frsize=buf.f_frsize;
st->f_blocks=buf.f_blocks;
st->f_bfree=buf.f_bfree;
st->f_bavail=buf.f_bavail;
st->f_files=buf.f_files;
st->f_ffree=buf.f_ffree;
st->f_favail=buf.f_ffree;
st->f_fsid|=buf.f_fsid.__val[1];
st->f_fsid<<=16;
st->f_fsid|=buf.f_fsid.__val[0];
st->f_flag=0;
st->f_namemax=buf.f_namelen;
// adjust maximum name length..
st->f_namemax = 6 * (st->f_namemax - 2) / 8; // approx..
}
if(res == -1)
res = -errno;
} catch( rlog::Error &err )
{
rError("error caught in statfs");
err.log( _RLWarningChannel );
}
//endif
return res;
}
from cryptonite.
From [email protected] on September 13, 2012 09:03:25
Thanks for the info. Will try to test your patch this weekend. If you have some time, could you try to modify encfs-android.patch so that it incorporates your changes? That would make it easier to apply your patch. There's a helper script (mkpatch.sh) to generate the patch.
from cryptonite.
From [email protected] on September 14, 2012 10:03:40
Patch generated by mkpatch.sh
This monkey code need to be tested, because some differences in POSIX stavfs() and old style statfs()
Attachment: encfs-android.patch
from cryptonite.
From [email protected] on September 15, 2012 12:20:23
Applied in r728d0e309fd6 . BuildInstructions have changed considerably:
- The 0.6 branch has been merged with master.
- The latest encfs svn code is now part of the git repository.
- Boost is not required any more as a consequence.
- Tinyxml and protobuf were added as new dependencies.
Thanks for the patch. df works for me now.
@betaface: A patched version of the encfs binary is available from the [ https://code.google.com/p/cryptonite/downloads/list downloads] section. Please test and report back.
from cryptonite.
From [email protected] on September 15, 2012 12:20:52
Status: Started
Owner: [email protected]
from cryptonite.
From [email protected] on September 16, 2012 01:36:59
yes it works....
from cryptonite.
From [email protected] on October 01, 2012 10:33:44
Status: FixVerified
from cryptonite.
From [email protected] on December 29, 2012 04:26:05
I can confirm this problem being still present on Cryptonite 0.7.6 installed from Google Play.
I have some folders in a ENCFS mountpoint, one of those folder is the DCIM that is bound to /sdcard/DCIM like this:
busybox mount -o bind /sdcard/descrypted_folder/DICM /sdcard/DCIM
With Cryptonite 0.7.6 I still get "Can't access SD Card" (in another language) as soon as I open the stock Camera APP (CyanogenMod 9.1 with GApps). The Camera App succeeds in creating the "/sdcard/DCIM/Camera" folder, but it fails on statfs.
The logcat reads:
E/ ( 3417): statfs /mnt/sdcard/DCIM/Camera failed, errno: 5
(..)
I/CameraStorage( 3417): Fail to access external storage
I/CameraStorage( 3417): java.lang.IllegalArgumentException
I/CameraStorage( 3417): at android.os.StatFs.native_setup(Native Method)
I/CameraStorage( 3417): at android.os.StatFs.(StatFs.java:32)
I/CameraStorage( 3417): at com.android.camera.Storage.getAvailableSpace(Storage.java:127)
I/CameraStorage( 3417): at com.android.camera.Camera.checkStorage(Camera.java:1496)
I/CameraStorage( 3417): at com.android.camera.Camera.initializeFirstTime(Camera.java:476)
I/CameraStorage( 3417): at com.android.camera.Camera.access$700(Camera.java:86)
I/CameraStorage( 3417): at com.android.camera.Camera$MainHandler.handleMessage(Camera.java:313)
I/CameraStorage( 3417): at android.os.Handler.dispatchMessage(Handler.java:99)
I/CameraStorage( 3417): at android.os.Looper.loop(Looper.java:137)
I/CameraStorage( 3417): at android.app.ActivityThread.main(ActivityThread.java:4575)
I/CameraStorage( 3417): at java.lang.reflect.Method.invokeNative(Native Method)
I/CameraStorage( 3417): at java.lang.reflect.Method.invoke(Method.java:511)
I/CameraStorage( 3417): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
I/CameraStorage( 3417): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
I/CameraStorage( 3417): at dalvik.system.NativeStart.main(Native Method)
I downloaded and replaced 0.7.6 encfs with the "encfs binary with df support" ( https://code.google.com/p/cryptonite/downloads/detail?name=encfs&can=1&q= ) you published on September, and the Camera app now works just fine!
The problem is: shouldn't this fix be included in any late release Cryptonite release?! Is this a regression?
Thank you.
from cryptonite.
From [email protected] on January 01, 2013 03:21:09
This issue was closed by revision 6f2779f .
Status: Fixed
from cryptonite.
From [email protected] on January 01, 2013 03:23:24
Thanks for reporting. The patch had only been applied to the development version of encfs. I've backported it to encfs 1.7.4 so that this should be fixed in the next release.
from cryptonite.
From [email protected] on January 01, 2013 11:46:57
Please test the latest alpha (0.7.7): https://code.google.com/p/cryptonite/downloads/list
from cryptonite.
From [email protected] on January 02, 2013 02:28:26
The 0.7.7 alpha works just fine, "df" reports the free space, and the Camera app works just fine.
Thank you!
from cryptonite.
From [email protected] on April 10, 2013 11:14:53
Tested df with aplha 0.7.7 and it still appears to be broken.
from cryptonite.
From [email protected] on May 09, 2013 01:40:31
on my new galaxy s4 the problem reappears with the original samsung firmware :(
from cryptonite.
From [email protected] on May 09, 2013 05:07:27
ok https://code.google.com/p/cryptonite/downloads/detail?name=encfs&can=1&q= works..why is this patch not in the latest alpha..but anyways..thanx that we have encfs on android robert :D
from cryptonite.
Related Issues (20)
- It doesn't work on Android 6, isn't it? HOT 1
- truecrypt PIE HOT 3
- android 6 mounting visibility issue HOT 6
- Not compatible with Windows EncFS apps HOT 2
- Mounting fails without error message HOT 1
- Contribute cryptonite to f-droid HOT 5
- OSX fuse usage HOT 5
- Mount dropsynch - synched folder as volume?
- New instructions HOT 3
- Binaries for Intel x86/x64
- How do I mount TrueCrypt'd Flashdrive? HOT 1
- Truecrypt - Error: Cannot convert from the charset 'encoding - 1' HOT 4
- Getting error when attempting to open files
- Create volume on external storage? HOT 2
- New Maintainer(s) Needed?
- Error in building encfs on Ubuntu 16.04 HOT 2
- Dropbox API v1 shutdown, sync not work HOT 1
- Mount failed on a Lenovo rooted device running with lollipop 5.1.
- Lineage Oreo 8.1: Mounts ok, but the mounted folder is empty
- Is cryptonite still active? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cryptonite.