Skip to content

Commit

Permalink
veux: Set device name as per the stock ROM
Browse files Browse the repository at this point in the history
Change-Id: I611e5f912096b3853a7d80f4135656d20bbf7f26
  • Loading branch information
dereference23 committed Mar 9, 2024
1 parent 9acdb95 commit 6c20626
Show file tree
Hide file tree
Showing 21 changed files with 231 additions and 0 deletions.
9 changes: 9 additions & 0 deletions device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,16 @@ PRODUCT_PACKAGES += \
SystemUIOverlayVEUX \
WifiOverlayVEUX

PRODUCT_PACKAGES += \
SettingsProviderOverlay2201116SG \
SettingsProviderOverlay2201116SC \
SettingsProviderOverlay2201116SI \
SettingsProviderOverlay2201116SR \
SettingsProviderOverlay2201116PG \
SettingsProviderOverlay2201116PI

PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/overlay/config-odm.xml:$(TARGET_COPY_OUT_ODM)/overlay/config/config.xml \
$(LOCAL_PATH)/overlay/config-vendor.xml:$(TARGET_COPY_OUT_VENDOR)/overlay/config/config.xml

# Partitions
Expand Down
9 changes: 9 additions & 0 deletions overlay/SettingsProviderOverlay2201116PG/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// Copyright (C) 2023-2024 The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//

runtime_resource_overlay {
name: "SettingsProviderOverlay2201116PG",
device_specific: true,
}
12 changes: 12 additions & 0 deletions overlay/SettingsProviderOverlay2201116PG/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023-2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.providers.settings.overlay.s88106ba1">
<overlay
android:requiredSystemPropertyName="ro.boot.board_id"
android:requiredSystemPropertyValue="S88106BA1"
android:targetPackage="com.android.providers.settings" />
</manifest>
11 changes: 11 additions & 0 deletions overlay/SettingsProviderOverlay2201116PG/res/values/defaults.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023-2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources>

<!-- Default for Settings.Global.DEVICE_NAME $1=MODEL-->
<string name="def_device_name_simple" translatable="false">POCO X4 Pro 5G</string>

</resources>
9 changes: 9 additions & 0 deletions overlay/SettingsProviderOverlay2201116PI/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// Copyright (C) 2023-2024 The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//

runtime_resource_overlay {
name: "SettingsProviderOverlay2201116PI",
device_specific: true,
}
12 changes: 12 additions & 0 deletions overlay/SettingsProviderOverlay2201116PI/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023-2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.providers.settings.overlay.s88107ba1">
<overlay
android:requiredSystemPropertyName="ro.boot.board_id"
android:requiredSystemPropertyValue="S88107BA1"
android:targetPackage="com.android.providers.settings" />
</manifest>
11 changes: 11 additions & 0 deletions overlay/SettingsProviderOverlay2201116PI/res/values/defaults.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023-2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources>

<!-- Default for Settings.Global.DEVICE_NAME $1=MODEL-->
<string name="def_device_name_simple" translatable="false">POCO X4 Pro 5G</string>

</resources>
9 changes: 9 additions & 0 deletions overlay/SettingsProviderOverlay2201116SC/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// Copyright (C) 2023-2024 The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//

runtime_resource_overlay {
name: "SettingsProviderOverlay2201116SC",
device_specific: true,
}
12 changes: 12 additions & 0 deletions overlay/SettingsProviderOverlay2201116SC/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023-2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.providers.settings.overlay.s88007aa1">
<overlay
android:requiredSystemPropertyName="ro.boot.board_id"
android:requiredSystemPropertyValue="S88007AA1"
android:targetPackage="com.android.providers.settings" />
</manifest>
11 changes: 11 additions & 0 deletions overlay/SettingsProviderOverlay2201116SC/res/values/defaults.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023-2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources>

<!-- Default for Settings.Global.DEVICE_NAME $1=MODEL-->
<string name="def_device_name_simple" translatable="false">Redmi Note 11E Pro</string>

</resources>
9 changes: 9 additions & 0 deletions overlay/SettingsProviderOverlay2201116SG/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// Copyright (C) 2023-2024 The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//

runtime_resource_overlay {
name: "SettingsProviderOverlay2201116SG",
device_specific: true,
}
12 changes: 12 additions & 0 deletions overlay/SettingsProviderOverlay2201116SG/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023-2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.providers.settings.overlay.s88006aa1">
<overlay
android:requiredSystemPropertyName="ro.boot.board_id"
android:requiredSystemPropertyValue="S88006AA1"
android:targetPackage="com.android.providers.settings" />
</manifest>
11 changes: 11 additions & 0 deletions overlay/SettingsProviderOverlay2201116SG/res/values/defaults.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023-2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources>

<!-- Default for Settings.Global.DEVICE_NAME $1=MODEL-->
<string name="def_device_name_simple" translatable="false">Redmi Note 11 Pro 5G</string>

