How To Get Files Off a HTC M7 That Won't Stay On
So I modified this script to automate file transfer in between reboots:


#!/bin/sh

rfolder=/mnt/sdcard/DCIM/$1
lfolder=$2 
homeDir=`pwd`
adb shell ls "$rfolder" > android.files

ls "$lfolder" -1 > local.files

rm -f update.files
touch update.files

while IFS=  read -r q; do
  # Remove non-printable characters (are not visible on console)
  l=$(echo ${q} | sed 's/[^[:print:]]//')
  # Populate files to update
  if ! grep -q "$l" local.files; then         
    echo "$l" >> update.files
  fi  
done 


Its slow but it works