build(android): install the debug build alongside release as its own app

Testing a debug build meant uninstalling the real one first: same
applicationId signed with a different key is INSTALL_FAILED_UPDATE_
INCOMPATIBLE, so every experiment cost the app's settings, credentials
and offline cache.

The debug build type now carries applicationIdSuffix ".debug" and
versionNameSuffix "-debug", so it installs as com.dtourolle.jellytau.debug
("JellyTau Debug", 0.5.5-debug) with its own data directory — two
independent apps on one device.

Only the *application* id is suffixed. Kotlin classes stay in the
`namespace` package com.dtourolle.jellytau, so the JNI loadClass lookups
in player/android/mod.rs, the manifest <service> entry and the R8 keep
rules are untouched, and the FileProvider authority was already
${applicationId}-relative. Launcher names come from the appLabel /
activityLabel manifestPlaceholders rather than resValue, which would
collide with Tauri's generated strings.xml; release resolves them back to
@string/app_name and merges byte-identical.

deploy-android.sh reports the target package and explains an
UPDATE_INCOMPATIBLE failure instead of leaving it raw; logcat.sh takes a
debug|release argument (it was filtering on com.jellytau.app, a package
that has never existed) and attaches by pid when the app is running.

Verified: aapt2 badging on the built APK reports
com.dtourolle.jellytau.debug / 0.5.5-debug / "JellyTau Debug", and the
release manifest merge is unchanged.
This commit is contained in:
2026-08-16 10:36:48 +02:00
parent e457a9884c
commit 2cc39cd7fd
6 changed files with 111 additions and 8 deletions
+25 -4
View File
@@ -1,13 +1,34 @@
#!/bin/bash
# View Android logcat output filtered for the app
# View Android logcat output filtered for the app.
#
# Usage: ./scripts/logcat.sh [debug|release] (default: debug)
#
# The debug build has applicationIdSuffix ".debug" so it can be installed
# alongside a release build; pick the package to follow accordingly.
set -e
APP_PACKAGE="com.jellytau.app"
BUILD_TYPE="${1:-debug}"
if [ "$BUILD_TYPE" = "release" ]; then
APP_PACKAGE="com.dtourolle.jellytau"
else
APP_PACKAGE="com.dtourolle.jellytau.debug"
fi
echo "📱 Showing logcat for $APP_PACKAGE"
echo "Press Ctrl+C to stop"
echo ""
# Filter logcat for the app's package name
adb logcat | grep -i "$APP_PACKAGE\|tauri\|rust"
# Prefer PID-scoped output when the app is running — it drops the noise that a
# text grep can't. Fall back to the old keyword filter when it isn't (so you can
# start the script first and then launch the app).
PID="$(adb shell pidof "$APP_PACKAGE" 2>/dev/null | tr -d '\r\n' | awk '{print $1}')"
if [ -n "$PID" ]; then
echo " (attached to pid $PID)"
adb logcat --pid="$PID"
else
echo " (app not running — falling back to keyword filter)"
adb logcat | grep -i "$APP_PACKAGE\|jellytau\|tauri\|rust"
fi