Add content_shell_crash_test to Android

- add support for resolving shared library deps on android
- add work around for missing local build id on android
- use devil.py to access the android device
- hook script up to swarming on android

Bug: 688737, 849904
Change-Id: I9ff2e3ae1fed279fef83a44b07c693c338b8ee13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1583715
Commit-Queue: Jochen Eisinger <[email protected]>
Reviewed-by: Ben Pastene <[email protected]>
Reviewed-by: Nico Weber <[email protected]>
Cr-Commit-Position: refs/heads/master@{#657138}
diff --git a/docs/testing/using_crashpad_with_content_shell.md b/docs/testing/using_crashpad_with_content_shell.md
index a582dc7..4c08a9e 100644
--- a/docs/testing/using_crashpad_with_content_shell.md
+++ b/docs/testing/using_crashpad_with_content_shell.md
@@ -22,12 +22,6 @@
 building.
 ***
 
-*** note
-**Android:** Add `force_local_build_id = true` to your [gn build
-arguments](https://gn.googlesource.com/gn/+/master/docs/quick_start.md) before
-building.
-***
-
 Then, create a directory where the crash dumps will be stored:
 
 * Linux/Mac:
@@ -36,7 +30,8 @@
   ```
 * Android:
   ```bash
-  adb shell mkdir /data/local/tmp/crashes
+  adb root
+  adb shell mkdir /data/data/org.chromium.content_shell_apk/cache
   ```
 * Windows:
   ```bash
@@ -67,7 +62,7 @@
   ```bash
   out/Default/bin/content_shell_apk install
   out/Default/bin/content_shell_apk launch chrome://crash
-  --args="--enable-crash-reporter --crash-dumps-dir=/data/local/tmp/crashes"
+  --args="--enable-crash-reporter --crash-dumps-dir=/data/data/org.chromium.content_shell_apk/cache"
   ```
 
 ## Retrieving the crash dump
@@ -81,7 +76,7 @@
   ```
 * Android:
   ```bash
-  adb pull $(adb shell ls /data/local/tmp/crashes/pending/*.dmp) /tmp/chromium-renderer-minidump.dmp
+  adb pull $(adb shell ls /data/data/org.chromium.content_shell_apk/cache/pending/*.dmp) /tmp/chromium-renderer-minidump.dmp
   ```
 
 ## Symbolizing the crash dump
@@ -107,7 +102,8 @@
   components/crash/content/tools/generate_breakpad_symbols.py \
       --build-dir=out/Default \
       --binary=out/Default/lib/libcontent_shell_content_view.so \
-      --symbols-dir=out/Default/content_shell.breakpad.syms --clear
+      --symbols-dir=out/Default/content_shell.breakpad.syms --clear \
+      --platform=android
   ```
 
 Now we can generate a stack trace from the crash dump. Assuming the crash dump