Preserve household TV data across app maintenance
All checks were successful
review/code-claude No blocking findings on a0237fa9
All checks were successful
review/code-claude No blocking findings on a0237fa9
This commit is contained in:
parent
332fc6476d
commit
a0237fa975
2 changed files with 25 additions and 6 deletions
|
|
@ -40,6 +40,7 @@
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
|
android:hasFragileUserData="true"
|
||||||
android:banner="@mipmap/ic_banner"
|
android:banner="@mipmap/ic_banner"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
|
|
||||||
|
|
@ -991,12 +991,30 @@ Keep and back up this file across clean builds, disposable worktrees, container
|
||||||
rebuilds and Gradle cache resets. Never commit it. The standard debug passwords
|
rebuilds and Gradle cache resets. Never commit it. The standard debug passwords
|
||||||
are public; this key is for local debug/optimized builds, not release signing.
|
are public; this key is for local debug/optimized builds, not release signing.
|
||||||
|
|
||||||
**One-time reinstall:** the first build with the stable key still needs one
|
### Preserve household TV data
|
||||||
uninstall+reinstall on the box because the signer changes once; later ones
|
|
||||||
install in place with `adb install -r`, retaining sign-ins and settings.
|
Install and update the household TV app only in place with `adb install -r`,
|
||||||
The initial uninstall removes app data, so sign in again once after that switch.
|
using the same package and persistent debug signer. Its certificate SHA-256 is:
|
||||||
Deleting/replacing the persistent key or choosing a different override changes
|
|
||||||
the signer again and requires another reinstall.
|
```text
|
||||||
|
182bac72e292b9ea4d3d4e6383f92eb2161fa28ba5afcff0337cb7d5a9d5341d
|
||||||
|
```
|
||||||
|
|
||||||
|
Never run `adb uninstall`, `pm uninstall` or `pm clear`, or switch signers on
|
||||||
|
the household box: clearing/removing the app deletes saved people, sign-ins
|
||||||
|
and settings, and a different signer cannot update the existing app in place.
|
||||||
|
Do not delete or replace the persistent key. If an uninstall is unavoidable,
|
||||||
|
use `adb uninstall -k <package>` to keep app data, then reinstall the same
|
||||||
|
package with the same signer.
|
||||||
|
|
||||||
|
The manifest sets `android:hasFragileUserData="true"` so Android 10+ can offer
|
||||||
|
a **keep app data** choice during interactive uninstall. Choose it when
|
||||||
|
available; older Android versions ignore the attribute. This is a retention
|
||||||
|
prompt, not an automatic backup or a guarantee against data clearing.
|
||||||
|
|
||||||
|
For an in-place update, compare `dumpsys package <pkg>` before and after:
|
||||||
|
`firstInstallTime` must remain unchanged. The guarded installer that checks
|
||||||
|
the signer and this timestamp lives in the operator's tooling, not this repo.
|
||||||
|
|
||||||
|
|
||||||
## Release credentials
|
## Release credentials
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue