FORUMS
Remove All Ads from XDA

[APP] LUKS Manager [v2.3] - Encrypted volumes via loopback for rooted phones

15 posts
Thanks Meter: 21
 
By Nemesis][, Junior Member on 26th June 2011, 01:50 AM
Post Reply Email Thread
Introduction

This is my first Android application and I'm looking for testers and feedback.

LUKS Manager

LUKS Manager provides on-the-fly encryption (AES by default) to virtual folders on Android devices.
The virtual folders can be dynamically mounted, unmounted, created and deleted as needed.
(Think TrueCrypt like functionality)

Volumes and loopback device information are stored in: /mnt/sdcard/luks/.data
And the encrypted volumes are mounted at: /mnt/sdcard/luks/<volume_name>

Requirements

The Android device must:
  • Be rooted
  • Have a kernel that supports secure dm-crypt modes and loopback devices
  • Have a current version of BusyBox installed
  • Have SuperUser app installed

This package contains:
  • A statically compiled, stripped and UPX compressed version of cryptsetup for the ARM using the tools provided by the The Guardian Project.
  • A statically compiled and stripped version of mkdosfs from dosfstools package for the ARM7.
  • A bash shell script called "luks" that does volume management.
  • And a native java app that provides a GUI interface to the luks script, a basic file explorer and simple text editor.

Download

You can find more on the apps homepage at:

nemesis2.qx.net/pages/LUKSManager/

Or the Android Market:

market.android.com/details?id=com.nemesis2.luksmanager

Changelog

Version 2.3:
Major rewrite to the luks shell script and GUI app to support user defined volume locations.
Encryption cipher and keysize are now user definable. (kernel support required)
Moved storage of volume information from /mnt/sdcard/luks/.data to /data/data/com.nemesis2.luksmanager/.data
Prompts to upgrade if loop device files are found in SDCard .data directory.
Removed top level restriction on file explorer activity.
Default file system changed from EXT4 to EXT2.
FAT file system support now enabled by default.
Added volume mount and unmount desktop shortcuts.
Added notification when volumes are mounted. (Can be toggled off in preferences)
Added landscape support to the main and volume edit activities.
Added basic SDcard support to install binaries routine.
(Fixes java.lang.NullPointerException on binary install.)
Added toggle to disable binary hash checks on startup. This enables
customized luks scripts and/or binaries.
Small fix to application initialization. (hopefully fixes odd reboot
issue on some devices)
Attempts to unmount volumes on ACTION_SHUTDOWN and MEDIA_EJECT broadcasts.
Additional checks and error handling if no volumes exist.
Additional error handling in luks script during volume mounting and creation.
Added required BusyBox applet checks on startup.
About Dialog additions / changes.
Small text changes (formatting and typo fixes).

Version 2.2:
Recompiled lm.crypsetup binary under android-ndk-r6b.
Hopefully this will stop segfaults on various devices.

Version 2.1:
Added widget:
When volumes are mounted the widget will turn red and display the number of currently mounted volumes.
A single touch unmounts all volumes.
Rewrote luks script and internal routines to use busybox all the time to avoid toolbox/busybox symlink conflicts.
Added the ability to password protect the create/remove buttons, volume properties and preferences dialog.
Improved error handling in luks script on mount.
Added additional scripts: pre-mount and pre-unmount.
Added volume management Activity.
Volume mount points are now user defineable.
The volumes loopback device is now user definable.
Added an internal file editor (to edit bash scripts).
(Editor can be used outside of LUKS Manager to edit files).
Fixed Force Close when mounting with a blank password.

Version 2.0: Added Preferences Activity.
Now allows FAT formatted volumes.
(works w/FreeOTFE on windows)
Improved error handling/cleanup on failed volume creation.
Added lm.mkdosfs binary to assets.
The lm.mkdosfs binary is sha1 hashed and replaced if out-dated or changed.
Remove Binaries nows includes the lm.mkdosfs binary.
Added additional menu options to Activities.
Increased debug logging and added system probe.
(Don't enable for normal usage!)
Added option to launch Explorer on volume mount.
Redirected stderr to stdout using redirectErrorStream.
Added validation checks to volume creation. (non-blank, sanitize filename).
Moved to dp units instead of pixels for display scaling.
Fixed a few items that needed to be .destroyed (oops).
SD Card path fix (typo fix).
File Explorer now saves/recalls list view position on directory changes and when opening files.
About Dialog updates.
Added run script on mount/unmount: <volume>.mount.sh and <volume>.unmount.sh
Added su/root check on startup.

Version 1.9:Renamed cryptsetup to lm.cryptsetup to avoid overwriting pre-existing copies.
LUKS script will use cryptsetup if it exists, solves Samsung Galaxy S2 issues.
(Users will need to manually restore the cryptsetup binary if it was overwritten!)
Added sanity checks to File Explorer. (path /mnt/sdcard must exist)
File Explorer now saves and restores path on rotation change.
Moved about html to assets file instead of an inline string.

Version 1.8: Removed Internet Access Permission (decided not to include ads).
The cryptsetup binary is no longer UPX compressed in an attempt to improve compatibility.
The cryptsetup and luks binaries are now sha1 hashed and replaced if outdated or changed.
Since "Unmount All" can take a while to complete it has been changed to an AsyncTask.
When mounted all volumes will get chmod 777 applied recursively to avoid file permission issues.
Numerous improvements and changes to the internal file explorer.
Slight wording changes to activity titles and About Dialog.
Added change log to About Dialog.

Version 1.7: Added file explorer (no longer requires ASTRO File Manager)
Updated the About Dialog
First Market Release

Version 1.6: updated and optimized the icon and background images
Updated the About Dialog
Updated failure logging to syslog

Version 1.5: now quotes passwords (oops)
Spaces in volume names are converted to underscores: _
About dialog updated

Version 1.4: code refactoring
Added about/homepage menu items
Added "Remove Binaries" to remove /system/bin files: luks and cryptsetup
Added explore menu option to explore to volume location (requires Astro Filemanager)
Added background

Version 1.3: moved binaries into apk and added extractor/binary installer

Version 1.2: first public release

Screen Shots
Attached Thumbnails
Click image for larger version

Name:	snap1.jpg
Views:	1100
Size:	33.5 KB
ID:	637051   Click image for larger version

Name:	snap2.jpg
Views:	1008
Size:	26.5 KB
ID:	637052   Click image for larger version

Name:	snap3.jpg
Views:	951
Size:	27.5 KB
ID:	637053   Click image for larger version

Name:	snap4.jpg
Views:	900
Size:	19.3 KB
ID:	637054   Click image for larger version

Name:	snap5.jpg
Views:	862
Size:	18.3 KB
ID:	637055   Click image for larger version

Name:	link.png
Views:	748
Size:	502 Bytes
ID:	640809  
The Following 7 Users Say Thank You to Nemesis][ For This Useful Post: [ View ] Gift Nemesis][ Ad-Free
 
 
26th June 2011, 02:29 PM |#2  
Junior Member
Flag Huntington Station
Thanks Meter: 0
 
More
Question Any Kernals for the OTA Sense
Quote:
Originally Posted by Nemesis][

Introduction

This is my first Android application and I'm looking for testers and feedback.

LUKS Manager

LUKS Manager provides on-the-fly encryption (AES by default) to virtual folders on Android devices.
The virtual folders can be dynamically mounted, unmounted, created and deleted as needed.
(Think TrueCrypt like functionality)

Volumes and loopback device information are stored in: /mnt/sdcard/luks/.data
And the encrypted volumes are mounted at: /mnt/sdcard/luks/<volume_name>

Requirements

The Android device must:

  • Be rooted
  • Have a kernel that supports secure dm-crypt modes and loopback devices
  • Have a current version of BusyBox installed
  • Have SuperUser app installed

This package contains:
  • A statically compiled, stripped and UPX compressed version of cryptsetup for the ARM using the tools provided by the Guardianproject.
  • A bash shell script called "luks" that does volume management.
  • And a native java app that provides a GUI interface to the luks script.

Download

You can find more on the apps homepage at:

nemesis2.qx.net/pages/LUKSManager/

(I've been a long time lurker but since I'm a first time poster I'm not allowed to post this is the main Android App Dev section nor am I allowed to post external links. )

Screen Shots

Hi I was wondering if you knew any kernals for the Gingerbread sense OTA cuz ive been looking around for some but i couldnt find any. THX if you reply
26th June 2011, 05:57 PM |#3  
Rooster85's Avatar
Senior Member
Flag Charlotte, NC
Thanks Meter: 389
 
More
Quote:
Originally Posted by h4ck0rk1d

Hi I was wondering if you knew any kernals for the Gingerbread sense OTA cuz ive been looking around for some but i couldnt find any. THX if you reply

This has been mentioned again and again, there will bo NO custom kernels for the 2.3 update until the source is released. Be patient.

Sent from my MiuiSpeedy
28th June 2011, 08:03 AM |#4  
Senior Member
Thanks Meter: 42
 
More
Won't download the full file on my phone using the stock browser and dolphin HD. 1 star because I can't install it. Just joking, but can you put up a mirror please? The download link seems to work fine in Chrome, but mobile browsers it seems to crap out on.

Sent from my PG06100 using XDA App
28th June 2011, 07:53 PM |#5  
Nemesis]['s Avatar
OP Junior Member
Thanks Meter: 21
 
More
Download Fixed (I believe)
OK. I believe I've fixed mobile downloads on the server so please try again.

And I've also updated LUKS Manager to v1.4. (lots of little fixes, tweaks)

-N2
The Following User Says Thank You to Nemesis][ For This Useful Post: [ View ] Gift Nemesis][ Ad-Free
28th June 2011, 10:36 PM |#6  
Senior Member
Thanks Meter: 42
 
More
Here's a pretty icky bug report for you: LuksManager fails to create a volume if you use spaces in the password.
The Following User Says Thank You to Ron Overdrive For This Useful Post: [ View ] Gift Ron Overdrive Ad-Free
29th June 2011, 12:45 AM |#7  
Nemesis]['s Avatar
OP Junior Member
Thanks Meter: 21
 
More
Quote:
Originally Posted by Ron Overdrive

Here's a pretty icky bug report for you: LuksManager fails to create a volume if you use spaces in the password.

Thanks for catching that. Version 1.5 should now quote passwords properly.

Any other issues? (I know I should validate user input more on volume creation; but the luks script should handle failures gracefully.)

-N2
The Following User Says Thank You to Nemesis][ For This Useful Post: [ View ] Gift Nemesis][ Ad-Free
4th July 2011, 01:05 AM |#8  
Nemesis]['s Avatar
OP Junior Member
Thanks Meter: 21
 
More
Released v1.6
Version 1.6 notes:

Images updated and optimized using optipng.
Updated the about box text.
Added additional failure logging to syslog.
And did a small bit of code cleanup.
The Following User Says Thank You to Nemesis][ For This Useful Post: [ View ] Gift Nemesis][ Ad-Free
15th July 2011, 10:23 PM |#9  
Junior Member
Thanks Meter: 4
 
More
just tried this on my hero and its almost very good it seems to create, mount and unmount ok but i'm getting an error that it cant find mkdir (i think this might be because my busybox is in /system/xbin rather than /system/bin?) and also the graphics for the buttons dont seem to resize so on a low resolution screen they overlap and arent readable.
29th July 2011, 02:28 AM |#10  
Nemesis]['s Avatar
OP Junior Member
Thanks Meter: 21
 
More
Quote:
Originally Posted by clarkk

just tried this on my hero and its almost very good it seems to create, mount and unmount ok but i'm getting an error that it cant find mkdir (i think this might be because my busybox is in /system/xbin rather than /system/bin?) and also the graphics for the buttons dont seem to resize so on a low resolution screen they overlap and arent readable.

Ok, I switched over from pixels to dp units. It seems to render fine in the emulator with the display settings for the Hero. Please let me know if it works.
The Following 2 Users Say Thank You to Nemesis][ For This Useful Post: [ View ] Gift Nemesis][ Ad-Free
30th July 2011, 07:05 PM |#11  
Junior Member
Thanks Meter: 4
 
More
Quote:
Originally Posted by Nemesis][

Ok, I switched over from pixels to dp units. It seems to render fine in the emulator with the display settings for the Hero. Please let me know if it works.

Thanks looks great now on the screen, still have a problem mounting though, could it auto-detect the location of busybox or have a changeable option?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes