From 83d3158a006b36c710c979cb75b750c6b7b63c13 Mon Sep 17 00:00:00 2001 From: yungtravla Date: Wed, 13 Mar 2019 02:48:20 +1000 Subject: [PATCH 1/2] add build constraint for android --- core/core_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core_unix.go b/core/core_unix.go index af96eb7c..2aca44ce 100644 --- a/core/core_unix.go +++ b/core/core_unix.go @@ -1,4 +1,4 @@ -// +build !windows +// +build !windows,!android package core From 3bbd402aaea79c455b35ecfdf5450635de64e07f Mon Sep 17 00:00:00 2001 From: yungtravla Date: Wed, 13 Mar 2019 02:53:22 +1000 Subject: [PATCH 2/2] fix android Shell command function --- core/core_android.go | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 core/core_android.go diff --git a/core/core_android.go b/core/core_android.go new file mode 100644 index 00000000..af6a3255 --- /dev/null +++ b/core/core_android.go @@ -0,0 +1,7 @@ +// +build android + +package core + +func Shell(cmd string) (string, error) { + return Exec("/system/bin/sh", []string{"-c", cmd}) +}