bugreport 概述 Android bugreport 是一个用于诊断和解决 Android 设备问题的工具。它包含了 Android 设备在某个时间点的所有状态和信息,包括各种 CPU、RAM、网络和 I/O 等方面的信息,以及一些
Android bugreport 是一个用于诊断和解决 Android 设备问题的工具。它包含了 Android 设备在某个时间点的所有状态和信息,包括各种 CPU、RAM、网络和 I/O 等方面的信息,以及一些日志和统计数据等等。相对于通过用户反馈等方式汇报问题,通过分析 Android bugreport 可以更准确地理解和诊断问题。
要分析 Android bugreport 文件,可以按照以下步骤进行:
查找基本信息:检查手机型号、固件版本、系统构建号等基本信息,了解手机的硬件和软件环境。
查找统计信息:查看系统统计信息,了解手机的 CPU、内存、网络使用情况等等,这些信息对于检查手机运行的健康状况有很大帮助。
查找异常日志:查看异常日志,找到导致问题的错误信息,错误信息可能包括应用程序崩溃、系统日志或服务停止等等。
使用工具进行分析:使用工具分析日志信息,比如 Android Studio 的 Profiler 工具、adb loGCat 等等,可以帮助你更深入地分析异常日志,找到导致问题的具体原因。
直接 adb bugreport 生成
adb bugreport/data/user_de/0/com.android.shell/files/bugreports/bugreport-frost-RD2A.211001.002-2022-07-26-09-29-01.zip: 1 file pulled, 0 skipped. 27.4 MB/s (23057334 bytes in 0.802s)Bug report copied to C:\Users\86185\bugreport-frost-RD2A.211001.002-2022-07-26-09-29-01.zip
直接生成的是一个zip 包,大概有20M大小;
bugreport-xxxxx-2022-07-26-09-29-01.zip
解压后目录如下所示:
|-- FS|-- bugreport-W6501-TP1A.220624.014-2023-06-01-20-52-54.txt|-- dumpstate_log.txt|-- lshal-debug|-- main_entry.txt|-- proto|-- version.txt`-- visible_windows.zip
========================================================== dumpstate: 2022-07-26 09:29:01========================================================Build: frost-userdebug 11 RD2A.211001.002 C3QP_R_V0.9.15.R1-0577-20220720 test-keysBuild fingerprint: 'Redmi/frost/frost:11/RD2A.211001.002/C3QP_R_V0.9.15.R1-0577-20220720:userdebug/test-keys'Bootloader: unknownRadio: MPSS.HA.1.0.c2-00414-QtANG2_LWG_PACK-1,MPSS.HA.1.0.c2-00414-QTANG2_LWG_PACK-1Network: ,Module Metadata version: 30Kernel: linux version 5.4.191-jgki-debug+ (scm@SS-AIMM02) (Android (6443078 based on r383902) clang version 11.0.1 (https://android.Googlesource.com/toolchain/llvm-project b397f81060ce6d701042b782172ed13bee898b79), LLD 11.0.1 (/buildbot/tmp/tmp6_m7QH b397f81060ce6d701042b782172ed13bee898b79)) #1 SMP PREEMPT Wed Jul 20 02:28:27 CST 2022Command line: security=selinux androidboot.hardware=jlq iommu.strict=0 firmware_class.path=/etc/firmware swiotlb=2048 rcu_nocbs=0-7 kpti=off rcupdate.rcu_expedited=1 earlycon=uart8250,mmio32,0x3450F000 console=jlqttyS1,115200n8 no_console_suspend loglevel=7 page_owner=on printk.devkmsg=on buildvariant=userdebug androidboot.verifiedbootstate=orange androidboot.vbmeta.device=PARTUUID=7db6ac55-ecb5-4e02-80da-4d335b973332 androidboot.vbmeta.avb_version=1.0 androidboot.vbmeta.device_state=unlocked androidboot.secureboot=0 androidboot.vbmeta.hash_alg=sha256 androidboot.vbmeta.size=7168 androidboot.vbmeta.digest=9d001b15f4485a96b573fa13c001ac965a9cd10f43c5734ee92815b91827a401 androidboot.veritymode=disabled androidboot.bootdevice=34458000.sdhci androidboot.boot_devices=0.soc/34458000.sdhci androidboot.serialno=d4081bbb androidboot.sysdump=1 androidboot.cpuid=0x2124a4815baaeebd2102628ed64fc07400000000000000000000000000000000 androidboot.bootreason=0 androidboot.baseband=msm androidboot.hwname=frost androidboot.hwc=Global androidboot.hwversion=1.21.0 androidboot.hwlevel=1 androidboot.product.hardware.sku=c3qpa panel_cfg=xiaomi C3QP 35 02 0a hd+ video dsi panel,display_init=1 androidboot.slot_suffix=_a rootwait ro init=\init androidboot.dtbo_idx=6,9,15 androidboot.dtb_idx=0 androidboot.force_nORMal_boot=1Uptime: up 0 weeks, 6 days, 6 hours, 1 minuteBugreport format version: 2.0Dumpstate info: id=2 pid=20089 dry_run=0 args=/system/bin/dumpstate -S -d -z bugreport_mode=
dumpsys SurfaceFlinger
关键字:
DUMP OF SERVICE CRITICAL SurfaceFlinger:
was the duration of dumpsys SurfaceFlinger
dumpsys activity activities
关键字:
ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities)
was the duration of dumpsys activity
dumpsys cpuinfo
关键字:
was the duration of dumpsys cpuinfo
dumpsys input
关键字:
was the duration of dumpsys input
dumpsys notification
关键字:
was the duration of dumpsys notification
dumpsys power
关键字:
was the duration of dumpsys power
dumpsys sensorservice
关键字:
was the duration of dumpsys sensorservice
dumpsys window lastanr
关键字:
WINDOW MANAGER LAST ANR (dumpsys window lastanr)
dumpsys window policy
关键字:
WINDOW MANAGER POLICY STATE (dumpsys window policy)
dumpsys window animator
关键字:
WINDOW MANAGER ANIMATOR STATE (dumpsys window animator)
dumpsys window sessions
关键字:
WINDOW MANAGER SESSIONS (dumpsys window sessions)
dumpsys window displays
关键字:
WINDOW MANAGER DISPLAY CONTENTS (dumpsys window displays)
dumpsys window tokens
关键字:
WINDOW MANAGER TOKENS (dumpsys window tokens)
dumpsys window windows
关键字:
WINDOW MANAGER WINDOWS (dumpsys window windows)
dumpsys window trace
关键字:
WINDOW MANAGER TRACE (dumpsys window trace)
dumpsys window logging
关键字:
WINDOW MANAGER LOGGING (dumpsys window logging)
dumpsys window refresh
关键字:
WINDOW MANAGER HIGH REFRESH RATE BLACKLIST (dumpsys window refresh)
dumpsys window constants
关键字:
WINDOW MANAGER CONSTANTS (dumpsys window constants):
关键字:
system log:
------ SYSTEM LOG (logcat -v threadtime -v printable -v uid -d *:v) ------
------ was the duration of ‘SYSTEM LOG’ ------
event log:
------ EVENT LOG (logcat -b events -v threadtime -v printable -v uid -d *:v) ------
------ was the duration of ‘EVENT LOG’ ------
stat log:
------ STATS LOG (logcat -b stats -v threadtime -v printable -v uid -d *:v) ------
------ was the duration of ‘STATS LOG’ ------
radio log:
------ RADIO LOG (logcat -b radio -v threadtime -v printable -v uid -d *:v) ------
------ was the duration of ‘RADIO LOG’ ------
last log:
------ LAST LOGCAT (logcat -L -b all -v threadtime -v printable -v uid -d *:v) ------
因为bugreport 中包含了太多的信息,查找分类信息很困难,所以有分析bugreport txt文件的开源工具 chkbugreport;作用是分析析处理手机上生成的bugreport,并且为开发者提取尽可能多的有用数据;
具体用法可以参考下面的文章:
BugReport 分析利器 ChkBugReport
来源地址:https://blog.csdn.net/weixin_44008788/article/details/131294133
--结束END--
本文标题: Android bugreport 分析方法
本文链接: https://lsjlt.com/news/372597.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0