From a9a6cba4ddf8227d43cec50fb6d48a410e9369c9 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 27 May 2018 13:14:50 +0200 Subject: [PATCH] Force GPU profiling on Huawei as a work-around for rendering artifacts --- sepolicy/vndk_detect.te | 1 + vndk-detect | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sepolicy/vndk_detect.te b/sepolicy/vndk_detect.te index b530a35..fd49c49 100644 --- a/sepolicy/vndk_detect.te +++ b/sepolicy/vndk_detect.te @@ -4,6 +4,7 @@ type vndk_detect_exec, exec_type, file_type; init_daemon_domain(vndk_detect); allow vndk_detect sepolicy_file:file r_file_perms; set_prop(vndk_detect,system_prop); +set_prop(vndk_detect,debug_prop); allow vndk_detect shell_exec:file rx_file_perms; allow vndk_detect toolbox_exec:file rx_file_perms; diff --git a/vndk-detect b/vndk-detect index a80c18d..563af53 100644 --- a/vndk-detect +++ b/vndk-detect @@ -10,7 +10,7 @@ while read version;do done mount -o bind /system/bin/adbd /sbin/adbd -if ( getprop ro.hardware | grep -q kirin970 ) || ( getprop ro.hardware | grep -q hi6250 );then +if ( getprop ro.hardware | grep -qE '(kirin970|hi3660|hi6250|hi3670)' );then FOUND_HUAWEI=1 setprop persist.sys.bt_acl_bypass true fi @@ -20,6 +20,10 @@ if getprop ro.vendor.build.fingerprint |grep -qiE '(huawei|honor|hi3660)' || [ - setprop persist.sys.overlay.huawei.backlight true fi +if [ -n "$FOUND_HUAWEI" ];then + setprop debug.hwui.profile true +fi + if getprop ro.hardware |grep -qiE qcom;then FOUND_QCOM=1 setprop persist.sys.overlay.devinputjack true