Giter Site home page Giter Site logo

Comments (18)

sindney avatar sindney commented on May 22, 2024

确认你跟踪的动态库设置是否正确,可以贴一下Config页面
然后再拉起APP后,看看adb log:'adb logcat-s Loli' 看Log是否提示你的动态库已加载到内存
如果Hook的库设置错误,或so库仍未加载进内存,是没有数据的
一般情况都是Profiler的设置写错
折线图只是meminfo数据的可视化

from loli_profiler.

grystudy avatar grystudy commented on May 22, 2024

大神 我又试了试 ,StackTrace里有东西了,但全是unknow。我点了Load Symblos 选了一下.so 但是点完还是unknow,没有变化。 咋回事呢?

from loli_profiler.

sindney avatar sindney commented on May 22, 2024

如果采集完数据是unknown,就是进程的smaps(proc/pid/smaps)信息没有dump出来
你用的是root设备?看看 adb logcat -s Loli 的真机log

from loli_profiler.

grystudy avatar grystudy commented on May 22, 2024

点击[proc/pid/smaps]的按钮提示 no smaps data found!
com.mxnavi.navi是我要监控的程序
libMXNavi.so 是我要看堆栈的so 堆栈里面都是unknow
我运行的是一个导航程序,不是在手机上,是在某车载导航仪上,是安卓系统的,不知道是不是root了
大神帮看一下,前一条是logcat信息

现在从stack页右键复制出来的全是 unknown和数字 没有函数名
unknown, 0x7d22509be0
unknown, 0x7dc76db29c
unknown, 0x7dc76da744
unknown, 0x7dc76dab4c
unknown, 0x7dc3b155e0
unknown, 0x7dc76db9a0
unknown, 0x7dc76d9f20
unknown, 0x7d3cdce74c
unknown, 0x707be58c

from loli_profiler.

sindney avatar sindney commented on May 22, 2024

点击[proc/pid/smaps]的按钮提示 no smaps data found!
com.mxnavi.navi是我要监控的程序
libMXNavi.so 是我要看堆栈的so 堆栈里面都是unknow

  1. 那你应该用白名单模式,然后只填libMXNavi在列表里,我看你的log是黑名单模式(就是见一个so库就去 hook)
  2. 导航仪我没试过,你可以搜搜如何拿进程的smaps数据,找到你的进程的pid,然后尝试dump一下smaps数据,看看你的这个安卓系统支持不支持smaps:
    adb shell run-as com.mxnavi.navi "cat /proc/你拿到的pid/smaps"
    如果命令行没数据,那就是没办法了,你先验证下,因为我们是通过smaps文件里的数据对内存进行分类的

from loli_profiler.

grystudy avatar grystudy commented on May 22, 2024

1 run-as: package not an application: com.mxnavi.navi
-》 我怀疑导航仪是不是把导航软件当成系统应用了,所以不能runas,因为runas源码有一句这个:
`
/* reject system packages */
if (info.uid < AID_APP) {

panic("Package '%s' is not an application\n", pkgname);

return 1;

}
`
////////////////////////////////////////////////////////////////

2 然后我cd到 /proc/导航pid/smaps 看cat smaps文件里是有内容的,smaps里有libMXNavi.so的内容

按大神的分析就是导航软件没有读smaps的权限呗

3 导航仪应该是root的了 因为我用adb shell进去以后 可以su

from loli_profiler.

grystudy avatar grystudy commented on May 22, 2024

看了下源码 发现 _is_root_device 情况下会用 adb shell su -c ........
尝试对导航机 su -c 失败:

$ adb shell su -c "echo 1"
su: invalid uid/gid '-c'

于是参考网上说不是所有安卓都支持su -c ,但是都支持 su 0
是否将源码中的 su -c 改成 adb shell su 0 "cat ...smaps "就能好用了,纯属猜测。

from loli_profiler.

sindney avatar sindney commented on May 22, 2024

看了下源码 发现 _is_root_device 情况下会用 adb shell su -c ........
尝试对导航机 su -c 失败:

$ adb shell su -c "echo 1"
su: invalid uid/gid '-c'

于是参考网上说不是所有安卓都支持su -c ,但是都支持 su 0
是否将源码中的 su -c 改成 adb shell su 0 "cat ...smaps "就能好用了,纯属猜测。

辛苦,你那边有qt和android sdk的环境吗?我们写了一件构建脚本,自己改起来也很方便的
实在是打不出包的话 你再跟我说,我找时间给你单发一个改成su 0的包,因为我们这里没有很多root机,还没遇到过su -c
所以不太好直接改github的代码,担心兼容性

from loli_profiler.

grystudy avatar grystudy commented on May 22, 2024

好的 ; android sdk我有 ;qt你跟我说哪个版本的 我可以自己安装。
大神说的那个脚本怎么用
我的邮箱是[email protected]
可以帮我发这里吗

from loli_profiler.

sindney avatar sindney commented on May 22, 2024

https://github.com/Tencent/loli_profiler/blob/master/docs/BUILD.md

from loli_profiler.

DozenWang avatar DozenWang commented on May 22, 2024

@sindney 大佬 有微信群可以交流吗,感谢,同样是没有抓到stacktrace

from loli_profiler.

grystudy avatar grystudy commented on May 22, 2024

https://github.com/Tencent/loli_profiler/blob/master/docs/BUILD.md

大神,方便给我发一个su 0 的版本不,我电脑win7的 也没有vs2017

from loli_profiler.

sindney avatar sindney commented on May 22, 2024

LoliProfiler.zip
@grystudy 试试,windows版,win7应该也能用
我晚点确认下是不是 su 0 兼容性更好,如果是的话,我把这个修改合入master
你也可以把你找的资料发一下,我就不用搜了

from loli_profiler.

sindney avatar sindney commented on May 22, 2024

@sindney 大佬 有微信群可以交流吗,感谢,同样是没有抓到stacktrace

暂时还没群,我晚点弄一个QQ群,你也是root手机吗?
非root的可能就是配置不正确的原因,根据你连的哪个issue用adb logcat排查一下

from loli_profiler.

grystudy avatar grystudy commented on May 22, 2024

LoliProfiler.zip
@grystudy 试试,windows版,win7应该也能用
我晚点确认下是不是 su 0 兼容性更好,如果是的话,我把这个修改合入master
你也可以把你找的资料发一下,我就不用搜了
感谢,我一会下载一下你这个版本我试试再,
我当时看的是这个网页说的 su 0
https://blog.csdn.net/uana_777/article/details/93512358

from loli_profiler.

grystudy avatar grystudy commented on May 22, 2024

大神你新编这个su 0 版本好用了! load symbol之后都能看函数名了牛

from loli_profiler.

sindney avatar sindney commented on May 22, 2024

大神你新编这个su 0 版本好用了! load symbol之后都能看函数名了牛

好的,我先关issue了,晚点不忙了我考虑要不要默认用 su 0 哈

from loli_profiler.

shaomluo avatar shaomluo commented on May 22, 2024

这个问题还存在啊 我这里一直显示unknown

from loli_profiler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.