• ADB常用命令


    /*/
    /通用/
    /
    /
    //打开权限
    adb root
    adb remount

    //查看设备
    adb devices

    //抓取当前cpu信息
    adb shell cat proc/cpuinfo

    //重启
    adb reboot

    //抓取 log
    adb logcat

    //暂停抓取log
    鼠标左键

    //停止抓取log
    Ctrl+c

    //log筛选 (abcdef为需要筛选的字符串)
    adb logcat | findstr adbcef
    adb shell cat /proc/kmsg | grep “string”

    //清空并重定向到a.log
    adb shell cat /proc/kmsg | grep “string” > a.log
    adb logcat > a.log

    //拍照
    adb shell input keyevent 27

    //
    /Qualcomm
    /
    /
    */
    //8909/8916 开3Alog信息
    adb shell setprop persist.camera.mobicat 2
    adb shell setprop persist.camera.stats.debug.mask 3080207
    adb shell setprop persist.camera.stats.tintness enable

    //tintness
    adb shell setprop persist.camera.stats.tintness enable //使能tintness
    adb shell getprop persist.camera.tintless enable //获取是否打开

    //adb 抓log命令 gain color_temp 关键字
    logcat | grep final //awb 最终
    logcat | grep simple //标点
    logcat | grep color_temp //AWB 色温
    logcat | grep final-awb-decision //光源
    logcat | grep real_gain //查看当前的gain值
    logcat | grep linecnt //查看曝光行
    logcat | grep exp_index
    logcat | grep green-percent //green zone

    // so路径
    8x12/8x10/8x26/8916/8909 push /system/vendor/lib
    8x25 push system/lib/

    内核:adb shell cat /proc/kmsg > path/xxx.txt
    用户层:adb logcat -v time > path/xxx.txt

    adb shell setprop persist.camera.stats.debug.mask 7 //开log
    adb shell setprop persist.camera.stats.debug.mask 1 //aec
    adb shell setprop persist.camera.stats.debug.mask 2 //awb
    adb shell setprop persist.camera.stats.debug.mask 4 //af
    adb shell setprop persist.camera.stats.debug.mask 8 //asd
    adb shell setprop persist.camera.stats.debug.mask 16 //afd

    8909/8916 enable exif 3a information
    adb root
    adb remount
    adb shell chmod 777/data
    adb shell setprop persist.camera.mobicat 2
    adb shell setprop persist.camera.stats.debug.mask 3080192
    adb shell sync

    //fastboot
    使用adb shell
    reboot bootloader

    fastboot flash boot boot.img
    fastboot flash system system.img
    fastboot reboot

    删除文件:

    adb shell rm <文件名>
    adb shell rm -rf <路径文件>

    文件传输:
    adb push <电脑路径> <设备路径>
    adb pull <设备路径> <电脑路径>
    ./:当前路径
    … :上级路径

    抓通道:
    adb logcat | find “FillTuningModeData”

    Camx日志由属性控制,具体也是一套规则,首先获取权限:
    adb root
    adb remount
    如果remount报错:failed: Read-only file system,
    则执行:
    adb disable-verity
    adb reboot 解决,然后重新
    adb root
    adb remount

    开dump:
    adb root
    adb remount
    adb shell mkdir /sdcard/Android/data/com.oplus.camera/files
    adb shell mkdir /sdcard/Android/data/com.oplus.camera/files/spdebug
    adb shell setprop persist.sys.assert.panic true
    adb shell setprop persist.sys.dump.aps 3
    adb shell setprop persist.camera.llhdr.iso 0
    adb shell setprop persist.camera.llhdr.ev0 1000
    adb shell setprop persist.camera.llhdr.ev1 1000
    adb shell setprop persist.camera.llhdr.ev2 1000
    adb shell setprop persist.camera.llhdr.drc 0
    adb shell setprop persist.camera.llhdr.ispgain 0
    adb shell setprop persist.camera.hdr.iso 0
    adb shell setprop persist.camera.hdr.ev0 1000
    adb shell setprop persist.camera.hdr.ev1 1000
    adb shell setprop persist.camera.hdr.ev2 1000
    adb shell setprop persist.camera.hdr.drc 0
    adb shell setprop persist.camera.hdr.ispgain 0
    pause

    拉dump:

    adb root
    adb remount
    adb pull sdcard/Android/data/com.oplus.camera/files/spdebug ./

    push参数:

    adb root

    adb remount

    echo --------------push so--------------
    set dir=%~dp0
    for /r %dir% %%s in (*.bin) do (
    echo %%s
    adb push %%s /odm/lib64/camera
    rem save %%s
    )
    echo ---------restarting cameraserver-------------
    adb shell input keyevent 3
    rem for /f “tokens=2” %%a in (‘“adb shell ps -A| findstr mediaserver”’) do adb shell kill %%a
    rem for /f “tokens=2” %%a in (‘“adb shell ps -A| findstr mm-qcamera-daemon”’) do adb shell kill %%a
    for /f “tokens=2” %%a in (‘“adb shell ps -A| findstr android.hardware.camera.provider@2.4-service_64”’) do adb shell kill %%a
    rem for /f “tokens=2” %%a in (‘“adb shell ps -A| findstr camera”’) do adb shell kill %%a
    timeout /t 5 /nobreak>nul
    pause

    给手机开启对应开关:
    1.创建 camxoverridesettings.txt文件
    2.将对应的开关写入该文件:
    enableTuningMetadata=TRUE //开启3Alog信息
    enable3AdebugData=TRUE //开启3Alog信息
    dumpsensorEEPROMData=TURE//dump OTP。
    Reprocessdump=TRUE//dump raw。
    debugDataSizeAEC=6000//开启AEC信息

    3.将camxoverridesettings.txt文件 push到手机以下路径:vendor/etc/camera:
    adb push camxoverridesettings.txt’spath vendor/etc/camera
    查看camxoverridesettings.txt内容:
    adb shell cat vendor/etc/camera/camxoverridesettings.txt

    adb push bin 文件进入手机:

    adb push bin文件 vendor/lib64/camera

    检查是否push成功:
    adb shell
    Cd vendor/lib64/camera
    Ls -l | grep abra (筛选adra的文件 即bin文件)
    修改时间为最新时间 push成功

    Dump OTP:
    adb pull data/vendor/camera <电脑路径>
    杀死相机进程:
    adb shell ps -A | findstr camera//查看相机相关进程

    Adb shell kill [pid]//将第一个pid杀死

    减少系统功耗

    adb root
    adb shell “echo 40000 >> /sys/class/thermal/thermal_zone26/trip_point_0_temp”

    ADB获取高通usecase:

    1.将以下三条指令写进camxoverridesettings.txt
    logInfoMask=0xff
    logVerboseMask=0xff
    systemLogEnable=TRUE

    2.将camxoverridesettings.txt文件 push到手机以下路径:vendor/etc/camera
    adb push camxoverridesettings.txt’spath vendor/etc/camera

    adb root
    adb remount
    adb shell " logcat | grep ‘PopulateGeneralTuningMetadata’ "
    (或者:adb logcat | find “PopulateGeneralTuningMetadata”)
    //抓取PopulateGeneralTuningMetadata关键字

    photo预览: sensor 0 usecase 0
    photo:sensor 0 usecase 1
    video预览:sensor 0 usecase 2
    Video:sensor 0 usecase 2

  • 相关阅读:
    Django 数据库迁移(Django-04)
    python--谷歌恐龙快跑小项目
    传统遗产与技术相遇,古彝文的数字化与保护
    表白墙(前端+后端+数据库)
    ESP-07S进行TCP 通信测试
    毕业设计微信小程序题目
    Open3D(C++) 最小二乘拟合二维直线(拉格朗日乘子法)
    《工程伦理与学术道德》第二章习题
    redis的原理和源码-缓存的三个常见问题(缓存穿透、缓存击穿、缓存雪崩)
    springboot简单集成Security配置
  • 原文地址:https://blog.csdn.net/VinagerJoe/article/details/127735365