From 53e71f35a120c9d73f58d4cda71ef185c157d944 Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Wed, 11 May 2022 02:48:48 +0300 Subject: [PATCH] sm8250-common: Reapply "Set ro.boot.hardware.revision based on RF version" ro.boot.hardware.revision is used in fastbootd UI, getvar hw-revision output and Settings app. Set based on the RF version so external tools can use it to flash the correct firmware variant and show the HW variant in Settings. Change-Id: I1adfb6514fdbaa2e5b9782c37d9eaf8112a110fc --- common.mk | 2 ++ init/Android.bp | 8 ++++++++ init/init.oplus.hw.rc | 20 ++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 init/init.oplus.hw.rc diff --git a/common.mk b/common.mk index 30f7dde..02e2930 100644 --- a/common.mk +++ b/common.mk @@ -266,6 +266,8 @@ PRODUCT_PACKAGES += \ # Init PRODUCT_PACKAGES += \ init.class_main.sh \ + init.oplus.hw.rc \ + init.oplus.hw.rc.recovery \ init.oplus.rc \ init.oplus.sh \ init.qcom.early_boot.sh \ diff --git a/init/Android.bp b/init/Android.bp index 6a99f0a..ed69f41 100644 --- a/init/Android.bp +++ b/init/Android.bp @@ -10,6 +10,14 @@ prebuilt_etc { vendor: true, } +prebuilt_etc { + name: "init.oplus.hw.rc", + src: "init.oplus.hw.rc", + sub_dir: "init", + device_specific: true, + recovery_available: true, +} + prebuilt_etc { name: "init.oplus.rc", src: "init.oplus.rc", diff --git a/init/init.oplus.hw.rc b/init/init.oplus.hw.rc new file mode 100644 index 0000000..8f68d6e --- /dev/null +++ b/init/init.oplus.hw.rc @@ -0,0 +1,20 @@ +# +# Copyright (C) 2022 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +on property:ro.boot.rf_version=11 + setprop ro.boot.hardware.revision "CN" + +on property:ro.boot.rf_version=12 + setprop ro.boot.hardware.revision "TMO" + +on property:ro.boot.rf_version=13 + setprop ro.boot.hardware.revision "IN" + +on property:ro.boot.rf_version=14 + setprop ro.boot.hardware.revision "EU" + +on property:ro.boot.rf_version=15 + setprop ro.boot.hardware.revision "NA"