当前位置: 首页 > article >正文

20241004给荣品RD-RK3588-AHD开发板刷Rockchip原厂的Android12时永不休眠的步骤

20241004给荣品RD-RK3588-AHD开发板刷Rockchip原厂的Android12时永不休眠的步骤
2024/10/4 19:22


1、
Z:\rk3588s4_3588a12\device\rockchip\common\device.mk
ifeq ($(strip $(BOARD_HAVE_BLUETOOTH_RTK)), true)
include hardware/realtek/rtkbt/rtkbt.mk
endif

ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), box)
    #include device/rockchip/common/samba/rk31_samba.mk
    PRODUCT_COPY_FILES += \
      $(LOCAL_PATH)/init.box.samba.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.box.samba.rc \
      device/rockchip/common/cifsmanager.sh:system/bin/cifsmanager.sh

    PRODUCT_PROPERTY_OVERRIDES += \
      ro.rk.screenoff_time=2147483647
else
PRODUCT_PROPERTY_OVERRIDES += \
    ro.rk.screenoff_time=60000
endif

# incrementalfs config
$(call inherit-product-if-exists, vendor/rockchip/common/modular_kernel/4.19/incrementalfs.mk)

修改为:
ifeq ($(strip $(BOARD_HAVE_BLUETOOTH_RTK)), true)
include hardware/realtek/rtkbt/rtkbt.mk
endif

ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), box)
    #include device/rockchip/common/samba/rk31_samba.mk
    PRODUCT_COPY_FILES += \
      $(LOCAL_PATH)/init.box.samba.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.box.samba.rc \
      device/rockchip/common/cifsmanager.sh:system/bin/cifsmanager.sh

    PRODUCT_PROPERTY_OVERRIDES += \
      ro.rk.screenoff_time=2147483647
else
PRODUCT_PROPERTY_OVERRIDES += \
    ro.rk.screenoff_time=2147483647
endif

# incrementalfs config
$(call inherit-product-if-exists, vendor/rockchip/common/modular_kernel/4.19/incrementalfs.mk)


2、
Z:\rk3588s4_3588a12\device\rockchip\rk3588\overlay\frameworks\base\packages\SettingsProvider\res\values\defaults.xml
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
 * Copyright (c) 2009, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->
<resources>
    <integer name="def_screen_off_timeout">60000</integer>
   <!-- Initial value for the Settings.Secure.IMMERSIVE_MODE_CONFIRMATIONS setting,
         which is a comma separated list of packages that no longer need confirmation
         for immersive mode.
         Override to disable immersive mode confirmation for certain packages. -->
    <string name="def_immersive_mode_confirmations" translatable="false">confirmed</string>
    <bool name="def_bluetooth_on">false</bool>
    <bool name="def_accelerometer_rotation">false</bool>

    <!-- 0 == Always sleep
     1 == Do not sleep when plugged in
     2 == Never sleep
    When the screen is off, it will enter the sleep policy.
    You can configure persist.wifi.sleep.delay.ms to delay closing wifi.
    The default is 15 minutes, 0 means that the wifi is turned off
    immediately after the screen is off. -->
    <integer name="def_wifi_sleep_policy">2</integer>

    <!-- Decrease animation duration. -->
    <fraction name="def_window_animation_scale">50%</fraction>
    <fraction name="def_window_transition_scale">50%</fraction>
</resources>

修改为:
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
 * Copyright (c) 2009, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->
<resources>
    <integer name="def_screen_off_timeout">2147483647</integer>
   <!-- Initial value for the Settings.Secure.IMMERSIVE_MODE_CONFIRMATIONS setting,
         which is a comma separated list of packages that no longer need confirmation
         for immersive mode.
         Override to disable immersive mode confirmation for certain packages. -->
    <string name="def_immersive_mode_confirmations" translatable="false">confirmed</string>
    <bool name="def_bluetooth_on">false</bool>
    <bool name="def_accelerometer_rotation">false</bool>

    <!-- 0 == Always sleep
     1 == Do not sleep when plugged in
     2 == Never sleep
    When the screen is off, it will enter the sleep policy.
    You can configure persist.wifi.sleep.delay.ms to delay closing wifi.
    The default is 15 minutes, 0 means that the wifi is turned off
    immediately after the screen is off. -->
    <integer name="def_wifi_sleep_policy">2</integer>

    <!-- Decrease animation duration. -->
    <fraction name="def_window_animation_scale">50%</fraction>
    <fraction name="def_window_transition_scale">50%</fraction>
</resources>

3、【改两个地方,但是只修改这里无效!】
Z:\rk3588s4_3588a12\frameworks\base\packages\SettingsProvider\res\values\defaults.xml
    <bool name="def_dim_screen">true</bool>
    <integer name="def_screen_off_timeout">6000</integer>
    <integer name="def_sleep_timeout">-1</integer>

