Recently Written · git

ink-recents

Ink Recents: a recent-apps switcher drawn for e-ink readers. No animation, swipe up to close, swipe down to close the others.

git clone https://github.com/equwal/ink-recents

Log | Files | Refs


commit 52af6ab5a6cd30ea647fd2317bde7d5d8c33a3ab
equwal <13551856+equwal@users.noreply.github.com>
2026-10-04 02:20:01 -0700

Declare ShizukuProvider, drop the su fallback of the snapshot read, disclose the snapshot read

 PRIVACY.md                                      | 4 +++-
 app/src/main/AndroidManifest.xml                | 9 +++++++++
 app/src/main/java/dev/equwal/inkrecents/Apps.kt | 6 +++---
 3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/PRIVACY.md b/PRIVACY.md
index d290269..de2939b 100644
--- a/PRIVACY.md
+++ b/PRIVACY.md
@@ -16,7 +16,9 @@ background processes of an app that you close.
 
 **Shizuku (moe.shizuku.manager.permission.API_V23).** If you run Shizuku, the
 app asks the shell for the task list, and closes a task that you close. The
-commands are `dumpsys activity recents`, `am stack remove` and `am kill`.
+commands are `dumpsys activity recents`, `am stack remove` and `am kill`. On a device where
+the shell is root, it also reads the task snapshot files with `base64`, to show
+a picture on the card. The app never runs `su`.
 
 ## What the app stores
 
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 254033b..1f73a3d 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -77,6 +77,15 @@
             </intent-filter>
         </service>
 
+        <!-- Shizuku delivers its binder to the app through this provider. -->
+        <provider
+            android:name="rikka.shizuku.ShizukuProvider"
+            android:authorities="${applicationId}.shizuku"
+            android:enabled="true"
+            android:exported="true"
+            android:multiprocess="false"
+            android:permission="android.permission.INTERACT_ACROSS_USERS_FULL" />
+
     </application>
 
 </manifest>
diff --git a/app/src/main/java/dev/equwal/inkrecents/Apps.kt b/app/src/main/java/dev/equwal/inkrecents/Apps.kt
index 221d503..1217a24 100644
--- a/app/src/main/java/dev/equwal/inkrecents/Apps.kt
+++ b/app/src/main/java/dev/equwal/inkrecents/Apps.kt
@@ -124,13 +124,13 @@ object Apps {
 
     /**
      * The picture that the system keeps of a task. The files belong to `system`,
-     * so this works only where the shell is root, or can use `su`. It gives null
-     * in every other case.
+     * so this works only where the shell is root. It gives null in every other
+     * case. The app never calls `su`.
      */
     fun snapshot(taskId: Int, done: (android.graphics.Bitmap?) -> Unit) {
         val dir = "/data/system_ce/0/snapshots/"
         val pick = "f=$dir${taskId}_reduced.jpg; [ -e \$f ] || f=$dir$taskId.jpg; "
-        Shell.run(pick + "base64 -w 0 \$f 2>/dev/null || su 0 base64 -w 0 \$f 2>/dev/null") { r ->
+        Shell.run(pick + "base64 -w 0 \$f 2>/dev/null") { r ->
             val bytes = runCatching {
                 android.util.Base64.decode(r.output.trim(), android.util.Base64.DEFAULT)
             }.getOrNull()