forked from crdroidandroid/android_device_google_lynx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathregen-carriersettings.sh
executable file
·47 lines (35 loc) · 999 Bytes
/
regen-carriersettings.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
#
# Copyright (C) 2019-2023 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
set -e
# Load extract_utils and do some sanity checks
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
ANDROID_ROOT="${MY_DIR}/../../.."
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
if [ ! -f "${HELPER}" ]; then
echo "Unable to find helper script at ${HELPER}"
exit 1
fi
source "${HELPER}"
_input_image="${1}"
_output_file="${2}"
if [ -z "${_input_image}" ]; then
echo "No input image supplied"
exit 1
fi
if [ -z "${_output_file}" ]; then
echo "No output filename supplied"
exit 1
fi
CARRIER_SKIP_FILES=()
# Initialize the helper
setup_vendor_deps "${ANDROID_ROOT}"
generate_prop_list_from_image "${_input_image}" "${_output_file}" CARRIER_SKIP_FILES carriersettings
function header() {
sed -i "1s/^/${1}\n/" "${_output_file}"
}
header "# All blobs are extracted from Google factory images for each new ASB"