OpenKeychain is an OpenPGP implementation for Android.
WARNING: This software is no longer actively developed.
We will still apply security fixes where reported, and do basic maintenance work, but no new features or will be worked on.
We will try to consider and merge contributions where possible.
OpenKeychain (for Android)
OpenKeychain is an OpenPGP implementation for Android. For a more detailed description and installation instructions go to https://www.openkeychain.org .
Branches
The development of OpenKeychain happens in the "master" branch.
For every release a new branch, e.g., "3.2-fixes" is created to backport fixes from "master"
Open the Android SDK Manager (shell command: android).
Expand the Tools directory and select "Android SDK Build-tools (Version 27.0.3)".
Expand the Extras directory and install "Android Support Library", as well as "Local Maven repository for Support Libraries"
Select SDK Platform for API levels 27.
Export ANDROID_HOME pointing to your Android SDK
Execute ./gradlew assembleDebug
You can install the app with adb install -r OpenKeychain/build/outputs/apk/OpenKeychain-debug.apk
Report is here: OpenKeychain/build/reports/jacoco/jacocoTestReport/html/index.html
Development with Android Studio
We are using the newest Android Studio for development. Development with Eclipse is currently not possible because we are using the new project structure.
Clone the project from Github
Get all external submodules with git submodule update --init --recursive
From Android Studio: File -> Import Project -> Select the cloned top folder
Libraries
Bouncy Castle
OpenKeychain uses a forked version with some small changes. These changes will been sent to Bouncy Castle.
Always use a fixed Android Gradle plugin version not a dynamic one, e.g. 0.7.3 instead of 0.7.+ (allows offline builds without lookups for new versions, also some minor Android plugin versions had serious issues, i.e. 0.7.2 and 0.8.1)
Update every build.gradle file with the new gradle version and/or gradle plugin version
build.gradle
OpenKeychain/build.gradle
run ./gradlew wrapper twice to update gradle and download the new gradle jar file
commit the corresponding Gradle wrapper to the repository (allows easy building for new contributors without the need to install the required Gradle version using a package manager)
Update SDK and Build Tools
Change SDK and Build Tools in git submodules "openkeychain-api-lib" and "openpgp-api-lib" manually. They should also build on their own without the ext variables.
Update library
You can check for library updates with ``./gradlew dependencyUpdates -Drevision=release
Add new library
You can add the library as a Maven dependency or as a git submodule (if patches are required) in the "extern" folder.
You can get all transitive dependencies with ./gradlew -q dependencies OpenKeychain:dependencies
If added as a git submodule, change the compileSdkVersion in build.gradle to use the variables from the root project:
Paste the tools/checkstyle.xml file to ~/.AndroidStudioPreview/config/codestyles/
Go to Settings > Code Style > Java, select OpenPgpChecker, as well as Code Style > XML and select OpenPgpChecker again.
Start code inspection and see the results by selecting Analyze > Inspect Code from Android-Studio or you can directly run checkstyle via cli with .tools/checkstyle. Make sure it's executable first.
Mac OSX
Paste the tools/checkstyle.xml file to ~/Library/Preferences/AndroidStudioPreview/codestyles
Go to Preferences > Code Style > Java, select OpenPgpChecker, as well as Code Style > XML and select OpenPgpChecker again.
Start code inspection and see the results by selecting Analyze > Inspect Code from Android-Studio or you can directly run checkstyle via cli with .tools/checkstyle. Make sure it's executable first.
Windows
Paste the tools/checkstyle.xml file to C:\Users\<UserName>\.AndroidStudioPreview\config\codestyles
Go to File > Settings > Code Style > Java, select OpenPgpChecker, as well as Code Style > XML and select OpenPgpChecker again.
Start code inspection and see the results by selecting Analyze > Inspect Code from Android-Studio.