-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Companion App doesn't work on privacy-focused Android distributions (CalyxOS, GrapheneOS) #55
Comments
Can't test, but one possible solution is to disable Storage Scopes for Linux Android Backup and grant the storage permissions manually. It's possible to do this by going to Settings -> Apps & notifications -> See all apps -> Linux Android Backup Companion -> Permissions -> Storage Scopes and toggling it off. Then, storage permissions can be granted by going to Settings -> Apps & notifications -> See all apps -> Linux Android Backup Companion -> Permissions -> Files and media and choosing Allow management of all files. |
I related issue: I did a backup on my Pixel 6a with stock Android and I restored it on GrapheneOS (on the same phone, after flashing it). |
What permission errors were you getting? |
Unfortunately, I didn't take a screenshot. But it was a very general error message. |
I get the same problem on my Samsung Galaxy A40 that uses Android 11 (last automatic system update was in March 2023) . Running the backup script from the git repository I took the brute-force way of commenting out the offending code that tries to back up SMS and Contact information, and it continued. diff --git a/functions/backup_func.sh b/functions/backup_func.sh
index 0a714da..81e37f9 100644
--- a/functions/backup_func.sh
+++ b/functions/backup_func.sh
@@ -55,13 +55,13 @@ function backup_func() {
done
# Export contacts and SMS messages
- cecho "Exporting contacts (as vCard) and SMS messages (as CSV)."
- mkdir ./backup-tmp/Contacts
- get_file /storage/emulated/0/open-android-backup-temp . ./backup-tmp/Contacts
- mkdir ./backup-tmp/SMS
- mv ./backup-tmp/Contacts/SMS_Messages.csv ./backup-tmp/SMS
- cecho "Removing temporary files created by the companion app."
- adb shell rm -rf /storage/emulated/0/open-android-backup-temp
+# cecho "Exporting contacts (as vCard) and SMS messages (as CSV)."
+# mkdir ./backup-tmp/Contacts
+# get_file /storage/emulated/0/open-android-backup-temp . ./backup-tmp/Contacts
+# mkdir ./backup-tmp/SMS
+# mv ./backup-tmp/Contacts/SMS_Messages.csv ./backup-tmp/SMS
+# cecho "Removing temporary files created by the companion app."
+# adb shell rm -rf /storage/emulated/0/open-android-backup-temp
# Export internal storage
cecho "Exporting internal storage - this will take a while." Funnily, I still see 'Exporting contacts (as vCard) and SMS messages (as CSV).' on the terminal inspite of being commented out; I have no idea how this can happen... Similarly, 'Exporting call logs' doesn't seem to work; I see
but this didn't make the script abort. |
@lemzwerg Thanks for the info! However, to troubleshoot the issue you are facing, I need to see the logs when the script is run with no modifications. Could you please run the script as it is and send me the logs as an attachment or a link? This will help me understand what is going wrong and how to fix it. If you're worried the logs could contain identifying information, you can email them to me - my e-mail address can be found in my GitHub profile. |
Sorry for the late replay. Here it is.
|
Just to confirm, did you press the "Export data" button when the Companion App was automatically opened on your device? This error usually shows up when this button isn't pressed. Related issue: #63 |
Yep, I did that. |
I can't reproduce this on the latest GrapheneOS 🙁 |
Good news: I've just done a full backup without any problems of my Galaxy S40 (Android 11, Kernel 4.4.177 from 2023-Mar-24) on my GNU/Linux box using current git (f2c7e83). In other words, the problem, whatever it was, has been solved for me. |
Discussed in #39
Originally posted by onley November 27, 2022
Report any possible clues regarding this problem as well as workarounds under this issue. Unfortunately I don't have any devices that could run either of these operating systems, so I'm unable to debug this without your help.
The text was updated successfully, but these errors were encountered: