Skip to content

fix一些问题#54

Open
liminwanqing wants to merge 1 commit into
KwaiAppTeam:masterfrom
liminwanqing:master
Open

fix一些问题#54
liminwanqing wants to merge 1 commit into
KwaiAppTeam:masterfrom
liminwanqing:master

Conversation

@liminwanqing

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

这个地方为什么要删掉?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@liminwanqing liminwanqing Jan 18, 2021

Copy link
Copy Markdown
Author

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
Copy Markdown
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
Copy Markdown
Author

Choose a reason for hiding this comment

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

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

soLoaded = KGlobalConfig.getSoLoader().loadLib("koom-java");
if (soLoaded) {
initForkDump();
initForkDump(Build.VERSION.SDK_INT);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

不用传参,native也能判断

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

是的,这个可以修改下

return false;
}

//modify file permission, adapt to some rom

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
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台手机我们这边都不行

Copy link
Copy Markdown

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