Lots of errors are shown, and the script doesn't handle them and just keeps going.
$ git clone https://github.com/mrrfv/linux-android-backup
Cloning into 'linux-android-backup'...
remote: Enumerating objects: 283, done.
remote: Counting objects: 100% (17/17), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 283 (delta 4), reused 14 (delta 4), pack-reused 266
Receiving objects: 100% (283/283), 4.05 MiB | 8.35 MiB/s, done.
Resolving deltas: 100% (128/128), done.
$ ./backup.sh
Please enable developer options on your device, connect it to your computer and set it to file transfer mode. Then, press Enter to continue.
./backup.sh: line 20: [: -v: unary operator expected
If you have connected your device correctly, you should now see a message asking for access to your phone. Allow it, then press Enter to go to the last step.
Tip: If this is not the first time you're using this script, you might not need to allow anything.
./backup.sh: line 20: [: -v: unary operator expected
List of devices attached
xxxxxxxxxxxxxxx device
Can you see your device in the list above, and does it say 'device' next to it? If not, quit this script (ctrl+c) and try again.
./backup.sh: line 55: [: -v: unary operator expected
Linux Android Backup will install a companion app on your device, which will allow for contacts to be backed up and restored.
The companion app is open-source, and you can see what it's doing under the hood on GitHub.
Downloading companion app.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 16.2M 100 16.2M 0 0 3393k 0 0:00:04 0:00:04 --:--:-- 4470k
Attempting to uninstall companion app.
Installing companion app.
Performing Streamed Install
Success
Granting required permissions to companion app.
./backup.sh: line 92: [: =: unary operator expected
./backup.sh: line 147: [: =: unary operator expected
If this project helped you, please star the GitHub repository. It lets me know that there are people using this script and I should continue working on it.
I've not investigated very much, but macOS's bash is old and it has something to do with this issue.
$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin20)
Copyright (C) 2007 Free Software Foundation, Inc.