1
0
mirror of git://f0xx.org/android_cast synced 2026-07-29 06:39:09 +03:00
Files
android_cast/pull_stats.sh
Anton Afanasyeu 9b1afec032 snap
2026-05-18 12:17:05 +02:00

22 lines
558 B
Bash
Executable File

#!/bin/bash
DEVICES_LIST="$(adb devices -l)"
echo "${DEVICES_LIST}"
filter_out() {
local -n dev_string=${1}
[[ ${dev_string} =~ List* ]] && dev_string=""
return 0
}
echo "${DEVICES_LIST}" | while IFS= read -r DEV; do
SERIAL="$(echo "${DEV}" | awk '{print $1}')"
filter_out SERIAL
[ -z "${SERIAL}" ] && continue
# echo "Device: ${DEV}"
# echo "Serial: ${SERIAL}"
adb -s "${SERIAL}" shell run-as com.foxx.androidcast ls files/session_stats/
adb -s "${SERIAL}" shell run-as com.foxx.androidcast cat files/session_stats/session_*.json
done