btrace
btrace copied to clipboard
集成RheaTrace 2.0之后, 仍然提示: We detect your app is not integrate with RheaTrace 2.0. Please have a check.
环境配置如下: gradle wrapper 版本: gradle-7.4-bin AGP版本: 7.3.1 kotlin版本: 1.7.20
集成btrace版本:
插件版本: com.bytedance.btrace:rhea-gradle-plugin:2.0.3-rc02
core版本: com.bytedance.btrace:rhea-core:2.0.3-rc02
配置:
rheaTrace {
compilation {
traceFilterFilePath = "${project.rootDir}/trace-filter/traceFilter.txt"
needPackageWithMethodMap = false
}
}
这样配置之后出来的apk, 可以看到插桩是已经成功的:
然后运行脚本: java -jar rhea-trace-shell.jar -a com.demo.btracedemo -t 10 -o output.pb -r rhea.all sched -fullClassName
可以看到应用重启
但是最终导出trace文件出错:
02-06 16:12:13.384 I RheaTrace : os version is 30. default capture is PerfettoCapture
02-06 16:12:13.822 RheaTrace : start tracing...
02-06 16:12:24.009 RheaTrace : stop tracing...
02-06 16:12:25.363 E RheaTrace : /data/misc/perfetto-traces/2025-02-06_16-12-853c72.pftrace: 1 file pulled, 0 skipped. 40.4 MB/s (5961139 bytes in 0.141s)
02-06 16:12:25.841 E RheaTrace : We detect your app is not integrate with RheaTrace 2.0. Please have a check.
02-06 16:12:25.844 E RheaTrace : Error: download file trace error
02-06 16:12:25.844 E RheaTrace : Tips: check your app is integrated with btrace2.0 and is running.
更换了root的手机, 还是有上面的错误
然后我自己使用原生的perfetto, 是可以抓取 trace_file.perfetto-trace 文件的.
同样的问题,有解决方法嘛
同样的问题,有解决方法嘛
用这个兄弟: https://github.com/aidaole/EasyTrace