Skip to content

v0.1.10 — your habits stay on your phone

Choose a tag to compare

@jorgejiro jorgejiro released this 08 Sep 07:41
· 124 commits to main since this release
6188e86

Your habits stay on your phone.

Install

Open this page on the phone, tap constanza-0.1.10.apk, install over the previous version. No database change — installing over 0.1.9 keeps everything you have.

Android was copying your habits to Google Drive

Found the way these things are usually found: uninstalling the app to install a new build, and watching every habit reappear afterwards.

Uninstalling really does delete /data/data. What put the data back was Android Auto Backup — android:allowBackup was true, so the platform had been copying the habit database to the account's Google Drive and restoring it on the next install. The attribute was written into the manifest, but true is also Android's default and nothing explained the choice, so it was template rather than a decision. Nobody picked it.

It is picked now, the other way. Keeping your habits across a reinstall or a new phone is what Export and Import in Settings are for: a file you ask for, keep where you like, and can open and read. A restore you never asked for is how uninstalling quietly stopped meaning "start clean".

Turning off the manifest flag only closes half of it. On Android 12 and above, phone-to-phone transfer is configured separately and would still have carried the database to a new device, so that path is excluded too.

What this means for you, practically

Reinstalling is now a real reset. If you ever want your habits back after wiping the app, export first — nothing will bring them back on its own any more.

Not verified: whether the copy already sitting in the Google Drive of a device that ran an earlier version is deleted, and when. From this version the app neither uploads new data nor restores from any copy, but what Google does with the one already uploaded was not checked here.

Verification

App unit tests 304/304, domain 57/57, detekt clean on main sources.

The backup flag is checked three independent ways rather than one, on the release build itself:

  • aapt2 reading the APK's own manifest reports allowBackup=false and the extraction rules present
  • an instrumented test reads the flag off the merged manifest as the platform parses it — not off the source file, because a library can reintroduce that attribute without anyone touching ours — and passes on a device
  • adb shell dumpsys package lists the installed app's flags as [ DEBUGGABLE HAS_CODE ALLOW_CLEAR_USER_DATA ], with ALLOW_BACKUP absent. That is Android's own view, independent of both the source and the test.

That test also exists because the setting comes back by itself: true is the default, so deleting the line reads as tidying rather than as a change of behaviour.

APK signed with the release key and verified with apksigner (CN=Constanza, OU=jjrapps), aapt2 confirming versionCode 11, versionName 0.1.10.

Delivered by #112 and #113.