mirror of
git://f0xx.org/android_cast
synced 2026-07-29 04:18:09 +03:00
snap
This commit is contained in:
@@ -9,6 +9,25 @@ filter_out() {
|
||||
return 0
|
||||
}
|
||||
|
||||
LOG_ROOT="log_capture/session_stats/"
|
||||
CLEAN_LOGS="no"
|
||||
|
||||
while true; do
|
||||
read -p "clean logs on device after fetch? [Y/n]" yn
|
||||
case $yn in
|
||||
[Y|Yes|y|yes]* )
|
||||
CLEAN_LOGS="yes"
|
||||
break
|
||||
;;
|
||||
[N|No|n|no]* )
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo "answer Y(es) or N(no) (short y/n or yes/no)"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "${DEVICES_LIST}" | while IFS= read -r DEV; do
|
||||
SERIAL="$(echo "${DEV}" | awk '{print $1}')"
|
||||
filter_out SERIAL
|
||||
@@ -16,6 +35,14 @@ echo "${DEVICES_LIST}" | while IFS= read -r DEV; do
|
||||
# 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
|
||||
LOG_PATH="${LOG_ROOT}/${SERIAL}/"
|
||||
echo "------------ dumping in ${LOG_PATH}"
|
||||
mkdir -p "${LOG_PATH}"
|
||||
for f in $(adb -s ${SERIAL} shell run-as com.foxx.androidcast ls files/session_stats/); do
|
||||
adb -s ${SERIAL} exec-out run-as com.foxx.androidcast cat "files/session_stats/$f" > "${LOG_PATH}/$f"
|
||||
[[ "no" != "${CLEAN_LOGS}" ]] && adb -s ${SERIAL} shell run-as com.foxx.androidcast rm -f "files/session_stats/$f"
|
||||
done
|
||||
done
|
||||
|
||||
echo "run './gradlew :session-studio:run' to analyze logs; find the latest logs in ${LOG_ROOT}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user