diff options
| author | Bruno Martins <bgcngm@gmail.com> | 2019-10-05 12:33:17 +0100 |
|---|---|---|
| committer | Julian Veit <claymore1298@gmail.com> | 2019-10-08 19:23:55 +0200 |
| commit | 7748236b2e1d48a234df1a545f9375a7b18aab59 (patch) | |
| tree | 2d3d54b81de735efff85c113f455d3ea2cf39a72 | |
| parent | 22067fbaeffaae5090f8e293272def2982fc6fae (diff) | |
m8-common: Kill the variant linking script
The only variant-specific RIL blob is now the QC libril,
which can simply be shipped among the others and selected
during runtime based on the rild.libpath system property.
The motivation for doing this after all these years is that,
as of Q, with the enablement of system-as-root it was not
easy to adapt this script and make it recovery-agnostic
at the same time.
Change-Id: Ie863455f66a9561f405b6a9fa5b1ce0cb71ae432
| -rw-r--r-- | m8-common.mk | 4 | ||||
| -rw-r--r-- | releasetools/releasetools.py | 7 | ||||
| -rw-r--r-- | releasetools/variant_script.sh | 61 |
3 files changed, 1 insertions, 71 deletions
diff --git a/m8-common.mk b/m8-common.mk index ac986fe..a02bccb 100644 --- a/m8-common.mk +++ b/m8-common.mk @@ -61,7 +61,3 @@ PRODUCT_PACKAGES += \ libnfc_ndef \ libnfc_jni \ Nfc - -# Variant linking script -PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/releasetools/variant_script.sh:install/bin/variant_script.sh diff --git a/releasetools/releasetools.py b/releasetools/releasetools.py index 9a6d810..562f57e 100644 --- a/releasetools/releasetools.py +++ b/releasetools/releasetools.py @@ -1,6 +1,6 @@ # Copyright (C) 2012 The Android Open Source Project # Copyright (C) 2013-2016 The CyanogenMod Project -# Copyright (C) 2017 The LineageOS Project +# 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. @@ -21,11 +21,6 @@ import common import re import os -def FullOTA_InstallEnd(info): - info.script.Mount("/system") - info.script.AppendExtra('assert(run_program("/tmp/install/bin/variant_script.sh") == 0);') - info.script.Unmount("/system") - def FullOTA_PostValidate(info): info.script.AppendExtra('run_program("/sbin/e2fsck", "-fy", "/dev/block/platform/msm_sdcc.1/by-name/system");'); info.script.AppendExtra('run_program("/tmp/install/bin/resize2fs_static", "/dev/block/platform/msm_sdcc.1/by-name/system");'); diff --git a/releasetools/variant_script.sh b/releasetools/variant_script.sh deleted file mode 100644 index e7130d7..0000000 --- a/releasetools/variant_script.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/sbin/sh -# -# Copyright (C) 2014-2016 The CyanogenMod Project -# Copyright (C) 2017 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 -# -# 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 - -# Helper functions -copy() -{ - LD_LIBRARY_PATH=/system/lib /system/bin/toybox cp --preserve=a "$1" "$2" -} - -# Detect variant and copy its specific-blobs -modelid=`getprop ro.boot.mid` - -case $modelid in - "0P6B20000") variant="vzw" ;; - "0P6B70000") variant="spr" ;; - "0P6B61000") variant="dug" ;; - "0P6B64000") variant="dug" ;; - "0P6B68000") variant="dug" ;; - "0P6B41000") variant="dwg" ;; - "0P6B13000") variant="gsm"; tmo="true" ;; - *) variant="gsm" ;; -esac - -# Skip copying blobs in case of Dual SIM variants because the files are already in the proper location -if [ "$variant" == "vzw" ] || [ "$variant" == "spr" ] || [ "$variant" == "gsm" ]; then - basedir="/system/vendor/blobs/$variant/" - if [ -d $basedir ]; then - cd $basedir - - for file in `find . -type f` ; do - mkdir -p `dirname /system/vendor/$file` - copy $file /system/vendor/$file - done - - for file in bin/* ; do - chmod 755 /system/vendor/$file - done - else - echo "Expected source directory does not exist!" - exit 1 - fi -fi - -exit 0 |
