diff --git a/experimental/libbox/log.go b/experimental/libbox/log.go index 18332ef9..3e442b92 100644 --- a/experimental/libbox/log.go +++ b/experimental/libbox/log.go @@ -4,6 +4,7 @@ package libbox import ( "os" + "runtime" "golang.org/x/sys/unix" ) @@ -18,12 +19,14 @@ func RedirectStderr(path string) error { if err != nil { return err } - if sUserID > 0 { - err = outputFile.Chown(sUserID, sGroupID) - if err != nil { - outputFile.Close() - os.Remove(outputFile.Name()) - return err + if runtime.GOOS != "android" { + if sUserID > 0 { + err = outputFile.Chown(sUserID, sGroupID) + if err != nil { + outputFile.Close() + os.Remove(outputFile.Name()) + return err + } } } err = unix.Dup2(int(outputFile.Fd()), int(os.Stderr.Fd()))