This little scripts allows you to search for a package name and download all matching apps.

for i in `adb shell pm list packages | grep "$1" | cut -d":" -f2 | sed "s/\\r//g"`
  APPDIR=$(adb shell pm path $i | cut -d: -f2 | sed "s/\\r//g")
  adb pull $APPDIR $i.apk

You need to have adb installed on your computer as well as you have to have adb enabled on your device.