debug窗口脚本


@echo off
cls
mode con cols=60 lines=30 &title Debug
:menu
cls
echo Please Select
echo =============================================
echo 1.Raw-Dump
echo.
echo 2.ITS-Debug
echo.
echo 3.PDAF-Debug
echo.
echo 4.Strobe-Debug
echo.
echo 5.Setupwizard
echo.
echo 6.Debuglogger
echo.
echo 7.MIPI-Debug
echo.
echo 8.Dump-Meatadata
echo.
echo Q.Quit
echo.
:cho
set choice=
set /p choice= Please Select:
if not "%choice%" == "" set choice=%choice:~0,1%
if /i "%choice%" == "1" call :Raw
if /i "%choice%" == "2" call :ITS
if /i "%choice%" == "3" call :PDAF
if /i "%choice%" == "4" call :Strobe
if /i "%choice%" == "5" call :Setupwizard
if /i "%choice%" == "6" call :Debuglogger
if /i "%choice%" == "7" call :MIPI
if /i "%choice%" == "8" call :Metadata
if /i "%choice%" == "Q" goto quit

goto menu
echo Invalid,Please Input:
echo.
goto cho

:Raw
@echo on

adb root
adb remount
adb shell setenforce 0
adb shell rm -rf /data/vendor/camera_dump
adb shell mkdir /data/vendor/camera_dump -p

rem Tuning
adb shell setprop vendor.debug.camera.dump.p2.debuginfo 1
rem lsc2
rem adb shell setprop vendor.debug.camera.copy.p1.lsc 1
rem adb shell setprop vendor.debug.camera.dump.p1.lsc 1
rem adb shell setprop vendor.debug.camera.dump.lsc2 1
rem HW_AAO
adb shell setprop vendor.debug.camera.SttBufQ.enable 60
adb shell setprop vendor.debug.camera.AAO.dump 1
rem IMG3O
rem adb shell setprop vendor.debug.camera.ufo_off 1
rem adb shell setprop vendor.debug.camera.dump.p2 1
rem adb shell setprop vendor.debug.camera.img3o.dump 1
rem LCSO
rem adb shell setprop vendor.debug.camera.ufo_off 1
rem adb shell setprop vendor.debug.camera.dump.p2 1
rem RAW
adb shell setprop vendor.debug.camera.ufo_off 1
adb shell setprop vendor.debug.camera.p2.dump 1
rem JPEG
adb shell setprop vendor.debug.camera.dump.JpegNode 1

rem Preview Tuning
adb shell setprop vendor.debug.hal3av3.forcedump 1

adb shell setprop vendor.debug.camera.upkraw.dump 1
rem 0:processed raw
rem adb shell setprop vendor.debug.camera.raw.type 0
rem 1:pure raw
adb shell setprop vendor.debug.camera.raw.type 0
rem unpack6589raw.exe 052418994-0065-0026-main-imgo-PW9280-PH6944-BW11600__9280x6944_10_2.packed_word 9280 6944 10 2

adb shell stop camerahalserver
adb shell start camerahalserver
rem 生成的文件的目录:data/vendor/camera_dump
@echo off
rem echo Press any key to return & pause > nul
goto :eof

:ITS
@echo on
adb root
adb remount
rem 3A
adb shell setprop persist.vendor.mtk.camera.log_level 3
adb shell setprop vendor.debug.camera.log 1
adb shell setprop vendor.debug.hal3av3.log 263
adb shell setprop vendor.debug.3a.log 1
adb shell setprop vendor.debug.idxcache.log 1
adb shell setprop vendor.debug.hal3a.taskmgr 1
adb shell setprop vendor.debug.paramctrl.enable 1
adb shell setprop vendor.profile.paramctrl.enable 1
adb shell setprop vendor.debug.isp_tuning_mgr.enable 1
adb shell setprop vendor.debug.isp_mgr.enable 1
adb shell setprop vendor.debug.mapping_mgr.enable 3

rem ISP
adb shell setprop debug.camera.log.p1node 3
adb shell setprop vendor.debug.camera.log.p1node 3
adb shell setprop persist.mtk.camera.log_level 3
adb shell setprop persist.vendor.mtk.camera.log_level 3
adb shell setprop debuglog.imageio.iopipe 3
adb shell setprop debuglog.imageio.iopipet 3
adb shell setprop debuglog.imageio.pipe 3
adb shell setprop debuglog.imageio.TwinMgr 3
adb shell setprop debug.isp 3
adb shell setprop debuglog.imageio.func_cam 3
adb shell setprop vendor.debuglog.imageio.path 3

