[LSC] Add LOCAL_LICENSE_KINDS to platform_testing

Added SPDX-license-identifier-Apache-2.0 to:
  libraries/annotations/Android.bp
  libraries/aoa-helper/Android.bp
  libraries/app-helpers/core/Android.bp
  libraries/app-helpers/handheld/Android.bp
  libraries/app-helpers/handheld/business-card-app-helper/Android.bp
  libraries/app-helpers/handheld/performance-launch-app-helper/Android.bp
  libraries/app-helpers/interfaces/Android.bp
  libraries/audio-test-harness/client-lib/Android.bp
  libraries/audio-test-harness/common/Android.bp
  libraries/audio-test-harness/proto/Android.bp
  libraries/audio-test-harness/server/Android.bp
  libraries/audio-test-harness/tradefed/Android.bp
  libraries/aupt-lib/Android.bp
  libraries/automotive-helpers/dial-app-helper/Android.bp
  libraries/automotive-helpers/hardkeys-app-helper/Android.bp
  libraries/automotive-helpers/notifications-app-helper/Android.bp
  libraries/automotive-helpers/settings-app-helper/Android.bp
  libraries/automotive-helpers/standard-app-helper/Android.bp
  libraries/automotive-helpers/utility-helper/Android.bp
  libraries/car-helpers/multiuser-helper/Android.bp
  libraries/collectors-helper/jank/Android.bp
  libraries/collectors-helper/jank/test/Android.bp
  libraries/collectors-helper/memory/Android.bp
  libraries/collectors-helper/memory/test/Android.bp
  libraries/collectors-helper/perfetto/Android.bp
  libraries/collectors-helper/perfetto/test/Android.bp
  libraries/collectors-helper/power/Android.bp
  libraries/collectors-helper/power/test/Android.bp
  libraries/collectors-helper/simpleperf/Android.bp
  libraries/collectors-helper/simpleperf/test/Android.bp
  libraries/collectors-helper/statsd/Android.bp
  libraries/collectors-helper/statsd/test/Android.bp
  libraries/collectors-helper/system/Android.bp
  libraries/collectors-helper/system/test/Android.bp
  libraries/collectors-helper/tests/Android.bp
  libraries/collectors-helper/utilities/Android.bp
  libraries/compatibility-common-util/Android.bp
  libraries/device-collectors/src/hostsidetests/Android.bp
  libraries/device-collectors/src/main/Android.bp
  libraries/device-collectors/src/main/platform-collectors/Android.bp
  libraries/device-collectors/src/test/java/Android.bp
  libraries/device-collectors/src/test/platform/Android.bp
  libraries/flicker/Android.bp
  libraries/flicker/test/Android.bp
  libraries/health/composers/host/Android.bp
  libraries/health/composers/host/tests/Android.bp
  libraries/health/composers/platform/Android.bp
  libraries/health/composers/platform/tests/Android.bp
  libraries/health/options/Android.bp
  libraries/health/options/tests/Android.bp
  libraries/health/rules/Android.bp
  libraries/health/rules/tests/Android.bp
  libraries/health/runners/longevity/host/Android.bp
  libraries/health/runners/longevity/host/samples/Android.bp
  libraries/health/runners/longevity/host/tests/Android.bp
  libraries/health/runners/longevity/platform/Android.bp
  libraries/health/runners/longevity/platform/samples/Android.bp
  libraries/health/runners/longevity/platform/tests/Android.bp
  libraries/health/runners/microbenchmark/Android.bp
  libraries/health/runners/microbenchmark/tests/Android.bp
  libraries/health/utils/Android.bp
  libraries/health/utils/tests/Android.bp
  libraries/junitxml/Android.bp
  libraries/launcher-helper/Android.bp
  libraries/media-helper/Android.bp
  libraries/metrics-helper/Android.bp
  libraries/metrics-helper/tests/Android.bp
  libraries/power-helper/Android.bp
  libraries/power-helper/sample/Android.bp
  libraries/system-helpers/Android.bp
  libraries/system-helpers/accessibility-helper/Android.bp
  libraries/system-helpers/account-helper/Android.bp
  libraries/system-helpers/activity-helper/Android.bp
  libraries/system-helpers/commands-helper/Android.bp
  libraries/system-helpers/connectivity-helper/Android.bp
  libraries/system-helpers/device-helper/Android.bp
  libraries/system-helpers/package-helper/Android.bp
  libraries/system-helpers/permission-helper/Android.bp
  libraries/system-helpers/settings-helper/Android.bp
  libraries/system-helpers/sysui-helper/Android.bp
  libraries/system-helpers/user-helper/Android.bp
  libraries/telephony-utility/Android.bp
  libraries/timeresult-helper/Android.bp
  libraries/tradefed-error-prone/Android.bp
  libraries/tradefed-python-lib/Android.bp
  libraries/tradefed-python-lib/helloWorld/Android.bp
  scripts/androidx-perf-setup/Android.mk
  scripts/perf-load-setup/Android.mk
  scripts/perf-setup/Android.mk
  scripts/perfetto-setup/Android.mk
  tests/apphealth/scenarios/Android.bp
  tests/apphealth/scenarios/tests/Android.bp
  tests/automotive/functional/dialer/Android.bp
  tests/automotive/functional/notifications/Android.bp
  tests/automotive/functional/settings/Android.bp
  tests/automotive/health/rules/Android.bp
  tests/automotive/health/settings/Android.bp
  tests/automotive/health/settings/tests/Android.bp
  tests/example/devcodelab/Android.bp
  tests/example/instrumentation/Android.bp
  tests/example/jarhosttest/Android.bp
  tests/example/mobly/Android.bp
  tests/example/native/Android.bp
  tests/functional/applinktests/Android.bp
  tests/functional/calculator/Android.bp
  tests/functional/devicehealthchecks/Android.bp
  tests/functional/devicehealthtests/Android.bp
  tests/functional/downloadapp/Android.bp
  tests/functional/notificationtests/Android.bp
  tests/functional/overviewtests/Android.bp
  tests/functional/permission/Android.bp
  tests/functional/testapks/applinktestapp/Android.bp
  tests/functional/testapks/permissiontestappmv1/Android.bp
  tests/health/scenarios/Android.bp
  tests/health/scenarios/tests/Android.bp
  tests/jank/UbSystemUiJankTests/Android.bp
  tests/jank/androidtvjanktests/Android.bp
  tests/jank/dialer/Android.bp
  tests/jank/jankmicrobenchmark/Android.bp
  tests/jank/sysapp_wear/Android.bp
  tests/jank/touch_latency_wear/Android.bp
  tests/jank/uibench/Android.bp
  tests/jank/uibench_wear/Android.bp
  tests/jank/webview/Android.bp
  tests/microbenchmarks/LauncherIconsApp/Android.bp
  tests/microbenchmarks/uibench/Android.bp
  tests/perf/BootHelperApp/Android.bp
  tests/perf/PerfTransitionTest/Android.bp
  tests/perf/PerformanceAppTest/Android.bp
  tests/perf/PerformanceLaunch/Android.bp
  tests/perf/PowerPerfTest/Android.bp
  utils/crashcollector/Android.mk
  utils/dpad/Android.bp
  utils/esimutility/Android.bp
  utils/permissions/Android.bp
  utils/wifistrengthscanner/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I5c35a99cb44ccb9b7f2be4941491cd932dfbda8e
diff --git a/libraries/annotations/Android.bp b/libraries/annotations/Android.bp
index 4790849..36ae1dc 100644
--- a/libraries/annotations/Android.bp
+++ b/libraries/annotations/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library_static {
     name: "platform-test-annotations",
     host_supported: true,
diff --git a/libraries/aoa-helper/Android.bp b/libraries/aoa-helper/Android.bp
index 788901b..cc78a8d 100644
--- a/libraries/aoa-helper/Android.bp
+++ b/libraries/aoa-helper/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library_host {
     name: "aoa-helper",
     srcs: ["src/**/*.java"],
diff --git a/libraries/app-helpers/core/Android.bp b/libraries/app-helpers/core/Android.bp
index 63a1241..2afed90 100644
--- a/libraries/app-helpers/core/Android.bp
+++ b/libraries/app-helpers/core/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "app-helpers-core",
     libs: [
diff --git a/libraries/app-helpers/handheld/Android.bp b/libraries/app-helpers/handheld/Android.bp
index 5815fa2..ebb86d0 100644
--- a/libraries/app-helpers/handheld/Android.bp
+++ b/libraries/app-helpers/handheld/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "handheld-app-helpers",
     sdk_version: "test_current",
diff --git a/libraries/app-helpers/handheld/business-card-app-helper/Android.bp b/libraries/app-helpers/handheld/business-card-app-helper/Android.bp
index 91cf865..9d26635 100644
--- a/libraries/app-helpers/handheld/business-card-app-helper/Android.bp
+++ b/libraries/app-helpers/handheld/business-card-app-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "business-card-app-helper",
     libs: [
diff --git a/libraries/app-helpers/handheld/performance-launch-app-helper/Android.bp b/libraries/app-helpers/handheld/performance-launch-app-helper/Android.bp
index 1d339a1..3387da5 100644
--- a/libraries/app-helpers/handheld/performance-launch-app-helper/Android.bp
+++ b/libraries/app-helpers/handheld/performance-launch-app-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "performance-launch-app-helper",
     libs: [
diff --git a/libraries/app-helpers/interfaces/Android.bp b/libraries/app-helpers/interfaces/Android.bp
index 264d0a5..e70081f 100644
--- a/libraries/app-helpers/interfaces/Android.bp
+++ b/libraries/app-helpers/interfaces/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "app-helpers-common-interfaces",
     libs: ["ub-uiautomator"],
diff --git a/libraries/audio-test-harness/client-lib/Android.bp b/libraries/audio-test-harness/client-lib/Android.bp
index 0daf9bd..118ce81 100644
--- a/libraries/audio-test-harness/client-lib/Android.bp
+++ b/libraries/audio-test-harness/client-lib/Android.bp
@@ -19,6 +19,10 @@
 // Test Harness Server.
 // LIBRARIES ==============================================================
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "audiotestharness-client-clientlib",
     host_supported: true,
diff --git a/libraries/audio-test-harness/common/Android.bp b/libraries/audio-test-harness/common/Android.bp
index b07727c..77dc748 100644
--- a/libraries/audio-test-harness/common/Android.bp
+++ b/libraries/audio-test-harness/common/Android.bp
@@ -18,6 +18,10 @@
 // These are libraries that can be used either host-side or device-side.
 // LIBRARIES ==============================================================
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "audiotestharness-commonlib-lite",
     host_supported: true,
diff --git a/libraries/audio-test-harness/proto/Android.bp b/libraries/audio-test-harness/proto/Android.bp
index df2923c..631618d 100644
--- a/libraries/audio-test-harness/proto/Android.bp
+++ b/libraries/audio-test-harness/proto/Android.bp
@@ -19,6 +19,10 @@
 // included in both lite and full variants.
 // DEFINITIONS ==============================================================
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 PROTO_TOOLS = [
     "aprotoc",
     "protoc-gen-grpc-java-plugin",
diff --git a/libraries/audio-test-harness/server/Android.bp b/libraries/audio-test-harness/server/Android.bp
index 8fc7199..59f9985 100644
--- a/libraries/audio-test-harness/server/Android.bp
+++ b/libraries/audio-test-harness/server/Android.bp
@@ -19,6 +19,10 @@
 // any connected gRPC clients either on another host or a device.
 // BINARIES ==============================================================
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_binary_host {
     name: "audiotestharness-clicapturer",
     srcs: [
diff --git a/libraries/audio-test-harness/tradefed/Android.bp b/libraries/audio-test-harness/tradefed/Android.bp
index b8a43dc..ba343b6 100644
--- a/libraries/audio-test-harness/tradefed/Android.bp
+++ b/libraries/audio-test-harness/tradefed/Android.bp
@@ -16,6 +16,10 @@
 
 // Contains the Trade Federation extensions for the Audio Test Harness system.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library_host {
     name: "audiotestharness-testlib",
 
diff --git a/libraries/aupt-lib/Android.bp b/libraries/aupt-lib/Android.bp
index 35191f4..79eb93d 100644
--- a/libraries/aupt-lib/Android.bp
+++ b/libraries/aupt-lib/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "AuptLib",
     libs: [
diff --git a/libraries/automotive-helpers/dial-app-helper/Android.bp b/libraries/automotive-helpers/dial-app-helper/Android.bp
index 7222705..c298786 100644
--- a/libraries/automotive-helpers/dial-app-helper/Android.bp
+++ b/libraries/automotive-helpers/dial-app-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "automotive-dial-app-helper",
     libs: [
diff --git a/libraries/automotive-helpers/hardkeys-app-helper/Android.bp b/libraries/automotive-helpers/hardkeys-app-helper/Android.bp
index d10e24c..2e44189 100644
--- a/libraries/automotive-helpers/hardkeys-app-helper/Android.bp
+++ b/libraries/automotive-helpers/hardkeys-app-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "automotive-vehiclehardkeys-app-helper",
     libs: [
diff --git a/libraries/automotive-helpers/notifications-app-helper/Android.bp b/libraries/automotive-helpers/notifications-app-helper/Android.bp
index 7a6e75d..05bcd94 100644
--- a/libraries/automotive-helpers/notifications-app-helper/Android.bp
+++ b/libraries/automotive-helpers/notifications-app-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "automotive-notifications-app-helper",
     libs: [
diff --git a/libraries/automotive-helpers/settings-app-helper/Android.bp b/libraries/automotive-helpers/settings-app-helper/Android.bp
index b4adc4c..790664e 100644
--- a/libraries/automotive-helpers/settings-app-helper/Android.bp
+++ b/libraries/automotive-helpers/settings-app-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "automotive-settings-app-helper",
     libs: [
diff --git a/libraries/automotive-helpers/standard-app-helper/Android.bp b/libraries/automotive-helpers/standard-app-helper/Android.bp
index 520d431..22c5098 100644
--- a/libraries/automotive-helpers/standard-app-helper/Android.bp
+++ b/libraries/automotive-helpers/standard-app-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "automotive-standard-app-helper",
     libs: [
diff --git a/libraries/automotive-helpers/utility-helper/Android.bp b/libraries/automotive-helpers/utility-helper/Android.bp
index 62ec3ad..a708628 100644
--- a/libraries/automotive-helpers/utility-helper/Android.bp
+++ b/libraries/automotive-helpers/utility-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "automotive-utility-helper",
     libs: ["ub-uiautomator"],
diff --git a/libraries/car-helpers/multiuser-helper/Android.bp b/libraries/car-helpers/multiuser-helper/Android.bp
index 6680790..a4e40f6 100644
--- a/libraries/car-helpers/multiuser-helper/Android.bp
+++ b/libraries/car-helpers/multiuser-helper/Android.bp
@@ -13,6 +13,10 @@
 // limitations under the License.
 
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library_static {
     name: "multi-user-helper",
     srcs: [
@@ -23,4 +27,4 @@
         "androidx.test.runner",
         "ub-uiautomator",
     ],
-}
\ No newline at end of file
+}
diff --git a/libraries/collectors-helper/jank/Android.bp b/libraries/collectors-helper/jank/Android.bp
index e433f9d..eb37c82 100644
--- a/libraries/collectors-helper/jank/Android.bp
+++ b/libraries/collectors-helper/jank/Android.bp
@@ -13,6 +13,10 @@
 // limitations under the License.
 
 // Used for collecting jank metrics.
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "jank-helper",
     defaults: ["tradefed_errorprone_defaults"],
@@ -30,4 +34,3 @@
 
     sdk_version: "current",
 }
-
diff --git a/libraries/collectors-helper/jank/test/Android.bp b/libraries/collectors-helper/jank/test/Android.bp
index 73c6f09..799fc52 100644
--- a/libraries/collectors-helper/jank/test/Android.bp
+++ b/libraries/collectors-helper/jank/test/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "jank-helper-test",
     defaults: ["tradefed_errorprone_defaults"],
diff --git a/libraries/collectors-helper/memory/Android.bp b/libraries/collectors-helper/memory/Android.bp
index c77f6a4..7822bf7 100644
--- a/libraries/collectors-helper/memory/Android.bp
+++ b/libraries/collectors-helper/memory/Android.bp
@@ -13,6 +13,10 @@
 // limitations under the License.
 
 // Used for collecting memory metrics.
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "memory-helper",
     defaults: ["tradefed_errorprone_defaults"],
@@ -30,4 +34,3 @@
 
     sdk_version: "current",
 }
-
diff --git a/libraries/collectors-helper/memory/test/Android.bp b/libraries/collectors-helper/memory/test/Android.bp
index ffb33d1..8af9ea3 100644
--- a/libraries/collectors-helper/memory/test/Android.bp
+++ b/libraries/collectors-helper/memory/test/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "memory-helper-test",
     defaults: ["tradefed_errorprone_defaults"],
@@ -26,4 +30,4 @@
     ],
 
     sdk_version: "current",
-}
\ No newline at end of file
+}
diff --git a/libraries/collectors-helper/perfetto/Android.bp b/libraries/collectors-helper/perfetto/Android.bp
index 1c5e6a6..893009d 100644
--- a/libraries/collectors-helper/perfetto/Android.bp
+++ b/libraries/collectors-helper/perfetto/Android.bp
@@ -13,6 +13,10 @@
 // limitations under the License.
 
 // Used for collecting perfetto traces.
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "perfetto-helper",
     defaults: ["tradefed_errorprone_defaults"],
@@ -26,4 +30,3 @@
 
     sdk_version: "current",
 }
-
diff --git a/libraries/collectors-helper/perfetto/test/Android.bp b/libraries/collectors-helper/perfetto/test/Android.bp
index 22f730e..07f1a5e 100644
--- a/libraries/collectors-helper/perfetto/test/Android.bp
+++ b/libraries/collectors-helper/perfetto/test/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "perfetto-helper-test",
     defaults: ["tradefed_errorprone_defaults"],
diff --git a/libraries/collectors-helper/power/Android.bp b/libraries/collectors-helper/power/Android.bp
index 5889351..5c868ff 100644
--- a/libraries/collectors-helper/power/Android.bp
+++ b/libraries/collectors-helper/power/Android.bp
@@ -13,6 +13,10 @@
 // limitations under the License.
 
 // Used for collecting perfetto traces.
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "power-helper",
     defaults: ["tradefed_errorprone_defaults"],
@@ -28,4 +32,3 @@
 
     sdk_version: "current",
 }
-
diff --git a/libraries/collectors-helper/power/test/Android.bp b/libraries/collectors-helper/power/test/Android.bp
index fa1d4c8..1210c06 100644
--- a/libraries/collectors-helper/power/test/Android.bp
+++ b/libraries/collectors-helper/power/test/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "power-helper-test",
     defaults: ["tradefed_errorprone_defaults"],
diff --git a/libraries/collectors-helper/simpleperf/Android.bp b/libraries/collectors-helper/simpleperf/Android.bp
index 583b4be..ba576f9 100644
--- a/libraries/collectors-helper/simpleperf/Android.bp
+++ b/libraries/collectors-helper/simpleperf/Android.bp
@@ -13,6 +13,10 @@
 // limitations under the License.
 
 // Used for collecting simpleperf samples.
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "simpleperf-helper",
     defaults: ["tradefed_errorprone_defaults"],
@@ -26,4 +30,3 @@
 
     sdk_version: "current",
 }
-
diff --git a/libraries/collectors-helper/simpleperf/test/Android.bp b/libraries/collectors-helper/simpleperf/test/Android.bp
index 51bbb16..8afc153 100644
--- a/libraries/collectors-helper/simpleperf/test/Android.bp
+++ b/libraries/collectors-helper/simpleperf/test/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "simpleperf-helper-test",
     defaults: ["tradefed_errorprone_defaults"],
diff --git a/libraries/collectors-helper/statsd/Android.bp b/libraries/collectors-helper/statsd/Android.bp
index 9e6876e..e6dd6d7 100644
--- a/libraries/collectors-helper/statsd/Android.bp
+++ b/libraries/collectors-helper/statsd/Android.bp
@@ -13,6 +13,10 @@
 // limitations under the License.
 
 // Used for collecting metrics from statsd.
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "statsd-helper",
     defaults: ["tradefed_errorprone_defaults"],
@@ -32,4 +36,3 @@
 
     platform_apis: true,
 }
-
diff --git a/libraries/collectors-helper/statsd/test/Android.bp b/libraries/collectors-helper/statsd/test/Android.bp
index 9c92a55..6dcbdfa 100644
--- a/libraries/collectors-helper/statsd/test/Android.bp
+++ b/libraries/collectors-helper/statsd/test/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "statsd-helper-test",
     defaults: ["tradefed_errorprone_defaults"],
diff --git a/libraries/collectors-helper/system/Android.bp b/libraries/collectors-helper/system/Android.bp
index cafdccf..1d3475b 100644
--- a/libraries/collectors-helper/system/Android.bp
+++ b/libraries/collectors-helper/system/Android.bp
@@ -13,6 +13,10 @@
 // limitations under the License.
 
 // Used for collecting the any of the metrics from the system.
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "system-metric-helper",
     defaults: ["tradefed_errorprone_defaults"],
@@ -30,4 +34,3 @@
 
     sdk_version: "current",
 }
-
diff --git a/libraries/collectors-helper/system/test/Android.bp b/libraries/collectors-helper/system/test/Android.bp
index 4d94e5a..f649087 100644
--- a/libraries/collectors-helper/system/test/Android.bp
+++ b/libraries/collectors-helper/system/test/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "system-helper-test",
     defaults: ["tradefed_errorprone_defaults"],
diff --git a/libraries/collectors-helper/tests/Android.bp b/libraries/collectors-helper/tests/Android.bp
index 50e844c..4a3413a 100644
--- a/libraries/collectors-helper/tests/Android.bp
+++ b/libraries/collectors-helper/tests/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "CollectorsHelperAospTest",
     defaults: ["tradefed_errorprone_defaults"],
diff --git a/libraries/collectors-helper/utilities/Android.bp b/libraries/collectors-helper/utilities/Android.bp
index b66af68..4f5e441 100644
--- a/libraries/collectors-helper/utilities/Android.bp
+++ b/libraries/collectors-helper/utilities/Android.bp
@@ -13,6 +13,10 @@
 // limitations under the License.
 
 // Common utilities
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library_static {
     name: "collector-helper-utilities",
     defaults: ["tradefed_errorprone_defaults"],
@@ -23,4 +27,3 @@
 
     sdk_version: "current",
 }
-
diff --git a/libraries/compatibility-common-util/Android.bp b/libraries/compatibility-common-util/Android.bp
index 1e149fe..bc40510 100644
--- a/libraries/compatibility-common-util/Android.bp
+++ b/libraries/compatibility-common-util/Android.bp
@@ -13,6 +13,10 @@
 // limitations under the License.
 
 // Build the common utility library for use device-side
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library_static {
     name: "compatibility-common-util-devicesidelib",
     sdk_version: "current",
diff --git a/libraries/device-collectors/src/hostsidetests/Android.bp b/libraries/device-collectors/src/hostsidetests/Android.bp
index 7f0ebb0..03f9d43 100644
--- a/libraries/device-collectors/src/hostsidetests/Android.bp
+++ b/libraries/device-collectors/src/hostsidetests/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_test_host {
     name: "CollectorHostsideLibTest",
     defaults: ["tradefed_errorprone_defaults"],
diff --git a/libraries/device-collectors/src/main/Android.bp b/libraries/device-collectors/src/main/Android.bp
index 659b077..33cd7ba 100644
--- a/libraries/device-collectors/src/main/Android.bp
+++ b/libraries/device-collectors/src/main/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "collector-device-lib",
     defaults: ["tradefed_errorprone_defaults"],
diff --git a/libraries/device-collectors/src/main/platform-collectors/Android.bp b/libraries/device-collectors/src/main/platform-collectors/Android.bp
index 3daa712..25e82bc 100644
--- a/libraries/device-collectors/src/main/platform-collectors/Android.bp
+++ b/libraries/device-collectors/src/main/platform-collectors/Android.bp
@@ -13,6 +13,10 @@
 // limitations under the License.
 
 // Genrule for handwritten statsd configs.
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_genrule {
     name: "statsd-config-protos",
     host_supported: true,
diff --git a/libraries/device-collectors/src/test/java/Android.bp b/libraries/device-collectors/src/test/java/Android.bp
index cbfccb5..30ee9f3 100644
--- a/libraries/device-collectors/src/test/java/Android.bp
+++ b/libraries/device-collectors/src/test/java/Android.bp
@@ -15,6 +15,10 @@
 //
 
 // Android Unit Test target
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "CollectorDeviceLibTest",
     defaults: ["tradefed_errorprone_defaults"],
@@ -34,4 +38,3 @@
 
     test_suites: ["general-tests"],
 }
-
diff --git a/libraries/device-collectors/src/test/platform/Android.bp b/libraries/device-collectors/src/test/platform/Android.bp
index 6c794bb..d4e3501 100644
--- a/libraries/device-collectors/src/test/platform/Android.bp
+++ b/libraries/device-collectors/src/test/platform/Android.bp
@@ -15,6 +15,10 @@
 //
 
 // Android Unit Test target
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "CollectorDeviceLibPlatformTest",
     defaults: ["tradefed_errorprone_defaults"],
diff --git a/libraries/flicker/Android.bp b/libraries/flicker/Android.bp
index 5b1504b..3402a1b 100644
--- a/libraries/flicker/Android.bp
+++ b/libraries/flicker/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_test {
     name: "flickerlib",
     platform_apis: true,
diff --git a/libraries/flicker/test/Android.bp b/libraries/flicker/test/Android.bp
index 331f00a..1af44fe 100644
--- a/libraries/flicker/test/Android.bp
+++ b/libraries/flicker/test/Android.bp
@@ -15,6 +15,10 @@
 //
 
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "FlickerLibTest",
     // sign this with platform cert, so this test is allowed to call private platform apis
diff --git a/libraries/health/composers/host/Android.bp b/libraries/health/composers/host/Android.bp
index b5b1486..b99bbc4 100644
--- a/libraries/health/composers/host/Android.bp
+++ b/libraries/health/composers/host/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library_static {
     name: "test-composers",
     srcs: [
diff --git a/libraries/health/composers/host/tests/Android.bp b/libraries/health/composers/host/tests/Android.bp
index 194d0d0..b24fe02 100644
--- a/libraries/health/composers/host/tests/Android.bp
+++ b/libraries/health/composers/host/tests/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library_static {
     name: "test-composers-tests",
     srcs: [ "src/**/*.java" ],
diff --git a/libraries/health/composers/platform/Android.bp b/libraries/health/composers/platform/Android.bp
index 9c403d1..56a3b22 100644
--- a/libraries/health/composers/platform/Android.bp
+++ b/libraries/health/composers/platform/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library_static {
     name: "platform-test-composers",
     srcs: [
diff --git a/libraries/health/composers/platform/tests/Android.bp b/libraries/health/composers/platform/tests/Android.bp
index 9876357..b5b8ab6 100644
--- a/libraries/health/composers/platform/tests/Android.bp
+++ b/libraries/health/composers/platform/tests/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "PlatformTestComposersTests",
     sdk_version: "current",
diff --git a/libraries/health/options/Android.bp b/libraries/health/options/Android.bp
index 2d572d4..6750ffe 100644
--- a/libraries/health/options/Android.bp
+++ b/libraries/health/options/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library_static {
     name: "platform-test-options",
     sdk_version: "24",
diff --git a/libraries/health/options/tests/Android.bp b/libraries/health/options/tests/Android.bp
index 58e5074..8767fba 100644
--- a/libraries/health/options/tests/Android.bp
+++ b/libraries/health/options/tests/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "PlatformTestOptionsTests",
     sdk_version: "30",
diff --git a/libraries/health/rules/Android.bp b/libraries/health/rules/Android.bp
index 37d33bd..df94025 100644
--- a/libraries/health/rules/Android.bp
+++ b/libraries/health/rules/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "platform-test-rules",
     sdk_version: "test_current",
diff --git a/libraries/health/rules/tests/Android.bp b/libraries/health/rules/tests/Android.bp
index 0599cfa..ad0c653 100644
--- a/libraries/health/rules/tests/Android.bp
+++ b/libraries/health/rules/tests/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "PlatformRuleTests",
     defaults: ["tradefed_errorprone_defaults"],
diff --git a/libraries/health/runners/longevity/host/Android.bp b/libraries/health/runners/longevity/host/Android.bp
index f790115..ac6e1e5 100644
--- a/libraries/health/runners/longevity/host/Android.bp
+++ b/libraries/health/runners/longevity/host/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library_static {
     name: "longevity-base-lib",
     srcs: [ "src/**/*.java" ],
diff --git a/libraries/health/runners/longevity/host/samples/Android.bp b/libraries/health/runners/longevity/host/samples/Android.bp
index b4deb74..c2762ef 100644
--- a/libraries/health/runners/longevity/host/samples/Android.bp
+++ b/libraries/health/runners/longevity/host/samples/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library_host {
     name: "LongevityHostLibSamples",
     static_libs: [
diff --git a/libraries/health/runners/longevity/host/tests/Android.bp b/libraries/health/runners/longevity/host/tests/Android.bp
index a701285..e30d4a8 100644
--- a/libraries/health/runners/longevity/host/tests/Android.bp
+++ b/libraries/health/runners/longevity/host/tests/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_test_host {
     name: "LongevityHostLibTests",
     static_libs: [
diff --git a/libraries/health/runners/longevity/platform/Android.bp b/libraries/health/runners/longevity/platform/Android.bp
index 8cc34e0..91fde8d 100644
--- a/libraries/health/runners/longevity/platform/Android.bp
+++ b/libraries/health/runners/longevity/platform/Android.bp
@@ -13,6 +13,10 @@
 // limitations under the License.
 
 // Filegroup for the profile proto definition that enables referencing it elsewhere.
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 filegroup {
     name: "profile-proto-def",
     srcs: [ "src/**/profile.proto" ],
diff --git a/libraries/health/runners/longevity/platform/samples/Android.bp b/libraries/health/runners/longevity/platform/samples/Android.bp
index 9c59016..70c9925 100644
--- a/libraries/health/runners/longevity/platform/samples/Android.bp
+++ b/libraries/health/runners/longevity/platform/samples/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_genrule {
     name: "sample-profile-text-protos",
     host_supported: true,
diff --git a/libraries/health/runners/longevity/platform/tests/Android.bp b/libraries/health/runners/longevity/platform/tests/Android.bp
index a9e6a03..b3ece27 100644
--- a/libraries/health/runners/longevity/platform/tests/Android.bp
+++ b/libraries/health/runners/longevity/platform/tests/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_genrule {
     name: "lib-test-profile-text-protos",
     host_supported: true,
diff --git a/libraries/health/runners/microbenchmark/Android.bp b/libraries/health/runners/microbenchmark/Android.bp
index 9cba808..9f0bfc2 100644
--- a/libraries/health/runners/microbenchmark/Android.bp
+++ b/libraries/health/runners/microbenchmark/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "microbenchmark-device-lib",
     sdk_version: "test_current",
diff --git a/libraries/health/runners/microbenchmark/tests/Android.bp b/libraries/health/runners/microbenchmark/tests/Android.bp
index df83ba5..fb41767 100644
--- a/libraries/health/runners/microbenchmark/tests/Android.bp
+++ b/libraries/health/runners/microbenchmark/tests/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "MicrobenchmarkRunnerTests",
 
diff --git a/libraries/health/utils/Android.bp b/libraries/health/utils/Android.bp
index cf532fe..02dad25 100644
--- a/libraries/health/utils/Android.bp
+++ b/libraries/health/utils/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library_static {
     name: "health-testing-utils",
     srcs: [
diff --git a/libraries/health/utils/tests/Android.bp b/libraries/health/utils/tests/Android.bp
index 7b25a2c..0d49809 100644
--- a/libraries/health/utils/tests/Android.bp
+++ b/libraries/health/utils/tests/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "HealthTestingUtilsTests",
 
diff --git a/libraries/junitxml/Android.bp b/libraries/junitxml/Android.bp
index 464ea87..c4cdc0b 100644
--- a/libraries/junitxml/Android.bp
+++ b/libraries/junitxml/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "junitxml",
     static_libs: ["junit"],
diff --git a/libraries/launcher-helper/Android.bp b/libraries/launcher-helper/Android.bp
index e1bbd89..10a8d22 100644
--- a/libraries/launcher-helper/Android.bp
+++ b/libraries/launcher-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "launcher-helper-lib",
     libs: [
diff --git a/libraries/media-helper/Android.bp b/libraries/media-helper/Android.bp
index f9340d8..bf4706d 100644
--- a/libraries/media-helper/Android.bp
+++ b/libraries/media-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "media-helper-lib",
     sdk_version: "test_current",
diff --git a/libraries/metrics-helper/Android.bp b/libraries/metrics-helper/Android.bp
index ec8a500..f03a736 100644
--- a/libraries/metrics-helper/Android.bp
+++ b/libraries/metrics-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
 
     name: "metrics-helper-lib",
diff --git a/libraries/metrics-helper/tests/Android.bp b/libraries/metrics-helper/tests/Android.bp
index a6f7019..b9b7071 100644
--- a/libraries/metrics-helper/tests/Android.bp
+++ b/libraries/metrics-helper/tests/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "MetricsHelperTests",
 
diff --git a/libraries/power-helper/Android.bp b/libraries/power-helper/Android.bp
index 9687f93..230791b 100644
--- a/libraries/power-helper/Android.bp
+++ b/libraries/power-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "PowerTestHelper-src",
 
diff --git a/libraries/power-helper/sample/Android.bp b/libraries/power-helper/sample/Android.bp
index 61d6bc6..f55a852 100644
--- a/libraries/power-helper/sample/Android.bp
+++ b/libraries/power-helper/sample/Android.bp
@@ -1,3 +1,7 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "DummyPowerTest",
     srcs: ["src/**/*.java"],
diff --git a/libraries/system-helpers/Android.bp b/libraries/system-helpers/Android.bp
index e18bf66..1f5c863 100644
--- a/libraries/system-helpers/Android.bp
+++ b/libraries/system-helpers/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "system-helpers",
     static_libs: [
diff --git a/libraries/system-helpers/accessibility-helper/Android.bp b/libraries/system-helpers/accessibility-helper/Android.bp
index 9f02dd8..4f557b4 100644
--- a/libraries/system-helpers/accessibility-helper/Android.bp
+++ b/libraries/system-helpers/accessibility-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "accessibility-helper",
     libs: [
diff --git a/libraries/system-helpers/account-helper/Android.bp b/libraries/system-helpers/account-helper/Android.bp
index 218586d..7f950de 100644
--- a/libraries/system-helpers/account-helper/Android.bp
+++ b/libraries/system-helpers/account-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "account-helper",
     libs: [
diff --git a/libraries/system-helpers/activity-helper/Android.bp b/libraries/system-helpers/activity-helper/Android.bp
index a26c812..d58baf0 100644
--- a/libraries/system-helpers/activity-helper/Android.bp
+++ b/libraries/system-helpers/activity-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "activity-helper",
     libs: [
diff --git a/libraries/system-helpers/commands-helper/Android.bp b/libraries/system-helpers/commands-helper/Android.bp
index f85eab1..e2c1c10 100644
--- a/libraries/system-helpers/commands-helper/Android.bp
+++ b/libraries/system-helpers/commands-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "commands-helper",
     libs: [
diff --git a/libraries/system-helpers/connectivity-helper/Android.bp b/libraries/system-helpers/connectivity-helper/Android.bp
index 55e5410..ef432e2 100644
--- a/libraries/system-helpers/connectivity-helper/Android.bp
+++ b/libraries/system-helpers/connectivity-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "connectivity-helper",
     static_libs: [
diff --git a/libraries/system-helpers/device-helper/Android.bp b/libraries/system-helpers/device-helper/Android.bp
index 92b15ae..4fd373b 100644
--- a/libraries/system-helpers/device-helper/Android.bp
+++ b/libraries/system-helpers/device-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "device-helper",
     libs: [
diff --git a/libraries/system-helpers/package-helper/Android.bp b/libraries/system-helpers/package-helper/Android.bp
index 53de797..cb47584 100644
--- a/libraries/system-helpers/package-helper/Android.bp
+++ b/libraries/system-helpers/package-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "package-helper",
     libs: ["commands-helper"],
diff --git a/libraries/system-helpers/permission-helper/Android.bp b/libraries/system-helpers/permission-helper/Android.bp
index 109be0f..04a8d02 100644
--- a/libraries/system-helpers/permission-helper/Android.bp
+++ b/libraries/system-helpers/permission-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "permission-helper",
     static_libs: [
diff --git a/libraries/system-helpers/settings-helper/Android.bp b/libraries/system-helpers/settings-helper/Android.bp
index 2c33933..0d89012 100644
--- a/libraries/system-helpers/settings-helper/Android.bp
+++ b/libraries/system-helpers/settings-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "settings-helper",
     libs: [
diff --git a/libraries/system-helpers/sysui-helper/Android.bp b/libraries/system-helpers/sysui-helper/Android.bp
index 4377e88..b61c1bc 100644
--- a/libraries/system-helpers/sysui-helper/Android.bp
+++ b/libraries/system-helpers/sysui-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "sysui-helper",
     static_libs: [
diff --git a/libraries/system-helpers/user-helper/Android.bp b/libraries/system-helpers/user-helper/Android.bp
index 8b8bee5..5943998 100644
--- a/libraries/system-helpers/user-helper/Android.bp
+++ b/libraries/system-helpers/user-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "user-helper",
     libs: [
diff --git a/libraries/telephony-utility/Android.bp b/libraries/telephony-utility/Android.bp
index 5b495e8..62e93a6 100644
--- a/libraries/telephony-utility/Android.bp
+++ b/libraries/telephony-utility/Android.bp
@@ -15,6 +15,10 @@
 //
 
 // Android Instrumentation Target
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "TelephonyUtility",
     defaults: ["tradefed_errorprone_defaults"],
diff --git a/libraries/timeresult-helper/Android.bp b/libraries/timeresult-helper/Android.bp
index 56c2a8b..665e206 100644
--- a/libraries/timeresult-helper/Android.bp
+++ b/libraries/timeresult-helper/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "timeresult-helper-lib",
     sdk_version: "21",
diff --git a/libraries/tradefed-error-prone/Android.bp b/libraries/tradefed-error-prone/Android.bp
index f1202dc..647aac5 100644
--- a/libraries/tradefed-error-prone/Android.bp
+++ b/libraries/tradefed-error-prone/Android.bp
@@ -14,6 +14,10 @@
 
 // Set of error prone rules to ensure code quality
 // PackageLocation check requires the androidCompatible=false otherwise it does not do anything.
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_defaults {
   name: "tradefed_errorprone_defaults",
   errorprone: {
diff --git a/libraries/tradefed-python-lib/Android.bp b/libraries/tradefed-python-lib/Android.bp
index 13a3ff4..42a8ef0 100644
--- a/libraries/tradefed-python-lib/Android.bp
+++ b/libraries/tradefed-python-lib/Android.bp
@@ -13,6 +13,10 @@
 // limitations under the License.
 
 // Base library that should be extended/included to run as part of Tradefed
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 python_library_host {
   name: "tradefed_python_lib",
   srcs: [
@@ -27,4 +31,3 @@
     },
   }
 }
-
diff --git a/libraries/tradefed-python-lib/helloWorld/Android.bp b/libraries/tradefed-python-lib/helloWorld/Android.bp
index 529331c..0d27545 100644
--- a/libraries/tradefed-python-lib/helloWorld/Android.bp
+++ b/libraries/tradefed-python-lib/helloWorld/Android.bp
@@ -13,6 +13,10 @@
 // limitations under the License.
 
 // Example hello world test that can run in Tradefed
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 python_binary_host {
   name: "tradefed_hello_world",
   main: "test_hello_world.py",
@@ -33,4 +37,3 @@
     },
   }
 }
-
diff --git a/scripts/androidx-perf-setup/Android.mk b/scripts/androidx-perf-setup/Android.mk
index 405c6ba..16c60c8 100644
--- a/scripts/androidx-perf-setup/Android.mk
+++ b/scripts/androidx-perf-setup/Android.mk
@@ -17,11 +17,11 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := AndroidXComposeStartupApp
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
 LOCAL_MODULE_CLASS := APPS
 LOCAL_MODULE_TAGS := optional
 LOCAL_PREBUILT_MODULE_FILE := prebuilts/misc/common/androidx-perf/ui_apks_compose-integration-tests-demos_compose-demos-testapp-release.apk
 LOCAL_CERTIFICATE := PRESIGNED
 LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp
 include $(BUILD_PREBUILT)
-
-
diff --git a/scripts/perf-load-setup/Android.mk b/scripts/perf-load-setup/Android.mk
index 5d8f86b..6d28928 100644
--- a/scripts/perf-load-setup/Android.mk
+++ b/scripts/perf-load-setup/Android.mk
@@ -17,6 +17,8 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := spin-n-threads.sh
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
 LOCAL_MODULE_CLASS := EXECUTABLES
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp
diff --git a/scripts/perf-setup/Android.mk b/scripts/perf-setup/Android.mk
index 91ff9c1..571b383 100644
--- a/scripts/perf-setup/Android.mk
+++ b/scripts/perf-setup/Android.mk
@@ -37,6 +37,8 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := perf-setup
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
 LOCAL_MODULE_CLASS := EXECUTABLES
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp
diff --git a/scripts/perfetto-setup/Android.mk b/scripts/perfetto-setup/Android.mk
index ab478ec..02544e1 100644
--- a/scripts/perfetto-setup/Android.mk
+++ b/scripts/perfetto-setup/Android.mk
@@ -16,6 +16,8 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 LOCAL_MODULE := trace_config_detailed.textproto
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
 LOCAL_MODULE_CLASS := ETC
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp
@@ -24,6 +26,8 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := long_trace_config.textproto
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
 LOCAL_MODULE_CLASS := ETC
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp
@@ -32,6 +36,8 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := trace_config.textproto
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
 LOCAL_MODULE_CLASS := ETC
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp
@@ -40,6 +46,8 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := trace_config_experimental.textproto
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
 LOCAL_MODULE_CLASS := ETC
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp
@@ -48,11 +56,11 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := perfetto_trace_processor_shell
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
 LOCAL_MODULE_CLASS := EXECUTABLES
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp
 LOCAL_CHECK_ELF_FILES := false
 LOCAL_PREBUILT_MODULE_FILE := prebuilts/tools/linux-x86_64/perfetto/trace_processor_shell
 include $(BUILD_PREBUILT)
-
-
diff --git a/tests/apphealth/scenarios/Android.bp b/tests/apphealth/scenarios/Android.bp
index d13508f..8ebb3a0 100644
--- a/tests/apphealth/scenarios/Android.bp
+++ b/tests/apphealth/scenarios/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library_static {
     name: "facebook-scenarios",
     min_sdk_version: "24",
diff --git a/tests/apphealth/scenarios/tests/Android.bp b/tests/apphealth/scenarios/tests/Android.bp
index 271c4b0..5b424e5 100644
--- a/tests/apphealth/scenarios/tests/Android.bp
+++ b/tests/apphealth/scenarios/tests/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "FacebookAppsScenarioTests",
     min_sdk_version: "24",
diff --git a/tests/automotive/functional/dialer/Android.bp b/tests/automotive/functional/dialer/Android.bp
index 7487467..0993fd1 100644
--- a/tests/automotive/functional/dialer/Android.bp
+++ b/tests/automotive/functional/dialer/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "AndroidAutomotiveDialTests",
     min_sdk_version: "24",
diff --git a/tests/automotive/functional/notifications/Android.bp b/tests/automotive/functional/notifications/Android.bp
index 74760b1..c962633 100644
--- a/tests/automotive/functional/notifications/Android.bp
+++ b/tests/automotive/functional/notifications/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "AndroidAutomotiveNotificationsTests",
     min_sdk_version: "24",
diff --git a/tests/automotive/functional/settings/Android.bp b/tests/automotive/functional/settings/Android.bp
index 72d570e..9658302 100644
--- a/tests/automotive/functional/settings/Android.bp
+++ b/tests/automotive/functional/settings/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "AndroidAutomotiveSettingsTests",
     min_sdk_version: "24",
diff --git a/tests/automotive/health/rules/Android.bp b/tests/automotive/health/rules/Android.bp
index 14d2b4b..98d529d 100644
--- a/tests/automotive/health/rules/Android.bp
+++ b/tests/automotive/health/rules/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "automotive-health-test-rules",
     libs: [
diff --git a/tests/automotive/health/settings/Android.bp b/tests/automotive/health/settings/Android.bp
index f656246..31e700e 100644
--- a/tests/automotive/health/settings/Android.bp
+++ b/tests/automotive/health/settings/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library_static {
     name: "automotive-settings-scenarios",
     min_sdk_version: "24",
diff --git a/tests/automotive/health/settings/tests/Android.bp b/tests/automotive/health/settings/tests/Android.bp
index cf89c1a..0f102f5 100644
--- a/tests/automotive/health/settings/tests/Android.bp
+++ b/tests/automotive/health/settings/tests/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "AndroidAutomotiveSettingsScenarioTests",
     min_sdk_version: "24",
diff --git a/tests/example/devcodelab/Android.bp b/tests/example/devcodelab/Android.bp
index 7eb00b9..f7af9c6 100644
--- a/tests/example/devcodelab/Android.bp
+++ b/tests/example/devcodelab/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "DevCodelabTest",
 
diff --git a/tests/example/instrumentation/Android.bp b/tests/example/instrumentation/Android.bp
index 0c59e9c..fb4d975 100644
--- a/tests/example/instrumentation/Android.bp
+++ b/tests/example/instrumentation/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "HelloWorldTests",
 
diff --git a/tests/example/jarhosttest/Android.bp b/tests/example/jarhosttest/Android.bp
index 62f8cd0..2df7dbe 100644
--- a/tests/example/jarhosttest/Android.bp
+++ b/tests/example/jarhosttest/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_test_host {
     name: "HelloWorldHostTest",
 
diff --git a/tests/example/mobly/Android.bp b/tests/example/mobly/Android.bp
index f5a417a..47785bb 100644
--- a/tests/example/mobly/Android.bp
+++ b/tests/example/mobly/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 python_test_host {
     name: "mobly-hello-world-test",
     main: "hello_world_test.py",
diff --git a/tests/example/native/Android.bp b/tests/example/native/Android.bp
index c28bcb5..a1ed53a 100644
--- a/tests/example/native/Android.bp
+++ b/tests/example/native/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 cc_test {
     name: "hello_world_test",
     srcs: ["HelloWorldTest.cpp"],
diff --git a/tests/functional/applinktests/Android.bp b/tests/functional/applinktests/Android.bp
index a31a2a0..e7a7306 100644
--- a/tests/functional/applinktests/Android.bp
+++ b/tests/functional/applinktests/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "AppLinkFunctionalTests",
 
diff --git a/tests/functional/calculator/Android.bp b/tests/functional/calculator/Android.bp
index da25891..ead815b 100644
--- a/tests/functional/calculator/Android.bp
+++ b/tests/functional/calculator/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "CalculatorFunctionalTests",
     srcs: ["src/**/*.java"],
diff --git a/tests/functional/devicehealthchecks/Android.bp b/tests/functional/devicehealthchecks/Android.bp
index e4ea468..a9ddc2e 100644
--- a/tests/functional/devicehealthchecks/Android.bp
+++ b/tests/functional/devicehealthchecks/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "DeviceHealthChecks",
 
diff --git a/tests/functional/devicehealthtests/Android.bp b/tests/functional/devicehealthtests/Android.bp
index 299bc44..8e6fb7b 100644
--- a/tests/functional/devicehealthtests/Android.bp
+++ b/tests/functional/devicehealthtests/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "DeviceHealthTests",
 
diff --git a/tests/functional/downloadapp/Android.bp b/tests/functional/downloadapp/Android.bp
index b9a4be4..43fda1e 100644
--- a/tests/functional/downloadapp/Android.bp
+++ b/tests/functional/downloadapp/Android.bp
@@ -1,3 +1,7 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "DownloadAppFunctionalTests",
 
diff --git a/tests/functional/notificationtests/Android.bp b/tests/functional/notificationtests/Android.bp
index 0b846e6..71bb34b 100644
--- a/tests/functional/notificationtests/Android.bp
+++ b/tests/functional/notificationtests/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "NotificationFunctionalTests",
     srcs: ["src/**/*.java"],
diff --git a/tests/functional/overviewtests/Android.bp b/tests/functional/overviewtests/Android.bp
index 2092146..fe7637c 100644
--- a/tests/functional/overviewtests/Android.bp
+++ b/tests/functional/overviewtests/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "OverviewFunctionalTests",
     srcs: ["src/**/*.java"],
diff --git a/tests/functional/permission/Android.bp b/tests/functional/permission/Android.bp
index 102f47c..c3983d0 100644
--- a/tests/functional/permission/Android.bp
+++ b/tests/functional/permission/Android.bp
@@ -1,3 +1,7 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "PermissionFunctionalTests",
 
diff --git a/tests/functional/testapks/applinktestapp/Android.bp b/tests/functional/testapks/applinktestapp/Android.bp
index ffb3c76..1f83b23 100644
--- a/tests/functional/testapks/applinktestapp/Android.bp
+++ b/tests/functional/testapks/applinktestapp/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "AppLinkTestApp",
 
diff --git a/tests/functional/testapks/permissiontestappmv1/Android.bp b/tests/functional/testapks/permissiontestappmv1/Android.bp
index 127de97..98ead78 100644
--- a/tests/functional/testapks/permissiontestappmv1/Android.bp
+++ b/tests/functional/testapks/permissiontestappmv1/Android.bp
@@ -1,3 +1,7 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "PermissionTestAppMV1",
 
diff --git a/tests/health/scenarios/Android.bp b/tests/health/scenarios/Android.bp
index bdab489..2d64396 100644
--- a/tests/health/scenarios/Android.bp
+++ b/tests/health/scenarios/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library_static {
     name: "common-platform-scenarios",
     min_sdk_version: "24",
diff --git a/tests/health/scenarios/tests/Android.bp b/tests/health/scenarios/tests/Android.bp
index 8eaad98..0e27a23 100644
--- a/tests/health/scenarios/tests/Android.bp
+++ b/tests/health/scenarios/tests/Android.bp
@@ -14,6 +14,10 @@
 
 // TODO(harrytczhang@): Refactor to share command with the similar genrule in samples. See
 // b/119635583 for similar bug.
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_genrule {
     name: "common-profile-text-protos",
     host_supported: true,
diff --git a/tests/jank/UbSystemUiJankTests/Android.bp b/tests/jank/UbSystemUiJankTests/Android.bp
index f3bf752..cfad359 100644
--- a/tests/jank/UbSystemUiJankTests/Android.bp
+++ b/tests/jank/UbSystemUiJankTests/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "UbSystemUiJankTests",
     platform_apis: true,
diff --git a/tests/jank/androidtvjanktests/Android.bp b/tests/jank/androidtvjanktests/Android.bp
index 2fbc232..a59614b 100644
--- a/tests/jank/androidtvjanktests/Android.bp
+++ b/tests/jank/androidtvjanktests/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "AndroidTVJankTests",
     srcs: ["src/**/*.java"],
diff --git a/tests/jank/dialer/Android.bp b/tests/jank/dialer/Android.bp
index 9f77efd..f37f226 100644
--- a/tests/jank/dialer/Android.bp
+++ b/tests/jank/dialer/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "DialerJankTests",
     sdk_version: "current",
diff --git a/tests/jank/jankmicrobenchmark/Android.bp b/tests/jank/jankmicrobenchmark/Android.bp
index 75f66a4..715b494 100644
--- a/tests/jank/jankmicrobenchmark/Android.bp
+++ b/tests/jank/jankmicrobenchmark/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "JankMicroBenchmarkTests",
     srcs: ["src/**/*.java"],
diff --git a/tests/jank/sysapp_wear/Android.bp b/tests/jank/sysapp_wear/Android.bp
index 7f63f45..9f5667f 100644
--- a/tests/jank/sysapp_wear/Android.bp
+++ b/tests/jank/sysapp_wear/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "SysAppJankTestsWear",
     srcs: ["src/**/*.java"],
diff --git a/tests/jank/touch_latency_wear/Android.bp b/tests/jank/touch_latency_wear/Android.bp
index db68bfd..5481b92 100644
--- a/tests/jank/touch_latency_wear/Android.bp
+++ b/tests/jank/touch_latency_wear/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "TouchLatencyJankTestWear",
     srcs: ["src/**/*.java"],
diff --git a/tests/jank/uibench/Android.bp b/tests/jank/uibench/Android.bp
index 4cf363e..220762f 100644
--- a/tests/jank/uibench/Android.bp
+++ b/tests/jank/uibench/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "UiBenchJankTests",
     srcs: ["src/**/*.java"],
diff --git a/tests/jank/uibench_wear/Android.bp b/tests/jank/uibench_wear/Android.bp
index acb4ad3..a2c1810 100644
--- a/tests/jank/uibench_wear/Android.bp
+++ b/tests/jank/uibench_wear/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "UiBenchJankTestsWear",
     srcs: ["src/**/*.java"],
diff --git a/tests/jank/webview/Android.bp b/tests/jank/webview/Android.bp
index 0c1bf13..9e3bb7e 100644
--- a/tests/jank/webview/Android.bp
+++ b/tests/jank/webview/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "UbWebViewJankTests",
     sdk_version: "current",
diff --git a/tests/microbenchmarks/LauncherIconsApp/Android.bp b/tests/microbenchmarks/LauncherIconsApp/Android.bp
index 59988e3..e713b6e 100644
--- a/tests/microbenchmarks/LauncherIconsApp/Android.bp
+++ b/tests/microbenchmarks/LauncherIconsApp/Android.bp
@@ -12,9 +12,13 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "LauncherIconsApp",
     platform_apis: true,
     srcs: ["src/**/*.java"],
 
-}
\ No newline at end of file
+}
diff --git a/tests/microbenchmarks/uibench/Android.bp b/tests/microbenchmarks/uibench/Android.bp
index aa207c0..bb4e4c6 100644
--- a/tests/microbenchmarks/uibench/Android.bp
+++ b/tests/microbenchmarks/uibench/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "UiBenchMicrobenchmark",
     srcs: ["src/**/*.java"],
diff --git a/tests/perf/BootHelperApp/Android.bp b/tests/perf/BootHelperApp/Android.bp
index b57bf02..659925d 100644
--- a/tests/perf/BootHelperApp/Android.bp
+++ b/tests/perf/BootHelperApp/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "BootHelperApp",
 
diff --git a/tests/perf/PerfTransitionTest/Android.bp b/tests/perf/PerfTransitionTest/Android.bp
index 19dbc58..d5f7b22 100644
--- a/tests/perf/PerfTransitionTest/Android.bp
+++ b/tests/perf/PerfTransitionTest/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "AppTransitionTests",
 
diff --git a/tests/perf/PerformanceAppTest/Android.bp b/tests/perf/PerformanceAppTest/Android.bp
index ec4488d..8d9a091 100644
--- a/tests/perf/PerformanceAppTest/Android.bp
+++ b/tests/perf/PerformanceAppTest/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "PerformanceAppTest",
 
diff --git a/tests/perf/PerformanceLaunch/Android.bp b/tests/perf/PerformanceLaunch/Android.bp
index 24f53b6..c014dc4 100644
--- a/tests/perf/PerformanceLaunch/Android.bp
+++ b/tests/perf/PerformanceLaunch/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 LOCAK_SDK_VERSION = ["current"]
 android_test {
     name: "PerformanceLaunch",
diff --git a/tests/perf/PowerPerfTest/Android.bp b/tests/perf/PowerPerfTest/Android.bp
index 6b89bc7..bdf537b 100644
--- a/tests/perf/PowerPerfTest/Android.bp
+++ b/tests/perf/PowerPerfTest/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "PowerPerfTest",
     sdk_version: "current",
diff --git a/utils/crashcollector/Android.mk b/utils/crashcollector/Android.mk
index cc8bdd0..1a119f0 100644
--- a/utils/crashcollector/Android.mk
+++ b/utils/crashcollector/Android.mk
@@ -18,6 +18,8 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := crashcollector
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
 LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp/crashcollector
 LOCAL_MODULE_TAGS := optional
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
@@ -27,6 +29,8 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := crashcollector
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
 LOCAL_MODULE_CLASS := EXECUTABLES
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp/crashcollector
diff --git a/utils/dpad/Android.bp b/utils/dpad/Android.bp
index a7a3474..4d01673 100644
--- a/utils/dpad/Android.bp
+++ b/utils/dpad/Android.bp
@@ -16,6 +16,10 @@
 
 // -----------------------------------------------------------------------
 // The static library that platform/app helpers can link against
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "dpad-util",
     libs: [
diff --git a/utils/esimutility/Android.bp b/utils/esimutility/Android.bp
index c2fa435..a34478a 100644
--- a/utils/esimutility/Android.bp
+++ b/utils/esimutility/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "ESimUtility",
 
diff --git a/utils/permissions/Android.bp b/utils/permissions/Android.bp
index c4c3e35..f93dc1e 100644
--- a/utils/permissions/Android.bp
+++ b/utils/permissions/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_test {
     name: "permission-utils-lib",
     libs: ["android.test.runner"],
diff --git a/utils/wifistrengthscanner/Android.bp b/utils/wifistrengthscanner/Android.bp
index 99bcda1..fffd43e 100644
--- a/utils/wifistrengthscanner/Android.bp
+++ b/utils/wifistrengthscanner/Android.bp
@@ -14,6 +14,10 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 android_test {
     name: "WifiStrengthScannerUtil",