Merge pull request #430 from cloverkits/pie

Add overlay for Realme Q3 5G (RMX3161)
This commit is contained in:
Pierre-Hugues HUSSON 2021-12-22 15:12:05 +01:00 committed by GitHub
commit 9457ae4643
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 256 additions and 0 deletions

8
Realme/Q3/Android.mk Normal file
View file

@ -0,0 +1,8 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_PACKAGE_NAME := treble-overlay-realme-q3
LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/overlay
LOCAL_IS_RUNTIME_RESOURCE_OVERLAY := true
LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.phh.treble.overlay.realme.q3"
android:versionCode="1"
android:versionName="1.0">
<overlay android:isStatic="true"
android:priority="701"
android:requiredSystemPropertyName="ro.vendor.build.fingerprint"
android:requiredSystemPropertyValue="+qti/lito*"
android:targetPackage="android"/>
</manifest>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="quick_qs_offset_height">@dimen/status_bar_height_landscape</dimen>
</resources>

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="config_automatic_brightness_available">true</bool>
<bool name="config_useDevInputEventForAudioJack">true</bool>
<bool name="config_device_volte_available">true</bool>
<bool name="config_showNavigationBar">true</bool>
<bool name="config_fillMainBuiltInDisplayCutout">false</bool>
<dimen name="status_bar_height_landscape">110.0px</dimen>
<dimen name="status_bar_height_portrait">110.0px</dimen>
<dimen name="quick_qs_offset_height">@dimen/status_bar_height_portrait</dimen>
<integer name="config_screenBrightnessDoze">17</integer>
<integer name="config_screenBrightnessSettingMinimum">1</integer>
<integer name="config_screenBrightnessSettingDefault">863</integer>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>10</item>
<item>20</item>
<item>40</item>
<item>70</item>
<item>110</item>
<item>160</item>
<item>200</item>
<item>255</item>
</integer-array>
<integer-array name="config_autoBrightnessLevels">
<item>10</item>
<item>30</item>
<item>60</item>
<item>100</item>
<item>150</item>
<item>210</item>
<item>255</item>
</integer-array>
<string name="config_mainBuiltInDisplayCutout">M -544,0 L -544,110 L -386,110 L -386,0 Z</string>
<string name="config_mainBuiltInDisplayCutoutRectApproximation">M -544,0 L -544,110 L -386,110 L -386,0 Z</string>
</resources>

View file

