Releases: Tiefkuehlpizze/oandbackupx
7.0.0-tkp_workaroundEmptyPaths_v2
Read at least this
Testing release – not intended for productive use. Even though it's unexpected, things could go wrong especially on unexpected configurations. I'm not responsible if all your data is lost and your phone bricked.
Thank you for testing. You can give feedback in Issues or in OABX's Telegram group.
Contents
Workaround for Empty Paths
Workaround for empty paths occurring when restoring previously not installed apps because of a race condition with Package Manager Service. The restore process fails with the message "Could not restore a file due to a failed root command: mv: //shared_prefs: Read-only file system"
The problem is caused, because PackageManager returns a PackageInfo object where the dataDir path is empty. The workaround comes into effect when it detects this case. It waits a moment (currently 100ms) and tries another update of the data and repeats this procedure up to 5 times until it aborts the process as failed.
Please test this and try to reproduce either the said error message or the new error message "PackageManagerDataIncompleteException". Highest chances are on huge batch restores like after a phone wipe.
For self service, the new parameters can be configured through the advanced settings page.
Compression Level Setting
Just a slider to choose the compression level to trade-off a few percent of saved space for a lot saved time. My recommendation is level 1. Go fast! Already available upstream!
Wifi Backup/Restore fixed
OABX now knows where the WifiConfigStore.xml
is found. The location has been changed with release of Android 11. Now it works an all supported versions again. Already available upstream!
7.0.0-tkp_workaroundEmptyPaths_v1
Read at least this
Testing release – not intended for productive use. Even though it's unexpected, things could go wrong especially on unexpected configurations. I'm not responsible if all your data is lost and your phone bricked.
Thank you for testing. You can give feedback in Issues or in OABX's Telegram group.
Contents
Workaround for Empty Paths
Workaround for empty paths occurring when restoring previously not installed apps because of a race condition with Package Manager Service. The restore process fails with the message "Could not restore a file due to a failed root command: mv: //shared_prefs: Read-only file system"
The problem is caused, because PackageManager returns a PackageInfo object where the dataDir path is empty. The workaround comes into effect when it detects this case. It waits a moment (currently 100ms) and tries another update of the data and repeats this procedure up to 5 times until it aborts the process as failed.
Please test this and try to reproduce either the said error message or the new error message "PackageManagerDataIncompleteException". Highest chances are on huge batch restores like after a phone wipe.
Compression Level Setting
Just a slider to choose the compression level to trade-off a few percent of saved space for a lot saved time. My recommendation is level 1. Go fast! Already available upstream!
Wifi Backup/Restore fixed
OABX now knows where the WifiConfigStore.xml
is found. The location has been changed with release of Android 11. Now it works an all supported versions again. Already available upstream!
4.0.3-neotkp-beta05
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
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 withjava.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
Enjoy testing
4.0.4-neotkp-beta06
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 withjava.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
4.0.2-neotkp-beta04
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
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 withjava.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
Enjoy testing
4.0.1-neotkp-beta03
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
- 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)
- Fixed: Unnecessary gz file extension when creating encrypted backups
Known issues
- AppSheet does not update reliably (restarting OABX helps)
- Logfile in settings is always empty
- UI generally neglected in this version
- 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 withjava.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
Enjoy testing
2.0.0-tkp-rc1
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 2.0.0 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
Backup directory changes
tar.gz backup archives
- zip has been replaced with tar.gz
- subdirectories have been removed. They only exist during backup creation and are removed after compressing
- exception applies for external data (obb). It's usually not worth protecting and already compressed.
Structure cleanup
The base directory looks the same:
serranoltexx:/sdcard/OAndbackupX $ ls -l
total 364
-rw-rw---- 1 root sdcard_rw 328304 2020-06-28 12:57 OAndBackupX.log
drwxrwx--x 2 root sdcard_rw 4096 2020-07-01 23:33 cc.dict.dictcc
drwxrwx--x 2 root sdcard_rw 4096 2020-07-01 12:39 com.dwarfplanet.bundle
drwxrwx--x 4 root sdcard_rw 4096 2020-07-06 22:30 com.opera.browser
drwxrwx--x 2 root sdcard_rw 4096 2020-07-03 16:37 com.spotify.music
drwxrwx--x 3 root sdcard_rw 4096 2020-06-28 00:34 com.sunborn.girlsfrontline.en
-rw-rw---- 1 root sdcard_rw 37 2020-07-06 21:59 customlist1
drwxrwx--x 2 root sdcard_rw 4096 2020-07-06 22:30 data.usage.policy
drwxrwx--x 2 root sdcard_rw 4096 2020-07-01 23:39 de.avm.android.fritzapp
drwxrwx--x 2 root sdcard_rw 4096 2020-07-06 21:34 org.mozilla.firefox
The application's backup directory:
serranoltexx:/sdcard/OAndbackupX $ ls -l com.sunborn.girlsfrontline.en/
total 72140
-rw-rw---- 1 root sdcard_rw 67383788 2020-07-06 22:46 base.apk
-rw-rw---- 1 root sdcard_rw 499 2020-07-06 22:47 com.sunborn.girlsfrontline.en.log
-rw-rw---- 1 root sdcard_rw 9424 2020-07-06 22:46 data.tar.gz.enc
-rw-rw---- 1 root sdcard_rw 6459376 2020-07-06 22:46 external_files.tar.gz.enc
drwxrwx--x 2 root sdcard_rw 4096 2020-07-06 22:46 obb_files
base.apk
is the application itself (this example does not use split-apks)data.tar.gz.enc
is the application's data, compressed and encrypted- The same applies for
external_files.tar.gz.enc
obb_files
is just a plain directory with the obb stuff, that can be copied to it's original place
AES encrypted backups
- The data is kept secret. The key is generated from the configured password using PBKDF2WithHmacSHA1
Logging and Error Handling
- logcat is gives a lot more status information making tracing easier
- Exceptions for Backup and Restore that are caught and processed
Structure/Logic changes
- A base class for common Backup/Restore stuff
- Multiple more specialized classes
- Generic methods for data backup and restore
- Application wide instance of the new class
ShellHandler
to avoid repeated checks for toybox/busybox (quick solution, room for improvement I guess) - Added more functions to get paths from a common place instead of building them everywhere
- Cleanup actions are done even if an exception is thrown
- Move is used for restoring data instead of copying data on restore and target directories are wiped before restore to avoid mixing files
- an exclude list for directories to ignore has been introduced (such as cache or lib directories)
- Specific copy commands explicitly mentioning every file and directory to backup instead of using wildcards
- Proper restoring of correct permissions
UI/UX Changes
- Improved check for root and toybox; it aborts application launch if root permissions are denied to avoid issues during backup/restore
- Save button, that dumps logs of a failed batch process on user's wish
Unspecific code changes
- Brackets for readability
this
and classname prefix for clear visibility what is being access (a personal thing, I hate tracing a variable's scope)- Some comments in the code to explain what's going on and why
- Simplified some methods by removing parameters
Added dependencies
commons_compress
: tar and gzip streamscommons_io
: Just a common library for filesystem stuff. Unfortunately just the Java 6 version because of the low Android SDK.
Further Improvement ideas
- Harden the app against broken backups (missing .log file, missing data files)
- Use Android Keystore to store the AES key instead of regenerating it every time
- SDK 26+ (drop support for SDK 24 and 25)
- access to some useful new classes such as
Path
- more and stronger crypto algorithms
- more powerful access to the filesystem to handle special files such as named pipes and symlinks
- access to some useful new classes such as
- Refresh
AppInfo
objects andAppSheet
after operation- Restore pull fresh information from the package manager on it's own at the moment
Open Issues
- Apps with symlinks or named pipes in their data dir will fail to back up
- Backups processes can be ran at the same time. Scheduled backups can interfere with user triggered backups and let them end up in a corrupted state
1.2.0-tkp-splitapk
1.2.0-tkp
Implemented support for split/partial apks
Testing release.
This version can alter you backups and render them incompatible with the original oandbackupx!
Please use a separate backup folder for testing.
Changes from original 1.2.0
- Added: support for split/partial apps
- Fixed: Special System entries now write a proper log file and display the right information
- Fixed: Json parsing errors in logcat caused by files in the backup directory
Known Issues
- App shows "No such file or directory" errors after (batch) backup when apps with empty cache directories were processed. Disable cache wiping before backup.
- Other not critical errors messages related to oab-utils after backup
Not tested with oab-utils - only in legacy mode
Disclaimer
I'm not responsible for anything. It's your device, your choice and your damage.
I'm testing the app on my own, but I can only test my configuration. It seems to work, but I'm still maintaining a second backup.
1.2.0-splitapk Testing Bugfix1
Implemented support for split/partial apks
Testing release. Please do not use this for your important backups!
This version can alter you backups and render them incompatible with the original oandbackupx!
Please use a separate backup folder for testing.
Changes:
- Fixed the crashes caused by the NullPointerException.
Known Issues:
- App shows "No such file or directory" errors after (batch) backup when apps with empty cache directories were processed
Not tested with oab-utils - only in legacy mode