From e1f314d4dd81e6b66ec129ceb64c3f5374915508 Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Sat, 19 Dec 2020 02:53:35 +0200 Subject: [PATCH 1/2] universal8890: Switch to standalone extract utils * Align with templates while we are at it Change-Id: Ife50623a3d1b8733f5cc76995c982d8950d39ad4 --- extract-files.sh | 76 ++++++++++++++++++++++++---------------------- setup-makefiles.sh | 36 ++++++++-------------- 2 files changed, 53 insertions(+), 59 deletions(-) diff --git a/extract-files.sh b/extract-files.sh index 1463e49..cfca310 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -1,60 +1,64 @@ #!/bin/bash # -# Copyright (C) 2018 The LineageOS Project +# Copyright (C) 2018-2020 The LineageOS Project # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-License-Identifier: Apache-2.0 # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. set -e -VENDOR=samsung DEVICE_COMMON=universal8890-common +VENDOR=samsung # Load extractutils and do some sanity checks MY_DIR="${BASH_SOURCE%/*}" if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi -LINEAGE_ROOT="$MY_DIR"/../../.. +ANDROID_ROOT="${MY_DIR}/../../.." -HELPER="$LINEAGE_ROOT"/vendor/lineage/build/tools/extract_utils.sh -if [ ! -f "$HELPER" ]; then - echo "Unable to find helper script at $HELPER" +HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh" +if [ ! -f "${HELPER}" ]; then + echo "Unable to find helper script at ${HELPER}" exit 1 fi -. "$HELPER" - -if [ $# -eq 0 ]; then - SRC=adb -else - if [ $# -eq 1 ]; then - SRC=$1 - else - echo "$0: bad number of arguments" - echo "" - echo "usage: $0 [PATH_TO_EXPANDED_ROM]" - echo "" - echo "If PATH_TO_EXPANDED_ROM is not specified, blobs will be extracted from" - echo "the device using adb pull." - exit 1 - fi +source "${HELPER}" + +# Default to sanitizing the vendor folder before extraction +CLEAN_VENDOR=true + +KANG= +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}" + ;; + esac + shift +done + +if [ -z "${SRC}" ]; then + SRC="adb" fi # Initialize the helper -setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true +setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}" -extract "$MY_DIR"/proprietary-files.txt "$SRC" +extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" # Fix proprietary blobs -BLOB_ROOT="$LINEAGE_ROOT"/vendor/"$VENDOR"/"$DEVICE_COMMON"/proprietary +BLOB_ROOT="$ANDROID_ROOT"/vendor/"$VENDOR"/"$DEVICE_COMMON"/proprietary sed -i -z "s/ seclabel u:r:gpsd:s0\n//" $BLOB_ROOT/vendor/etc/init/init.gps.rc sed -i -z "s/-g@android:wpa_wlan0\n class main\n/-g@android:wpa_wlan0\n interface android.hardware.wifi.supplicant@1.0::ISupplicant default\n interface android.hardware.wifi.supplicant@1.1::ISupplicant default\n interface android.hardware.wifi.supplicant@1.2::ISupplicant default\n class main\n/" $BLOB_ROOT/vendor/etc/init/wifi.rc @@ -73,4 +77,4 @@ sed -i "s|system/etc|vendor/etc|g" $BLOB_ROOT/vendor/lib/libsec-ril.so sed -i "s|system/etc|vendor/etc|g" $BLOB_ROOT/vendor/lib64/libsec-ril-dsds.so sed -i "s|system/etc|vendor/etc|g" $BLOB_ROOT/vendor/lib64/libsec-ril.so -"$MY_DIR"/setup-makefiles.sh +"${MY_DIR}/setup-makefiles.sh" diff --git a/setup-makefiles.sh b/setup-makefiles.sh index b6d03ee..3e5505e 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -1,51 +1,41 @@ #!/bin/bash -# Copyright (C) 2017-2019 The LineageOS Project # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Copyright (C) 2017-2021 The LineageOS Project # -# http://www.apache.org/licenses/LICENSE-2.0 +# SPDX-License-Identifier: Apache-2.0 # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +set -e -VENDOR=samsung DEVICE_COMMON=universal8890-common - -export INITIAL_COPYRIGHT_YEAR=2019 +VENDOR=samsung # Load extractutils and do some sanity checks MY_DIR="${BASH_SOURCE%/*}" if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi -LINEAGE_ROOT="$MY_DIR"/../../.. +ANDROID_ROOT="${MY_DIR}/../../.." -HELPER="$LINEAGE_ROOT"/vendor/lineage/build/tools/extract_utils.sh -if [ ! -f "$HELPER" ]; then - echo "Unable to find helper script at $HELPER" +HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh" +if [ ! -f "${HELPER}" ]; then + echo "Unable to find helper script at ${HELPER}" exit 1 fi -. "$HELPER" +source "${HELPER}" # Initialize the helper -setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true +setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true -# Copyright headers and guards +# Warning headers and guards write_headers "herolte hero2lte" -# The standard blobs -write_makefiles "$MY_DIR"/proprietary-files.txt true +write_makefiles "${MY_DIR}/proprietary-files.txt" true ################################################################################################### # CUSTOM PART START # ################################################################################################### OUTDIR=vendor/$VENDOR/$DEVICE_COMMON -(cat << EOF) >> $LINEAGE_ROOT/$OUTDIR/Android.mk +(cat << EOF) >> $ANDROID_ROOT/$OUTDIR/Android.mk include \$(CLEAR_VARS) EGL_LIBS := libGLES_mali.so libOpenCL.so libOpenCL.so.1 libOpenCL.so.1.1 -- GitLab From 1750275c457ec36011a39680921b8d6f1017b0c6 Mon Sep 17 00:00:00 2001 From: Ahmed Harhash Date: Mon, 25 Sep 2023 13:51:17 +0300 Subject: [PATCH 2/2] universal8890-common: Update vendor --- proprietary-files.txt | 4 ++-- recovery/recovery_updater.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/proprietary-files.txt b/proprietary-files.txt index 3fdd5c6..be71eec 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -1,5 +1,5 @@ -# Files are from N935FXXS7CTJ2 unless pinned -# Vendor security patch level 2020-11-01 +# Files are from N935FXXU8CVG2 unless pinned +# Vendor security patch level 2021-04-01 # AptX - from crosshatch - QP1A.190711.020 product/lib64/libaptX_encoder.so|df1c89d7af1bb35808d5fe3496b04ba066c10cbc diff --git a/recovery/recovery_updater.cpp b/recovery/recovery_updater.cpp index 3bfcdfa..19b4e04 100644 --- a/recovery/recovery_updater.cpp +++ b/recovery/recovery_updater.cpp @@ -68,15 +68,15 @@ Value *VerifyBootloaderMin(const char *name, State *state, bool isHero2 = bootloader.substr(0, 4).compare("G935") == 0; if (bootloader.substr(4, 1).compare("F") == 0) { /* matches F and FD */ - ret = compareBootloader(bootloader, isHero2 ? "G935FXXU8ETI2" : "G930FXXU8ETI2"); + ret = compareBootloader(bootloader, isHero2 ? "G935FXXU8EVH3" : "G930FXXU8EVG3"); } else if(bootloader.substr(4, 1).compare("K") == 0) { - ret = compareBootloader(bootloader, isHero2 ? "G935KKKU3ETJ1" : "G930KKKU3ETJ1"); + ret = compareBootloader(bootloader, isHero2 ? "G935KKKU3EVG2" : "G930KKKU3EVG2"); } else if(bootloader.substr(4, 1).compare("L") == 0) { - ret = compareBootloader(bootloader, isHero2 ? "G935LKLU3ETJ1" : "G930LKLU3ETJ1"); + ret = compareBootloader(bootloader, isHero2 ? "G935LKLU3EVG2" : "G930LKLU3EVG2"); } else if(bootloader.substr(4, 1).compare("S") == 0) { - ret = compareBootloader(bootloader, isHero2 ? "G935SKSU3ETJ1" : "G930SKSU3ETJ1"); + ret = compareBootloader(bootloader, isHero2 ? "G935SKSU3EVG2" : "G930SKSU3EVG2"); } else if(bootloader.substr(4, 2).compare("W8") == 0) { - ret = compareBootloader(bootloader, isHero2 ? "G935W8VLS8CTI1" : "G930W8VLS8CTI1"); + ret = compareBootloader(bootloader, isHero2 ? "G935W8VLU8CVG1" : "G930W8VLU8CVG1"); } return StringValue(std::to_string(ret)); -- GitLab