Give symbolize-buildbot-crashes.sh the ability to read from a file.

symbolize-buildbot-crashes.sh would always read from adb logcat.
Sometimes it is useful to read from a file though. This change lets
the crash logs be given as the first argument.

Test: manual
Bug: 74429665
Change-Id: Idd09e8eb5117082c98860e98b9e8afa05fe83e77
diff --git a/tools/symbolize-buildbot-crashes.sh b/tools/symbolize-buildbot-crashes.sh
index 8dc4e27..0200346 100755
--- a/tools/symbolize-buildbot-crashes.sh
+++ b/tools/symbolize-buildbot-crashes.sh
@@ -17,7 +17,11 @@
 # We push art and its dependencies to '/data/local/tmp', but the 'stack'
 # script expect things to be in '/'. So we just remove the
 # '/data/local/tmp' prefix.
-adb logcat -d | sed 's,/data/local/tmp,,g' | development/scripts/stack
+if [[ -n "$1" ]]; then
+  cat $1
+else
+  adb logcat -d
+fi | sed 's,/data/local/tmp,,g' | development/scripts/stack
 
 # Always return 0 to avoid having the buildbot complain about wrong stacks.
 exit 0