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进阶

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