美文网首页
adb命令行获取Android包名和Activity

adb命令行获取Android包名和Activity

作者: Riclue | 来源:发表于2018-09-07 10:38 被阅读16次
    1. logcat
    • 清除logcat内容,使用命令adb logcat -c
    • 启动logcat,使用命令adb logcat ActivityManager:I *:s
    • 启动要查看的程序


      命令行
    • 对应appium desktop 配置如下:


      appium desktop
    1. 查看所有包名
    • adb devices 查看正在运行的Android模拟器或真机


    • 输入adb shell(如果不止一台设备,则adb -s emulator-5554 shell )
    • cd data/data
    • ls 查看所有包



      注:如出现opendir failed, Permission denied,需要切换到root下,具体命令如下

    adb root
    adb remount
    adb shell
    

    ps:adb logcat -v time 查看实时日志

    相关文章

      网友评论

          本文标题:adb命令行获取Android包名和Activity

          本文链接:https://www.haomeiwen.com/subject/rjdkwftx.html