• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3# Used as part of manual testing of tzdata update mechanism.
4
5PREFIX=${1-bootlogs}
6
7echo "Rebooting...."
8adb reboot && adb wait-for-device
9
10TIME=${2-5}
11LOGCAT=${PREFIX}.logcat
12echo "Dumping logcat output in ${LOGCAT}, waiting for ${TIME} seconds"
13adb logcat > ${LOGCAT} 2>/dev/null &
14LOGCAT_PID=$!
15
16sleep ${TIME}
17
18# Kill the logcat process and wait, suppresses the Terminated message
19# output by the shell.
20kill ${LOGCAT_PID}
21wait ${LOGCAT_PID} 2>/dev/null
22
23DMESG=${PREFIX}.dmesg
24echo "Dumping dmesg output in ${DMESG}"
25adb shell dmesg > ${DMESG}
26