</resources>
9 changes: 9 additions & 0 deletions overlay/SettingsProviderOverlay2201116SI/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// Copyright (C) 2023-2024 The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//

runtime_resource_overlay {
name: "SettingsProviderOverlay2201116SI",
device_specific: true,
}
12 changes: 12 additions & 0 deletions overlay/SettingsProviderOverlay2201116SI/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023-2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.providers.settings.overlay.s88007ea1">
<overlay
android:requiredSystemPropertyName="ro.boot.board_id"
android:requiredSystemPropertyValue="S88007EA1"
android:targetPackage="com.android.providers.settings" />
</manifest>
11 changes: 11 additions & 0 deletions overlay/SettingsProviderOverlay2201116SI/res/values/defaults.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023-2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources>

<!-- Default for Settings.Global.DEVICE_NAME $1=MODEL-->
<string name="def_device_name_simple" translatable="false">Redmi Note 11 Pro+ 5G</string>

</resources>
9 changes: 9 additions & 0 deletions overlay/SettingsProviderOverlay2201116SR/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// Copyright (C) 2023-2024 The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//

runtime_resource_overlay {
name: "SettingsProviderOverlay2201116SR",
device_specific: true,
}
12 changes: 12 additions & 0 deletions overlay/SettingsProviderOverlay2201116SR/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023-2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.providers.settings.overlay.s88008ba1">
<overlay
android:requiredSystemPropertyName="ro.boot.board_id"
android:requiredSystemPropertyValue="S88008BA1"
android:targetPackage="com.android.providers.settings" />
</manifest>
11 changes: 11 additions & 0 deletions overlay/SettingsProviderOverlay2201116SR/res/values/defaults.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023-2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources>

<!-- Default for Settings.Global.DEVICE_NAME $1=MODEL-->
<string name="def_device_name_simple" translatable="false">Redmi Note 11 Pro 5G</string>

</resources>
12 changes: 12 additions & 0 deletions overlay/config-odm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!--
Copyright (C) 2023-2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<config>
<overlay package="com.android.providers.settings.overlay.s88006aa1" mutable="false" enabled="true" />
<overlay package="com.android.providers.settings.overlay.s88007aa1" mutable="false" enabled="true" />
<overlay package="com.android.providers.settings.overlay.s88007ea1" mutable="false" enabled="true" />
<overlay package="com.android.providers.settings.overlay.s88008ba1" mutable="false" enabled="true" />
<overlay package="com.android.providers.settings.overlay.s88106ba1" mutable="false" enabled="true" />
<overlay package="com.android.providers.settings.overlay.s88107ba1" mutable="false" enabled="true" />
</config>
18 changes: 18 additions & 0 deletions rootdir/etc/init.device.rc
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,38 @@ service secureelement-hal_1_2 /vendor/bin/hw/[email protected]

# Redmi Note 11 Pro 5G (Global)
on early-init && property:ro.boot.board_id=S88006AA1
setprop bluetooth.device.default_name "Redmi Note 11 Pro 5G"
setprop vendor.usb.product_string "Redmi Note 11 Pro 5G"
setprop ro.boot.product.hardware.sku pn557

# Redmi Note 11E Pro
on early-init && property:ro.boot.board_id=S88007AA1
setprop bluetooth.device.default_name "Redmi Note 11E Pro"
setprop vendor.usb.product_string "Redmi Note 11E Pro"
setprop ro.boot.product.hardware.sku sn100

# Redmi Note 11 Pro+ 5G (India)
on early-init && property:ro.boot.board_id=S88007EA1
setprop bluetooth.device.default_name "Redmi Note 11 Pro+ 5G"
setprop vendor.usb.product_string "Redmi Note 11 Pro+ 5G"

# Redmi Note 11 Pro 5G (Japan)
on early-init && property:ro.boot.board_id=S88008BA1
setprop bluetooth.device.default_name "Redmi Note 11 Pro 5G"
setprop vendor.usb.product_string "Redmi Note 11 Pro 5G"
setprop ro.boot.product.hardware.sku sn100

# POCO X4 Pro 5G (Global)
on early-init && property:ro.boot.board_id=S88106BA1
setprop bluetooth.device.default_name "POCO X4 Pro 5G"
setprop vendor.usb.product_string "POCO X4 Pro 5G"
setprop ro.boot.product.hardware.sku pn557

# POCO X4 Pro 5G (India)
on early-init && property:ro.boot.board_id=S88107BA1
setprop bluetooth.device.default_name "POCO X4 Pro 5G"
setprop vendor.usb.product_string "POCO X4 Pro 5G"

on property:ro.boot.product.hardware.sku=pn557
enable vendor.nfc_hal_service

Expand Down

0 comments on commit 6c20626

Please sign in to comment.