#!/bin/sh
set -x

# Kabel einstecken
adb devices

# Auf Handy erlauben
adb devices

echo "Hole Bilder ab August 2026"
adb shell 'find /sdcard/DCIM/Camera -type f' |
    grep '/20260[89][^/]*$' |
    while IFS= read -r file; do
        adb pull "$file" ~/Downloads/000/
    done

adb shell 'find /sdcard/DCIM/Camera -type f' |
    grep '/20261[^/]*$' |
    while IFS= read -r file; do
        adb pull "$file" ~/Downloads/000/
    done

exit

# letzte Kopie vom 20260816

fusermount -u -z ~/mnt/handy
jmtpfs ~/mnt/handy

# rsync -av --progress  --ignore-existing --no-inc-recursive "~/mnt/handy/Internal storage/DCIM/Camera/2025*" /home/andreas/Downloads/000
