cryptonite
cryptonite copied to clipboard
TrueCrypt can't find working "mount" on Google Nexus 7 with motley kernel
From [email protected] on August 11, 2012 08:43:24
What steps will reproduce the problem? 1. Try to mount with truecrypt --fs-options="uid=1000,gid=1000,umask=00002" /sdcard/truectypt.tc /sdcard/truecrypt_mount What is the expected output? What do you see instead? Error: No such file or directory: /system/xbin/mount What version of the product are you using? On what operating system? Google Nexus 7 with motley kernel ( http://forum.xda-developers.com/showthread.php?t=1775798 ) and busybox. Please provide any additional information below. Changing "/system/xbin/mount" to "mount" (without full path) in the TrueCrypt patch (fed44244e881) results in: Error: Usage: mount [-r] [-w] [-o options] [-t type] device directory
Original issue: http://code.google.com/p/cryptonite/issues/detail?id=36
From [email protected] on August 11, 2012 00:44:38
Do you have any other version of "mount" on your device? Try find /system -name "mount" or find / -name "mount"
From [email protected] on August 13, 2012 12:05:48
find /system -name "mount" --> /system/bin/mount find / -name "mount" --> /system/bin/mount
From [email protected] on September 01, 2012 03:15:48
it may be of interest to you that i encounter the same errors described above when using the mount command from stock android on samsung galaxy s3 (Error: No such file or directory: /system/xbin/mount).
when i ln -s /system/bin/mount /system/xbin/mount i get the usage error described regarding patch (fed44244e881) (Error: Usage: mount [-r] [-w] [-o options] [-t type] device directory)
however when i use the mount from busybox, but with a relative path to my mount point i get the following:
root@android:/data/local # truecrypt /dev/block/mmcblk1p2 mp
%
Enter password for /dev/block/mmcblk1p2:
Enter keyfile [none]:
Protect hidden volume (if any)? (y=Yes/n=No) [No]:
Error: mount: mounting /dev/block/loop0 on /ac/mp failed: No such file or directory
maybe some strange truncation is happening to the path? (notice the /ac/mp problem)
when i use the full path: /data/local/mp the mount is successful! however i cannot unmount without rebooting.
From [email protected] on September 01, 2012 03:21:59
note also that after the relative path failure above i get the following:
root@android:/data/local # truecrypt -l
%
1: /dev/block/mmcblk1p2 /dev/block/loop0 -
root@android:/data/local # truecrypt -d
%
Error: umount
From [email protected] on September 01, 2012 12:37:47
@damonswirled: Have you been able to decrypt a truecrypt folder in the end on your Galaxy S3? If so, could you please:
- Tell us which truecrypt version you've used (cryptonite 0.6.17 or truecrypt-3.0)?
- Post a step by step guide?
- How exactly did you "use the mount from busybox"?
From [email protected] on September 01, 2012 14:02:28
@christoph.schmidthieber
i will note that i am NOT mounting a folder here, but a partition. i am not sure if that makes a difference to you.
- i am using the version 0.6.17
- to use the busybox "mount" command i symlinked /system/bin/mount to /system/xbin/mount. i did this because from what i gathered from your troubleshooting above, version 0.6.17 is hardcoded to xbin. this gets us our mount command, but the stock one doesn't work (Error: Usage: mount [-r] [-w] [-o options] [-t type] device directory). so i tried the busybox "mount" command to see if it was a problem with the stock mount command (actually a symlink to /system/bin/toolbox). i could have changed this link by hand, but i used the busybox gui to change it (for what it's worth).
root@android:/data/local # ll /system/bin/mount
lrwxrwxrwx 1 0 0 19 Sep 1 07:14 /system/bin/mount -> /system/bin/busybox*
root@android:/data/local # ll /system/xbin/mount
lrwxrwxrwx 1 0 0 17 Sep 1 07:02 /system/xbin/mount -> /system/bin/mount*
root@android:/data/local #
what i found at this point is that using the busybox mount command is in fact different from the toolbox one, and works with truecrypt 0.6.17 as long as i use an absolute path for my mountpoint argument. at this point i am able to save files and delete them on the truecrypt partition. i am however unable to unmount the truecrypt volume at this point, short of a reboot.
- here is an example of what i do *
- /dev/block/mmcblk1p2 is the second
- partition of my external sdcard *
root@android:/data/local # truecrypt /dev/block/mmcblk1p2 /mnt/extSdCard/
%
Enter password for /dev/block/mmcblk1p2:
Enter keyfile [none]:
Protect hidden volume (if any)? (y=Yes/n=No) [No]:
root@android:/data/local # truecrypt -l
%
1: /dev/block/mmcblk1p2 /dev/block/loop0 /mnt/extSdCard
root@android:/data/local # ll /mnt/extSdCard/
total 20
drwxrwxr-x 3 1000 1023 4096 Sep 1 09:40 ./
drwxrwxr-x 13 0 1000 0 Jan 19 1970 ../
drwxrwxr-x 2 0 0 16384 Sep 1 06:15 lost+found/
root@android:/data/local # echo asdf > /mnt/extSdCard/test
root@android:/data/local # ll /mnt/extSdCard/
total 24
drwxrwxr-x 3 1000 1023 4096 Sep 1 20:53 ./
drwxrwxr-x 13 0 1000 0 Jan 19 1970 ../
drwxrwxr-x 2 0 0 16384 Sep 1 06:15 lost+found/
-rw-rw-rw- 1 0 0 5 Sep 1 20:53 test
root@android:/data/local # cat /mnt/extSdCard/test
asdf
root@android:/data/local # rm /mnt/extSdCard/test
root@android:/data/local # ll /mnt/extSdCard/
total 20
drwxrwxr-x 3 1000 1023 4096 Sep 1 20:54 ./
drwxrwxr-x 13 0 1000 0 Jan 19 1970 ../
drwxrwxr-x 2 0 0 16384 Sep 1 06:15 lost+found/
root@android:/data/local # truecrypt -d
%
Error: umount
%
Error: umount
From [email protected] on September 01, 2012 14:18:45
Thanks. "truecrypt -d" might fail because umount is hard-coded to "/system/xbin/umount" in cryptonite 0.6.17. I was wondering whether you'd be able to make "/system/xbin/umount" call busybox's umount, as you did with mount?
From [email protected] on September 01, 2012 14:38:45
LOL of course you are right! in all the excitement i forgot to symlink /system/bin/umount to busybox. so i had:
root@android:/data/local # ll /system/bin/umount
lrwxr-xr-x 1 0 2000 7 May 23 14:31 /system/bin/umount -> toolbox*
root@android:/data/local # ll /system/xbin/umount
lrwxrwxrwx 1 0 0 18 Sep 1 07:03 /system/xbin/umount -> /system/bin/umount*
root@android:/data/local #
i have now changed it:
root@android:/data/local # ll /system/bin/umount
lrwxrwxrwx 1 0 0 19 Sep 1 21:31 /system/bin/umount -> /system/bin/busybox*
root@android:/data/local # ll /system/xbin/umount
lrwxrwxrwx 1 0 0 18 Sep 1 07:03 /system/xbin/umount -> /system/bin/umount*
root@android:/data/local #
and i get
root@android:/data/local # truecrypt -d
%
root@android:/data/local # truecrypt -l
%
Error: No volumes mounted.
1|root@android:/data/local #
success!
on a side note, any idea why the relative path is truncated/corrupted? i.e. "/data/local" -> "/ac" ?? seems kind of odd, and may point to something?
From [email protected] on September 01, 2012 14:46:19
Thanks for reporting. There's another truecrypt binary in the downloads section (truecrypt-3.0) that uses plain "mount" and "umount" without a hard-coded path. Would that be helpful at all?
Don't know what's happening with the relative path.
From [email protected] on September 01, 2012 14:48:58
are there any other changes to the truecrypt binary 3.0 beyond the mount path coding?
thanks for your prompt assistance!
From [email protected] on September 01, 2012 14:52:42
The full diff of tc-android.patch is here: rfed44244e881 It's a diff of a patch, which makes it a bit cryptic.
From [email protected] on September 01, 2012 15:06:45
looks like just the mount code changed.
thanks again!