brew install libimobiledevice
brew cask install osxfuse
brew install ifuse
Mount your device's filesystem
mkdir ~/iPhone
ifuse ~/iPhone
List your favourited photos
cd ~/iPhone
echo "SELECT ZDIRECTORY || '/' || ZFILENAME FROM ZGENERICASSET WHERE ZFAVORITE = 1;" | sqlite3 PhotoData/Photos.sqlite | tee favs.txt
Copy them to your computer
cd ~/iPhone
mkdir -p ~/Favourites
rsync -aP --files-from=favs.txt . ~/Favourites