Skip to content

4.0.4-neotkp-beta06

Compare
Choose a tag to compare
@Tiefkuehlpizze Tiefkuehlpizze released this 29 Sep 20:28

Read at least this

Testing release – not intended for productive use. I'm only releasing from time to time without any other migration paths than "wipe your backup directory!"

So first of all:
This is a breaking change! Previous backups can't be restored anymore! Mixing OAndBackupX with OAndBackupX-tkp does not work and can destroy your backups!

You may now stop reading, if you just want to get your hands on. You have been warned.

Contents

Storage Access Framework

  • Support for SDCards and other external storage media
  • (Untested) Support for anything that offers an Android Storage Provider implementation (Cloud apps ( ͡° ͜ʖ ͡°)?)

The app asks in addition to storage access for a backup location. This is necessary because Storage Access Framework is managing restricting access to exactly that directory tree. OABX will create a subdirectory OABXNG in this directory and store backups in it.
Note: On Android 11 the root of the storage may not be chosen anymore.

Backup Format Restructuring & Multiple Backup Versions preparation

  • [Breaking Change!] Changed backup structure to contain a backup.properties file with necessary metadata and multiple directory levels
  • Implemented support for multiple backup versions (currently only the latest backup can be restored)
    • UI does not offer this functionality to the user yet

This implements the idea described in [Rework app "log" files NeoApplications#71](https://github.com/machiav3lli/oandbackupx/issues/71].
New directory scheme is now OABXNG/packageName/userId/dateTime/. Metadata is stored in backup.properties, apks are copied with their original names base.apk + the custom names into this directory. Data is separated into data.tar.gz, external_data.tar.gz etc. If encrypted, it's mentioned in the properties file and the files get an .enc suffix.

Sample directory structure:

generic_x86:/mnt/media_rw/160D-2E03/OABXNG/com.termux/0/2020-09-22-22-25-57 # ls -l 
total 35208
-rwxrwx--- 1 media_rw media_rw      604 2020-09-22 22:26 backup.properties
-rwxrwx--- 1 media_rw media_rw   192006 2020-09-22 22:25 base.apk
-rwxrwx--- 1 media_rw media_rw 17423087 2020-09-22 22:26 data.tar.gz
-rwxrwx--- 1 media_rw media_rw     8538 2020-09-22 22:25 split_config.en.apk
-rwxrwx--- 1 media_rw media_rw 18383276 2020-09-22 22:25 split_config.x86.apk
-rwxrwx--- 1 media_rw media_rw    13140 2020-09-22 22:25 split_config.xhdpi.apk

Sample backup.properties:

{
  "backupDate": "2020-09-22T22:25:57.985",
  "hasApk": true,
  "hasAppData": true,
  "hasDevicesProtectedData": false,
  "hasExternalData": false,
  "hasObbData": false,
  "isSystem": false,
  "packageLabel": "Termux",
  "packageName": "com.termux",
  "profileId": 0,
  "sourceDir": "/data/app/com.termux-i4mHG_D9D0GJZ-K4JKJiHQ==/base.apk",
  "splitSourceDirs": [
    "/data/app/com.termux-i4mHG_D9D0GJZ-K4JKJiHQ==/split_config.en.apk",
    "/data/app/com.termux-i4mHG_D9D0GJZ-K4JKJiHQ==/split_config.x86.apk",
    "/data/app/com.termux-i4mHG_D9D0GJZ-K4JKJiHQ==/split_config.xhdpi.apk"
  ],
  "versionCode": 99,
  "versionName": "0.99"
}

Symlink and Pipe support

  • Apps with symlinks and pipes in their data directories can be backed up and restored (example: Firefox, Termux, Bundle, …)

It was previously not possible to detect symlinks and add the to the tar archive. Now it works.
Symlinks with absolute paths can break upon restore because the paths might become invalid.

Internal Changes

  • Backup data is now streamed right into the backup archive. No insecure copying all data to sdcard before compressing and encrypting
  • Restore uses the OABX's cache directories to extract the data and then move it

Misc

  • Removed Share functionality for backups
    • Currently out of function and might not support multiple files

Fixes since last testing release

  • beta01:
    • Initial testing release
  • beta02:
    • OABX's own APK is copied again to the backup archive
    • Code cleanup from linting hints
    • New Logcat messages in scheduled backup processing
    • Fixed: Appcrashes for uninstalled apps with only invalid backups
    • Fixed: Do not try to backup not existent file in Wifi Access points special backup
    • Fixed: Deleting Backups implemented
    • Fixed: No more killing UID 1000's processes (system processes)
    • Improved: Storage access performance through caching (#10, #11 & #12 by @hg42)
  • beta03:
    • Fixed: Unnecessary gz file extension when creating encrypted backups
    • Added: Package ignore list to avoid backing up packages like Android System, which are impossible to backup
  • beta04:
    • Fixed: Also restore selinux security contexts when permissions are restored (Thanks to the community for reporting!)
    • Added: Own application package name to the ignore list to avoid accidental sending a SIGTERM to itself
  • beta05:
    • Fixed: Pipes were extracted as regular empty files
    • Fixed: Wrong permissions on extracted files
    • Fixed: Files in the root directory of the app's data dir would be added twice (found in com.katana.facebook)
    • Fixed: Uninstall message never disappearing
  • beta06:
    • Changed: Wakelock time to 60 minutes
    • Changed: Using am force-stop instead of posix signals to end applications before backup/restore
    • Added: Option to control if apps are closed before backup and restore

Known issues

  • AppSheet does not update reliably (restarting OABX helps) Seems to be okay now
  • Logfile in settings is always empty
  • UI generally neglected in this version (it works fine. The limitations are simply not implemented properties, users should see)
  • Package "Android System" is show as available for backup. But it doesn't work (app crash: kotlin.NotImplementedError: It does not make sense to backup sockets)
  • App crashes with java.time.format.DateTimeParseException: Solution right now is, to wipe the backup directory, because it contains backups from a testing version
  • Custom lists cannot be defined for scheduled backups
  • Deleting all backups from settings always offers special applications
  • Launcher and Keyboard are closed before backup and restore (if killing apps is enabled) and Android falls back to the default ones

Enjoy testing