twres: change how build directory is determined

Change-Id: I1af103bc276828e9ec07e20becf9df59c9535478
diff --git a/soong/copy.go b/soong/copy.go
index c6b07b4..6b3a766 100755
--- a/soong/copy.go
+++ b/soong/copy.go
@@ -7,6 +7,8 @@
 	"io/ioutil"
 	"os"
 	"path"
+	"runtime"
+	"path/filepath"
 	"strings"
 )
 
@@ -15,9 +17,10 @@
 }
 
 func getBuildAbsDir(ctx android.BaseContext) string {
-	outDir := ctx.Config().Getenv("OUT")
-	absIndex := strings.Index(outDir, "out")
-	return string(outDir[0:absIndex])
+	var b string
+	_, b, _, _ = runtime.Caller(0)
+	absIndex := strings.Index(filepath.Dir(b), "bootable")
+	return string(b[0:absIndex])
 }
 
 func copyDir(src string, dest string) error {