Add overlay for Sony J9110 ( xperia 1) (#419)

This commit is contained in:
Fu 2021-12-03 05:55:26 +08:00 committed by GitHub
parent 366b96b124
commit 8a4e0ed7cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 518 additions and 0 deletions

8
Sony/J9110/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-sony-J9110
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,10 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.phh.treble.overlay.sony.J9110"
android:versionCode="1"
android:versionName="1.0">
<overlay android:targetPackage="android"
android:requiredSystemPropertyName="ro.vendor.build.fingerprint"
android:requiredSystemPropertyValue="+Sony/J9110*"
android:priority="783"
android:isStatic="true" />
</manifest>

View file

@ -0,0 +1,313 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. Do not translate. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Boolean indicating if restoring network selection should be skipped -->
<!-- The restoring is handled by modem if it is true-->
<bool translatable="false" name="skip_restoring_network_selection">true</bool>
<!-- List of regexpressions describing the interface (if any) that represent tetherable
USB interfaces. If the device doesn't want to support tething over USB this should
be empty. An example would be "usb.*" -->
<string-array translatable="false" name="config_tether_usb_regexs">
<item>"usb\\d"</item>
<item>"rndis\\d"</item>
</string-array>
<!-- List of regexpressions describing the interface (if any) that represent tetherable
Wifi interfaces. If the device doesn't want to support tethering over Wifi this
should be empty. An example would be "softap.*" -->
<string-array translatable="false" name="config_tether_wifi_regexs">
<item>"softap0"</item>
<item>"wigig0"</item>
<item>"wifi_br0"</item>
<item>"wlan0"</item>
<item>"wlan1"</item>
</string-array>
<!-- List of regexpressions describing the interface (if any) that represent tetherable
bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this
should be empty. -->
<string-array translatable="false" name="config_tether_bluetooth_regexs">
<item>"bnep\\d"</item>
<item>"bt-pan"</item>
</string-array>
<!-- This string array should be overridden by the device to present a list of network
attributes. This is used by the connectivity manager to decide which networks can coexist
based on the hardware -->
<!-- An Array of "[Connection name],[ConnectivityManager.TYPE_xxxx],
[associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] -->
<!-- the 5th element "resore-time" indicates the number of milliseconds to delay
before automatically restore the default connection. Set -1 if the connection
does not require auto-restore. -->
<!-- the 6th element indicates boot-time dependency-met value. -->
<string-array translatable="false" name="networkAttributes">
<item>wifi,1,1,1,-1,true</item>
<item>mobile,0,0,0,-1,true</item>
<item>mobile_mms,2,0,4,60000,true</item>
<item>mobile_supl,3,0,2,60000,true</item>
<item>mobile_dun,4,0,2,60000,true</item>
<item>mobile_hipri,5,0,3,60000,true</item>
<item>mobile_fota,10,0,2,60000,true</item>
<item>mobile_ims,11,0,2,60000,true</item>
<item>mobile_cbs,12,0,2,60000,true</item>
<item>bluetooth,7,7,2,-1,true</item>
<item>mobile_emergency,15,0,5,-1,true</item>
</string-array>
<!-- This string array should be overridden by the device to present a list of radio
attributes. This is used by the connectivity manager to decide which networks can coexist
based on the hardware -->
<!-- An Array of "[ConnectivityManager connectionType],
[# simultaneous connection types]" -->
<string-array translatable="false" name="radioAttributes">
<item>"1,1"</item>
<item>"0,1"</item>
<item>"7,1"</item>
</string-array>
<!-- Set to true if the wifi display supports compositing content stored
in gralloc protected buffers. For this to be true, there must exist
a protected hardware path for surface flinger to composite and send
protected buffers to the wifi display video encoder.
If this flag is false, we advise applications not to use protected
buffers (if possible) when presenting content to a wifi display because
the content may be blanked.
This flag controls whether the {@link Display#FLAG_SUPPORTS_PROTECTED_BUFFERS}
flag is set for wifi displays.
-->
<bool name="config_wifiDisplaySupportsProtectedBuffers">true</bool>
<!-- Indicate whether closing the lid causes the device to go to sleep and opening
it causes the device to wake up.
The default is false. -->
<bool name="config_lidControlsSleep">true</bool>
<!-- Configure mobile tcp buffer sizes in the form:
rat-name:rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max
If no value is found for the rat-name in use, the system default will be applied.
-->
<string-array name="config_mobile_tcp_buffers">
<item>lte:2097152,4194304,8388608,262144,524288,1048576</item>
<item>lte_ca:4096,6291456,12582912,4096,1048576,2097152</item>
<item>umts:4094,87380,1220608,4096,16384,1220608</item>
<item>hspa:4094,87380,1220608,4096,16384,1220608</item>
<item>hsupa:4094,87380,1220608,4096,16384,1220608</item>
<item>hsdpa:4094,87380,1220608,4096,16384,1220608</item>
<item>hspap:4094,87380,1220608,4096,16384,1220608</item>
<item>edge:4093,26280,35040,4096,16384,35040</item>
<item>gprs:4092,8760,11680,4096,8760,11680</item>
<item>evdo:4094,87380,524288,4096,16384,262144</item>
</string-array>
<!-- Flag specifying whether VoLTE is available on device -->
<bool name="config_device_volte_available">true</bool>
<!-- Flag specifying whether WFC over IMS is available on device -->
<bool name="config_device_wfc_ims_available">true</bool>
<!-- Flag specifying whether or not IMS will use the ImsResolver dynamically -->
<bool name="config_dynamic_bind_ims">true</bool>
<!-- Config determines whether to update phone object when voice registration
state changes. Voice radio tech change will always trigger an update of
phone object irrespective of this config -->
<bool name="config_switch_phone_on_voice_reg_state_change">false</bool>
<!-- Boolean indicating if current platform supports BLE peripheral mode -->
<bool name="config_bluetooth_le_peripheral_mode_supported">true</bool>
<!-- Flag indicating if the speed up audio on mt call code should be executed -->
<bool name="config_speed_up_audio_on_mt_calls">true</bool>
<!-- Shutdown if the battery temperature exceeds (this value * 0.1) Celsius. -->
<integer name="config_shutdownBatteryTemperature">680</integer>
<!-- Operating volatage for bluetooth controller. 0 by default-->
<integer name="config_bluetooth_operating_voltage_mv">3300</integer>
<!-- Default list of files pinned by the Pinner Service -->
<string-array translatable="false" name="config_defaultPinnerServiceFiles">
<item>"/system/framework/arm64/boot-framework.oat"</item>
<item>"/system/framework/framework.jar"</item>
<item>"/system/framework/oat/arm64/services.odex"</item>
<item>"/system/framework/services.jar"</item>
<item>"/apex/com.android.art/javalib/core-oj.jar"</item>
<item>"/apex/com.android.art/javalib/core-libart.jar"</item>
<item>"/apex/com.android.media/javalib/updatable-media.jar"</item>
<item>"/system_ext/priv-app/SystemUI/SystemUI.apk"</item>
<item>"/system_ext/priv-app/SystemUI/oat/arm64/SystemUI.odex"</item>
<item>"/system/lib64/libsurfaceflinger.so"</item>
</string-array>
<!-- Should the pinner service pin the Camera application? -->
<bool name="config_pinnerCameraApp">true</bool>
<!-- Should the pinner service pin the Home application? -->
<bool name="config_pinnerHomeApp">true</bool>
<!-- Indicate whether to allow the device to suspend when the screen is off
due to the proximity sensor. This resource should only be set to true
if the sensor HAL correctly handles the proximity sensor as a wake-up source.
Otherwise, the device may fail to wake out of suspend reliably.
The default is false. -->
<bool name="config_suspendWhenScreenOffDueToProximity">true</bool>
<!-- Power Management: Specifies whether to decouple the auto-suspend state of the
device from the display on/off state.
When false, autosuspend_disable() will be called before the display is turned on
and autosuspend_enable() will be called after the display is turned off.
This mode provides best compatibility for devices using legacy power management
features such as early suspend / late resume.
When true, autosuspend_display() and autosuspend_enable() will be called
independently of whether the display is being turned on or off. This mode
enables the power manager to suspend the application processor while the
display is on.
This resource should be set to "true" when a doze component has been specified
to maximize power savings but not all devices support it.
Refer to autosuspend.h for details.
-->
<bool name="config_powerDecoupleAutoSuspendModeFromDisplay">true</bool>
<!-- Screen brightness used to dim the screen while dozing in a very low power state.
May be less than the minimum allowed brightness setting
that can be set by the user. -->
<integer name="config_screenBrightnessDoze">1</integer>
<!-- Flag indicating whether the we should enable the automatic brightness in Settings.
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
<bool name="config_automatic_brightness_available">true</bool>
<!-- Array of light sensor LUX values to define our levels for auto backlight brightness support.
The N entries of this array define N + 1 control points as follows:
(1-based arrays)
Point 1: (0, value[1]): lux <= 0
Point 2: (level[1], value[2]): 0 < lux <= level[1]
Point 3: (level[2], value[3]): level[2] < lux <= level[3]
...
Point N+1: (level[N], value[N+1]): level[N] < lux
The control points must be strictly increasing. Each control point
corresponds to an entry in the brightness backlight values arrays.
For example, if LUX == level[1] (first element of the levels array)
then the brightness will be determined by value[2] (second element
of the brightness values array).
Spline interpolation is used to determine the auto-brightness
backlight values for LUX levels between these control points.
Must be overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessLevels">
<item>32</item>
<item>64</item>
<item>128</item>
<item>170</item>
<item>220</item>
<item>256</item>
<item>384</item>
<item>512</item>
<item>768</item>
<item>1024</item>
<item>1536</item>
<item>2048</item>
<item>4096</item>
</integer-array>
<!-- Array of output values for LCD backlight corresponding to the LUX values
in the config_autoBrightnessLevels array. This array should have size one greater
than the size of the config_autoBrightnessLevels array.
The brightness values must be between 0 and 255 and be non-decreasing.
This must be overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>3</item> <!-- 0 -->
<item>10</item> <!-- 32 -->
<item>32</item> <!-- 64 -->
<item>64</item> <!-- 128 -->
<item>80</item> <!-- 170 -->
<item>96</item> <!-- 220 -->
<item>112</item> <!-- 256 -->
<item>128</item> <!-- 384 -->
<item>144</item> <!-- 512 -->
<item>176</item> <!-- 768 -->
<item>196</item> <!-- 1024 -->
<item>208</item> <!-- 1536 -->
<item>224</item> <!-- 2048 -->
<item>255</item> <!-- 4096 -->
</integer-array>
<!-- Screen brightness used to dim the screen when the user activity
timeout expires. May be less than the minimum allowed brightness setting
that can be set by the user. -->
<integer name="config_screenBrightnessDim">10</integer>
<!-- Default screen brightness setting.
Must be in the range specified by minimum and maximum. -->
<integer name="config_screenBrightnessSettingDefault">128</integer>
<!-- Minimum screen brightness setting allowed by the power manager.
The user is forbidden from setting the brightness below this level. -->
<integer name="config_screenBrightnessSettingMinimum">1</integer>
<!-- Whether a software navigation bar should be shown. NOTE: in the future this may be
autodetected from the Configuration. -->
<bool name="config_showNavigationBar">true</bool>
<!-- When true use the linux /dev/input/event subsystem to detect the switch changes
on the headphone/microphone jack. When false use the older uevent framework. -->
<bool name="config_useDevInputEventForAudioJack">true</bool>
<!-- Is the device capable of hot swapping an ICC Card -->
<bool name="config_hotswapCapable">true</bool>
<!-- True if the device supports Sustained Performance Mode-->
<bool name="config_sustainedPerformanceModeSupported">true</bool>
<!-- Boolean indicating whether the HWC setColorTransform function can be performed efficiently
in hardware. -->
<bool name="config_setColorTransformAccelerated">true</bool>
<!-- Is the notification LED intrusive? Used to decide if there should be a disable option -->
<bool name="config_intrusiveNotificationLed">true</bool>
<!-- Control whether the always on display mode is available. This should only be enabled on
devices where the display has been tuned to be power efficient in DOZE and/or DOZE_SUSPEND
states. -->
<bool name="config_dozeAlwaysOnDisplayAvailable">true</bool>
<!-- Whether the display blanks itself when transitioning from a doze to a non-doze state -->
<bool name="config_displayBlanksAfterDoze">true</bool>
<!-- If true, the doze component is not started until after the screen has been turned off
and the screen off animation has been performed. -->
<bool name="config_dozeAfterScreenOffByDefault">true</bool>
<!-- If true, the display will be shifted around in ambient mode. -->
<bool name="config_enableBurnInProtection">true</bool>
<!-- Minimum allowable screen brightness to use in a very dark room.
This value sets the floor for the darkest possible auto-brightness
adjustment. It is expected to be somewhat less than the first entry in
config_autoBrightnessLcdBacklightValues so as to allow the user to have
some range of adjustment to dim the screen further than usual in very
dark rooms. The contents of the screen must still be clearly visible
in darkness (although they may not be visible in a bright room). -->
<integer name="config_screenBrightnessDark">2</integer>
</resources>

View file

@ -0,0 +1,186 @@
<?xml version="1.0" encoding="utf-8"?>
<device name="Android">
<item name="ambient.on">75.00</item>
<item name="screen.on">140.01</item>
<item name="screen.full">381.95</item>
<item name="bluetooth.active">0</item>
<item name="bluetooth.on">0</item>
<item name="wifi.on">9.27</item>
<item name="wifi.active">73.48</item>
<item name="wifi.scan">65.64</item>
<item name="audio">23.49</item>
<item name="video">47.08</item>
<item name="camera.flashlight">27.98</item>
<item name="camera.avg">405.69</item>
<item name="radio.active">137.50</item>
<item name="radio.scanning">105.40</item>
<array name="radio.on">
<value>5.76</value>
<value>5.76</value>
<value>5.76</value>
<value>5.76</value>
<value>5.76</value>
</array>
<array name="cpu.clusters.cores">
<value>4</value>
<value>3</value>
<value>1</value>
</array>
<array name="cpu.core_speeds.cluster0">
<value>300000</value>
<value>403200</value>
<value>518400</value>
<value>614400</value>
<value>691200</value>
<value>787200</value>
<value>883200</value>
<value>979200</value>
<value>1075200</value>
<value>1171200</value>
<value>1248000</value>
<value>1344000</value>
<value>1420800</value>
<value>1516800</value>
<value>1612800</value>
<value>1708800</value>
<value>1804800</value>
</array>
<array name="cpu.core_speeds.cluster1">
<value>710400</value>
<value>825600</value>
<value>940800</value>
<value>1056000</value>
<value>1171200</value>
<value>1286400</value>
<value>1382400</value>
<value>1478400</value>
<value>1574400</value>
<value>1670400</value>
<value>1766400</value>
<value>1862400</value>
<value>1958400</value>
<value>2054400</value>
<value>2150400</value>
<value>2246400</value>
<value>2342400</value>
<value>2419200</value>
</array>
<array name="cpu.core_speeds.cluster2">
<value>844800</value>
<value>960000</value>
<value>1075200</value>
<value>1190400</value>
<value>1305600</value>
<value>1401600</value>
<value>1516800</value>
<value>1632000</value>
<value>1747200</value>
<value>1862400</value>
<value>1977600</value>
<value>2073600</value>
<value>2169600</value>
<value>2265600</value>
<value>2361600</value>
<value>2457600</value>
<value>2553600</value>
<value>2649600</value>
<value>2745600</value>
<value>2841600</value>
</array>
<array name="cpu.core_power.cluster0">
<value>5.77</value>
<value>6.08</value>
<value>6.42</value>
<value>6.55</value>
<value>6.81</value>
<value>7.61</value>
<value>8.06</value>
<value>8.53</value>
<value>8.81</value>
<value>9.28</value>
<value>10.22</value>
<value>11.39</value>
<value>12.55</value>
<value>13.83</value>
<value>14.72</value>
<value>15.86</value>
<value>17.09</value>
</array>
<array name="cpu.core_power.cluster1">
<value>8.25</value>
<value>10.04</value>
<value>11.72</value>
<value>13.49</value>
<value>15.53</value>
<value>17.90</value>
<value>19.48</value>
<value>21.75</value>
<value>23.95</value>
<value>26.67</value>
<value>31.95</value>
<value>37.68</value>
<value>39.27</value>
<value>42.82</value>
<value>46.44</value>
<value>50.93</value>
<value>55.65</value>
<value>59.25</value>
</array>
<array name="cpu.core_power.cluster2">
<value>26.55</value>
<value>31.09</value>
<value>35.73</value>
<value>40.47</value>
<value>45.01</value>
<value>48.99</value>
<value>56.40</value>
<value>64.44</value>
<value>73.14</value>
<value>81.45</value>
<value>92.60</value>
<value>104.67</value>
<value>119.90</value>
<value>124.54</value>
<value>131.61</value>
<value>144.12</value>
<value>158.46</value>
<value>171.97</value>
<value>183.45</value>
<value>194.23</value>
</array>
<item name="cpu.suspend">4.68</item>
<item name="cpu.idle">6.00</item>
<item name="cpu.active">0.01</item>
<item name="battery.capacity">3860</item>
<item name="wifi.controller.idle">0.00</item>
<item name="wifi.controller.rx">5.55</item>
<item name="wifi.controller.tx">6.70</item>
<array name="wifi.controller.tx_levels" />
<item name="wifi.controller.voltage">600.00</item>
<array name="wifi.batchedscan">
<value>.0002</value>
<value>.002</value>
<value>.02</value>
<value>.2</value>
<value>2</value>
</array>
<item name="modem.controller.idle">0.67</item>
<item name="modem.controller.rx">116.96</item>
<array name="modem.controller.tx">
<value>112.33</value>
<value>112.33</value>
<value>112.33</value>
<value>112.33</value>
<value>112.33</value>
</array>
<item name="modem.controller.voltage">580</item>
<item name="bluetooth.controller.idle">0.59</item>
<item name="bluetooth.controller.rx">66.68</item>
<item name="bluetooth.controller.tx">77.97</item>
<item name="bluetooth.controller.voltage">3800.00</item>
<array name="gps.signalqualitybased">
<value>47.39</value>
<value>11.94</value>
</array>
<item name="gps.voltage">3800</item>
</device>

View file

@ -128,6 +128,7 @@ PRODUCT_PACKAGES += \
treble-overlay-samsung-s9q \
treble-overlay-sec-ims \
treble-overlay-sharp-s2 \
treble-overlay-sony-J9110 \
treble-overlay-sony-XZ3 \
treble-overlay-sony-pdx206 \
treble-overlay-sprd-ims \