Move bazel from being a shell function to being a script at build/bazel/bin/bazel

Bug: 254713799
Test: b build //packages/modules/adb/apex:com.android.adbd
Change-Id: I6a0a89438a46d8252c3e0c24319038b0cf2dbd59
diff --git a/ui/build/bazel.go b/ui/build/bazel.go
index 0ebfcd8..bd469a4 100644
--- a/ui/build/bazel.go
+++ b/ui/build/bazel.go
@@ -85,9 +85,9 @@
 
 	bazelEnv["SHELL"] = "/bin/bash"
 
-	// `tools/bazel` is the default entry point for executing Bazel in the AOSP
+	// `build/bazel/bin/bazel` is the default entry point for executing Bazel in the AOSP
 	// source tree.
-	bazelExecutable := filepath.Join("tools", "bazel")
+	bazelExecutable := filepath.Join("build", "bazel", "bin", "bazel")
 	cmd := Command(ctx, config, "bazel", bazelExecutable)
 
 	// Append custom startup flags to the Bazel command. Startup flags affect
diff --git a/ui/build/soong.go b/ui/build/soong.go
index 4ec0354..4e66c64 100644
--- a/ui/build/soong.go
+++ b/ui/build/soong.go
@@ -396,7 +396,7 @@
 	soongBuildEnv := config.Environment().Copy()
 	soongBuildEnv.Set("TOP", os.Getenv("TOP"))
 	// For Bazel mixed builds.
-	soongBuildEnv.Set("BAZEL_PATH", "./tools/bazel")
+	soongBuildEnv.Set("BAZEL_PATH", "./build/bazel/bin/bazel")
 	// Bazel's HOME var is set to an output subdirectory which doesn't exist. This
 	// prevents Bazel from file I/O in the actual user HOME directory.
 	soongBuildEnv.Set("BAZEL_HOME", absPath(ctx, filepath.Join(config.BazelOutDir(), "bazelhome")))