adb shell setprop 、开发者选项

news2024/9/27 15:25:37

App性能调试详解

Android App性能监控工具

更多系统属性参考

一、开启 GPU Render 的profiling bar: Gpu渲染速度

adb shell setprop debug.hwui.profile true
adb shell setprop debug.hwui.profile visual_bars 
adb shell setprop debug.hwui.profile visual_lines

adb shell setprop debug.hwui.profile false

#控制汇总条长度
adb shell setprop debug.hwui.profile.maxframes 400 

效果如下:

在这里插入图片描述

其中, Android 6.0 及更高版本的设备时分析器输出中某个竖条的每个区段如下所示:

在这里插入图片描述
下表显示的是 Android 4.0 和 5.0 中的竖条区段。

在这里插入图片描述

系统源码 :

/**
 * System property used to enable or disable hardware rendering profiling.
 * The default value of this property is assumed to be false.
 * When profiling is enabled, the adb shell dumpsys gfxinfo command will
 * output extra information about the time taken to execute by the last
 * frames.
 * Possible values:
 * "true",        to enable profiling
 * "visual_bars", to enable profiling and visualize the results on screen
 * "false",       to disable profiling
 * @see #PROFILE_PROPERTY_VISUALIZE_BARS
 * @hide
 */
public static final String PROFILE_PROPERTY = "debug.hwui.profile";
/**
 * System property used to specify the number of frames to be used
 * when doing hardware rendering profiling.
 * The default value of this property is #PROFILE_MAX_FRAMES.
 *
 * When profiling is enabled, the adb shell dumpsys gfxinfo command will
 * output extra information about the time taken to execute by the last
 * frames.
 *
 * Possible values:
 * "60", to set the limit of frames to 60
 */
static final String PROFILE_MAXFRAMES_PROPERTY = "debug.hwui.profile.maxframes";

二、打开 Overdraw 检查 : GPU过度绘制

adb shell setprop debug.hwui.overdraw show

# 

adb shell setprop debug.hwui.overdraw false

在这里插入图片描述

在这里插入图片描述

系统源码:

/*
 * Controls overdraw debugging.
 *
 * Possible values:
 * "false", to disable overdraw debugging
 * "show",  to show overdraw areas on screen
 * "count", to display an overdraw counter
 *
 * @hide
 */
public static final String DEBUG_OVERDRAW_PROPERTY = "debug.hwui.overdraw";

三、开启显示各个view的布局线 : 布局边界

adb shell setprop debug.layout true

# 

adb shell setprop debug.layout false

在这里插入图片描述

系统源码 :

/**
 * When set to true, apps will draw debugging information about their layouts.
 *
 * @hide
 */
public static final String DEBUG_LAYOUT_PROPERTY = "debug.layout";

参考

四、查看dirty区域:

adb shell setprop debug.hwui.show_dirty_regions true

adb shell setprop debug.hwui.render_dirty_regions true

系统源码:

/**
* System property used to enable or disable dirty regions invalidation.
* This property is only queried if {@link #RENDER_DIRTY_REGIONS} is true.
* The default value of this property is assumed to be true.
*
* Possible values:
* "true",  to enable partial invalidates
* "false", to disable partial invalidates
*/
static final String RENDER_DIRTY_REGIONS_PROPERTY = "debug.hwui.render_dirty_regions";


/**
* Turn on to draw dirty regions every other frame.
*
* Possible values:
* "true",  to enable dirty regions debugging
* "false", to disable dirty regions debugging
*
* @hide
*/
public static final String DEBUG_DIRTY_REGIONS_PROPERTY = "debug.hwui.show_dirty_regions";

五、log日志

# 使能所有log tag 输出,设置所有log V等级及以上的log才能输出
adb shell setprop persist.log.tag V

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/921423.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

opencv-答题卡识别判卷

#导入工具包 import numpy as np import argparse import imutils import cv2# 设置参数 ap argparse.ArgumentParser() ap.add_argument("-i", "--image", requiredTrue,help"path to the input image") args vars(ap.parse_args())# 正确答案…

HDLBits-Verilog学习记录 | Verilog Language-Modules(1)

文章目录 20.Module21.Connecting ports by position | Moudle pos22.Connecting ports by name | Module name23.Three modules | Module shift24.Modules and vectors | Module shift8 20.Module practice:You may connect signals to the module by port name or port posi…

一百六十四、Kettle——Linux上脚本运行kettle的转换任务(Linux本地、Linux资源库)

一、目的 在kettle的转换任务以及共享资源库、Carte服务创建好后,需要对kettle的转换任务用海豚调度器进行调度,调度的前提的写好脚本。所以,这篇博客首先介绍在Linux上脚本运行kettle的转换任务 二、前提准备 (一)…

运算放大器发展史

在内部集成了一个补偿电容 MPS公司OP07推出后,大受欢迎。各家厂商都推出了自己的 这4款都是可以替换的

Apache StreamPark系列教程第二篇——项目打包和开发

一、项目打包 项目依赖maven、jdk8.0、前端(node、npm) //下载代码 git clone//maven打包相关内容 mvn -N io.takari:maven:wrapper //前端打包相关内容 curl -sL https://rpm.nodesource.com/setup_16.x | bash - yum -y install nodejs npm -v npm install -g pnpm默认是h2…

小兔鲜儿 - 推荐模块

