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0
+
+
+
+ more
+ 1
+ 0
+ 0
+
+
+
+ more
+ 100
+ 0
+ 0
+
+
+
+ more
+ 100
+ 0
+ 0
+
+
+
+ more
+ 100
+ 0
+ 0
+
+
+
+ more
+ 100
+ 0
+ 0
+
+
+
+ more
+ 100
+ 0
+ 0
+
+
+
+ more
+ 100
+ 0
+ 0
+
+
+
+ less
+ 100
+ 0
+ 100
+
+
+
+ less
+ 100
+ 0
+ 100
+
+
+
+ less
+ 100
+ 0
+ 100
+
+
+
+ less
+ 100
+ 0
+ 100
+
+
+
+ less
+ 100
+ 0
+ 100
+
+
+
+ less
+ 100
+ 0
+ 100
+
+
+
+ less
+ 1000000000
+ 0
+ 1000
+
+
+
+ less
+ 1000000000
+ 0
+ 1000
+
+
+
+ more
+ 1000000000
+ 0
+ 1000
+
+
+
+ more
+ 1000000000
+ 0
+ 1000
+
+
+
+ more
+ 1
+ 0
+ 0
+ dsu_mode^
+
+
+
+ more
+ 15
+ 0
+ 0
+
+
+
+ more
+ 1
+ 0
+ 0
+
+
+
+ more
+ 6553599
+ 1
+ 130
+
+
+
+ more
+ 60
+ 0
+
+
+
+ more
+ 99
+ 1
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 2
+ 0
+
+
+
+ more
+ 2
+ 0
+
+
+
+ more
+ 100
+ 0
+
+
+
+ more
+ 100
+ 0
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 31
+ 0
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 10
+ 0
+
+
+
+ more
+ 1
+ 0
+ 0
+
+
+
+ more
+ 31
+ 0
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 1000000
+ 33
+
+
+
+ more
+ 1
+ 0
+ 0
+ cm_mgr_camera_enable^
+
+
+
+ more
+ 1
+ 0
+ 0
+ cm_mgr_cpu_map_dram_enable^
+
+
+
+ more
+ 2
+ 0
+ cm_aggr^
+
+
+ more
+ 1
+ 0
+ 1
+
+
+ less
+ 31
+ 0
+ 2
+
+
+ less
+ 31
+ 0
+ 2
+
+
+ more
+ 2000
+ 10
+ 200
+
+
+ more
+ 1000
+ 0
+ 100
+
+
+ more
+ 100
+ 0
+ 80
+
+
+ more
+ 1
+ 0
+ 1
+
+
+ less
+ 1000000000
+ 0
+ 0
+
+
+
+ more
+ 2000000000
+ 0
+
+
+
+ more
+ 100
+ 0
+
+
+
+ more
+ 2000000000
+ -1
+ 798
+
+
+
+ more
+ 25855
+ 0
+ 4
+
+
+
+ more
+ 32767
+ 1
+
+
+
+ more
+ 32767
+ 1
+
+
+
+ less
+ 1
+ 0
+
+
+
+ more
+ 100
+ 0
+
+
+
+ less
+ 2
+ 0
+
+
+
+ more
+ 100
+ 0
+ 0
+
+
+
+ more
+ 2
+ 0
+ 0
+
+
+
+ more
+ 20
+ 2
+
+
+
+ more
+ 50
+ 0
+ 0
+
+
+
+ more
+ 1
+ 0
+ 0
+
+
+
+ more
+ 1000000000
+ 0
+ 1000000000
+
+
+
+ more
+ 1
+ 0
+ 0
+
+
+
+ more
+ 9
+ 1
+
+
+
+ more
+ 5
+ 0
+
+
+
+ more
+ 100
+ 0
+ 25
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 10000
+ 400
+
+
+
+ more
+ 15
+ 1
+
+
+
+ more
+ 100
+ 0
+
+
+
+ more
+ 100
+ 0
+
+
+
+ more
+ 300
+ 10
+
+
+
+ more
+ 1000
+ 0
+
+
+
+ more
+ 1
+ 0
+ 1
+
+
+
+ more
+ 100
+ 0
+
+
+
+ more
+ 7
+ -1
+
+
+
+ more
+ 7
+ -1
+
+
+
+ less
+ 1
+ 0
+
+
+
+ more
+ 100
+ 0
+ 95
+
+
+
+ more
+ 50000000
+ -50000000
+ 1000000
+
+
+
+ more
+ 1
+ 0
+ 0
+
+
+
+ more
+ 1
+ 0
+ 0
+
+
+
+ more
+ 1
+ 0
+ 0
+
+
+
+ more
+ 3000000
+ 0
+
+
+
+ more
+ 3000000
+ 0
+
+
+
+ more
+ 3000000
+ 0
+
+
+
+ more
+ 3000000
+ 0
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 1
+ 0
+ 1
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 2
+ 0
+ 2
+
+
+
+ more
+ 65535
+ 0
+
+
+
+ more
+ 1
+ 0
+
+
+
+ less
+ 100
+ -100
+
+
+
+ more
+ 100
+ 0
+
+
+
+ more
+ 200
+ 0
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 200
+ 0
+
+
+
+ more
+ 200
+ 0
+
+
+
+ more
+ 200
+ 0
+
+
+
+ more
+ 200
+ 0
+
+
+
+ more
+ 6000
+ -6000
+
+
+
+ more
+ 100
+ 0
+
+
+
+ more
+ 100
+ 0
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 100
+ 0
+
+
+
+ more
+ 100
+ 0
+
+
+
+ more
+ 100
+ 0
+
+
+
+ more
+ 100
+ 0
+
+
+
+ more
+ 100
+ 0
+
+
+
+ more
+ 100
+ 0
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 100
+ -1
+ -1
+
+
+
+ more
+ 1
+ 0
+
+
+
+ more
+ 200
+ 0
+
+
diff --git a/configs/perf/powerscntbl.xml b/configs/perf/powerscntbl.xml
new file mode 100644
index 0000000..6e46108
--- /dev/null
+++ b/configs/perf/powerscntbl.xml
@@ -0,0 +1,164 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/device.mk b/device.mk
index bd60a18..7f2d769 100644
--- a/device.mk
+++ b/device.mk
@@ -102,6 +102,23 @@ PRODUCT_PACKAGES += \
# Include GSI keys
$(call inherit-product, $(SRC_TARGET_DIR)/product/developer_gsi_keys.mk)
+# Power
+PRODUCT_PACKAGES += \
+ android.hardware.power-service-mediatek \
+ android.hardware.power-V2-ndk_platform.vendor \
+ android.hardware.power@1.0.vendor \
+ android.hardware.power@1.1.vendor \
+ android.hardware.power@1.2.vendor \
+ libmtkperf_client_vendor \
+ vendor.mediatek.hardware.mtkpower@1.0.vendor \
+ vendor.mediatek.hardware.mtkpower@1.1.vendor \
+ vendor.mediatek.hardware.mtkpower@1.2.vendor
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/configs/perf/power_app_cfg.xml:$(TARGET_COPY_OUT_VENDOR)/etc/power_app_cfg.xml \
+ $(LOCAL_PATH)/configs/perf/powercontable.xml:$(TARGET_COPY_OUT_VENDOR)/etc/powercontable.xml \
+ $(LOCAL_PATH)/configs/perf/powerscntbl.xml:$(TARGET_COPY_OUT_VENDOR)/etc/powerscntbl.xml
+
# Project ID Quota
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
diff --git a/proprietary-files.txt b/proprietary-files.txt
index dc30afb..c6bdc5d 100644
--- a/proprietary-files.txt
+++ b/proprietary-files.txt
@@ -251,3 +251,23 @@ vendor/firmware/soc2_2_ram_wifi_1e_1_hdr.bin
vendor/firmware/soc_fm_v1_coeff.bin
vendor/firmware/soc_fm_v1_patch.bin
vendor/firmware/wifi.cfg
+
+# Power
+vendor/bin/hw/vendor.mediatek.hardware.mtkpower@1.0-service
+vendor/etc/init/bootperf.rc
+vendor/etc/init/init.fpsgo.rc
+vendor/etc/init/vendor.mediatek.hardware.mtkpower@1.0-init.rc
+vendor/etc/init/vendor.mediatek.hardware.mtkpower@1.0-service.rc
+vendor/lib/hw/vendor.mediatek.hardware.mtkpower@1.2-impl.so
+vendor/lib/libperfctl_vendor.so
+vendor/lib/libpower_timer.so
+vendor/lib/libpowerhal.so
+vendor/lib/libpowerhalwrap_vendor.so
+vendor/lib/vendor.mediatek.hardware.power@2.0.so
+vendor/lib64/hw/vendor.mediatek.hardware.mtkpower@1.2-impl.so
+vendor/lib64/libperfctl_vendor.so
+vendor/lib64/libpower_timer.so
+vendor/lib64/libpowerhal.so
+vendor/lib64/libpowerhalwrap_vendor.so
+vendor/lib64/libtranlog.so
+vendor/lib64/vendor.mediatek.hardware.power@2.0.so