@ -0,0 +1,193 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2016, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
-->
<!-- project:18097 -->
<device name="Android">
<!-- Most values are the incremental current used by a feature,
in mA (measured at nominal voltage).
The default values are deliberately incorrect dummy values.
OEM's must measure and provide actual values before
shipping a device.
Example real-world values are given in comments, but they
are totally dependent on the platform and can vary
significantly, so should be measured on the shipping platform
with a power meter. -->
<item name="none">0</item>
<item name="screen.on">100</item> <!-- ~200mA -->
<item name="screen.full">240</item> <!-- ~300mA -->
<item name="bluetooth.active">80</item> <!-- Bluetooth data transfer, ~10mA -->
<item name="bluetooth.on">1.5</item> <!-- Bluetooth on & connectable, but not connected, ~0.1mA -->
<item name="wifi.on">2.8</item> <!-- ~3mA -->
<item name="wifi.active">190</item> <!-- WIFI data transfer, ~200mA -->
<item name="wifi.scan">130</item> <!-- WIFI network scanning, ~100mA -->
<item name="audio">0</item> <!-- ~10mA -->
<item name="video">0</item> <!-- ~50mA -->
<item name="camera.flashlight">95</item> <!-- Avg. power for camera flash, ~160mA -->
<item name="camera.avg">750</item> <!-- Avg. power use of camera in standard usecases, ~550mA -->
<item name="gps.on">50</item> <!-- ~50mA -->
<!-- Radio related values. For modems without energy reporting support in firmware, use
radio.active, radio.scanning, and radio.on. -->
<item name="radio.active">50</item> <!-- ~200mA -->
<item name="radio.scanning">3.8</item> <!-- cellular radio scanning for signal, ~10mA -->
<!-- Current consumed by the radio at different signal strengths, when paging -->
<array name="radio.on"> <!-- Strength 0 to BINS-1 -->
<value>2</value> <!-- ~2mA -->
<value>1</value> <!-- ~1mA -->
</array>
<!-- Radio related values. For modems WITH energy reporting support in firmware, use
modem.controller.idle, modem.controller.tx, modem.controller.rx, modem.controller.voltage.
-->
<item name="modem.controller.idle">0</item>
<item name="modem.controller.rx">0</item>
<item name="modem.controller.tx">0</item>
<item name="modem.controller.voltage">0</item>
<!-- A list of heterogeneous CPU clusters, where the value for each cluster represents the
number of CPU cores for that cluster.
Ex:
<array name="cpu.clusters.cores">
<value>4</value> // cluster 0 has cpu0, cpu1, cpu2, cpu3
<value>2</value> // cluster 1 has cpu4, cpu5
</array> -->
<array name="cpu.clusters.cores">
<value>6</value> <!-- cluster 0 has cpu0, cpu1, cpu2, cpu3, cpu4, cpu5 -->
<value>2</value> <!-- cluster 1 has cpu6, cpu7 -->
</array>
<!-- Different CPU speeds for cluster 0 as reported in
/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state.
There must be one of these for each cluster, labeled:
cpu.speeds.cluster0, cpu.speeds.cluster1, etc... -->
<array name="cpu.core_speeds.cluster0">
<value>300000</value> <!-- 300 MHz CPU speed -->
<value>576000</value> <!-- 576 MHz CPU speed -->
<value>748800</value> <!-- 744.8 MHz CPU speed -->
<value>998400</value> <!-- 998.4 MHz CPU speed -->
<value>1132800</value> <!-- 1209.6 MHz CPU speed -->
<value>1324800</value> <!-- 1324.8 MHz CPU speed -->
<value>1516800</value> <!-- 1516.8 MHz CPU speed -->
<value>1612800</value> <!-- 1612.8 MHz CPU speed -->
<value>1708800</value> <!-- 1708.8 MHz CPU speed -->
</array>
<!-- Current at each CPU speed for cluster 0, as per 'cpu.speeds.cluster0'.
Like cpu.speeds.cluster0, there must be one of these present for
each heterogeneous CPU cluster. -->
<array name="cpu.core_power.cluster0">
<value>36</value> <!-- ~14mA -->
<value>39</value> <!-- ~25mA -->
<value>42</value> <!-- ~31mA -->
<value>45</value> <!-- ~46mA -->
<value>47</value> <!-- ~57mA -->
<value>57</value> <!-- ~84mA -->
<value>60</value> <!-- ~96mA -->
<value>62</value> <!-- ~114mA -->
<value>69</value> <!-- ~139mA -->
</array>
<array name="cpu.core_speeds.cluster1">
<value>300000</value> <!-- 300 MHz CPU speed -->
<value>652800</value> <!-- 652 MHz CPU speed -->
<value>852600</value> <!-- 852 MHz CPU speed -->
<value>979200</value> <!-- 979 MHz CPU speed -->
<value>1132800</value> <!-- 1132 MHz CPU speed -->
<value>1363200</value> <!-- 1363 MHz CPU speed -->
<value>1536000</value> <!-- 1536 MHz CPU speed -->
<value>1747200</value> <!-- 1747 MHz CPU speed -->
<value>1843200</value> <!-- 1843 MHz CPU speed -->
<value>1996800</value> <!-- 1996 MHz CPU speed -->
<value>2054400</value> <!-- 2054 MHz CPU speed -->
<value>2169600</value> <!-- 2169 MHz CPU speed -->
<value>2208000</value> <!-- 2208 MHz CPU speed -->
</array>
<!-- Current at each CPU speed for cluster 1, as per 'cpu.speeds.cluster1'.
Like cpu.speeds.cluster1, there must be one of these present for
each heterogeneous CPU cluster. -->
<array name="cpu.core_power.cluster1">
<value>49</value> <!-- ~256mA -->
<value>57</value> <!-- ~307mA -->
<value>63</value> <!-- ~332mA -->
<value>71</value> <!-- ~382mA -->
<value>80</value> <!-- ~408mA -->
<value>95</value> <!-- ~448mA -->
<value>109</value> <!-- ~586mA -->
<value>128</value> <!-- ~641mA -->
<value>160</value> <!-- ~659mA -->
<value>190</value> <!-- ~696mA -->
<value>203</value> <!-- ~876mA -->
<value>232</value> <!-- ~900mA -->
<value>241</value> <!-- ~924mA -->
</array>
<!-- Current when CPU is awake -->
<item name="cpu.awake">12</item>
<!-- Current when CPU is idle -->
<item name="cpu.idle">5.5</item>
<!-- Memory bandwidth power values in mA at the rail. There must be one value
for each bucket defined in the device tree. -->
<array name="memory.bandwidths">
<value>22.7</value> <!-- mA for bucket: 100mb/s-1.5 GB/s memory bandwidth -->
</array>
<!-- This is the battery capacity in mAh (measured at nominal voltage) -->
<item name="battery.capacity">5000</item>
<!-- Wifi related values. -->
<!-- Idle Receive current for wifi radio in mA. 0 by default-->
<item name="wifi.controller.idle">4.5</item>
<!-- Rx current for wifi radio in mA. 0 by default-->
<item name="wifi.controller.rx">180</item>
<!-- Tx current for wifi radio in mA. 0 by default-->
<item name="wifi.controller.tx">205</item>
<!-- Current at each of the wifi Tx levels in mA. The number of tx levels varies per device
and is available only of wifi chipsets which support the tx level reporting. Use
wifi.tx for other chipsets. none by default -->
<array name="wifi.controller.tx_levels"> <!-- mA -->
</array>
<!-- Operating volatage for wifi radio in mV. 0 by default-->
<item name="wifi.controller.voltage">3300</item>
<array name="wifi.batchedscan"> <!-- mA -->
<value>.0002</value> <!-- 1-8/hr -->
<value>.002</value> <!-- 9-64/hr -->
<value>.02</value> <!-- 65-512/hr -->
<value>.2</value> <!-- 513-4,096/hr -->
<value>2</value> <!-- 4097-/hr -->
</array>
</device>

View file

@ -109,6 +109,7 @@ PRODUCT_PACKAGES += \
treble-overlay-realme-c2 \
treble-overlay-realme-c3 \
treble-overlay-realme-narzo10a \
treble-overlay-realme-q3 \
treble-overlay-realme-rmx2117 \
treble-overlay-realme-rmx2117-systemui \
treble-overlay-realme-rmx3366 \