LG G3 Receives Oversharpening Fix via Modified Kernel

Nothing is perfect, as they say. No matter how alluring or seemingly perfect, … more

APKTool Updated with Android Lollipop Support

One of the beauties of Android is the level of flexibility we have over our devices. Whether … more

Lollipop Leak for Sprint Galaxy S5, TWRP for Micromax Canvas Magnus – XDA TV

Android 5.0 Lollipop has been leaked for the Sprint … more

Velocity is Like OpenTable on Steroids

We all enjoy a night out with friends or our significant other from time to time. However, there is … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Minimal UI for LUKS encryption on the Wildfire

OP sigkill1337

8th December 2010, 11:40 PM   |  #1  
OP Junior Member
Thanks Meter: 5
 
5 posts
Join Date:Joined: Oct 2010
This is a basic gui I wrote to unlock my encrypted partitions during boot.
I'm running my /data and /sdcard partitions encrypted, and the "luksunlock" binary is launched from init.rc to read the password and unlock the encrypted partitions.

I have included my somewhat modified init.rc for those interested.
For more information about LUKS on Android see this blogpost, written by shawn (Seems I'm not allowed to have urls in the post, but Google for 'android luks' , first hit)

This works good on Wildfire, altough it should work fine on other phones as well. Just remember that you need to set up your partitions as in the luksunlock.c (or change the defines).

Dont forget to backup before you start playing around!
Good luck!
Attached Thumbnails
Click image for larger version

Name:	menu.jpg
Views:	1646
Size:	90.2 KB
ID:	459499  
Attached Files
File Type: txt init.rc.txt - [Click for QR Code] (14.8 KB, 529 views)
File Type: zip luksunlock.zip - [Click for QR Code] (610.3 KB, 420 views)
The Following 4 Users Say Thank You to sigkill1337 For This Useful Post: [ View ]
13th December 2010, 05:50 PM   |  #2  
Junior Member
Thanks Meter: 0
 
4 posts
Join Date:Joined: Dec 2010
Thanks! i'll give a try!
15th December 2010, 04:11 PM   |  #3  
Junior Member
Thanks Meter: 0
 
4 posts
Join Date:Joined: Dec 2010
Hi,

I tried to use your cryptsetup binary from your blog, but I have some issues that you'll sure have an answer:

I run ./cryptsetup luksFormat -c aes-plain /dev/block/loop2 and after i put the luks password it says 'Command failed', no logs, no other output, even using the -v flag...

Any clue?

Thanks in advance!

PS: the module dm-crypt is necessary for cryptsetup? could be this the error? I don't have it installed on the system because I can't find it for 2.6.35.9-cyanogenmod
16th December 2010, 04:55 PM   |  #4  
Sympnotic's Avatar
Senior Member
Thanks Meter: 281
 
565 posts
Join Date:Joined: Aug 2010
More
Quote:
Originally Posted by tusabe

Hi,

I tried to use your cryptsetup binary from your blog, but I have some issues that you'll sure have an answer:

I run ./cryptsetup luksFormat -c aes-plain /dev/block/loop2 and after i put the luks password it says 'Command failed', no logs, no other output, even using the -v flag...

Any clue?

Thanks in advance!

PS: the module dm-crypt is necessary for cryptsetup? could be this the error? I don't have it installed on the system because I can't find it for 2.6.35.9-cyanogenmod

CM6.1 for wildfire uses a 2.6.32 kernel (see HCDR.jacob's post about his custom kernel for more info)
17th December 2010, 06:24 PM   |  #5  
OP Junior Member
Thanks Meter: 5
 
5 posts
Join Date:Joined: Oct 2010
Quote:
Originally Posted by tusabe

PS: the module dm-crypt is necessary for cryptsetup? could be this the error? I don't have it installed on the system because I can't find it for 2.6.35.9-cyanogenmod

Yeah you really need dm-crypt support, either compiled into the kernel or as a module. You also need the AES ciphers support.
20th December 2010, 12:34 PM   |  #6  
Junior Member
Thanks Meter: 0
 
4 posts
Join Date:Joined: Dec 2010
Quote:
Originally Posted by sigkill1337

Yeah you really need dm-crypt support, either compiled into the kernel or as a module. You also need the AES ciphers support.

Hi! Yeah, that's what I was afraid of.... ok, but the problem is that i'm running CM6.1 with 2.6.35.9 which has no dm-crypt module neither compiled in kernel... where can i find some kernel with this modules included? Is for an HTC Desire (@Sympnotic )

Thanks in advance!
29th December 2010, 11:34 PM   |  #7  
Junior Member
Brooklyn, NY
Thanks Meter: 0
 
4 posts
Join Date:Joined: Jun 2010
Great work and thanks for sharing @Sigkill. Working on building it here for my NexusOne with CM6.1.

BTW, I’m the lead on a project working on general secure Android distro – we’ve ported Tor, have an OTR IM app, and have supported other projects along those lines. Would love to talk more about supporting anyone working on this specific capability.
30th December 2010, 09:22 PM   |  #8  
Junior Member
Thanks Meter: 0
 
14 posts
Join Date:Joined: Sep 2010
Thumbs up
wow! awesome work!!! Very exciting news. Gonna give this a go on my MyTouch Slide
6th January 2011, 05:45 PM   |  #9  
OP Junior Member
Thanks Meter: 5
 
5 posts
Join Date:Joined: Oct 2010
Quote:
Originally Posted by NathanFreitas

Great work and thanks for sharing @Sigkill. Working on building it here for my NexusOne with CM6.1.

BTW, Im the lead on a project working on general secure Android distro weve ported Tor, have an OTR IM app, and have supported other projects along those lines. Would love to talk more about supporting anyone working on this specific capability.

Seems really nice. I like the secure phone concept.
3rd February 2011, 03:44 AM   |  #10  
Junior Member
Brooklyn, NY
Thanks Meter: 0
 
4 posts
Join Date:Joined: Jun 2010
Talking New Makefile and wiki info up
_hc from the @guardianproject has a new build process up for Crypsetup/LUKS which includes a Makefile compatible with Android NDK r5.

We have new instructions up on our wiki, as well.

I cannot post links under this account, but you can find the info on github if you search "LUKS" or just under our guardianproject account.

Post Reply Subscribe to Thread

Tags
dm-crypt, encryption, luks, remember-to-backup-before
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes