Skip to content

Commit

Permalink
make get_recordings simpler
Browse files Browse the repository at this point in the history
the A*.wav is to get rid of wave.wav which apears in /tmp sometimes i think from call me
also this seems incredibly prone to overwritting files because the file names are not in actual time they are in time since the modems boot at least for me but i wont publish a fix for that rn
  • Loading branch information
bgkillas authored Nov 28, 2022
1 parent 70985d0 commit 30ae194
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions tools/helpers/retrieve_recordings/get_recordings
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
#!/bin/bash
#!/bin/sh
TARGETPATH="/path/to/save/the/recordings/"
FILESTMP=`adb shell ls /tmp/`
FILESPERSIST=`adb shell ls /persist/`
mkdir -p $TARGETPATH
cd $TARGETPATH
for file in $FILESTMP; do
if [[ $file =~ .*\.(wav) ]]; then
THISFILE=$(echo $file|tr -d '\n'|tr -d '\r')
echo "Pulling "$THISFILE
adb pull /tmp/${THISFILE} && adb shell rm /tmp/${THISFILE}
fi
done;
for file in $FILESPERSIST; do
if [[ $file =~ .*\.(wav) ]]; then
THISFILE=$(echo $file|tr -d '\n'|tr -d '\r')
echo "Pulling "$THISFILE
adb pull /persist/${THISFILE} && adb shell rm /tmp/${THISFILE}
fi
done;

for file in $(adb shell 'ls -1d /tmp/A*.wav /persist/A*.wav 2>/dev/null'|tr -d '\r');do
echo "Pulling $file"
adb pull $file && adb shell rm $file || echo "Failed to Pull $file"
done

0 comments on commit 30ae194

Please sign in to comment.