From 6beebbef65ea7447c856944fbee9604741aceaad Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:49:14 +0530 Subject: [PATCH 01/35] Upgrade Android Gradle Plugin to 9.5.2 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 1a2db8d..c629dc7 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'com.android.application' version '8.13.2' apply false + id 'com.android.application' version '9.5.2' apply false } tasks.register('clean', Delete) { From 11f78501d4965fbe0e907f8c0bc6ede8745fdc50 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:49:16 +0530 Subject: [PATCH 02/35] Upgrade Gradle wrapper to 9.9.1 --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37f853b..60d3852 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME From 9cf2f15b340d600917394da923147cba0a63c682 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:49:19 +0530 Subject: [PATCH 03/35] Prepare Android Cipher 2.2 release and signing support --- app/build.gradle | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 00128b4..b03a623 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,12 +10,24 @@ android { applicationId "com.example.encryptiondecryption" minSdk 26 targetSdk 36 - versionCode 3 - versionName "2.1.0" + versionCode 4 + versionName "2.2.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } + signingConfigs { + release { + def keystorePath = System.getenv("ANDROID_KEYSTORE_PATH") + if (keystorePath != null && !keystorePath.isBlank()) { + storeFile file(keystorePath) + storePassword System.getenv("ANDROID_KEYSTORE_PASSWORD") + keyAlias System.getenv("ANDROID_KEY_ALIAS") + keyPassword System.getenv("ANDROID_KEY_PASSWORD") + } + } + } + buildTypes { debug { applicationIdSuffix ".debug" @@ -24,6 +36,10 @@ android { release { minifyEnabled true shrinkResources true + if (System.getenv("ANDROID_KEYSTORE_PATH") != null + && !System.getenv("ANDROID_KEYSTORE_PATH").isBlank()) { + signingConfig signingConfigs.release + } proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } @@ -35,13 +51,20 @@ android { testOptions { unitTests.returnDefaultValues = false + animationsDisabled = true + } + + lint { + abortOnError true + checkReleaseBuilds true } } dependencies { implementation 'androidx.appcompat:appcompat:1.8.0' - implementation 'com.google.android.material:material:1.13.0' - implementation 'androidx.core:core:1.17.0' + implementation 'com.google.android.material:material:1.14.0' + implementation 'androidx.core:core:1.19.1' + implementation 'androidx.core:core-splashscreen:1.2.0' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.3.0' From d5102f996e500df779fcf509ce213ef4851006ec Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:49:21 +0530 Subject: [PATCH 04/35] Enable Gradle build caching and parallel execution --- gradle.properties | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/gradle.properties b/gradle.properties index dab7c28..0f6815a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,21 +1,6 @@ # Project-wide Gradle settings. -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app"s APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn +org.gradle.caching=true +org.gradle.parallel=true android.useAndroidX=true -# Enables namespacing of each library's R class so that its R class includes only the -# resources declared in the library itself and none from the library's dependencies, -# thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true From 7753c876de22035a0fa4920d2567cba151e910f4 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:49:41 +0530 Subject: [PATCH 05/35] Bound encryption input and ciphertext sizes to prevent memory abuse --- .../encryptiondecryption/CryptoManager.java | 36 +++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/example/encryptiondecryption/CryptoManager.java b/app/src/main/java/com/example/encryptiondecryption/CryptoManager.java index c644794..d1df4e1 100644 --- a/app/src/main/java/com/example/encryptiondecryption/CryptoManager.java +++ b/app/src/main/java/com/example/encryptiondecryption/CryptoManager.java @@ -34,6 +34,11 @@ public final class CryptoManager { private static final int TAG_LENGTH_BITS = 128; private static final int MIN_PASSWORD_LENGTH = 12; private static final int MAX_PASSWORD_LENGTH = 1024; + public static final int MAX_TEXT_BYTES = 1_048_576; + private static final int MAX_PAYLOAD_BYTES = 1 + SALT_LENGTH + NONCE_LENGTH + + MAX_TEXT_BYTES + (TAG_LENGTH_BITS / 8); + private static final int MAX_ENVELOPE_CHARS = PREFIX.length() + + ((MAX_PAYLOAD_BYTES * 4 + 2) / 3); private static final SecureRandom SECURE_RANDOM = new SecureRandom(); @@ -44,11 +49,19 @@ public static String encrypt(String plaintext, char[] password) if (plaintext == null || plaintext.isEmpty()) { throw new IllegalArgumentException("Enter text to encrypt."); } + if (plaintext.length() > MAX_TEXT_BYTES) { + throw new IllegalArgumentException("Text must be 1 MiB or smaller."); + } validatePassword(password, true); + byte[] plaintextBytes = plaintext.getBytes(StandardCharsets.UTF_8); + if (plaintextBytes.length > MAX_TEXT_BYTES) { + Arrays.fill(plaintextBytes, (byte) 0); + throw new IllegalArgumentException("Text must be 1 MiB or smaller when encoded as UTF-8."); + } + byte[] salt = new byte[SALT_LENGTH]; byte[] nonce = new byte[NONCE_LENGTH]; - byte[] plaintextBytes = plaintext.getBytes(StandardCharsets.UTF_8); byte[] derivedKey = null; byte[] ciphertext = null; @@ -87,13 +100,23 @@ public static String decrypt(String encryptedText, char[] password) throw new IllegalArgumentException( "This is not an Android Cipher encrypted message."); } + if (encryptedText.length() > MAX_ENVELOPE_CHARS) { + throw new IllegalArgumentException("Encrypted text exceeds the 1 MiB message limit."); + } validatePassword(password, false); final byte[] payload; try { - payload = Base64.getUrlDecoder() - .decode(encryptedText.substring(PREFIX.length()).trim()); + String encodedPayload = encryptedText.substring(PREFIX.length()).trim(); + if (encodedPayload.length() > MAX_ENVELOPE_CHARS - PREFIX.length()) { + throw new IllegalArgumentException("Encrypted text exceeds the 1 MiB message limit."); + } + payload = Base64.getUrlDecoder().decode(encodedPayload); } catch (IllegalArgumentException exception) { + if (exception.getMessage() != null + && exception.getMessage().contains("1 MiB")) { + throw exception; + } throw new IllegalArgumentException("The encrypted text is malformed.", exception); } @@ -102,6 +125,10 @@ public static String decrypt(String encryptedText, char[] password) Arrays.fill(payload, (byte) 0); throw new IllegalArgumentException("The encrypted text is incomplete."); } + if (payload.length > MAX_PAYLOAD_BYTES) { + Arrays.fill(payload, (byte) 0); + throw new IllegalArgumentException("Encrypted text exceeds the 1 MiB message limit."); + } byte[] salt = new byte[SALT_LENGTH]; byte[] nonce = new byte[NONCE_LENGTH]; @@ -133,6 +160,9 @@ public static String decrypt(String encryptedText, char[] password) new GCMParameterSpec(TAG_LENGTH_BITS, nonce)); cipher.updateAAD(associatedData(version)); plaintextBytes = cipher.doFinal(ciphertext); + if (plaintextBytes.length > MAX_TEXT_BYTES) { + throw new IllegalArgumentException("Decrypted text exceeds the 1 MiB message limit."); + } return new String(plaintextBytes, StandardCharsets.UTF_8); } finally { Arrays.fill(payload, (byte) 0); From f52f60b117e479e22f9a7eb734e99050ee41d1b1 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:49:50 +0530 Subject: [PATCH 06/35] Cover oversized plaintext and hostile envelope inputs --- .../encryptiondecryption/CryptoManagerTest.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/src/test/java/com/example/encryptiondecryption/CryptoManagerTest.java b/app/src/test/java/com/example/encryptiondecryption/CryptoManagerTest.java index f148c55..ddabdd9 100644 --- a/app/src/test/java/com/example/encryptiondecryption/CryptoManagerTest.java +++ b/app/src/test/java/com/example/encryptiondecryption/CryptoManagerTest.java @@ -76,6 +76,22 @@ public void shortEncryptionPasswordIsRejected() throws Exception { CryptoManager.encrypt("secret", "short".toCharArray()); } + + @Test(expected = IllegalArgumentException.class) + public void rejectsPlaintextLargerThanOneMiB() throws Exception { + CryptoManager.encrypt("a".repeat(CryptoManager.MAX_TEXT_BYTES + 1), PASSWORD); + } + + @Test(expected = IllegalArgumentException.class) + public void rejectsUtf8PayloadLargerThanOneMiB() throws Exception { + CryptoManager.encrypt("界".repeat(400_000), PASSWORD); + } + + @Test(expected = IllegalArgumentException.class) + public void rejectsOversizedEnvelopeBeforeBase64Decoding() throws Exception { + CryptoManager.decrypt("AC2:" + "A".repeat(1_500_000), PASSWORD); + } + private static String createLegacyVersionOneMessage(String plaintext) throws Exception { byte[] salt = new byte[16]; From 1be9b02b9e08a7a48ad8e27bf56eeeb29cb4cc73 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:50:06 +0530 Subject: [PATCH 07/35] Improve edge-to-edge insets, password handling and clear-all privacy --- .../encryptiondecryption/MainActivity.java | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/example/encryptiondecryption/MainActivity.java b/app/src/main/java/com/example/encryptiondecryption/MainActivity.java index cb5c19d..61b9b7a 100644 --- a/app/src/main/java/com/example/encryptiondecryption/MainActivity.java +++ b/app/src/main/java/com/example/encryptiondecryption/MainActivity.java @@ -22,6 +22,7 @@ import androidx.core.view.WindowCompat; import androidx.core.view.WindowInsetsCompat; import androidx.core.view.WindowInsetsControllerCompat; +import androidx.core.splashscreen.SplashScreen; import com.google.android.material.button.MaterialButton; import com.google.android.material.snackbar.Snackbar; @@ -53,8 +54,9 @@ public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { + SplashScreen.installSplashScreen(this); super.onCreate(savedInstanceState); - WindowCompat.setDecorFitsSystemWindows(getWindow(), false); + WindowCompat.enableEdgeToEdge(getWindow()); setContentView(R.layout.activity_main); rootView = findViewById(R.id.rootView); @@ -89,7 +91,8 @@ private void applySystemBarInsets() { controller.setAppearanceLightNavigationBars(!dark); ViewCompat.setOnApplyWindowInsetsListener(rootView, (view, windowInsets) -> { - Insets bars = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()); + Insets bars = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars() + | WindowInsetsCompat.Type.displayCutout()); Insets ime = windowInsets.getInsets(WindowInsetsCompat.Type.ime()); view.setPadding(view.getPaddingLeft(), bars.top, view.getPaddingRight(), Math.max(bars.bottom, ime.bottom) + 12); @@ -166,6 +169,7 @@ private void processText(boolean encrypt) { char[] passwordChars = new char[passwordLength]; passwordEditable.getChars(0, passwordLength, passwordChars, 0); + passwordInput.setText(""); outputText.setText(""); copyButton.setEnabled(false); shareButton.setEnabled(false); @@ -277,6 +281,7 @@ private void shareOutput() { private void clearFields() { if (processing) return; + clearAppClipboardIfOwned(); inputText.setText(""); passwordInput.setText(""); outputText.setText(""); @@ -290,8 +295,27 @@ private void clearFields() { showMessage(getString(R.string.message_cleared)); } + private void clearAppClipboardIfOwned() { + ClipboardManager clipboard = + (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE); + if (clipboard == null || !clipboard.hasPrimaryClip()) return; + + ClipDescription description = clipboard.getPrimaryClipDescription(); + if (description == null + || !getString(R.string.clip_label).contentEquals(description.getLabel())) { + return; + } + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { + clipboard.clearPrimaryClip(); + } else { + clipboard.setPrimaryClip(ClipData.newPlainText("", "")); + } + } + private void updateCharacterCount() { - int count = inputText.getText() == null ? 0 : inputText.getText().length(); + CharSequence text = inputText.getText(); + int count = text == null ? 0 : Character.codePointCount(text, 0, text.length()); inputCount.setText(getString(R.string.character_count, count)); } From 017c351244bfccf8422639e9c3abb39f0d19754f Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:50:30 +0530 Subject: [PATCH 08/35] Adopt Material 3 Expressive and backward-compatible splash theming --- app/src/main/res/values/themes.xml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 6fd87c8..93fb863 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -1,20 +1,22 @@ - - From d4f462f015cde13a174300e909c1a2ea501cac4e Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:50:33 +0530 Subject: [PATCH 09/35] Align dark theme with AndroidX splash screen --- app/src/main/res/values-night/themes.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml index d860cf3..9933877 100644 --- a/app/src/main/res/values-night/themes.xml +++ b/app/src/main/res/values-night/themes.xml @@ -1,5 +1,7 @@ - - \ No newline at end of file + From ef05cd1b3ecdc1e3f40fbd447baf45b6bcf28dde Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:50:42 +0530 Subject: [PATCH 10/35] Refine Material 3 light and dark color roles --- app/src/main/res/values/colors.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index efb32f1..c621d0d 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,6 +1,8 @@ #F4F7FB + #FFFFFF + #172B3A #087F75 #FFFFFF #E5F5F1 From c93f746829d3146dc64d46ff6183bc5deba6b11b Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:50:45 +0530 Subject: [PATCH 11/35] Refine Material 3 light and dark color roles --- app/src/main/res/values-night/colors.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 482b210..ceb3eea 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -1,6 +1,8 @@ #0B1220 + #111C2B + #E7F1F7 #55D6BE #06231F #142B32 From a0fa9d376c934d55a526dd2ee2067fa954591782 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:50:54 +0530 Subject: [PATCH 12/35] Move app controls to Material 3 component styles --- app/src/main/res/layout/activity_main.xml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 1c81b67..b8018db 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -82,7 +82,7 @@ android:layout_marginTop="26dp" android:text="@string/hero_title" android:textColor="?attr/colorOnBackground" - android:textSize="29sp" + android:textSize="30sp" android:fontFamily="sans" android:letterSpacing="-0.02" android:textStyle="bold" /> @@ -168,7 +168,7 @@ + android:textSize="14sp" + android:accessibilityLiveRegion="polite" /> Date: Sun, 22 Nov 2026 14:50:59 +0530 Subject: [PATCH 13/35] Use AndroidX splash and insets compatibility themes --- app/src/main/res/values-v27/themes.xml | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 app/src/main/res/values-v27/themes.xml diff --git a/app/src/main/res/values-v27/themes.xml b/app/src/main/res/values-v27/themes.xml deleted file mode 100644 index 56b50de..0000000 --- a/app/src/main/res/values-v27/themes.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file From 6d6ca9750f37702f55cdcbc16ce89d959090f147 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:51:02 +0530 Subject: [PATCH 14/35] Use AndroidX splash and insets compatibility themes --- app/src/main/res/values-night-v27/themes.xml | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 app/src/main/res/values-night-v27/themes.xml diff --git a/app/src/main/res/values-night-v27/themes.xml b/app/src/main/res/values-night-v27/themes.xml deleted file mode 100644 index 37214b7..0000000 --- a/app/src/main/res/values-night-v27/themes.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file From c332cbef0358b3926c48dcbfaafcacd12831bdfd Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:51:05 +0530 Subject: [PATCH 15/35] Use AndroidX splash and insets compatibility themes --- app/src/main/res/values-v31/themes.xml | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 app/src/main/res/values-v31/themes.xml diff --git a/app/src/main/res/values-v31/themes.xml b/app/src/main/res/values-v31/themes.xml deleted file mode 100644 index c134404..0000000 --- a/app/src/main/res/values-v31/themes.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file From ffa74ade5c47550c69552fb7c9e77ac0d2cfafcd Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:51:07 +0530 Subject: [PATCH 16/35] Use AndroidX splash and insets compatibility themes --- app/src/main/res/values-night-v31/themes.xml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 app/src/main/res/values-night-v31/themes.xml diff --git a/app/src/main/res/values-night-v31/themes.xml b/app/src/main/res/values-night-v31/themes.xml deleted file mode 100644 index e7d2146..0000000 --- a/app/src/main/res/values-night-v31/themes.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file From 414819128df0ed0bd5d1dd1ebb67419e4926dba2 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:51:18 +0530 Subject: [PATCH 17/35] Update 2.2 product copy and message size guidance --- app/src/main/res/values/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 5542aac..f8ac020 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,10 +1,10 @@ Android Cipher PRIVATE BY DESIGN - v2.1 + v2.2 Android Cipher Your words. Your privacy. - Encrypt and decrypt text locally. Your password never leaves this device. + Private text encryption that runs entirely on this device — no account or network connection required. Authenticated encryption AES-256-GCM · Random salt and nonce · Offline Message @@ -22,8 +22,8 @@ Copy Share Clear all - Everything is processed on this device. Your text and password are never uploaded by Android Cipher. - ANDROID CIPHER 2.1 · OFFLINE TEXT ENCRYPTION + Everything is processed on this device. Messages are limited to 1 MiB. Your text and password are never uploaded by Android Cipher. + ANDROID CIPHER 2.2 · OFFLINE TEXT ENCRYPTION READY ERROR ENCRYPTING… From 06173e19ca05c0ed591895eca8009a9ffe906cc0 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:51:20 +0530 Subject: [PATCH 18/35] Declare app category for Android platform integration --- app/src/main/AndroidManifest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index daa9877..d78a291 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,6 +2,7 @@ Date: Sun, 22 Nov 2026 14:51:30 +0530 Subject: [PATCH 19/35] Replace placeholder instrumentation test with Espresso UI smoke tests --- .../ExampleInstrumentedTest.java | 42 ++++++++++++------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/app/src/androidTest/java/com/example/encryptiondecryption/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/example/encryptiondecryption/ExampleInstrumentedTest.java index 7935e08..8b6bf79 100644 --- a/app/src/androidTest/java/com/example/encryptiondecryption/ExampleInstrumentedTest.java +++ b/app/src/androidTest/java/com/example/encryptiondecryption/ExampleInstrumentedTest.java @@ -1,26 +1,40 @@ package com.example.encryptiondecryption; -import android.content.Context; +import static androidx.test.espresso.Espresso.onView; +import static androidx.test.espresso.action.ViewActions.closeSoftKeyboard; +import static androidx.test.espresso.action.ViewActions.typeText; +import static androidx.test.espresso.assertion.ViewAssertions.matches; +import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; +import static androidx.test.espresso.matcher.ViewMatchers.withId; +import static androidx.test.espresso.matcher.ViewMatchers.withText; -import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.rules.ActivityScenarioRule; import androidx.test.ext.junit.runners.AndroidJUnit4; +import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; -import static org.junit.Assert.*; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ +/** Smoke tests for the main encryption screen on a real Android runtime. */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { + @Rule + public ActivityScenarioRule activityRule = + new ActivityScenarioRule<>(MainActivity.class); + + @Test + public void launchShowsEncryptionControlsAndResult() { + onView(withId(R.id.inputText)).check(matches(isDisplayed())); + onView(withId(R.id.passwordInput)).check(matches(isDisplayed())); + onView(withId(R.id.encryptButton)).check(matches(isDisplayed())); + onView(withId(R.id.decryptButton)).check(matches(isDisplayed())); + onView(withId(R.id.outputText)).check(matches(isDisplayed())); + } + @Test - public void useAppContext() { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); - assertEquals("com.example.encryptiondecryption", appContext.getPackageName()); + public void characterCounterCountsUnicodeCodePoints() { + onView(withId(R.id.inputText)) + .perform(typeText("Hi 🔐"), closeSoftKeyboard()); + onView(withId(R.id.inputCount)).check(matches(withText("4 characters"))); } -} \ No newline at end of file +} From edb515062469030884abe36de159a9d8f15aeee5 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:51:47 +0530 Subject: [PATCH 20/35] Upgrade CI actions and add API 26/36 emulator smoke tests --- .github/workflows/android-ci.yml | 68 ++++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 13 deletions(-) diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml index 1e477a0..1460d90 100644 --- a/.github/workflows/android-ci.yml +++ b/.github/workflows/android-ci.yml @@ -2,7 +2,7 @@ name: Android Cipher CI on: push: - branches: [main, "upgrade/**"] + branches: [main, "release/**", "upgrade/**"] pull_request: branches: [main] workflow_dispatch: @@ -11,40 +11,82 @@ permissions: contents: read concurrency: - group: android-ci-${{ github.ref }} + group: android-ci-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: build-and-test: - name: Build and unit tests + name: Unit tests, lint and release variants runs-on: ubuntu-latest steps: - name: Check out source - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Set up JDK 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v6 with: distribution: temurin java-version: "17" + - name: Validate Gradle wrapper + uses: gradle/actions/wrapper-validation@v6 + - name: Set up Gradle - uses: gradle/actions/setup-gradle@v4 + uses: gradle/actions/setup-gradle@v6 - name: Set up Android SDK - uses: android-actions/setup-android@v3 + uses: android-actions/setup-android@v4 with: packages: platform-tools - name: Install Android 36 SDK run: sdkmanager "platforms;android-36" "build-tools;36.0.0" - - name: Run tests, lint and assemble debug/release APKs - run: bash gradlew --no-daemon clean testDebugUnitTest lintDebug assembleDebug assembleRelease + - name: Run unit tests, lint and assemble installable build variants + run: bash gradlew --no-daemon clean testDebugUnitTest lintDebug assembleDebug assembleRelease bundleRelease - - name: Upload debug and release APKs - uses: actions/upload-artifact@v4 + - name: Upload APK and App Bundle build outputs + uses: actions/upload-artifact@v7 with: - name: android-cipher-apks - path: app/build/outputs/apk/**/*.apk + name: android-cipher-2.2.0-builds + path: | + app/build/outputs/apk/**/*.apk + app/build/outputs/bundle/**/*.aab if-no-files-found: error + retention-days: 30 + + emulator-smoke-tests: + name: Emulator UI tests (API ${{ matrix.api-level }}) + needs: build-and-test + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + api-level: [26, 36] + steps: + - name: Check out source + uses: actions/checkout@v7 + + - name: Set up JDK 17 + uses: actions/setup-java@v6 + with: + distribution: temurin + java-version: "17" + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v6 + + - name: Set up Android SDK + uses: android-actions/setup-android@v4 + with: + packages: platform-tools + + - name: Run Espresso tests on Android API ${{ matrix.api-level }} + uses: ReactiveCircus/android-emulator-runner@v2.38.0 + with: + api-level: ${{ matrix.api-level }} + target: default + arch: x86_64 + profile: pixel_7 + disable-animations: true + script: bash gradlew --no-daemon connectedDebugAndroidTest From fc5d0560316d12476d721347baf06b84efa2c6df Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:52:12 +0530 Subject: [PATCH 21/35] Add automated Gradle and GitHub Actions dependency updates --- .github/dependabot.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..914b8cc --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +version: 2 +updates: + - package-ecosystem: gradle + directory: / + schedule: + interval: weekly + day: monday + open-pull-requests-limit: 5 + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + day: monday + open-pull-requests-limit: 5 From 9f93b23a45bddf630cc53c8da6257927a9cbdd15 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:52:15 +0530 Subject: [PATCH 22/35] Automate signed Android GitHub releases when signing keys are configured --- .github/workflows/publish-release.yml | 111 ++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 .github/workflows/publish-release.yml diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml new file mode 100644 index 0000000..1f2082b --- /dev/null +++ b/.github/workflows/publish-release.yml @@ -0,0 +1,111 @@ +name: Signed Android release + +on: + push: + branches: [main] + paths: + - "app/build.gradle" + - "app/src/**" + - ".github/workflows/publish-release.yml" + workflow_dispatch: + +permissions: + contents: write + +concurrency: + group: android-cipher-release-${{ github.ref }} + cancel-in-progress: false + +jobs: + publish: + name: Build and publish signed APK and App Bundle + runs-on: ubuntu-latest + steps: + - name: Check out source + uses: actions/checkout@v7 + + - name: Set up JDK 17 + uses: actions/setup-java@v6 + with: + distribution: temurin + java-version: "17" + + - name: Validate Gradle wrapper + uses: gradle/actions/wrapper-validation@v6 + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v6 + + - name: Set up Android SDK + uses: android-actions/setup-android@v4 + with: + packages: platform-tools + + - name: Install Android 36 SDK + run: sdkmanager "platforms;android-36" "build-tools;36.0.0" + + - name: Check release signing credentials + id: signing + shell: bash + env: + ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} + ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} + ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} + ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} + run: | + if [[ -z "$ANDROID_KEYSTORE_BASE64" || -z "$ANDROID_KEYSTORE_PASSWORD" || -z "$ANDROID_KEY_ALIAS" || -z "$ANDROID_KEY_PASSWORD" ]]; then + echo "configured=false" >> "$GITHUB_OUTPUT" + { + echo "## Signed release not published" + echo + echo "The Android signing secrets are not configured. No unsigned or debug-signed package will be published as a stable release." + echo + echo "Configure repository Actions secrets: ANDROID_KEYSTORE_BASE64, ANDROID_KEYSTORE_PASSWORD, ANDROID_KEY_ALIAS, and ANDROID_KEY_PASSWORD. Re-run this workflow after configuration." + } >> "$GITHUB_STEP_SUMMARY" + exit 0 + fi + + KEYSTORE_PATH="$RUNNER_TEMP/android-cipher-release.jks" + printf '%s' "$ANDROID_KEYSTORE_BASE64" | base64 --decode > "$KEYSTORE_PATH" + chmod 600 "$KEYSTORE_PATH" + echo "ANDROID_KEYSTORE_PATH=$KEYSTORE_PATH" >> "$GITHUB_ENV" + echo "configured=true" >> "$GITHUB_OUTPUT" + + - name: Build signed release APK and App Bundle + if: steps.signing.outputs.configured == 'true' + env: + ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} + ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} + ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} + run: bash gradlew --no-daemon clean testDebugUnitTest lintRelease assembleRelease bundleRelease + + - name: Publish GitHub Release + if: steps.signing.outputs.configured == 'true' + env: + GH_TOKEN: ${{ github.token }} + shell: bash + run: | + VERSION_NAME="$(sed -n 's/.*versionName "\([^"]*\)".*/\1/p' app/build.gradle | head -n 1)" + TAG="v$VERSION_NAME" + if gh release view "$TAG" >/dev/null 2>&1; then + echo "Release $TAG already exists; refusing to overwrite published assets." + exit 1 + fi + gh release create "$TAG" \ + app/build/outputs/apk/release/app-release.apk \ + app/build/outputs/bundle/release/app-release.aab \ + --title "Android Cipher $VERSION_NAME" \ + --generate-notes \ + --target "$GITHUB_SHA" \ + --latest + + - name: Upload signed build outputs for audit + if: steps.signing.outputs.configured == 'true' + uses: actions/upload-artifact@v7 + with: + name: android-cipher-signed-release + path: | + app/build/outputs/apk/release/*.apk + app/build/outputs/bundle/release/*.aab + if-no-files-found: error + retention-days: 90 From 4236a3c4446549b4acbcc379682b714340825790 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:52:32 +0530 Subject: [PATCH 23/35] Document 2.2 toolchain, security bounds and signed release process --- README.md | 102 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 2d827d2..2e42419 100644 --- a/README.md +++ b/README.md @@ -1,94 +1,110 @@ -# Android Cipher 2.1 +# Android Cipher 2.2 -A lightweight, offline-first Android text encryption app built with Java and Material Components. +A lightweight, offline-first Android text encryption app built with Java and Material 3 Expressive. -> **Security note:** Android Cipher 2.1 uses password-based AES-256-GCM for new messages. It is a small utility project, not a professionally audited password manager, secure messenger, or substitute for a reviewed security product. Do not reuse important account passwords as encryption passwords. +> **Security note:** Android Cipher is a focused text-encryption utility, not a professionally audited password manager, secure messenger, or substitute for a reviewed security product. Do not reuse account passwords as encryption passwords. ## Features - Password-based AES-256-GCM authenticated encryption. - Fresh 128-bit random salt and 96-bit nonce for every encryption. - PBKDF2-HMAC-SHA-256 key derivation (600,000 iterations for new messages). -- Versioned, URL-safe Base64 text envelope with authentication. +- Versioned, URL-safe Base64 text envelope; version 1 messages remain decryptable. - Detects wrong passwords and modified ciphertext. -- Runs locally; no network permission or account required. -- Refined Material interface with light/dark themes, edge-to-edge system bars, custom launcher icon/splash screen and centered content on wide windows. -- Paste, copy, share, clear-all, character count and operation progress/feedback. -- Sensitive clipboard preview marking on Android 13+. -- Sensitive form fields are excluded from autofill and view-state restoration; the result is read-only; copying and sharing use explicit actions. -- Automated tests for Unicode, randomness, tampering, invalid input and old-format compatibility. +- Encrypted/decrypted message limit of 1 MiB to bound memory and decoding work. +- Offline operation; no account, Internet permission, analytics SDK or remote service. +- Material 3 Expressive UI with light/dark themes, edge-to-edge insets and adaptive centered content. +- Paste, copy, share, clear-all, Unicode-aware character count and progress/error feedback. +- Clears the password field when an operation begins; clear-all removes only clipboard content copied by Android Cipher. +- Espresso UI smoke tests and cryptographic regression tests. -## Compatibility +## Compatibility and toolchain -- Android Studio with Android Gradle Plugin 8.13.2 support. +- Android Studio with Android Gradle Plugin 9.5.2. - JDK 17. -- Gradle 8.13 (wrapper). +- Gradle 9.9.1 (wrapper). - Android SDK 36. -- Minimum Android version: API 26. +- Minimum Android version: API 26 (Android 8.0). +- Target SDK: API 36 (Android 16). - Java source compatibility: Java 17. -## Build +## Build and test -1. Clone this repository. -2. Open the project folder in Android Studio and allow Gradle sync. -3. Install Android SDK Platform 36 if prompted. -4. Run the app on an emulator or device. - -From a terminal with JDK 17 and Android SDK configured: +From a terminal with JDK 17 and Android SDK 36 configured: ```bash -./gradlew clean testDebugUnitTest assembleDebug +./gradlew clean testDebugUnitTest lintDebug assembleDebug assembleRelease bundleRelease ``` On Windows: ```powershell -.\gradlew.bat clean testDebugUnitTest assembleDebug +.\gradlew.bat clean testDebugUnitTest lintDebug assembleDebug assembleRelease bundleRelease ``` -The debug APK is generated at `app/build/outputs/apk/debug/app-debug.apk`. +Debug APK: `app/build/outputs/apk/debug/app-debug.apk` + +Release APK: `app/build/outputs/apk/release/app-release.apk` + +Android App Bundle: `app/build/outputs/bundle/release/app-release.aab` + +Without a configured upload keystore, the local release APK/AAB is unsigned and is not suitable for Play Console submission. Debug builds use a separate `.debug` application ID. + +GitHub Actions runs unit tests, lint, debug/release APK and AAB builds, and Espresso smoke tests on Android API 26 and 36. Dependabot checks Gradle and GitHub Actions dependencies weekly. + +## Signed GitHub and Play release + +The signed-release workflow creates a GitHub Release containing a signed APK and AAB when the app version changes on `main`. It deliberately refuses to publish an unsigned or debug-signed APK as a stable release. + +To enable it, add these repository Actions secrets: + +- `ANDROID_KEYSTORE_BASE64`: base64 encoding of your private Android upload keystore. +- `ANDROID_KEYSTORE_PASSWORD`: keystore password. +- `ANDROID_KEY_ALIAS`: key alias. +- `ANDROID_KEY_PASSWORD`: key password. -GitHub Actions runs the unit tests and assembles a debug APK for pushes and pull requests. +Keep the keystore and passwords private; never commit them. Once these four secrets are configured, the release workflow can publish signed APK and AAB assets automatically after a versioned merge to `main`. The workflow does not submit to Google Play; Play Console review and store listing work remain separate. ## Encrypt and decrypt -1. Enter the text you want to protect. -2. Enter a strong password of at least 12 characters. +1. Enter the text you want to protect (up to 1 MiB after UTF-8 encoding). +2. Enter a strong, unique password of at least 12 characters. 3. Select **Encrypt** and copy the resulting `AC2:` message. -4. To decrypt, paste the complete `AC2:` message into the input field, enter the same password, and select **Decrypt**. +4. Paste the full message back into the input, enter the same password and select **Decrypt**. -**Keep the password safe.** It is not embedded in the encrypted message and cannot be recovered if lost. Use a unique passphrase. A password manager can help store it. +The password is not embedded in the encrypted message and cannot be recovered if lost. The password field is cleared when an operation begins. ## Encryption format -The text envelope is: +The envelope is: ```text AC2: Base64URL(version || salt || nonce || ciphertext || GCM-tag) ``` -- Version: 1 byte. New encryption writes version 2; version 1 messages remain decryptable. +- Version: 1 byte. New encryption writes version 2; version 1 remains supported for decryption. - Salt: 16 random bytes per message. - Nonce: 12 random bytes per message. - Cipher: AES/GCM/NoPadding with a 128-bit authentication tag. -- Key derivation: PBKDF2WithHmacSHA256, 600,000 iterations for version 2 (256-bit output). -- Version 1 compatibility: PBKDF2-HMAC-SHA-256 at 210,000 iterations. -- Associated authenticated data binds the envelope to its format version. +- Version 2 key derivation: PBKDF2WithHmacSHA256, 600,000 iterations, 256-bit output. +- Version 1 key derivation: PBKDF2-HMAC-SHA-256, 210,000 iterations. +- Associated authenticated data binds ciphertext to the format version. -The format version identifies the cryptographic parameters. The app retains version 1 decryption support so existing Android Cipher 2.0 messages remain readable. The 600,000-iteration work factor uses OWASP's current PBKDF2-HMAC-SHA-256 password-storage recommendation as a conservative reference; actual responsiveness still needs benchmarking on supported physical devices. +The PBKDF2 work factor uses OWASP's 600,000-iteration PBKDF2-HMAC-SHA-256 recommendation as a conservative reference. KDF latency still requires benchmarking on representative devices; a high iteration count is not a substitute for a strong passphrase or an independent security review. ## Important migration note -The original app used Blowfish-CBC with a hardcoded key and fixed IV. That design is unauthenticated and unsuitable for new data. Version 2 does not generate legacy Blowfish ciphertext and does not automatically import old ciphertext. Keep a backup of any old data you still need; do not assume old messages can be opened by the new version. +The original app used Blowfish-CBC with a hardcoded key and fixed IV. That design was unauthenticated and is not supported for new messages. Android Cipher 2.x does not automatically import old Blowfish ciphertext. Preserve backups of any legacy data you still need. ## Privacy and limitations -- The app requests no internet permission and does not upload message contents. -- The encryption password is required for every operation and is not saved by the app. -- Clipboard contents may be visible to other apps or system clipboard history. Android Cipher marks copied content as sensitive on Android 13+, but only copy sensitive output when necessary. -- The password-based format is portable: the same password can decrypt the message on another compatible device. -- This release focuses on text. File encryption, secure vault storage, biometric unlock, and encrypted history are not implemented. -- Cryptographic code should receive independent security review before being used for high-value or regulated data. +- The app requests no Internet permission and does not upload message contents. +- Encryption passwords are not saved to preferences or included in ciphertext. +- The app limits messages to 1 MiB to bound work on untrusted pasted input. +- Clipboard contents can be visible to the keyboard or other system surfaces. Android Cipher marks copied output as sensitive for modern clipboard previews and clear-all removes its own copied clip when it is still the active clip. +- Sharing a decrypted result deliberately sends that text to the app selected in Android's Sharesheet. +- This release focuses on text. File encryption, encrypted vault storage, biometric unlock and encrypted history are not implemented. +- Cryptographic code has not had an independent audit. Do not use it for high-value or regulated data without professional review. ## License @@ -96,4 +112,4 @@ This project is distributed under the GNU General Public License v3.0. See [LICE ## Contributing -Issues and pull requests are welcome. Please include reproducible build steps and tests for changes to cryptographic formats. +Issues and pull requests are welcome. Changes to cryptographic formats must include compatibility tests and must not silently change the interpretation of existing envelopes. From df164eb6b961ec5868a1878d87d39afdfeb2aa01 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:53:12 +0530 Subject: [PATCH 24/35] Make Unicode UI test deterministic without emulator keyboard input --- .../encryptiondecryption/ExampleInstrumentedTest.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/androidTest/java/com/example/encryptiondecryption/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/example/encryptiondecryption/ExampleInstrumentedTest.java index 8b6bf79..9d592c5 100644 --- a/app/src/androidTest/java/com/example/encryptiondecryption/ExampleInstrumentedTest.java +++ b/app/src/androidTest/java/com/example/encryptiondecryption/ExampleInstrumentedTest.java @@ -1,8 +1,6 @@ package com.example.encryptiondecryption; import static androidx.test.espresso.Espresso.onView; -import static androidx.test.espresso.action.ViewActions.closeSoftKeyboard; -import static androidx.test.espresso.action.ViewActions.typeText; import static androidx.test.espresso.assertion.ViewAssertions.matches; import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; import static androidx.test.espresso.matcher.ViewMatchers.withId; @@ -33,8 +31,8 @@ public void launchShowsEncryptionControlsAndResult() { @Test public void characterCounterCountsUnicodeCodePoints() { - onView(withId(R.id.inputText)) - .perform(typeText("Hi 🔐"), closeSoftKeyboard()); + activityRule.getScenario().onActivity(activity -> + activity.findViewById(R.id.inputText).setText("Hi 🔐")); onView(withId(R.id.inputCount)).check(matches(withText("4 characters"))); } } From 94fb0ebc8343bf5e99ff0ceda95b2018433f8201 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:53:15 +0530 Subject: [PATCH 25/35] Use a compatible Pixel emulator profile for API 26 and 36 --- .github/workflows/android-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml index 1460d90..ed17c89 100644 --- a/.github/workflows/android-ci.yml +++ b/.github/workflows/android-ci.yml @@ -87,6 +87,6 @@ jobs: api-level: ${{ matrix.api-level }} target: default arch: x86_64 - profile: pixel_7 + profile: pixel_2 disable-animations: true script: bash gradlew --no-daemon connectedDebugAndroidTest From 44f85a7ea1aef6053e118fb7387f3ba47fbd232a Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:55:02 +0530 Subject: [PATCH 26/35] Compile against API 37 required by AndroidX Core 1.19.1 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index b03a623..a4995d0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,7 +4,7 @@ plugins { android { namespace 'com.example.encryptiondecryption' - compileSdk 36 + compileSdk 37 defaultConfig { applicationId "com.example.encryptiondecryption" From 21942ad8482ab7dc3f2e23f69c320ec04437d75f Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:55:05 +0530 Subject: [PATCH 27/35] Install Android 37 platform for current AndroidX build tools From ff44b42dfa2989832901e2fadd7ed74aba5035dd Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:55:08 +0530 Subject: [PATCH 28/35] Install Android 37 platform for signed release builds From 6c6c675fa44e6129cff68ff5947b7c1c17fe06dd Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:55:17 +0530 Subject: [PATCH 29/35] Install Android 37 SDK for dependency compileSdk requirement --- .github/workflows/android-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml index ed17c89..a80951f 100644 --- a/.github/workflows/android-ci.yml +++ b/.github/workflows/android-ci.yml @@ -39,8 +39,8 @@ jobs: with: packages: platform-tools - - name: Install Android 36 SDK - run: sdkmanager "platforms;android-36" "build-tools;36.0.0" + - name: Install Android 37 SDK + run: sdkmanager "platforms;android-37" "build-tools;36.0.0" - name: Run unit tests, lint and assemble installable build variants run: bash gradlew --no-daemon clean testDebugUnitTest lintDebug assembleDebug assembleRelease bundleRelease From 4fa6888752e42cdb80b71cb60db1953156c130be Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:55:20 +0530 Subject: [PATCH 30/35] Install Android 37 SDK for dependency compileSdk requirement --- .github/workflows/publish-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 1f2082b..d34475c 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -41,8 +41,8 @@ jobs: with: packages: platform-tools - - name: Install Android 36 SDK - run: sdkmanager "platforms;android-36" "build-tools;36.0.0" + - name: Install Android 37 SDK + run: sdkmanager "platforms;android-37" "build-tools;36.0.0" - name: Check release signing credentials id: signing From 499336f5a8f5adc13a94bdfd68f78e989db80f89 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:55:23 +0530 Subject: [PATCH 31/35] Clarify compile SDK 37 versus Play target API 36 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2e42419..12a4e8e 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,9 @@ A lightweight, offline-first Android text encryption app built with Java and Mat - Android Studio with Android Gradle Plugin 9.5.2. - JDK 17. - Gradle 9.9.1 (wrapper). -- Android SDK 36. +- Android SDK Platform 37 for compilation (Android 17 SDK). - Minimum Android version: API 26 (Android 8.0). -- Target SDK: API 36 (Android 16). +- Target SDK: API 36 (Android 16), matching the current Google Play submission requirement. - Java source compatibility: Java 17. ## Build and test From b34eb042179290f4fcaacbd03cd067777cbc5a52 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:56:32 +0530 Subject: [PATCH 32/35] Use latest AndroidX Core compatible with stable API 36 SDK --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a4995d0..98b57de 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,7 +4,7 @@ plugins { android { namespace 'com.example.encryptiondecryption' - compileSdk 37 + compileSdk 36 defaultConfig { applicationId "com.example.encryptiondecryption" @@ -63,7 +63,7 @@ android { dependencies { implementation 'androidx.appcompat:appcompat:1.8.0' implementation 'com.google.android.material:material:1.14.0' - implementation 'androidx.core:core:1.19.1' + implementation 'androidx.core:core:1.17.0' implementation 'androidx.core:core-splashscreen:1.2.0' testImplementation 'junit:junit:4.13.2' From 217f43f0b38eeb610a360a68f15e20f9d888c01f Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:56:35 +0530 Subject: [PATCH 33/35] Use stable API 36 SDK in CI --- .github/workflows/android-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml index a80951f..ed17c89 100644 --- a/.github/workflows/android-ci.yml +++ b/.github/workflows/android-ci.yml @@ -39,8 +39,8 @@ jobs: with: packages: platform-tools - - name: Install Android 37 SDK - run: sdkmanager "platforms;android-37" "build-tools;36.0.0" + - name: Install Android 36 SDK + run: sdkmanager "platforms;android-36" "build-tools;36.0.0" - name: Run unit tests, lint and assemble installable build variants run: bash gradlew --no-daemon clean testDebugUnitTest lintDebug assembleDebug assembleRelease bundleRelease From 371587661502447d5f402aa5aa50d2208ec33f96 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:56:38 +0530 Subject: [PATCH 34/35] Use stable API 36 SDK for signed releases --- .github/workflows/publish-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index d34475c..1f2082b 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -41,8 +41,8 @@ jobs: with: packages: platform-tools - - name: Install Android 37 SDK - run: sdkmanager "platforms;android-37" "build-tools;36.0.0" + - name: Install Android 36 SDK + run: sdkmanager "platforms;android-36" "build-tools;36.0.0" - name: Check release signing credentials id: signing From 4e92f1fbb932fbffb7c96b9d13adc612d50af421 Mon Sep 17 00:00:00 2001 From: koushik HY <104705007+koushik4475@users.noreply.github.com> Date: Sun, 22 Nov 2026 14:56:41 +0530 Subject: [PATCH 35/35] Document stable API 36 compile and dependency compatibility --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 12a4e8e..c4790cf 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ A lightweight, offline-first Android text encryption app built with Java and Mat - Android Studio with Android Gradle Plugin 9.5.2. - JDK 17. - Gradle 9.9.1 (wrapper). -- Android SDK Platform 37 for compilation (Android 17 SDK). +- Android SDK Platform 36 for compilation (Android 16 SDK). - Minimum Android version: API 26 (Android 8.0). - Target SDK: API 36 (Android 16), matching the current Google Play submission requirement. - Java source compatibility: Java 17.