Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix一些问题 #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

liminwanqing
Copy link

适配x86支持
适配某些手机无权限分析文件
fix android R StripHprof 模式native崩溃问题

适配x86支持
fix android R StripHprof 模式native崩溃问题
primitiveArrayDumpIndex + BASIC_TYPE_BYTE_SIZE /*value type*/;
}
arraySerialNo++;
// if (isCurrentSystemHeap) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个地方为什么要删掉?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

裁剪模式会导致分析的时候出现问题,并且也不需要这块的分析

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里是为了裁剪掉更多的heap,如果注释掉了,会导致裁剪的内容变少。具体出现的问题是什么?

xhook_register("libart.so", "write", (void *)hook_write, nullptr);
xhook_register("libbase.so", "write", (void *)hook_write, nullptr);
xhook_register("libartbase.so", "write", (void *)hook_write, nullptr);
if (sdk_version == 30) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为啥要特判30呢,这两个函数原本不是也hook了吗

Copy link
Author

@liminwanqing liminwanqing Jan 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

30 不需要hook其他的,只要hook 2个就可以了,(我们还有其他的hook尽量少吧,也可以不判断,对程序结果不影响)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果这里特判了,其他版本感觉也要特判。但是可能会导致有些不遵守规范的rom版本用不了有问题,比如是6.0的android版本,但是实际上是5.0的虚拟机so

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最好其他也判断下,我们这边5.0的没上这个

@@ -38,7 +39,7 @@
public ForkJvmHeapDumper() {
soLoaded = KGlobalConfig.getSoLoader().loadLib("koom-java");
if (soLoaded) {
initForkDump();
initForkDump(Build.VERSION.SDK_INT);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不用传参,native也能判断

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,这个可以修改下

@@ -60,6 +61,19 @@ public boolean dump(String path) {
return false;
}

//modify file permission, adapt to some rom
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里能说下具体哪些rom有哪些不兼容的现象吗

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meizu 16T 和 oppo r11 2台手机我们这边都不行

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有什么解决方案吗小老哥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants