From 310f11ef0a2e0d8ccab60e87a24b213c1fcc3107 Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Wed, 11 May 2022 02:48:48 +0300 Subject: [PATCH] sm8250-common: 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: Ib92b080ace4d14fc2f13b5b3705249a15f1671c8 --- common.mk | 2 ++ rootdir/Android.bp | 12 ++++++++++++ rootdir/etc/init.oplus.hw.rc | 20 ++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 rootdir/Android.bp create mode 100644 rootdir/etc/init.oplus.hw.rc diff --git a/common.mk b/common.mk index ffb36a7..7b30957 100644 --- a/common.mk +++ b/common.mk @@ -207,6 +207,8 @@ PRODUCT_PACKAGES += \ init.oem.rc \ init.oem.sec.rc \ init.oem_ftm.rc \ + init.oplus.hw.rc \ + init.oplus.hw.rc.recovery \ init.oplus_chg.sh \ init.qcom.class_core.sh \ init.qcom.coex.sh \ diff --git a/rootdir/Android.bp b/rootdir/Android.bp new file mode 100644 index 0000000..36f9113 --- /dev/null +++ b/rootdir/Android.bp @@ -0,0 +1,12 @@ +// +// Copyright (C) 2022 The LineageOS Project +// SPDX-License-Identifier: Apache-2.0 +// + +prebuilt_etc { + name: "init.oplus.hw.rc", + src: "etc/init.oplus.hw.rc", + sub_dir: "init", + device_specific: true, + recovery_available: true, +} diff --git a/rootdir/etc/init.oplus.hw.rc b/rootdir/etc/init.oplus.hw.rc new file mode 100644 index 0000000..8f68d6e --- /dev/null +++ b/rootdir/etc/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"