Comments (35)
From [email protected] on April 15, 2012 13:21:16
Thanks for your bug report. How large is the partition that you would like to mount? Unfortunately I don't own a device that supports USB hosts and the emulator doesn't support FUSE so that this will be difficult for me to debug.
Owner: [email protected]
from cryptonite.
From [email protected] on April 16, 2012 05:01:02
How did you format the truecrypt partition? FAT, NTFS, EXT2/3/4, HFS+, ...?
from cryptonite.
From [email protected] on April 16, 2012 08:37:48
Sorry for the late reply, I'm only able to get back to you at around this time every day because of my job.
Partitions are pretty large (450 GiB and 250 GiB). They are both NTFS formatted but I don't think that poses any problem as NTFS is supported by the tablet and I've successfully mounted an NTFS formatted truecrypt container (but that was just a 100 MiB test one). I can try this with a partition of manageable size but that's going to take some time because I have to find a mass storage device with non-partitioned space (or make some).
I am an android developer so I can help to debug but you need to step me through the process as I've never ported or compiled native projects of this size (and never debugged a native process before). I develop under Windows. Contact me via email if that is an option.
from cryptonite.
From [email protected] on April 19, 2012 10:54:23
Thanks for your kind offer to help. Unfortunately, the native code is a real pain to compile and won't even work with the default ndk because of incomplete wchar support. If you still want to give it a go, contact me pm.
You will have noticed that the UI is quite ugly - I'd certainly appreciate some help on that front if that's interesting to you.
Concerning your original bug report, I suppose that there might be issues with files or volumes > 2GB on Android. I'll try to test that with a simple container.
Status: Started
from cryptonite.
From [email protected] on June 13, 2012 00:40:33
Recorded the same problem with Asus Slider sl101 w/ 320G usb drive w/ a 290G hidden truecrypt partition FAT formatted filesystem. CM9-RC0-TF101, 2.5.39.4-g8066a5a-dirtylivux@Tragon.
from cryptonite.
From [email protected] on July 02, 2012 07:49:15
I have the same problem, I think, with a encrypted file (not partition) of 3.75 gb (so it fits on the fat32 SD card of my phone).
from cryptonite.
From [email protected] on July 03, 2012 14:51:28
Same with Iconia Tab A200, 2TB USB HDD, EXT3.
from cryptonite.
From [email protected] on July 14, 2012 12:31:00
I was able to mount 5 GB TC volume residing on NTFS formatted sdcard. However, the following source file needs to be modified:
TrueCrypt/Platform/Unix/File.cpp
In File::Length method:
//off_t current = lseek (FileHandle, 0, SEEK_CUR);
loff_t current = lseek64 (FileHandle, 0, SEEK_CUR);
throw_sys_sub_if (current == -1, wstring (Path));
SeekEnd (0);
//uint64 length = lseek (FileHandle, 0, SEEK_CUR);
uint64 length = lseek64 (FileHandle, 0, SEEK_CUR);
SeekAt (current);
return length;
In File::SeekAt method:
//throw_sys_sub_if (lseek (FileHandle, position, SEEK_SET) == -1, wstring (Path));
throw_sys_sub_if (lseek64 (FileHandle, position, SEEK_SET) == -1, wstring (Path));
In File::SeekEnd method:
//throw_sys_sub_if (lseek (FileHandle, offset, SEEK_END) == -1, wstring (Path));
throw_sys_sub_if (lseek64 (FileHandle, offset, SEEK_END) == -1, wstring (Path));
In File::ReadAt method:
//ssize_t bytesRead = pread (FileHandle, buffer, buffer.Size(), position);
loff_t current = lseek64 (FileHandle, 0, SEEK_CUR);
throw_sys_sub_if (current == -1, string (Path));
SeekAt (position);
ssize_t bytesRead = read (FileHandle, buffer, buffer.Size());
SeekAt (current);
throw_sys_sub_if (bytesRead == -1, string (Path));
return bytesRead;
In File::WriteAt method:
//throw_sys_sub_if (pwrite (FileHandle, buffer, buffer.Size(), position) != (ssize_t) buffer.Size(), wstring (Path));
loff_t current = lseek64 (FileHandle, 0, SEEK_CUR);
throw_sys_sub_if (current == -1, string (Path));
SeekAt (position);
ssize_t bytesWritten = write (FileHandle, buffer, buffer.Size());
SeekAt (current);
throw_sys_sub_if (bytesWritten != (ssize_t) buffer.Size(), string (Path));
from cryptonite.
From [email protected] on July 15, 2012 03:29:52
This issue was closed by revision 6166ae8 .
Status: Fixed
from cryptonite.
From [email protected] on July 15, 2012 03:30:12
This issue was closed by revision 6fe47b5 .
from cryptonite.
From [email protected] on July 15, 2012 03:37:08
@pkalny: Thanks for the patch - much appreciated
@pikipirs @mail.bikash @laurenssimonis @HyperHacker: Please test the standalone binary that includes the patch and report back. It's available from the downloads section: https://cryptonite.googlecode.com/files/truecrypt
from cryptonite.
From [email protected] on July 15, 2012 04:48:49
tried mounting an external 2.7TB truecrypt partition formatted NTFS and got this:
ERROR: Failed to create a file or directory in a temporary directory.
Please make sure that the temporary directory exists, its security permissions allow you to access it, and there is sufficient disk space.
/sdcard/Android/data/csh.cryptonite/.truecrypt_aux_mnt256
The mount point was created as /sdcard/tc
will try again with a 8G fat formatted filesystem when its ready.
from cryptonite.
From [email protected] on July 15, 2012 04:54:03
@Christoph: You are welcome :-). I noticed a typo in the latest patch. The File::Length method still uses the 32-bit "off_t current" instead of the 64-bit "loff_t current".
from cryptonite.
From [email protected] on July 15, 2012 04:58:38
@mail.bikash: Thanks for testing. Supposedly some directories don't exist because the Cryptonite app hasn't set them up properly. Try:
mkdir /sdcard/Android/data/csh.cryptonite/
before mounting.
from cryptonite.
From [email protected] on July 15, 2012 05:07:53
@pkalny: Thanks for spotting this so quickly. Fixed in r271e819b9349 @ALL: New download link: https://cryptonite.googlecode.com/files/truecrypt-1.0
from cryptonite.
From [email protected] on July 15, 2012 05:37:01
Tried again with a newly created 8G fat formatted truecrypt filesystem using the new truecrypt-1.0 binary and directory fix @comment#14. worked like a charm, although did had to pass fs options so the mounted directory could be made readable. This is quantum leap and many thanks to christoph.schmidthieber and pkalny.
from cryptonite.
From [email protected] on July 15, 2012 06:07:03
I can confirm that the new truecrypt-1.0 binary can mount external FAT32 formatted 32 GB sdcard partition (using /dev/block/mmcblk1p1 for the TC volume name). There is, however, a problem when the partition is formatted using NTFS - the internal mount command fails with Invalid Argument error, even though the system (CM9) supports ntfs formatted external sdcards (in read-only mode). But well, I still call it a success :-).
from cryptonite.
From [email protected] on July 16, 2012 08:52:32
Just released 0.6.13 ( https://cryptonite.googlecode.com/files/cryptonite-ALPHA-0.6.13.apk ) that includes large volume support. A number of libraries have been updated so that I'm labelling it as ALPHA until I hear back from your tests on various devices. Thanks!
from cryptonite.
From [email protected] on July 17, 2012 19:58:10
can not mount external storage partitions https://cryptonite.googlecode.com/files/cryptonite-ALPHA-0.6.13.apk ) that
includes large volume support. A number of libraries have been updated so
that I'm labelling it as ALPHA until I hear back from your tests on various
devices. Thanks!
Thanks for the response! With this version I could successfully mount my
2TB USB EXT3 disk on my A200. I had to create a temporary directory as the
app told me. But there is an odd issue - no directories are visible. From
ES File Explorer I see only lost+found and the files in the root directory;
from the terminal, I can see the other directories but get an I/O error
trying to list them. The files I can see seem to read fine.
from cryptonite.
From [email protected] on July 18, 2012 02:20:17
@HyperHacker: Thanks for your feedback. Could be a permissions problem. Try to add
--fs-options="uid=1000,gid=1000,umask=0002"
or
--fs-options="uid=1000,gid=1015,umask=0002"
to your truecrypt options.
See issue #32 and FrequentlyAskedQuestions .
from cryptonite.
From [email protected] on July 18, 2012 03:46:21
On Jul 18, 2012 4:20 AM, <cryptonite
[email protected]@[email protected]
googlecode.com [email protected]> wrote:
@ christoph.schmidthieber@[email protected]:
Truecrypt can not mount external storage partitions
code.google.com
< https://code.google.com/p/cryptonite/issues/detail?id=18>/p/http://code.google.com/p/cryptonite/issues/detail?id=18 cryptonite < https://code.google.com/p/cryptonite/issues/detail?id=18 >
/issues/detail?
< https://code.google.com/p/cryptonite/issues/detail?id=18>idhttp://code.google.com/p/cryptonite/issues/detail?id=18 =18 < https://code.google.com/p/cryptonite/issues/detail?id=18 >
Try to add
That doesn't seem to be working either:
app_37@android:/ # mkdir /mnt/tc
app_37@android:/ # truecrypt --fs-options="uid=1000,gid=1000,umask=0002"
--mount
%
Enter volume path: /dev/block/sda
Enter mount directory [default]: /mnt/tc
Enter password for /dev/block/sda:
Enter keyfile [none]:
Protect hidden volume (if any)? (y=Yes/n=No) [No]:
Error: mount: mounting /dev/block/loop0 on /mnt/tc failed: Invalid argument
1|app_37@android:/ # truecrypt --fs-options="uid=1000,gid=1015,umask=0002"
--mount
%
Enter volume path: /dev/block/sda
Enter mount directory [default]: /mnt/tc
Enter password for /dev/block/sda:
Enter keyfile [none]:
Protect hidden volume (if any)? (y=Yes/n=No) [No]:
Error: mount: mounting /dev/block/loop0 on /mnt/tc failed: Invalid argument
1|app_37@android:/ #
The first attempt (without fs-options) also produced some messages in
logcat:
130|app_37@android:/ # logcat | grep crypt
I/ActivityManager( 141): START {act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x10200000
cmp=csh.cryptonite/.Cryptonite} from pid 383
I/ActivityManager( 141): Start proc csh.cryptonite for activity
csh.cryptonite/.Cryptonite: pid=11526 uid=10125 gids={1015, 3003}
D/dalvikvm(11526): Trying to load lib
/data/data/csh.cryptonite/lib/libcryptonite.so 0x40d270e8
D/dalvikvm(11526): Added shared lib
/data/data/csh.cryptonite/lib/libcryptonite.so 0x40d270e8
D/dalvikvm(11526): No JNI_OnLoad found in
/data/data/csh.cryptonite/lib/libcryptonite.so 0x40d270e8, skipping init
V/cryptonite(11526): EncFS 1.7.4 OpenSSL 1.0.0j 10 May 2012
E/cryptonite(11526): Couldn't decrypt DB access keys
I/cryptonite-jni(11526): checkGRoot(): Root volume is NULL
I/cryptonite-jni(11526): checkGRoot(): Root volume is NULL
V/cryptonite(11526): EncFS mount state: false; FUSE support: true
I/cryptonite-jni(11526): checkGRoot(): Root volume is NULL
V/cryptonite(11526): EncFS mount state: false; FUSE support: true
I/cryptonite-jni(11526): checkGRoot(): Root volume is NULL
I/ActivityManager( 141): Displayed csh.cryptonite/.Cryptonite: +823ms
I/cryptonite-jni(11526): checkGRoot(): Root volume is NULL
I/cryptonite-jni(11526): checkGRoot(): Root volume is NULL
V/cryptonite(11526): Terminal Emulator version: 1.0.44
V/cryptonite(11526): EncFS mount state: false; FUSE support: true
I/cryptonite-jni(11526): checkGRoot(): Root volume is NULL
Also interesting, the missing directories show up when doing "ls" but not
"ls -l". "stat" also gives an I/O error, so I wonder if ls isn't just
ignoring those it can't stat.
(Sorry if this gets sent twice.)
from cryptonite.
From [email protected] on July 18, 2012 03:55:41
can not mount external storage partitions
Try to add
More info; looking at dmesg, I see both EXT3-fs and EXT4-fs complaining
"unrecognized mount option or missing value" for all three options
(uid,gid,umask). Also warnings about "deleted inode referenced" and "unable
to read inode block".
from cryptonite.
From [email protected] on July 20, 2012 14:40:28
@pkalny: See issue #34 regarding ntfs problems
from cryptonite.
From [email protected] on July 20, 2012 15:13:23
can not mount external storage partitions
Does cryptonite make some changes to the OS? I noticed when I plugged my
external disk in, it reported my SD card was unexpectedly removed. I didn't
think anything of it, but now it's stopped detecting the card entirely.
from cryptonite.
From [email protected] on July 20, 2012 16:38:38
@HyperHacker: TrueCrypt doesn't change your OS, but it will attempt to find a free loopback device to mount the TrueCrypt volume. The code is essentially the same as on Linux. All loopback devices should be freed after a reboot. Does the problem persist when you reboot (without running TrueCrypt)?
from cryptonite.
From [email protected] on July 20, 2012 21:04:09
Tested the latest alpha build (0.6.15)to mount a FAT formatted hidden 28GB truecrypt volume on a 32GB sdcard and encountered missing files. The volume mounts fine but the files inside the directory do not show up (The directories do show up though). I am using the filesystem options (uid,gid,umask). Nothing specific shows up on logcat to report.
from cryptonite.
From [email protected] on July 20, 2012 22:11:38
Just tested another theory and found #26 definitely happens when using a hidden partition. Standard partition mounts and works better, although files in few folders still end up as missing/not showing.
from cryptonite.
From [email protected] on July 21, 2012 22:12:27
can not mount external storage partitions
find a free loopback device to mount the TrueCrypt volume. The code is
essentially the same as on Linux. All loopback devices should be freed
after a reboot. Does the problem persist when you reboot (without running
TrueCrypt)?
Actually even the recovery menu can't see SD cards now, so I guess it's
just a well-timed hardware failure.
from cryptonite.
From [email protected] on July 23, 2012 03:55:09
I'm re-opening this issue because some users are still reporting problems with volumes > 2 GB.
Summary: Truecrypt can not mount volumes > 2 GB
Status: Started
from cryptonite.
From [email protected] on July 23, 2012 03:55:50
Issue 35 has been merged into this issue.
from cryptonite.
From [email protected] on July 24, 2012 09:58:53
Hi all,
first i want to give many thanks to Christhoph
for his work and wiki: BuildInstructions !!!
truecrypt is very difficult to build in the android environment
and his guide was very usefoul to me.
I have experimented issues with truecrypt on volumes > 2GB so ...
i have analyzed the code and found some other patches to apply to solve the bug.
First please looking at Comment 8 of Issue 18 and notice the 64 bit file pointer patch into File.cpp
Well, i discovered other places where that kind of fix must be made
becouse android defaults to an off_t type of 32 bits, but TrueCrypt
assumes that off_t should be 64 bits.
Notice that the android off_t type is a signed integer so
cannot represent a file pointer greater than 2GBytes.
Same issue for the android's default pread&pwrite that cannot point over 2 GB file limit.
NOTICE : The actual TrueCrypt executable installed with cryptonite-ALPHA-0.6.15.apk
could damage your encrypted volumes if used for writing on a volume > 2GB.
This is due to the file pointers that wraps around 2GB limit.
Now the patch instructions
-
Patch fuse source tree using (from the fuse root dir.)
sed -i 's/off_t/loff_t/g' *
sed -i 's/off_t/loff_t/g' include/* -
Patch fusexmp.c
.... patch the pwrite
// res = pwrite(fd, buf, size, offset);
loff_t current = lseek64 (fd, 0, SEEK_CUR);
lseek64 (fd, offset, SEEK_SET);
ssize_t bytesWritten = write (fd, buf, size);
lseek64 (fd, current, SEEK_SET);
res = bytesWritten;
.... and patch the pread
// res = pread(fd, buf, size, offset);
loff_t current = lseek64 (fd, 0, SEEK_CUR);
lseek64 (fd, offset, SEEK_SET);
ssize_t bytesRead = read (fd, buf,size);
lseek64 (fd, current, SEEK_SET);
res = bytesRead;
You can notice that whitout these 2 patches nor fuse package can manage files over 2GB limit
-
Patch FuseService.cpp in TrueCrypt source code (from the directory of FuseService.cpp)
sed -i 's/off_t/loff_t/g' FuseService.cpp -
Recompile fuse and then TC. that's all.
bye.
from cryptonite.
From [email protected] on July 24, 2012 11:33:03
@il2am0000: Thanks for the patch. Applied in ra0fedeaafdc4 and rd4578c84f3c1 .
Patched standalone TrueCrypt binary and Cryptonite apk (0.6.16 alpha) are available from the downloads section: https://code.google.com/p/cryptonite/downloads/list Let me know it this works.
from cryptonite.
From [email protected] on July 24, 2012 14:28:08
An early test with truecrypt installed by 0.6.16 alpha is ok.
I have re-downloaded the source and check the fix and all are ok.
from cryptonite.
From [email protected] on July 24, 2012 14:31:40
@il2am0000: Thanks for again for the patch and for testing. Are the 3000MB and 4000MB ext4 partitions that you mentioned in issue #35 all working now?
from cryptonite.
From [email protected] on July 24, 2012 17:55:03
yes, really , this time, i have try with a 6GB partition on external sd card (i have deleted
the 3G and 4G test partition) ; newer truecrypt has crated correctly the volume and the ext4 filesystem and can mount it with no flaw.
Previous tc binary cannot create nor mount an ext4 filesystem >2GB on
a partition of external sd card.
I will made some other tests : eg fulfill the 6G drive with a lot of videos and
see they working allright. i'll let you know
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.