修改为:
    <bool name="def_dim_screen">true</bool>
    <integer name="def_screen_off_timeout">2147483647</integer>
    <integer name="def_sleep_timeout">-1</integer>


    <bool name="def_lockscreen_disabled">false</bool>
    <bool name="def_device_provisioned">false</bool>
    <integer name="def_dock_audio_media_enabled">1</integer>

修改为:
    <bool name="def_lockscreen_disabled">true</bool>
    <bool name="def_device_provisioned">false</bool>
    <integer name="def_dock_audio_media_enabled">1</integer>


4、
Z:\rk3588s4_3588a12\packages\apps\Settings\res\values\arrays.xml
    <!-- Display settings.  The delay in inactivity before the screen is turned off. These are shown in a list dialog. -->
    <string-array name="screen_timeout_entries">
        <item>15 seconds</item>
        <item>30 seconds</item>
        <item>1 minute</item>
        <item>2 minutes</item>
        <item>5 minutes</item>
        <item>10 minutes</item>
        <item>30 minutes</item>
    </string-array>

    <!-- Do not translate. -->
    <string-array name="screen_timeout_values" translatable="false">
        <!-- Do not translate. -->
        <item>15000</item>
        <!-- Do not translate. -->
        <item>30000</item>
        <!-- Do not translate. -->
        <item>60000</item>
        <!-- Do not translate. -->
        <item>120000</item>
        <!-- Do not translate. -->
        <item>300000</item>
        <!-- Do not translate. -->
        <item>600000</item>
        <!-- Do not translate. -->
        <item>1800000</item>
    </string-array>

修改为:
    <!-- Display settings.  The delay in inactivity before the screen is turned off. These are shown in a list dialog. -->
    <string-array name="screen_timeout_entries">
        <item>15 seconds</item>
        <item>30 seconds</item>
        <item>1 minute</item>
        <item>2 minutes</item>
        <item>5 minutes</item>
        <item>10 minutes</item>
        <item>30 minutes</item>
        <item>Never</item>
    </string-array>

    <!-- Do not translate. -->
    <string-array name="screen_timeout_values" translatable="false">
        <!-- Do not translate. -->
        <item>15000</item>
        <!-- Do not translate. -->
        <item>30000</item>
        <!-- Do not translate. -->
        <item>60000</item>
        <!-- Do not translate. -->
        <item>120000</item>
        <!-- Do not translate. -->
        <item>300000</item>
        <!-- Do not translate. -->
        <item>600000</item>
        <!-- Do not translate. -->
        <item>1800000</item>
        <!-- Do not translate. -->
        <item>2147483647</item>

    </string-array>


参考资料:
【以本文为准】
https://blog.csdn.net/ewin2012/article/details/128302913
RK3588-ANDROID12-永不息屏,不锁屏


https://blog.csdn.net/longmin96/article/details/122555882
RK3568-ANDROID11-不息屏


【可以/可选尝试在DTS配置suspend的状态为:disabled】
https://blog.51cto.com/u_16099349/9740109
rk3588 android12 禁止休眠状态 rk860休眠


【不能用】
https://developer.aliyun.com/article/1502084
rk平台Android12屏幕永不休眠


https://blog.csdn.net/DKBDKBDKB/article/details/128853366?spm=1001.2101.3001.6650.2&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-2-128853366-blog-122555882.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-2-128853366-blog-122555882.235%5Ev43%5Epc_blog_bottom_relevance_base7&utm_relevant_index=5
Android11 设置菜单添加永不休眠选项
切换到dream_timeout资源,这里边有永不休眠的选项;
 


http://www.kler.cn/news/343206.html

相关文章:

  • 【CTF Web】Pikachu 本地文件包含 Writeup(文件包含漏洞+GET请求)
  • 高级java每日一道面试题-2024年10月10日-中间件篇[设计篇]-结合项目场景问如何设计一个消息中间件?
  • 1688商品详情关键词数据-API
  • 低代码赋能汽车制造产业链场景系列
  • 【ubuntu】ubuntu20.04安装显卡驱动
  • Spring Boot 之 Lombok 使用详解
  • SAP 费用化采购订单简介
  • kubeadm 搭建k8s 1.28.2版本集群
  • Solon 3.0 新特性:SqlUtils
  • LeetCode-871 最低加油次数
  • 注册安全分析报告:惠农网
  • 【一文理解】conda install pip install 区别
  • sql 语句相关的函数
  • 深入解析 Go 语言中的结构体:从基础用法到高级技巧的全方位指南
  • requests 中data=xxx、json=xxx、params=xxx 分别什么时候用
  • 做ppt用什么软件好?5个办公必备的ppt工具推荐!
  • VS Code最新版本Retome远程ssh不兼容旧服务器问题
  • 在Windows中使用谷歌浏览器观看和录制游戏直播
  • 【C#生态园】打造现代化跨平台应用:深度解析.NET桌面应用工具
  • c# gobal using