Skip to content

Commit

Permalink
pixel-additional: Sync extract scripts to template and enable check ELF
Browse files Browse the repository at this point in the history
Change-Id: I0870c78bbe7ca43f436722a25b54afa05188d8e4
  • Loading branch information
someone5678 committed Oct 8, 2024
1 parent 0063c53 commit 982a193
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 36 deletions.
35 changes: 17 additions & 18 deletions extract-files-radio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ VENDOR=google/pixel-additional

# Load extract_utils and do some sanity checks
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi

ANDROID_ROOT="${MY_DIR}/../../.."

export TARGET_ENABLE_CHECKELF=true

HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
if [ ! -f "${HELPER}" ]; then
echo "Unable to find helper script at ${HELPER}"
Expand All @@ -32,19 +34,20 @@ SECTION=

while [ "${#}" -gt 0 ]; do
case "${1}" in
-n | --no-cleanup )
CLEAN_VENDOR=false
;;
-k | --kang )
KANG="--kang"
;;
-s | --section )
SECTION="${2}"; shift
CLEAN_VENDOR=false
;;
* )
SRC="${1}"
;;
-n | --no-cleanup)
CLEAN_VENDOR=false
;;
-k | --kang)
KANG="--kang"
;;
-s | --section)
SECTION="${2}"
shift
CLEAN_VENDOR=false
;;
*)
SRC="${1}"
;;
esac
shift
done
Expand All @@ -53,10 +56,6 @@ if [ -z "${SRC}" ]; then
SRC="adb"
fi

if [ -z "$SRC" ]; then
echo "Path to system dump not specified! Specify one with --path"
exit 1
fi

# Initialize the helper
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
Expand Down
35 changes: 17 additions & 18 deletions extract-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ VENDOR=google/pixel-additional

# Load extract_utils and do some sanity checks
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi

ANDROID_ROOT="${MY_DIR}/../../.."

export TARGET_ENABLE_CHECKELF=true

HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
if [ ! -f "${HELPER}" ]; then
echo "Unable to find helper script at ${HELPER}"
Expand All @@ -32,19 +34,20 @@ SECTION=

while [ "${#}" -gt 0 ]; do
case "${1}" in
-n | --no-cleanup )
CLEAN_VENDOR=false
;;
-k | --kang )
KANG="--kang"
;;
-s | --section )
SECTION="${2}"; shift
CLEAN_VENDOR=false
;;
* )
SRC="${1}"
;;
-n | --no-cleanup)
CLEAN_VENDOR=false
;;
-k | --kang)
KANG="--kang"
;;
-s | --section)
SECTION="${2}"
shift
CLEAN_VENDOR=false
;;
*)
SRC="${1}"
;;
esac
shift
done
Expand All @@ -53,10 +56,6 @@ if [ -z "${SRC}" ]; then
SRC="adb"
fi

if [ -z "$SRC" ]; then
echo "Path to system dump not specified! Specify one with --path"
exit 1
fi

# Initialize the helper
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
Expand Down
2 changes: 2 additions & 0 deletions setup-makefiles-radio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi

ANDROID_ROOT="${MY_DIR}/../../.."

export TARGET_ENABLE_CHECKELF=true

HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
if [ ! -f "${HELPER}" ]; then
echo "Unable to find helper script at ${HELPER}"
Expand Down
2 changes: 2 additions & 0 deletions setup-makefiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi

ANDROID_ROOT="${MY_DIR}/../../.."

export TARGET_ENABLE_CHECKELF=true

HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
if [ ! -f "${HELPER}" ]; then
echo "Unable to find helper script at ${HELPER}"
Expand Down

0 comments on commit 982a193

Please sign in to comment.