adb 调试命令

ADB:Android Debug Bridge。

这里性能调试如下:

性能测试需要进行如下设置:

  • 如果要让user模式能够进行root操作,需要更改(system/core/adb/adb.c)
  • 将无用的log信息去掉,#define LOG_NIDEBUG 0
  • 如果调试Web的用户体验,需要wifi已经能够正常工作

以下命令将设备进入性能模式

将DDR进入性能模式

adb shell echo 400000000 > /sys/class/kgsl/kgsl-3d0/gpuclk
adb shell echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor
adb shell echo performance >/sys/class/devfreq/qcom,cpubw.30/governor(不同的设备可能会有差异)

读取交互模式cpu频率管理器参数

adb shell cat /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
adb shell cat /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
adb shell cat /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
adb shell cat /sys/devices/system/cpu/cpufreq/interactive/target_loads
adb shell cat /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
adb shell cat /sys/devices/system/cpu/cpufreq/interactive/boost
adb shell cat /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
adb shell cat /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
adb shell cat /sys/devices/system/cpu/cpufreq/interactive/timer_rate
adb shell cat /sys/devices/system/cpu/cpufreq/interactive/timer_slack

禁止内核thermal

adb shell
echo 0 > /sys/module/msm_thermal/core_control/enabled

通过无线adb调试

1. Connect a USB and verify that Wi-Fi is working on the device.
– adb tcpip 5555
– adb shell netcfg
– <output> wlan0 UP 10.42.118.17/22 0x00001043 f0:25:b7:f5:02:81
– adb connect 10.42.118.17
# In Wi-Fi settings, click the Wi-Fi network
name to get the IP.
2. Remove the USB and try adb devices.
3. To end the session:
– adb disconnect

GPU性能调试

将GPU进入性能模式

adb shell echo 0 > /sys/class/kgsl/kgsl-3d0/bus_split
adb shell echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor
adb shell echo 1 > /sys/class/kgsl/kgsl-3d0/force_bus_on
adb shell echo 1 > /sys/class/kgsl/kgsl-3d0/force_rail_on
adb shell echo 1 > /sys/class/kgsl/kgsl-3d0/force_clk_on
adb shell echo 1000000 > /sys/class/kgsl/kgsl-3d0/idle_timer

通过adb查看每秒滚屏数

1. adb pull /system/build.prop
2. Enable the properties debug.gr.calcfps = 1 and debug.gr.calcfps.period = 1 in the build.prop
file and save the file.
adb push build.prop /system/
adb shell chmod 0644 /system/build.prop
adb shell sync
adb shell reboot
3. Enable the FPS calculation (and display the distribution of frame arrival times) by setting
debug.gr.calcfps = 2.
4. Grep for FPS in logcat.


检查设备layer的组成和层数

1. Get the adb shell dumpsys SurfaceFlinger log.
2. Search for lines similar to those highlighted in the following log:
numHwLayers=4, flags=00000000
type | handle | hints | flags | tr | blend | format | source crop | frame name
------------+----------+----------+----------+----+-------+----------+---------------------------+---------
HWC | b71a1610 | 00000000 | 00000004 | 00 | 00100 | 00000002 | [ 160, 25, 480, 480] | [ 0, 25, 320, 480]
com.android.systemui.ImageWallpaper

HWC – MDP composition
GLES – GPU composition
During transition, the log sometimes shows HWC and GLES, which is Mixed mode composition.

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

shichaog

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值