[Android Apps and Games] franher007:
Hi, I've been trying to make this work with my Oneplus Two and my Mac to no avail. I sorted most of the problems I had, but for the last three days I've been trying and can't get past this last one. Can I get some help?

The script removes my current whatsapp version, installs the legacy one, asks me to confirm the backup on my phone (which I do), asks me for the backup password, and then I start getting errors:

=========================================================================
= This script will extract the WhatsApp Key file and DB on Android 4.0+ =
= You DO NOT need root for this to work but you DO need Java installed. =
= If your WhatsApp version is greater than 2.11.431 (most likely), then =
= a legacy version will be installed temporarily in order to get backup =
= permissions. You will NOT lose ANY data and your current version will =
= be restored at the end of the extraction process so try not to panic. =
= Script by: TripCode (Greets to all who visit: XDA Developers Forums). =
= Thanks to: dragomerlin for ABE and to Abinash Bishoyi for being cool. =
= ### Version: v4.7 (12/10/2016) ### =
=========================================================================

Please connect your Android device with USB Debugging enabled:

* server not running *
* daemon not running. starting it now at tcp:5037 *
* daemon started successfully *
./WhatsAppKeyDBExtract.sh: line 57: [: -eq: unary operator expected

Found legacy WhatsApp 2.11.431 in local folder

WhatsApp 2.17.107 installed

Backing up WhatsApp 2.17.107
/data/app/com.whatsapp-2/base.apk: 1 f...d. 6.2 MB/s (29333005 bytes in 4.519s)
Backup complete

Removing WhatsApp 2.17.107 skipping data
Success
Removal complete

Installing legacy WhatsApp 2.11.431
tmp/LegacyWhatsApp.apk: 1 file pushed. 5.5 MB/s (18329558 bytes in 3.184s)
pkg: /data/local/tmp/LegacyWhatsApp.apk
Success
Install complete

Now unlock your device and confirm the backup operation...

Please enter your backup password (leave blank for none) and press Enter:

tar: apps/com.whatsapp/f/key: Not found in archive
tar: Error exit delayed from previous errors.
tar: apps/com.whatsapp/db/msgstore.db: Not found in archive
tar: Error exit delayed from previous errors.
tar: apps/com.whatsapp/db/wa.db: Not found in archive
tar: Error exit delayed from previous errors.
tar: apps/com.whatsapp/db/axolotl.db: Not found in archive
tar: Error exit delayed from previous errors.
tar: apps/com.whatsapp/db/chatsettings.db: Not found in archive
tar: Error exit delayed from previous errors.

Saving whatsapp.cryptkey ...
cp: tmp/apps/com.whatsapp/f/key: No such file or directory
Saving msgstore.db ...
cp: tmp/apps/com.whatsapp/db/msgstore.db: No such file or directory
Saving wa.db ...
cp: tmp/apps/com.whatsapp/db/wa.db: No such file or directory
Saving axolotl.db ...
cp: tmp/apps/com.whatsapp/db/axolotl.db: No such file or directory
Saving chatsettings.db ...
cp: tmp/apps/com.whatsapp/db/chatsettings.db: No such file or directory

Pushing cipher key to: /sdcard/WhatsApp/Databases/.nomedia
adb: error: cannot stat 'tmp/apps/com.whatsapp/f/key': No such file or directory

Restoring WhatsApp 2.17.107
tmp/base.apk: 1 file pushed. 4.6 MB/s (29333005 bytes in 6.074s)
pkg: /data/local/tmp/base.apk
Success
Restore complete

Cleaning up temporary files ...
Done

Operation complete

Please press Enter to quit...

What should I try?

Thanks in advance

PD: I tried both chmoding the script and running as sudo.