rem CCU
adb shell setprop vendor.debug.drv.ccu_drv 5
adb shell setprop vendor.debug.ccuif.ccu_drv 5
adb shell getprop vendor.debug.drv.ccu_drv
adb shell getprop vendor.debug.ccuif.ccu_drv

adb shell stop camerahalserver
adb shell start camerahalserver

@echo off
rem echo Press any key to return & pause > nul
goto :eof


:PDAF
@echo on
adb root
adb shell setenforce 0

adb shell setprop vendor.pd.dump.enable 1
adb shell setprop vendor.debug.pd_verify_flow.run 1
adb shell setprop vendor.debug.pd_verify_flow.enable 1
adb shell setprop vendor.debug.afassist.lockae 1
adb shell setprop vendor.debug.afo_mgr.enable 1
adb shell setprop vendor.debug.camera.dbginfo 1
adb shell setprop vendor.debug.pd.vpu.enable 1
adb shell setprop debug.af.log.enable 1
adb shell setprop debug.af.enable 1
adb shell setprop vendor.debug.af.log.enable 1
adb shell setprop vendor.debug.af.enable 1
adb shell setprop vendor.debug.af_mgr.enable 1
adb shell setprop vendor.debug.pd.enable 1
adb shell setprop persist.vendor.mtk.camera.log_level 3
adb shell setprop vendor.debug.pd.vpu.log.enable 1
adb shell setprop vendor.debug.camera.af.draw.lens 1
adb shell setprop debug.cam.drawid 1
adb shell setprop vendor.debug.drv.ccu_drv 4
adb shell setprop vendor.debug.ccuif.ccu_drv 4
adb shell setprop vendor.drv.ccu.log.ccuflowaf 1
adb shell setprop vendor.drv.ccu.log.ccuafalgo 1
adb shell setprop vendor.debug.pdo_mgr.enable 1
adb shell sync
adb shell sync
adb shell sync

@echo off
rem echo Press any key to return & pause > nul
goto :eof

:Strobe
@echo on
adb root
adb shell setenforce 0
adb shell setprop debug.camera.log.p1node 3
adb shell setprop vendor.flash_calibration_aao_en 1
adb shell setprop persist.vendor.mtk.camera.log_level 3
adb shell setprop persist.mtk.camera.log_level 3
adb shell setprop debug.cam.drawid 1
adb shell setprop vendor.debug.ae.enable 9
adb shell setprop vendor.debug.aaa.pvlog.enable 1
adb shell setprop vendor.debug.hal3av3.log 263
adb shell setprop vendor.debug.camera.log.hal3a 1
adb shell setprop vendor.debug.camera.log 1
adb shell setprop vendor.debug.3a.log 1
adb shell setprop vendor.flash_verbose_en 1
adb shell setprop vendor.flash_is_debug 1
adb shell pkill cameraserver
adb shell pkill camerahalserver
@echo off
rem echo Press any key to return & pause > nul
goto :eof

:Setupwizard
@echo on
adb root
adb wait-for-device
adb shell pm disable com.google.android.setupwizard
adb shell settings put secure user_setup_complete 1
adb shell settings put global device_provisioned 1
adb shell settings put system show_inadvertent 0
@echo off
rem echo Press any key to return & pause > nul
goto :eof

:Debuglogger
@echo off
rem mode con cols=100 lines=10 &title pull
set filename=%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%
E:
cd E:\Debug
mkdir %filename%
cd %filename%

adb pull /data/debuglogger .
start debuglogger\mobilelog

rem adb pull /storage/emulated/0/mtklog .
rem start mtklog\mobilelog
goto :eof

:MIPI
@echo on
adb root
adb wait-for-device
adb shell setenforce 0
adb shell setprop persist.vendor.mtk.camera.log_level 3
adb shell setprop vendor.debug.camera.log 1
adb shell setprop vendor.debug.camera.log.p1node 1
adb shell pkill cameraserver
adb shell pkill camerahalserver
@echo off
rem echo Press any key to return & pause > nul
goto :eof

:metadata
@echo on
adb root
adb wait-for-device

adb shell dumpsys media.camera –v 2 > metadata
@echo off
rem echo Press any key to return & pause > nul
goto :eof