From 4264b7e6b8636061535e0704140d96d01c4152c2 Mon Sep 17 00:00:00 2001 From: Daniel Roschka Date: Tue, 3 Mar 2020 21:00:32 +0100 Subject: [PATCH] Add overlay for Motorola Moto G7 Play (channel) This adds a hardware overlay for the Motorola Moto G7 Play. The property values are taken directly from stock ROM. Properties which matched the AOSP default values got removed, as well as some brightness related properties which caused problems. The `config_wifi_dual_band_support` and `status_bar_height_portrait` properties got added to fix the supported wifi bands and set the status bar to the height of the notch. In `config_gpsParameters` the `XTRA_SERVER` properties got adjusted to use Xtra3 instead of Xtra2 files. The overlay works fine and has been tested on a device for over a week now without any overlay related issues so far. --- Moto/G7Play/Android.mk | 8 ++ Moto/G7Play/AndroidManifest.xml | 15 +++ Moto/G7Play/res/values/config.xml | 144 ++++++++++++++++++++++++++ Moto/G7Play/res/xml/power_profile.xml | 68 ++++++++++++ overlay.mk | 1 + 5 files changed, 236 insertions(+) create mode 100644 Moto/G7Play/Android.mk create mode 100644 Moto/G7Play/AndroidManifest.xml create mode 100644 Moto/G7Play/res/values/config.xml create mode 100644 Moto/G7Play/res/xml/power_profile.xml diff --git a/Moto/G7Play/Android.mk b/Moto/G7Play/Android.mk new file mode 100644 index 0000000..a882b30 --- /dev/null +++ b/Moto/G7Play/Android.mk @@ -0,0 +1,8 @@ +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) +LOCAL_MODULE_TAGS := optional +LOCAL_PACKAGE_NAME := treble-overlay-moto-g7play +LOCAL_MODULE_PATH := $(TARGET_OUT)/overlay +LOCAL_IS_RUNTIME_RESOURCE_OVERLAY := true +LOCAL_PRIVATE_PLATFORM_APIS := true +include $(BUILD_PACKAGE) diff --git a/Moto/G7Play/AndroidManifest.xml b/Moto/G7Play/AndroidManifest.xml new file mode 100644 index 0000000..3f1ae9f --- /dev/null +++ b/Moto/G7Play/AndroidManifest.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/Moto/G7Play/res/values/config.xml b/Moto/G7Play/res/values/config.xml new file mode 100644 index 0000000..740b614 --- /dev/null +++ b/Moto/G7Play/res/values/config.xml @@ -0,0 +1,144 @@ + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + false + true + true + true + true + true + false + true + true + true + false + 72px + 2000 + 30 + 0 + 3300 + 65540 + 1410 + 4 + 3 + 3 + 17 + 3 + 670 + + 10 + 20 + 40 + 70 + 110 + 160 + 200 + 255 + + + 2 + 10 + 50 + 90 + 100 + 150 + 200 + 300 + 400 + 500 + 800 + 1000 + 1300 + 2000 + 3000 + 4000 + 8000 + 10000 + + + 0 + 20 + + + 0 + 20 + + + 0 + 1 + 5 + 7 + + + 0 + 26 + + com.motorola.sensor.camera_activate + com.android.systemui/com.android.systemui.doze.DozeService + org.codeaurora.ims + M -188,0 L -188,72 L 188,72 L 188,0 Z + + XTRA_SERVER_1=https://xtrapath1.izatcloud.net/xtra3grc.bin + XTRA_SERVER_2=https://xtrapath2.izatcloud.net/xtra3grc.bin + XTRA_SERVER_3=https://xtrapath3.izatcloud.net/xtra3grc.bin + NTP_SERVER=north-america.pool.ntp.org + SUPL_MODE=0 + SUPL_HOST=NONE + SUPL_PORT=7275 + SUPL_VER=0x20000 + LPP_PROFILE=3 + NMEA_PROVIDER=0 + A_GLONASS_POS_PROTOCOL_SELECT=0 + ERR_ESTIMATE=0 + INTERMEDIATE_POS=0 + SUPL_ES=1 + GPS_LOCK=1 + + + bnep\\d + bt-pan + + + rndis\\d + + + wigig0 + wlan0 + softap0 + + + wifi,1,1,1,-1,true + mobile,0,0,0,-1,true + mobile_mms,2,0,4,60000,true + mobile_supl,3,0,2,60000,true + mobile_dun,4,0,2,60000,true + mobile_hipri,5,0,3,60000,true + mobile_fota,10,0,2,60000,true + mobile_ims,11,0,2,60000,true + mobile_cbs,12,0,2,60000,true + bluetooth,7,7,2,-1,true + ethernet,9,9,3,-1,true + mobile_emergency,15,0,5,-1,true + + + 1,1 + 0,1 + 7,1 + 9,1 + + diff --git a/Moto/G7Play/res/xml/power_profile.xml b/Moto/G7Play/res/xml/power_profile.xml new file mode 100644 index 0000000..64b7d55 --- /dev/null +++ b/Moto/G7Play/res/xml/power_profile.xml @@ -0,0 +1,68 @@ + + + 0 + 101.431 + 275.550 + 0.606 + 74.462 + 25.088 + 374.399 + 265.769 + 21.412 + 208.332 + 46.310 + + 33.079 + 30 + 25 + 20 + 15 + 10 + 5 + 1.090 + + + 4 + 4 + + + 614400 + 883200 + 1036800 + 1363200 + 1536000 + 1670400 + 1804800 + + + 633600 + 902400 + 1094400 + 1401600 + 1555200 + 1804800 + + + 8.24 + 18.66 + 20.2 + 28.57 + 48.57 + 51.23 + 62.6 + + + 10.85 + 20.85 + 31.57 + 50.96 + 70.31 + 100.25 + + 4.27 + 7.22 + 3.993 + 2.969 + 3.5 + 3000 + diff --git a/overlay.mk b/overlay.mk index 86bae7c..ae6ed24 100644 --- a/overlay.mk +++ b/overlay.mk @@ -43,6 +43,7 @@ PRODUCT_PACKAGES += \ treble-overlay-moto-g6 \ treble-overlay-moto-g6play \ treble-overlay-moto-g6plus \ + treble-overlay-moto-g7play \ treble-overlay-moto-g7power \ treble-overlay-nokia-b2n \ treble-overlay-nokia-ctl \