For Educational Purposes only, this guide will allow you to build the cryptomator app from source, and remove the license check from the app.
- Clone the source
git clone --depth 1 https://github.com/cryptomator/android.git cryptomator-android
cd cryptomator-android
- Make a new branch to store our customizations
git switch -c modded
- Save patch to file
cat << EOF > ./license.patch
heredoc> index c9497a4a..35f0b2d0 100644
--- a/domain/src/main/java/org/cryptomator/domain/usecases/DoLicenseCheck.java
+++ b/domain/src/main/java/org/cryptomator/domain/usecases/DoLicenseCheck.java
@@ -44,20 +44,11 @@ public class DoLicenseCheck {
}
public LicenseCheck execute() throws BackendException {
- license = useLicenseOrRetrieveFromDb(license);
- try {
- Algorithm algorithm = Algorithm.ECDSA512(getPublicKey(ANDROID_PUB_KEY), null);
- JWTVerifier verifier = JWT.require(algorithm).build();
- DecodedJWT jwt = verifier.verify(license);
- return jwt::getSubject;
- } catch (SignatureVerificationException | JWTDecodeException | FatalBackendException e) {
- if (e instanceof SignatureVerificationException && isDesktopSupporterCertificate(license)) {
- throw new DesktopSupporterCertificateException(license);
+ return new LicenseCheck() {
+ public String mail() {
+ return "";
}
- throw new LicenseNotValidException(license);
- } catch (NoSuchAlgorithmException | InvalidKeySpecException e) {
- throw new FatalBackendException(e);
- }
+ };
}
private String useLicenseOrRetrieveFromDb(String license) throws NoLicenseAvailableException {
EOF
- Apply patch
git apply license.patch
-
Open project in Android Studio
-
Wait for Gradle to sync
-
Go to
Build > Select Build Variant...
-
Choose which build you want (liteRelease or fdroidRelease preferably)