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
This commit is contained in:
Michael Bestas
2022-05-11 02:48:48 +03:00
parent d9700cfc9b
commit 310f11ef0a
3 changed files with 34 additions and 0 deletions

View File

@@ -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 \

12
rootdir/Android.bp Normal file
View File

@@ -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,
}

View File

@@ -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"