目录 动态获取数据 静态结构 获取页面参数​ 获取数据​ 类型声明 热门推荐 – 渲染页面和Tab交互 热门推荐 – 分页加载 热门推荐 – 分页条件 type 和 interface 的区别 type 和 interface 的相似之处 type 的特点和用途 interface 的特点和用途 何时使用 type…

基于JAVA SpringBoot和UniAPP的宠物服务预约小程序

随着社会的发展和人们生活水平的提高,特别是近年来,宠物快速进入人们的家中,成为人们生活中重要的娱乐内容之一,过去宠物只是贵族的娱乐,至今宠物在中国作为一种生活方式得到了广泛的认可,随着人们精神文明…

Spring---Bean的生命周期

目录 何为Spring生命周期 Bean的生命周期 生命周期图 生命周期的流程 Spring Bean的单列与多列的作用域 单例Bean的配置方式 注解方式 XML方式 单列案列 后端Servlet 测试类 Spring Config文件配置 何为Spring生命周期 Bean的生命周期 对于一个Bean的生命周期&#xff…

SpringBoot集成Mybatis-Plus增删改查

一、前言 Mybatis:数据持久化框架Mybatis-Plus:对Mybatis进行了增强,它封装了基本的增删改查操作,使我们自己不需要再去写很多重复的代码,大大解放了生产力! 二、创建项目 创建成功后删除src下面的test目…

iTwin Capture Modeler中文版安装包 图文安装教程

iTwin Capture Modeler中文版安装包图文安装教程 一、下载软件 您可以登录官网下载ITwin Capture模型 https://www.bentley.com/zh-Hans 当然也可以在下面的评论区或者后台私信我 选择 二、安装程序 侧面下载的安 上传的安装文件 运行 Bentley iTwin Capture Modeler x64 .…

6.oracle中listagg函数使用

1. 作用 可以实现行转列,将多列数据聚合为一列,实现数据的压缩 2. 语法 listagg(measure_expr,delimiter) within group ( order by order_by_clause); 解释: measure_expr可以是基于任何列的表达式 delimiter分隔符&#xff0c…

centos服务器系统下安装python3并与自带的python2

centos服务器系统下安装python3并与自带的python2 在centos中,自带有python2,因此需要经常安装python3。但是这里有一个坑,就是centos的yum是用python2写的,如果正常编译安装python3,那么yum就会直接挂了。为了方便以…

AI大模型潮水中,医疗数字化加速「求解」

蝴蝶挥动翅膀,医疗行业每个角落开始连锁反应,曾经被忽视的问题也愈发明显。但与之对应的是,对数字化和AI大模型的价值认可,在中国医疗赛道也正在加速来临。 作者|斗斗 编辑|皮爷 出品|产业家 重庆市某地方人民医院&#xf…

仓储财产如何保存,教你一个小技巧~

仓库作为储存重要货物、设备和文件的场所,常常面临着各种潜在的风险,其中之一就是水浸事件。一旦发生水浸,不仅可能造成货物和设备的损坏,还可能导致生产中断和财产损失。 因此,水浸监控系统不仅仅是一项科技创新&…

Camunda 7.x 系列【25】发送任务 接收任务

有道无术,术尚可求,有术无道,止于术。 本系列Spring Boot 版本 2.7.9 本系列Camunda 版本 7.19.0 源码地址:https://gitee.com/pearl-organization/camunda-study-demo 文章目录 1. 概述2. 案例演示2.1 接收任务2.2 发送任务2.3 测试1. 概述 Send Task发送任务用于将消息…

笔记:transformer系列

1、和其他网络的比较 自注意力机制适合处理长文本,并行度好,在GPU上,CNN和Self-attention性能差不多,在TPU(Tensor Processing Uni)效果更好。 总结: 自注意力池化层将当做key,value,query来…

GitHub的PUSH显示网络超时,小乌龟网络代理办法

前言 (1)我能够正常访问GitHub,但是每次将代码提交到GitHub常常显示网络超时。这是因为提交是走的国内的网络,对GitHub访问会被进行限速。 (2)为了让小乌龟也拥有魔法,我们可以使用代理工具。注…

rabbitmq卸载重新安装3.8版本

卸载之前的版本的rabbitmq 卸载rabbitmq 卸载前先停止rabbitmq服务 /usr/lib/rabbitmq/bin/rabbitmqctl stop查看rabbitmq安装的相关列表 yum list | grep rabbitmq卸载rabbitmq相关内容 yum -y remove rabbitmq-server.noarch 卸载erlang 查看erlang安装的相关列表 …

Linux CentOS安装抓包解包工具Wireshark图形化界面

1.Wireshark介绍 Wireshark 是一个开源的网络协议分析工具,它能够捕获和分析网络数据包,提供深入的网络故障排除、网络性能优化和安全审计等功能。它支持跨多个操作系统,包括 Windows、macOS 和 Linux。 2.Wireshark主要使用方法 捕获数据…

韶音属于什么档次的品牌,韶音骨传导耳机值得入手吗

骨传导领域中流传着一句话,就是“配置看南卡,颜值看韶音”,之所以有这句话,是因为韶音的骨传导耳机在颜值方面可以说是无可挑剔的,每款耳机的颜色挑选上基本都能达到六七种,对于户外而言可以说是回头率满满…