adb进阶

作者: super_note | 来源:发表于2021-03-03 15:48 被阅读0次

AS查看控件idSDK -> tools -> monitor.bat DDMS若看不了则:adb reamountadb root

MTK log:  *#9646633#

adb push  D:\log\fileName  /storage/emulated/0adb install -t path  强制安装adb install -r path  替换安装adb shell am start -a android.media.action.STILL_IMAGE_CAMERA_SECURE  强制启动安全相机

linux:adb shell dumpsys activity | grep "mFocusedActivity"

windows:adb shell dumpsys activity | findstr "mFocusedActivity"

adb push xxxx.apk /system/app/Camera

抓Log抓取所有LOG命令:adb logcat –v time > d:\log.txt                            -v threadtime adb shell logcat > a.txt 抓取应用层LOG命令:adb logcat –b main –v time >d:\main.txt抓取死机、重启LOG命令: adb shell dumpsys > d:/dump.txt

kill -3 cameraAppPiddata/anr没有trace文件

logcat | grep -e  onAction -e notifyAction 抓多个关键字

adb -s H623CB7J01234567 shell dumpsys meminfo com.transsion.camera 查看指定设备内存使用情况查看进程:adb shell 进入shell模式logcat | grep "xxxx"ps -A | grep "camera"

"logcat read: unexpected EOF"cadb logcat -G 5madb logcat -c

"error: more than one device/emulator"adb kill-servertaskkill /f /im adb.exe

adb shell dumpsys window | grep mCurrentFocus 看下current focus window信息

抓内存adb shell dumpsys meminfo com.transsion.cameraadb shell dumpsys meminfo |grep camerahalserveradb shell dumpsys activity | grep "aaa"

抓系统值adb shell dumpsys media.camera | grep -A 1 "android.control.enableZsl"adb shell dumpsys media.camera | grep -A 1 "android.control.afAvailableModes"

adb shell dumpsys media.camera | grep -A 1 "com.mediatek.control.capture.early.notification.support"

com.android.internal.app.ChooserActivity当Activity被另一个透明或者 Dialog 样式的 Activity 覆盖时的状态。此时它依然与窗口管理器保持连接,系统继续维护其内部状态,所以它仍然可见,但它已经失去了焦点故不可与用户交互,所以被覆盖的Activity并不会执行onStop()方法。

1.在清单文件manifreast.xml中,找到对应的activity添加 android:exported="true"属性

2.adb shell am start -n com.transsion.camera.debug/com.transsion.camera.app.CameraActivity

adb pull <手机路径>  <本机路径>  从手机中拉取信息到本地电脑上adb push <本机路径>  <手机路径>  从本地电脑推送信息到手机上

adb pull /sdcard/FaceEmoji  C:\Users\yong.zhou1\Desktopdebugloggermtklog

adb shell am dumpheap com.transsion.camera /data/local/tmp/1.heapadb pull /data/local/tmp/ + 电脑文件夹路径

adb pull /sdcard/aiworks/ C:\Users\yong.zhou1\Desktop

adb shell am start -a android.media.action.STILL_IMAGE_CAMERA_SECURE

adb shell logcat > C:\Users\yong.zhou1\Desktop\a.txt

获取屏幕参数adb shell dumpsys window displays

内存泄漏:一:抓取JavaHeap1.adb命令:adb shell am dumpheap com.transsion.camera /data/local/tmp/1.heapadb pull /data/local/tmp/ + 电脑文件夹路径2.使用Android Profiler工具抓取Profiler -> + ->选择对应的手机的应用进程->MEMORY选项->dump Java heap

二:分析hprof文件hprof-conv  原始hprof文件路径  新生成的hprof文件路径

打开mtk log,电话拨暗码*#9646633#,进入工程模式-> Log and Debugging -> DebugLoggerUI -> 点击上面的设置按键->使能Mobile 和Enable Tag Log

adb push F:\log.7z /sdcard/

杀死相机服务

adb shell "ps -ef|grep cameraser|grep -v grep|awk '{print $2}'|xargs kill -9"

相关文章

  • adb进阶

    AS查看控件idSDK -> tools -> monitor.bat DDMS若看不了则:adb reamou...

  • adb进阶知识

    adb进阶知识,如何过滤只查看某一个app的日志前面大概学习了adb基础,但是adb的存在,在测试人员中究竟有什么...

  • Android adb进阶

    什么是adb? 其实我们口中所讲的adb是个泛指,这其中有两个工具——Fastboot和ADB Fastboot:...

  • Android开发常用到的命令行

    ADB adb start-server: 启动adb进程adb kill-server: 杀死adb进程adb ...

  • Android ADB常用指令

    Android ADB常用指令 启动adb服务 adb start-server 关闭adb服务 adb kill...

  • adb常用命令

    adb devices查看adb当前连接的设备 adb version查看adb版本 adb -s insta...

  • Android Adb 源码解析(base on Android

    Adb 框架 adb和adb server 是运行在PC端,adb就是大家所熟悉的控制台命令adb,adb ser...

  • adb、emulator、android指令

    adb命令大全adb命令pm工具讲解 adb 指令 常用 安装:adb install [文件路径] 卸载:adb...

  • adb命令

    启动adb服务adb start-server 终止adb服务adb kill-server 进入adb运行环境a...

  • ADB

    adb version 查看版本 adb devices 查看连接设备 adb install 安装 adb ...

网友评论

      本文标题:adb进阶

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