Recently Written · git

assistkey

Hardware key remapper for the Viwoods AiPaper Reader: AI key, volume keys and power, with multi-tap, hold and chords

git clone https://github.com/equwal/assistkey

Log | Files | Refs


commit f475e36add897b30a3b629467c98fc85a41601e9
truex <truex@equwal.com>
2026-09-26 13:54:43 -0700

Turn on R8, leave the Google dependency list out, and set the version to 0.1.2-beta

F-Droid asks for R8 and for a reproducible build. The recipe now names the signed fdroid APK on GitHub (Binaries) and the key that signs it (AllowedAPKSigningKeys). proguard-rules.pro keeps all names, keeps Shizuku.newProcess for Shell.kt, and allows the Play Billing telemetry classes that the build leaves out. dependenciesInfo is off: F-Droid rejects the encrypted dependency list in the signing block.

 CHANGELOG.md                                      | 10 ++++++++++
 app/build.gradle.kts                              | 16 ++++++++++++----
 app/proguard-rules.pro                            | 13 +++++++++++++
 fastlane/metadata/android/en-US/changelogs/18.txt |  1 +
 fdroid/dev.equwal.assistkey.yml                   | 13 ++++++++-----
 gradle.properties                                 |  4 ++--
 6 files changed, 46 insertions(+), 11 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b1be670..14fbc7f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,15 @@
 # Changelog
 
+## 0.1.2-beta - 2026-09-26
+
+Version code 18.
+
+- **Smaller.** R8 now removes unused code from the release builds. F-Droid asks
+  for it. Names of classes stay the same.
+- **Reproducible F-Droid build.** The signed APK has no dependency list for
+  Google in it. F-Droid builds the `fdroid` flavour itself and checks that it is
+  the same as the signed APK on GitHub.
+
 ## 0.1.1-beta - 2026-09-21
 
 Version code 17. The source code is now public under GPL-3.0-or-later.
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index e27c546..0e8ed55 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -42,6 +42,13 @@ android {
     namespace = "dev.equwal.assistkey"
     compileSdk = 36
 
+    // No list of dependencies, encrypted for Google alone, in the signed APK.
+    // F-Droid does not accept it, and it would stop the reproducible build check.
+    dependenciesInfo {
+        includeInApk = false
+        includeInBundle = false
+    }
+
     defaultConfig {
         applicationId = "dev.equwal.assistkey"
         // QuickAccessWalletService, which the wallet channel needs, is API 31.
@@ -102,10 +109,11 @@ android {
 
     buildTypes {
         release {
-            // No shrinking: the app is tiny, and R8 would only complicate
-            // keeping the accessibility service and the three impersonation
-            // entry points reachable.
-            isMinifyEnabled = false
+            // R8 removes unused code. F-Droid asks for it. proguard-rules.pro
+            // turns off renaming, because the code names its own activities and
+            // services in strings, and keeps Shizuku.newProcess for Shell.kt.
+            isMinifyEnabled = true
+            proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
             if (hasSigning) signingConfig = signingConfigs.getByName("release")
         }
         debug {
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100644
index 0000000..5616060
--- /dev/null
+++ b/app/proguard-rules.pro
@@ -0,0 +1,13 @@
+# Keep all names. The code names its own activities and services in strings
+# (for example Channel and ViwoodsBridge), and stored settings hold names too.
+-dontobfuscate
+
+# app/build.gradle.kts leaves out com.google.android.datatransport, the telemetry
+# of Play Billing, on purpose. So its classes are missing from the play and full builds.
+-dontwarn com.google.android.datatransport.**
+
+# Shell.kt calls the private method Shizuku.newProcess by reflection.
+# Keep it, so that R8 does not remove it.
+-keepclassmembers class rikka.shizuku.Shizuku {
+    *** newProcess(java.lang.String[], java.lang.String[], java.lang.String);
+}
diff --git a/fastlane/metadata/android/en-US/changelogs/18.txt b/fastlane/metadata/android/en-US/changelogs/18.txt
new file mode 100644
index 0000000..0c8bf1a
--- /dev/null
+++ b/fastlane/metadata/android/en-US/changelogs/18.txt
@@ -0,0 +1 @@
+The app is smaller: R8 removes code that it does not use. F-Droid now checks that its build is the same as the signed APK on GitHub.
diff --git a/fdroid/dev.equwal.assistkey.yml b/fdroid/dev.equwal.assistkey.yml
index 1f0f722..41ecf4e 100644
--- a/fdroid/dev.equwal.assistkey.yml
+++ b/fdroid/dev.equwal.assistkey.yml
@@ -12,19 +12,22 @@ AutoName: Rebind
 
 RepoType: git
 Repo: https://github.com/equwal/assistkey.git
+Binaries: https://github.com/equwal/assistkey/releases/download/v%v/rebind-%v-fdroid.apk
 
 Builds:
-  - versionName: 0.1.1-beta
-    versionCode: 17
-    commit: v0.1.1-beta
+  - versionName: 0.1.2-beta
+    versionCode: 18
+    commit: v0.1.2-beta
     subdir: app
     gradle:
       - fdroid
     rm:
       - app/src/full/assets/bundled
 
+AllowedAPKSigningKeys: bcb3127e1931a9b906e8e2498184ef5380f97cbf3531e5bc8bb0064476ee2919
+
 AutoUpdateMode: Version
 UpdateCheckMode: Tags
 UpdateCheckData: gradle.properties|assistkey\.versionCode=(\d+)|gradle.properties|assistkey\.versionName=(.+)
-CurrentVersion: 0.1.1-beta
-CurrentVersionCode: 17
+CurrentVersion: 0.1.2-beta
+CurrentVersionCode: 18
diff --git a/gradle.properties b/gradle.properties
index e117ecc..95bcf8a 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -6,8 +6,8 @@ android.nonTransitiveRClass=true
 kotlin.code.style=official
 
 # Release identity. versionCode must rise with every upload to Play.
-assistkey.versionName=0.1.1-beta
-assistkey.versionCode=17
+assistkey.versionName=0.1.2-beta
+assistkey.versionCode=18
 
 # The free beta ends on this date (UTC) at the latest. It is the backstop for
 # installs that cannot reach Google Play; the real switch is the