TBR: Show how to run on android

Add instructions to run vmsg on android as a native ARM application
inside Terminal Emulator.

Change-Id: I145c0fe3598b6506edeb17f385d0bd828fdd2d3e
diff --git a/README.md b/README.md
index 3a8e318..325d96a 100644
--- a/README.md
+++ b/README.md
@@ -178,13 +178,46 @@
 $JIRI_ROOT/release/projects/go/bin/vmsg chat --v23.credentials=$HOME/.vmsg-creds --store-dir=/tmp/store
 ```
 
-## Screenshot
+### Android (native app)
+
+The demo app can be installed on android as a native arm binary and run in
+[Terminal Emulator].
+
+First, build the arm binary:
+
+```
+jiri profile-v23 install --target=arm-linux@ v23:base
+
+GOARCH=arm jiri go install -a -ldflags '-extldflags "-lpthread -static"' messenger/vmsg
+```
+
+Then, copy $JIRI_ROOT/release/projects/go/bin/linux_arm/vmsg and
+[android/vmsg.sh](android/vmsg.sh) your android device.
+
+Open [Terminal Emulator] and run:
+
+(Note: This will run the app with anonymous credentials and open ACLs)
+
+```
+cd
+cp /mnt/sdcard/vmsg /mnt/sdcard/vmsg.sh .
+chmod 755 vmsg vmsg.sh
+./vmsg.sh
+```
+
+## Screenshots
+
+### Linux terminal
 
 ![Screenshot](diagrams/screenshot.png?raw=true)
 
+### Android (Terminal Emulator)
+
+![Screenshot](diagrams/screenshot-android.png?raw=true)
+
 [RFC 4838]: https://tools.ietf.org/html/rfc4838
 [Discovery API]: https://github.com/vanadium/go.v23/blob/master/discovery/model.go
 [Messenger Interface]: ifc/service.vdl
 [Vanadium Security]: https://vanadium.github.io/concepts/security.html
 [data mules]: https://en.wikipedia.org/wiki/Data_mule
-
+[Terminal Emulator]: https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
diff --git a/android/build.sh b/android/build.sh
new file mode 100755
index 0000000..a20f7e4
--- /dev/null
+++ b/android/build.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+#
+# This script builds the vmsg binary for arm.
+
+jiri profile-v23 install --target=arm-linux@ v23:base
+
+GOARCH=arm jiri go install -a -ldflags '-extldflags "-lpthread -static"' messenger/vmsg
diff --git a/android/vmsg.sh b/android/vmsg.sh
new file mode 100644
index 0000000..043fb7c
--- /dev/null
+++ b/android/vmsg.sh
@@ -0,0 +1,10 @@
+#!/system/bin/sh
+
+export TMPDIR=$(dirname $0)/tmp
+mkdir -p $TMPDIR
+
+./vmsg chat \
+  --store-dir=$TMPDIR/store \
+  --rate-acl-in='[{"acl":{"In":["..."]},"limit":20}]' \
+  --rate-acl-out='[{"acl":{"In":["..."]},"limit":100}]' \
+  --rate-acl-sender='[{"acl":{"In":["..."]},"limit":100}]'
diff --git a/diagrams/screenshot-android.png b/diagrams/screenshot-android.png
new file mode 100644
index 0000000..2e38cdd
--- /dev/null
+++ b/diagrams/screenshot-android.png
Binary files differ