Compile truecrypt for Android

Source: Internet
Author: User

Compile truecryptAndroid

Author: Jin haijian

TruecryptIntroduction:Truecrypt is a free and open-source green encrypted disk encryption software. You can create a virtual disk on the hard disk without generating any files. You can access it by drive letter, all files on the Virtual Disk are automatically encrypted and must be accessed using a password. Truecrypt
Provides a variety of encryption algorithms including: AES-256, blowfish (448-bit key), cast5, serpent, Triple DES, and
Twofish. Other features include FAT32 and NTFS partitions, hidden volume labels, and hot key startup. He supports multiple platforms, windows, Linux, UNIX, MacOSX, and other mainstream operating systems.

 

1. Download truecrypt

Download it from the truecrypt website. : Http://www.truecrypt.org/downloads2

Select Mac OS X/linux(.tar.gz) and click Download to download to your local device.

 

Ii. Compile truecrypt

To compile on ARM Linux, make sure that your Linux has an arm-Linux cross-compiling environment. If you do not need to download the arm
For cross-compiler in Linux, you can find relevant information on how to download the cross-compiler directly on Google.

To compile truecrypt, you must confirm that fuse and wxwidget exist. Generally, wxwidget already exists in the system.

Truecrypt uses the fuse library. Fuse refers to the filesystem
In userspace, writable fuse) is a concept in the operating system, refers to a file system fully implemented in the user State. Currently, Linux supports this feature through the kernel module. Some file systems such as ZFS, glusterfs, and luster use Fuse.

The Linux kernel module used to support the user space file system is fuse. The term fuse is sometimes used to specify the user space File System in Linux. A file system is an important part of a general operating system. Traditionally, the operating system supports the file system at the kernel level. Generally, the kernel-state code is difficult to debug and has low productivity. Linux versions 2.6.14 and later support file system implementation in user space through the fuse module.

2.1 compileFuse

L
Download FUSE: http://sourceforge.net/projects/fuse/

L
Decompress the downloaded file.

L
Compile:

./Configure
Cc = arm-None-Linux-gnueabi-gcc-host = arm-Linux-enable-static_link

Make

Make install

After make install is complete, it will be placed in the system library, and truecrypt can be referenced.

For more information about how to call fuse, see use fuse to develop your own file system http://www.ibm.com/developerworks/cn/linux/l-fuse/

 

2.2Compile truecrypt

After the ARM Linux cross-compiling environment is ready, truecrypt points to the system compiling environment by default, that is, the compiling environment under x86. We need to modify the makefile to point to ARM Linux. Open truecrypt
Make file. We can see that

Export CC? = Gcc

Export cxx? = G ++

The makefile of truecrypt has prepared the options for modifying the compilation configuration. We change

# Export CC? = Gcc

Export
Cc: = arm-None-Linux-gnueabi-gcc

# Export
Cxx? = G ++

Export
Cxx: = arm-None-Linux-gnueabi-G ++

# Export
As: = NASM

 

Now, makefile has been configured with OK. Make can compile the truecrypt of ARM Linux.

Truecrypt
It is a program with a GUI and uses the wxWidgets library. If we want to push the compiled truecrypt to Android, it will not work. It calls the wxwidget library, which is obviously not supported on Android. We can only remove all the Code related to the GUI. Truecrypt code is clearly written, and all the code under main is directly deleted. Then, extract the Code related to creating an encrypted partition, loading the encrypted partition, and changing the password for encapsulation.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.