Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to backup application #1108

Closed
kri164 opened this issue Oct 27, 2021 · 10 comments
Closed

Unable to backup application #1108

kri164 opened this issue Oct 27, 2021 · 10 comments
Assignees
Labels
Milestone

Comments

@kri164
Copy link

kri164 commented Oct 27, 2021

  • App build number: Version 2.4.2 (24208) - OSS
  • Android version: Android 11 (Lineage OS 18.1 2021/10/15)
  • Device: Xiaomi Redmi Note 9 Pro

Hello all,

Im unable to backup Owntracks application. Lineage OS comes with included SeedVault Backup (solution from Calyx Institute).
https://calyxinstitute.org/projects/seedvault-encrypted-backup-for-android

Error is "quota exceed". Searching on internet point me to android backup limits 25 MB (or 50 MB maybe) for application data suitable for backup.

Owntracks has 37 MB app and 82 MB userdata on my device after installation and few days of usage.
Nexttracks (fork of Owntracks) has only 17 MB app and 2MB userdata on same device.

Can I ask some kind developer to look at https://developer.android.com/guide/topics/data/autobackup
and exclude some files from backup in app source code via <exclude> elements :

android/project/app/src/main/res/xml/backup_descriptor.xml

Thank you very much for your great app
Petr

@growse
Copy link
Collaborator

growse commented Oct 27, 2021

I'll look into this - sounds like it should be a quick fix, although I'm not sure why the userdata should be 82MB. I'll check on some other devices and see what's pushing this size.

@kri164
Copy link
Author

kri164 commented Oct 27, 2021

Yes. I glad to know, what eated the place.
I can try adb shell command, but dont know, where to look and how to find it. Any advice is welcome.
Regards

@growse
Copy link
Collaborator

growse commented Oct 27, 2021

Ah, just noticed you're on the OSS version. I wonder if the cached map tiles are counting towards the user data space?

@growse
Copy link
Collaborator

growse commented Oct 27, 2021

Hah, yes, I just scolled around a lot on my OSM version and the User data jumped up to 43MB from about 10MB. I'll test adding an exclude for that path.

@kri164
Copy link
Author

kri164 commented Oct 27, 2021

Found it.

# du -h /data/data/org.owntracks.android/files/osmdroid/tiles/cache.db
82M /data/data/org.owntracks.android/files/osmdroid/tiles/cache.db

Maybe we can exclude tiles directory from backup.

Thank you

@growse
Copy link
Collaborator

growse commented Oct 27, 2021

Will be in 2.4.3

@growse growse added this to the v2.4.3 milestone Oct 28, 2021
@growse growse added the bug label Oct 28, 2021
@growse growse self-assigned this Oct 28, 2021
@growse
Copy link
Collaborator

growse commented Oct 28, 2021

Was just looking at the implementation here, I wonder if a better approach would be to get osmdroid to cache its tiles in the cacheDir() rather than the user data? So that would be /data/data/org.owntracks.android/cache/ rather than /data/data/org.owntracks.android/files.

I did some quick adb backup testing and it looks like it doesn't capture the cache dir in the backup, so I might try this initially, rather than trying to exclude paths from the backup.

@growse growse closed this as completed in c89a249 Oct 28, 2021
@kri164
Copy link
Author

kri164 commented Oct 29, 2021

If you will release beta 2, I will test it and will report results.
If not, I will wait to final 2.4.3 and will report too :-)
Thank you.

@growse
Copy link
Collaborator

growse commented Oct 29, 2021

Soon! Just a couple of things I want to tick off, then there'll be a new beta.

growse added a commit that referenced this issue Nov 3, 2021
* Cache dir is too fragile / touched by others to reliably put a SQLite
database. Related to #1108
* Also close file handles in tests that `adb shell`
@kri164
Copy link
Author

kri164 commented Nov 4, 2021

I would like to report that backuping of app is working now.
Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants