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

Script crashes when exporting contacts #7

Closed
Poomex opened this issue Jan 21, 2022 · 8 comments
Closed

Script crashes when exporting contacts #7

Poomex opened this issue Jan 21, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@Poomex
Copy link

Poomex commented Jan 21, 2022

As in the title, apps export correctly but it crashes after this message:

Exporting contacts (as vCard).
adb: error: failed to stat remote object '/storage/emulated/0/linux-android-backup-temp': No such file or directory

log.txt

@mrrfv
Copy link
Owner

mrrfv commented Jan 22, 2022

What Android version are you on? Also, have you pressed the "Export Data" button in the companion app before letting the script continue?

@Poomex
Copy link
Author

Poomex commented Jan 23, 2022 via email

@mrrfv mrrfv added the bug Something isn't working label Jan 23, 2022
@mrrfv
Copy link
Owner

mrrfv commented Jan 23, 2022

Do you have any experience with Android app development? I can't reproduce this on my side, so you'd have to install Flutter and Android Studio, build a debug .apk and use the built-in debugger to get error logs. A video or screenshots could be also helpful.

P.S. Możemy porozumiewać się po polsku :)

@Poomex
Copy link
Author

Poomex commented Jan 23, 2022 via email

@L34T
Copy link

L34T commented Jan 23, 2022

android:maxSdkVersion="28" from https://github.com/mrrfv/linux-android-backup/blob/673728da1d991e7fea2696810d9a1cab1603487b/companion_app/android/app/src/main/AndroidManifest.xml#L6
is wrong for me and returns errno 13 on create directory.

ps api29 phone
ps2 not sure, but seems this line required for api29 and above...
I was wrong.
MANAGE_EXTERNAL_STORAGE required from api30 and above.
But WRITE_EXTERNAL_STORAGE was required(according to manifest) for api28 and earlier.
So for api29 no write permission was requested in manifest.

@mrrfv
Copy link
Owner

mrrfv commented Jan 24, 2022

I built 2 debug APKs - one with no changes, and one with android:maxSdkVersion set to 29. Let me know if the second debug APK resolves the issue.

Download link (compressed with 7-Zip)

@Poomex
Copy link
Author

Poomex commented Jan 24, 2022

The debug version worked for me. But I had to replace the .apk built by the script with the debug one, otherwise it kept overwriting it with the original.

Thank you for your work! Pozdro

@mrrfv mrrfv closed this as completed in abdbc96 Jan 24, 2022
@xipmix
Copy link

xipmix commented Jul 4, 2022

I saw this too on Android 12 and master at 1d395af. To get past it I had to make this hack.

@@ -82,6 +82,8 @@ for permission in "${permissions[@]}"; do
   adb shell pm grant com.example.companion_app $permission
 done
 
+adb shell mkdir -p /storage/emulated/0/linux-android-backup-temp
+
 if [ -d backup-tmp ]; then
   cecho "Cleaning up after previous backup/restore..."
   rm -rfv backup-tmp

What is supposed to create this directory, if you don't do it with an adb shell command? You use one to remove it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants