Debian Codegraph @

libcxx/utils/ci/vendor/android/container-setup.sh

raw
1 #!/usr/bin/env bash
2 # ===----------------------------------------------------------------------===##
3 #
4 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 # See https://llvm.org/LICENSE.txt for license information.
6 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 #
8 # ===----------------------------------------------------------------------===##
9
10 set -e
11
12 # Different versions of adb can sometimes be incompatible (i.e. "adb server
13 # version (nn) doesn't match this client (mm); killing..."). Ensure that the adb
14 # in the main builder image matches that in the emulator by sharing the
15 # platform-tools from the main image.
16 if [ -d /mnt/android-platform-tools ]; then
17 sudo rm -fr /mnt/android-platform-tools/platform-tools
18 sudo cp -r /opt/android/sdk/platform-tools /mnt/android-platform-tools
19 fi