blob: b27f737159482ae2e869da6a3792616c03fe9111 [file] [log] [blame]
Andrew Rossignol3247fb12017-10-27 15:15:39 -07001#!/bin/bash
2
3# Quit if any command produces an error.
4set -e
5
6# Build and run the CHRE simulator.
7CHRE_HOST_OS=`uname`
8if [[ $CHRE_HOST_OS == 'Darwin' ]]; then
9JOB_COUNT=`sysctl -n hw.ncpu`
10else
11JOB_COUNT=$((`grep -c ^processor /proc/cpuinfo`))
12fi
13
14# Export the variant Makefile.
15export CHRE_VARIANT_MK_INCLUDES=variant/android/variant.mk
16
Andrew Rossignol26f0de52017-11-02 16:02:54 -070017make google_arm64_android_debug -j$JOB_COUNT
Andrew Rossignol3247fb12017-10-27 15:15:39 -070018adb shell setenforce 0
Andrew Rossignol26f0de52017-11-02 16:02:54 -070019adb push out/google_arm64_android_debug/libchre /system/bin/chre
Andrew Rossignol3247fb12017-10-27 15:15:39 -070020adb push variant/android/chre-stub /vendor/bin/chre