MTK开机启动勾选“Disable Hardware Overlays”

本实验在Android4.4系统尝试,并测试成功。

在init.rc中加入

#add by eliot shao for bootup shutdown     dis_hwoverlay
service hwoverlay /system/bin/dis_hwoverlay.sh
    class main
    user system
    disabled
    oneshot
on property:sys.boot_completed=1
    start hwoverlay

打包:./mk hexing72_cwet_lca bootimage

把dis_hwoverlay.sh脚本push到/system/bin/下面,dis_hwoverlay.sh内容:

#!/system/bin/sh

(while :
do
    sf=$(service list | grep -c "SurfaceFlinger")

    if [ $sf -eq 1 ]
    then
        service call SurfaceFlinger 1008 i32 1
        break
    else
        sleep 2
    fi
done
) &

dis_hwoverlay.sh编辑的时候要转换为unix文件格式,不然程序在运行的时候会报出无法找到文件的错误。

这样在开机启动的时候,就会勾选了“Disable Hardware Overlays”,停止硬件叠加功能,强制GPU合成。

MTK显示这一块的display data path (DDP)

发布了129 篇原创文章 · 获赞 322 · 访问量 49万+

猜你喜欢

转载自blog.csdn.net/seek_0380/article/details/84564860