zoukankan      html  css  js  c++  java
  • Android Thermal-engine

    Thermal Engine
    Thermal 相关的东西主要在Vendor/qcom/proprietary/thermal-engine 目录下:
    thermal-engine.conf 文件可以用来配置高低温时CPU的工作模式、充电电流等相关操作。
     
     
    也可通过修改ss-data.c thermal_config thermal_monitor-data-8916.c两个文件中的结构体成员来配置。
    当然,程序会优先选择conf文件进行解析,但是conf文件中涉及到的各项内容,在 c文件中的结构体要存在。
    (也就是说,你在conf文件中配置了CPU1,但是ss-data.c中对应的平台结构体没有CPU1这一项,那么相关的配置文件参数是不会生效的)
     
    此文件由 therml_config.c 来解析,使用
    int load_config(struct thermal_setting_t *settings, const char *pFName)
    在 therml_config_v2.c 中使用
    int load_config(struct thermal_setting_t *settings, const char *pFName, int flag)
     
    主要看传入的第二个参数
    const char *cf = (pFName) ? pFName : CONFIG_FILE_DEFAULT;
    如果pFname不存在,就用默认文件
     
    thermal.h文件中定义
    #ifndef CONFIG_FILE_DEFAULT
    #define CONFIG_FILE_DEFAULT "/system/etc/thermal-engine.conf"
    #endif
     
    在安卓O版本中,thermal-engine.conf 放在了 /system/vendor/etc/ 目录下,这个目录实际上是链接的vendor/etc/的目录,这个要特别注意。不止thermal这一块变了,camera的目录也发生了比较大的改变。
    另外在安卓O版本中,调试的时候,输入adb shell thermal-engine -o 关于CPU的配置总是不能输出。但是adb root 的一下就可以了,这个应该是权限问题。具体会不会影响thermal机制的运行,还要实际测一下试试。

     

     
    Thermal engine 调试
     
    1.找到当前的thermal engine配置
    1. adb shell thermal-engine –o > thermal-engine.conf  
     
    2.修改该文件后推送到设备上
     
    3.将”debug“放到thermal-engine.conf的首行,然后重新启动thermal-engine服务
    1. adb shell stop thermal-engine  
    2. adb root  
    3. adb remount  
    4. adb push thermal-engine.conf /system/etc/thermal-engine.conf  
    5. adb shell sync .  
    6. adb shell strat thermal-engine --debug &  
    4.logcat查看系统温度log
    1. adb logcat –v time –s ThermalEngine  

  • 相关阅读:
    MVC 中301永久重定向
    String
    redis key设置过期时间
    hbase java 增加列族
    hbase 物理存储
    java 类图
    SSH hql中文查询时乱码快速解决
    json和pickle的序列化与反序列化
    python之生成器与迭代器
    安装traits库心得
  • 原文地址:https://www.cnblogs.com/Hello-words/p/7458209.html
Copyright © 2011-2022 走看看