neurodroid / cryptonite

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

Can't write to sd card #77

Open sagikazarmark opened 10 years ago

sagikazarmark commented 10 years ago

I get this message every time I try to mount an encfs volume. The mount point is writable, and encfs works fine from shell.

neurodroid commented 10 years ago

Do any of these workarounds work for you? https://github.com/neurodroid/cryptonite/issues/47 https://github.com/neurodroid/cryptonite/issues/71 https://github.com/neurodroid/cryptonite/issues/72

sagikazarmark commented 10 years ago

I tried: /storage/sdcard0/ /sdcard/

Neither of them worked. I cannot even choose a root path (so I cannot mount any encfs volumes). Cryptonite says: "Mounting is not supported on this phone". Which is simply not true.

I am on Android 4.2. Is there any debug log where we could check what happens?

Also, cryptonite did not ask for root permissions.

sagikazarmark commented 10 years ago

Tried the latest alpha as well.

neurodroid commented 10 years ago

Either /dev/fuse cannot be found (https://github.com/neurodroid/cryptonite/blob/master/cryptonite/src/csh/cryptonite/ShellUtils.java#L65), or for whatever reason your external storage isn't writable for the App (https://github.com/neurodroid/cryptonite/blob/master/cryptonite/src/csh/cryptonite/Cryptonite.java#L797). Scanning adb logcat for Cryptonite may be helpful.

sagikazarmark commented 10 years ago

Since encfs works fine from shell, I guess the second one.

But there is no external storage in the device, only the internal sd card. Well, not exactly. The internal sd is only 4 GB, and the data partition was too small. So I've put a microSD in the phone and repartitioned it, so the internal sd is now fully the data partition and the microSD works as the internal sd.

Still, I am pretty sure that /sdcard/cryptonite is writable.

sagikazarmark commented 10 years ago

It is interesting that I can create an encfs volume, just can't mount it.

/dev/fuse is available (encfs itself is working). Which busybox version is required?

neurodroid commented 10 years ago

Nothing to do with busy box, it's just this test that fails: https://github.com/neurodroid/cryptonite/blob/master/cryptonite/src/csh/cryptonite/Cryptonite.java#L797 Loooks like your unusual external storage layout isn't reported as MEDIA_MOUNTED by getExternalStorageState (https://developer.android.com/reference/android/os/Environment.html#getExternalStorageState())

sagikazarmark commented 10 years ago

Since there is no external storage...

Do you say that a phone without an external SD will not work with cryptonite?

neurodroid commented 10 years ago

What the Android SDK calls an "external" storage can be a removable storage media (such as an SD card) or an internal (non-removable) storage. See https://developer.android.com/guide/topics/data/data-storage.html#filesExternal for details.

sagikazarmark commented 10 years ago

Here is the referencing logcat: http://pastebin.com/YmdS4N8A

I just ran it on my device, so if you need the full log let me know, however I scanned it for the keyword "cryptonite" and these were the only one referring to encfs, mounting, etc.

neurodroid commented 10 years ago

Just to narrow down the problem: Is the mount button greyed out or can you actually press it?

sagikazarmark commented 10 years ago

I can actually press it. After pressing it I get the message in the title.

sagikazarmark commented 10 years ago

Just above the button there is the text: Mounting is not supported on this phone

neurodroid commented 10 years ago

That's a bit unusual - the mount button should be disabled. At any rate, there's no simple workaround that I know of. As I'm not actively maintaining the app at this time, your best bet is to send me a pull request that overrides externalStorageIsWritable if a preference checkbox has been enabled. Should be reasonably straightforward and probably you wouldn't even have to build the app (which is a bit of a pain because of all the C code).