dumpstate: touch: Init touch_predump service
go/touch_predump Test: b/318578275 Test: Locally flash to check dump_touch logs on dogfood devices Bug: 287907308 Change-Id: Ibc9df367549dd69c83936a7fd08465f7bb53ce80
This commit is contained in:
parent
d8f09cbcef
commit
8a52cae4dd
9 changed files with 122 additions and 0 deletions
25
touch/predump/dump_touch.sh
Normal file
25
touch/predump/dump_touch.sh
Normal file
|
@ -0,0 +1,25 @@
|
|||
#!/vendor/bin/sh
|
||||
|
||||
DIR=/data/vendor/dump_touch
|
||||
LOCKFILE="$DIR"/dumping
|
||||
LOGFILE="$DIR"/dump.log
|
||||
|
||||
if [ ! -f $LOCKFILE ]
|
||||
then
|
||||
echo "-----------------------------------------------------"
|
||||
echo "Error : PreDump Touch Logs couldn't be found."
|
||||
echo "-----------------------------------------------------"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
state=$(cat $LOCKFILE)
|
||||
if [ "$state" != 2 ]
|
||||
then
|
||||
echo "Unexpected state! Expected 2 but found ${state}" >> $LOGFILE
|
||||
fi
|
||||
|
||||
cat $LOGFILE
|
||||
echo "" > $LOGFILE
|
||||
|
||||
echo 0 > $LOCKFILE
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue