How can I build the TextSecure app from source code? Unless I’m mistaken, the TextSecure app (which provides encrypted text messaging—both over the wire and on disk) was pulled from the market a while back, leaving no way to install the app is readily available from the Market. Just today, however, the source code was released to the public. How can I build the app from source code and get it onto my phone?
I know nothing about Android development, so keep that in mind. Following various instructions online, however, I was able to build the source and put it on my phone. Perhaps someone who knows what they’re doing can come along and explain how it really should be done. Until then…


Install and configure the Android SDK. Make sure you add the SDK tools to your PATH. I’m building this on Linux, but if you know what you’re doing it should be possible to follow along on Windows.

You may need to run android and install various platform software for the build to work. I did this a while back, so I don’t remember exactly what I had to do. Sorry.
Download the source code (requires git):

git clone https://github.com/WhisperSystems/TextSecure.git

Enter the source directory and build the app.

cd TextSecure
android update project --name textsecure --path . --target android-7
ant release

Cross your fingers. Hopefully the build succeeds. If it does, we will need to sign the newly built .apk file, textsecure-unsigned.apk, before Android will let you install it.

cp bin/textsecure-unsigned.apk bin/textsecure.apk
keytool -genkey -keystore mykeystore -validity 10000
jarsigner -keystore mykeystore bin/textsecure.apk mykey


Running keytool will prompt you to enter a bunch of information, as well as a password. Enter whatever you please, as it shouldn’t matter.
Copy the apk file, textsecure.apk, to the SDCard on your phone. Install it like you would any other non-Market application.