Skip to content

Backups: the gesture library checksum is neither backed up nor restored - #1027

Open
4di-hello wants to merge 2 commits into
LeanBitLab:mainfrom
4di-hello:pr/backup-lib-checksum
Open

4di-hello wants to merge 2 commits into
LeanBitLab:mainfrom
4di-hello:pr/backup-lib-checksum

Conversation

@4di-hello

Copy link
Copy Markdown
Contributor

The checksum in lib_checksum (protected prefs) tells the keyboard which gesture library file it may load as native code. The library file itself isn't in backups, so its checksum shouldn't come from one either:

  • Restoring a backup can remove or replace lib_checksum, e.g. a backup from another phone or from before the library was loaded. On the next start JniUtils then sees a mismatch with the installed library and deletes it (userSuppliedLibrary.delete()), so gesture typing is gone after the restore.
  • A backup file could set a checksum for a library file it doesn't contain.

Now the key is skipped when backing up and when restoring. Every restore path (main, protected and auxiliary prefs) goes through the same filter.

Compiles. In my fork (LeanType+) since 1.11.

🤖 Generated with Claude Code

4di-hello and others added 2 commits November 30, 2026 20:15
The checksum lets the keyboard load native code from the gesture library file. The library itself is
not in backups, so a restored backup must not set or remove its checksum either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant