neurodroid/cryptonite

Unable to view jpg files after mounting

thejaay opened this issue · 2 comments

Hello,

I have created an encrypted folder with encfs standalone and I got some trouble for reading jpg files, I have tried with with text file without any problem.
I have tried to activate FUSE debug option, following is what I got when trying to view the files
FUSE library version: 2.8.5
nullpath_ok: 0
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56
INIT: 7.18
flags=0x0000047b
max_readahead=0x00020000
INIT: 7.12
flags=0x00000011
max_readahead=0x00020000
max_write=0x00020000
unique: 1, success, outsize: 40


Opening a jpg file here

unique: 2, opcode: GETATTR (3), nodeid: 1, insize: 56
getattr /
unique: 2, success, outsize: 120


Opening a text file here

unique: 3, opcode: GETATTR (3), nodeid: 1, insize: 56
getattr /
unique: 3, success, outsize: 120
unique: 4, opcode: GETATTR (3), nodeid: 1, insize: 56
getattr /
unique: 4, success, outsize: 120
unique: 5, opcode: GETATTR (3), nodeid: 1, insize: 56
getattr /
unique: 5, success, outsize: 120
unique: 6, opcode: LOOKUP (1), nodeid: 1, insize: 54
LOOKUP /DSCN0230.data
getattr /DSCN0230.data
NODEID: 2
unique: 6, success, outsize: 144
unique: 7, opcode: OPEN (14), nodeid: 2, insize: 48
open flags: 0x20000 /DSCN0230.data
open[28737896] flags: 0x20000 /DSCN0230.data
unique: 7, success, outsize: 32
unique: 8, opcode: READ (15), nodeid: 2, insize: 80
read[28737896] 4096 bytes from 0 flags: 0x20000
read[28737896] 95 bytes from 0
unique: 8, success, outsize: 111
unique: 9, opcode: GETATTR (3), nodeid: 2, insize: 56
fgetattr[28737896] /DSCN0230.data
unique: 9, success, outsize: 120
unique: 10, opcode: FLUSH (25), nodeid: 2, insize: 64
flush[28737896]
unique: 10, success, outsize: 16
unique: 11, opcode: RELEASE (18), nodeid: 2, insize: 64
release[28737896] flags: 0x20000
unique: 11, success, outsize: 16

If I move the file outside the unencrypted folder (to any random folder not managed by FUSE) the image can be viewed, so I'm assuming the decoding is OK. I am using a folder explorator to acces my file, when Android gallery application open up, no image is shown and I got "Permission denied" in LogCat console (may be a side effect as FUSE cannot properly open it)

Concerning my configuration I am using the latest encfs-armv7a binary to run on my phone (found in https://github.com/neurodroid/cryptonite/releases 18/02/2015).
I'm also using CyanoGenMod 10.1 on XPeria-Z1.

Thx

Edit :
I have been able to read the file by setting permissions on the mounted folder, so my problem is solved, but that don't explain why I have been able to read a text file but not an image withotu setting permissions

What was the permission you've set? Did you set it with the mount command (-o uid=...,gid=...,umask=...)?

I've a problem that look a bit like yours.

In F-Stop images are visible, but F-Stop will freeze when I swipe through the images very fast (waiting less than 2s. before swiping).
Something similar happened with Quickpic. Quickpic didn't freeze, but I think encfs crashed, because the encrypted directory disappeared from the file explorer (Root Explorer). Remounting the encfs-volume brings the directory back again.