Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Script that copies WhatsApp images from Android smartphones
- # Author NoWebAtHome <nowebathome@protonmail.com>
- # Version 0.1
- # Making sure destiny directory exists...
- mkdir ~/Dropbox/".:)"
- phone=$(ls /run/user/0/gvfs/)
- until [ "$phone" != "" ]
- do
- # Here is where the Android is mounted in my system.
- phone=$(ls /run/user/0/gvfs/)
- #echo "No phone detected."
- sleep 3
- done
- # make sure it is unlocked
- unlocked=$(ls /run/user/0/gvfs/$phone/)
- until [ "$unlocked" != "" ]
- do
- unlocked=$(ls /run/user/0/gvfs/$phone/)
- #echo "Phone detected, but it's locked."
- sleep 3
- done
- #echo "Phone unlocked!"
- # The gvfs-copy works just like cp, but can't recursively copy directories.
- # For this reason is necessary to call it twice, for 'Images' and 'Sent' directories.
- # Saves at ~/Dropbox/".:)"/ (Starting with a dot, the directory becomes hidden)
- gvfs-copy /run/user/0/gvfs/$phone/Phone/WhatsApp/Media/WhatsApp\ Images/* ~/Dropbox/".:)"/ 2> /dev/null
- gvfs-copy /run/user/0/gvfs/$phone/Phone/WhatsApp/Media/WhatsApp\ Images/Sent/* ~/Dropbox/".:)"/ 2> /dev/null
- echo "Check your destiny folder."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement