日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

随笔笔记

發布時間:2024/1/18 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 随笔笔记 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

MTK平臺

1、預覽dump raw圖指令,dump路徑在 /data/vendor/camera_dump

adb rootadb shell setprop vendor.debug.camera.dump.en 1adb shell setprop vendor.debug.feature.forceEnableIMGO 1adb shell setprop vendor.debug.camera.dump.p1.imgo 1

2、MTK平臺HIDL注冊是在device/mediatek/mtxxxx/ manifest.xml中,然后這文件會被編譯到/vendor/etc/vintf路徑下

3、selinux權限的添加路徑:device\mediatek\sepolicy,這里的所有te文件會被編譯到out\target\product\mtxxxx\vendor\etc\selinux\vendor_sepolicy.cil

4、MTK VSDOF:這個其實就是preview Bokeh。VSDOF = Video Shadow Depth Of Field

5、MTK在預覽界面顯示幀數

adb shell setprop debug.cam.drawid 1

6、ConfigureStreams 階段部分log輸出

mtkcam-AppStreamMgr: [0-ConfigHandler::operator()] [addFrameDuration] format:34 size:640x480 min_duration:33333333, stall_duration:0 預覽 mtkcam-AppStreamMgr: [1-ConfigHandler::checkStream] framework stream dataspace:0x08c20000(V0_JFIF|STANDARD_BT601_625|TRANSFER_SMPTE_170M|RANGE_FULL) {.v3_2 = {.id = 1, .streamType = OUTPUT, .width = 640mtkcam-AppStreamMgr: [beginConfigureStreams] v_keylog StreamConfiguration={.streams = [2]{{.v3_2 = {.id = 0, .streamType = OUTPUT, .width = 640, .height = 480, .format = IMPLEMENTATION_DEFINED, .usage = CPU_READ_NEVER | CPU_WRITE_NEVER | GPU_TEXTURE (0x100), .dataSpace = UNKNOWN | STANDARD_UNSPECIFIED | TRANSFER_UNSPECIFIED | RANGE_UNSPECIFIED (0), .rotation = ROTATION_0}, .physicalCameraId = "", .bufferSize = 0}, {.v3_2 = {.id = 1, .streamType = OUTPUT, .width = 640, .height = 480, .format = YCBCR_420_888, .usage = CPU_READ_NEVER | CPU_READ_RARELY | CPU_READ_OFTEN | CPU_WRITE_NEVER (0x3), .dataSpace = UNKNOWN | STANDARD_UNSPECIFIED | STANDARD_BT601_625 | TRANSFER_UNSPECIFIED | TRANSFER_LINEAR | TRANSFER_SRGB | TRANSFER_SMPTE_170M | RANGE_UNSPECIFIED | RANGE_FULL | V0_JFIF (0x8c20000), .rotation = ROTATION_0}, .physicalCameraId = "", .bufferSize = 0}}, .operationMode = NORMAL_MODE, .sessionParams = [224]{224, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1... mtkcam-AppStreamMgr: [beginConfigureStreams] v_keylog StreamConfiguration={.streams = [2]{{.v3_2 = {.id = 0, .streamType = OUTPUT, .width = 640, .height = 480, .format = IMPLEMENTATION_DEFINED, .usage = CPU_READ_NEVER | CPU_WRITE_NEVER | GPU_TEXTURE (0x100), .dataSpace = UNKNOWN | STANDARD_UNSPECIFIED | TRANSFER_UNSPECIFIED | RANGE_UNSPECIFIED (0), .rotation = ROTATION_0}, .physicalCameraId = "", .bufferSize = 0}, {.v3_2 = {.id = 1, .streamType = OUTPUT, .width = 640, .height = 480, .format = YCBCR_420_888, .usage = CPU_READ_NEVER | CPU_READ_RARELY | CPU_READ_OFTEN | CPU_WRITE_NEVER (0x3), .dataSpace = UNKNOWN | STANDARD_UNSPECIFIED | STANDARD_BT601_625 | TRANSFER_UNSPECIFIED | TRANSFER_LINEAR | TRANSFER_SRGB | TRANSFER_SMPTE_170M | RANGE_UNSPECIFIED | RANGE_FULL | V0_JFIF (0x8c20000), .rotation = ROTATION_0}, .physicalCameraId = "", .bufferSize = 0}}, .operationMode = NORMAL_MODE, .sessionParams = [224]{224, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1... mtkcam-AppStreamMgr: [1-ConfigHandler::checkStream] framework stream dataspace:0x08c20000(V0_JFIF|STANDARD_BT601_625|TRANSFER_SMPTE_170M|RANGE_FULL) {.v3_2 = {.id = 1, .streamType = OUTPUT, .width = 640, .height = 480, .format = YCBCR_420_888, .usage = CPU_READ_NEVER | CPU_READ_RARELY | CPU_READ_OFTEN | CPU_WRITE_NEVER (0x3), .dataSpace = UNKNOWN | STANDARD_UNSPECIFIED | STANDARD_BT601_625 | TRANSFER_UNSPECIFIED | TRANSFER_LINEAR | TRANSFER_SRGB | TRANSFER_SMPTE_170M | RANGE_UNSPECIFIED | RANGE_FULL | V0_JFIF (0x8c20000), .rotation = ROTATION_0}, .physicalCameraId = "", .bufferSize = 0} mtkcam-AppStreamMgr: [1-ConfigHandler::operator()] [addFrameDuration] format:34 size:640x480 min_duration:33333333, stall_duration:0 mtkcam-AppStreamMgr: [1-ConfigHandler::operator()] [addFrameDuration] format:35 size:640x480 min_duration:33333333, stall_duration:0

7、MTK抓取部分階段預覽dump指令

#先執行 adb root adb shell setenforce 0 adb shell pkill camera* #然后執行 adb shell rm -rf /data/vendor/camera_dump/* adb shell mkdir /data/vendor/camera_dump adb shell setprop vendor.debug.p2f.dump.enable 1 adb shell setprop vendor.debug.p2f.dump.mode 1 #進入出問題的App,需要開始 dump 時執行 adb shell setprop vendor.debug.camera.preview.dump 1 #需要停止 dump 時執行 adb shell setprop vendor.debug.camera.preview.dump 0 #將dump的文件pull到電腦桌面 adb pull /data/vendor/camera_dump Desktop

8、顯示掃描幀,主要用于冷啟動查看第一幀到達的狀態

adb shell setprop vendor.debug.mtkcam.p2.scanline 1

9、dump camera 相關信息

adb shell dumpsys media.camera >> 路徑

10、CPU、GPU、DDR boost相關

# CPU # 查詢CPU支持那些頻率檔位 adb shell cat /proc/cpufreq/MT_CPU_DVFS_L/cpufreq_oppidx adb shell cat /proc/cpufreq/MT_CPU_DVFS_LL/cpufreq_oppidx # 查詢當前CPU頻率 adb shell cat /proc/cpufreq/MT_CPU_DVFS_L/cpufreq_freq adb shell cat /proc/cpufreq/MT_CPU_DVFS_LL/cpufreq_freq # 查看CPU頻率: cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq; # 固定CPU頻率(大小核和檔位) adb shell echo m n > /proc/ppm/policy/ut_fix_freq_idx #m = 0 or 1, 0 for cluster0,1 for cluster1; n = 0~15; 0 is highest freq;-1 for free limit adb shell "echo 0 0 > /proc/ppm/policy/ut_fix_freq_idx"# GPU: # 查詢GPU檔位: adb shell "cat proc/gpufreq/gpufreq_opp_dump" #查看 GPU 頻率: cat /proc/gpufreq/gpufreq_var_dump | grep g_cur_opp_freq #固定GPU頻率 adb shell "echo 680000 > /proc/gpufreq/gpufreq_opp_freq" adb shell "echo 770000 > /proc/gpufreq/gpufreq_opp_freq" #這里的770000是GPU Freq,單位KHz,可以#更換為你想要設定的GPU Freq,先看GPU檔位再設,否則不生效#查看DDR頻率: <CMD_SET_VCORE_MIN Param1="0"/> cat /sys/devices/platform/10012000.dvfsrc/helio-dvfsrc/dvfsrc_dump | grep khz cat /sys/devices/platform/10012000.dvfsrc/helio-dvfsrc/dvfsrc_opp_table #固定DDR頻率: adb shell "echo 0 > /sys/devices/platform/10012000.dvfsrc/helio-dvfsrc/dvfsrc_req_ddr_opp" #DDR: # 1) 獲取當前可支持的DDR頻率檔位 adb shell "cat /sys/devices/platform/10012000.dvfsrc/helio-dvfsrc/dvfsrc_opp_table" # 2) 固定DDR頻率 adb shell "echo 1 > /sys/devices/platform/10012000.dvfsrc/helio-dvfsrc/dvfsrc_force_vcore_dvfs_opp" #根據需要,可將這里的1修改為任何需要設定的檔位 # 3) 檢查是否設定成功 adb shell "cat /sys/devices/platform/10012000.dvfsrc/helio-dvfsrc/dvfsrc_dump | grep khz" adb shell "cat /sys/devices/platform/10012000.dvfsrc/helio-dvfsrc/dvfsrc_dump | grep -e uv -e khz" adb shell "cat /sys/devices/platform/10012000.dvfsrc/helio-dvfsrc/dvfsrc_dump | grep -e uv -e khz -e FORCE -e CONTROL"

11、FDtrace地址解析

需要工具symbols、gat-win32-x86_64-3.1703.1.m\gat-win32-x86_64-3\tools\gdb.bat 、TagLog_2019_0102_125901_NE\db.02.NE\20190320_180014_371\db.02.NE.dbg.DEC\PROCESS_MAPS 、TagLog_2019_0102_125901_NE\db.02.NE\20190320_180014_371\db.02.NE.dbg.DEC\PROCESS_COREDUMP 1. 解包*.dbg文件(路徑中不要包含中文) 2.使用NE/KE-Analyze(SpOfflineDebugSuite_exe_v1.9)解析文件得到分析結果,將分析結果中的需要SO庫從 symbols中拷貝到TagLog_2019_0102_125901_NE\db.02.NE\20190320_180014_371\db.02.NE.dbg.DEC\symbols中 3. file symbols/libandroidfw.so (加載單個文件) 4. set solib-search-path symbols/ 5. core PROCESS_COREDUMP (加載coredump) 6. list *$ADDRESS

高通平臺

1、常見Node及作用

  • BPS:Bayer Processing Segment ,Bayer處理階段(Bayer格式是相機內部的原始圖片,一般后綴名為.raw)。僅做snapshot的噪點降低和Bayer處理,不良像素、PDAF(相位檢測自動對焦)、LSC(鏡頭陰影校正)校正,綠色不平衡校正,
    黑色級別,通道增益,demosaic,Down scaler,HDR的合并與記錄,Bayer混合降噪。
  • IFE:Image front-end engine ,圖像前段引擎。僅做video/preview的Bayer處理,做些顏色校準,demosaic,Down scaler,統計3A數據等。
  • IPE:Image Processing engine,圖像處理引擎。由NPS、PPS兩部分組成,主要做些硬件降噪(MFNR、MFSR)、調整大小、噪聲處理、顏色處理(色差校正、色度抑制)、細節增強(膚色增強)。
  • JPGE:打包jpge
  • 2、CHI = Camera hardware interface

    3、高通默認閃光燈節點

    adb shell "echo 0 > /sys/class/leds/led:switch_0/brightness" adb shell "echo 100 > /sys/class/leds/led:torch_0/brightness" #(控制閃光燈亮度) adb shell "echo 1 > /sys/class/leds/led:switch_0/brightness" #(打開torch) adb shell "echo 0 > /sys/class/leds/led:switch_0/brightness" #(關閉torch)

    4、高通config階段log輸出

    adb shell logcat | grep -E "configure_streams|CameraService::connect call"

    5、callback 相關log

    01-01 15:25:08.283 883 1208 I CamX : [ INFO][HAL ] camxhaldevice.cpp:279 ProcessCaptureResult() Returning framework result Frame: 316, Metadata: 0x0, Stream 0x7ec0e5bd08, Fmt: 35 Width: 4160 Height: 3120 01-01 15:25:08.283 883 1208 I CamX : [CONFIG][HAL ] camxhal3.cpp:1437 process_capture_result() frame_number 316, partial_result 0, result 0x0, num_physcam_metadata 0, num_output_buffers 1 01-01 15:25:08.283 883 1208 I CamX : [CONFIG][HAL ] camxhal3.cpp:1457 process_capture_result() output_buffers[0] : 0x7eadaa4840, buffer: 0x7eae95b6f8, status: 00000000, stream: 0x7ec0e5bd08

    6、高通dump eeprom 的信息:adb shell “mkdir /vendor/etc/camera;echo dumpSensorEEPROMData=1>/vendor/etc/camera/camxoverridesettings.txt”,然后重啟,在打開camera, 看/data/vendor/camera/xxx_XX_OTP.txt.

    7、過濾上層下發的output stream,方法在chifeature2graphmanager.cpp 的MapOutputPortToOutputStream方法

    8、FPS的過濾及處理,在camxhwenvironment.cpp的InitializeScalerStaticCaps方法

    9、dump

    //dump RAW && YUV -->>data/vendor/camera adb shell setenforce 0 adb shell setprop persist.vendor.camera.dynamicImageDump true adb shell setprop persist.vendor.camera.autoImageDump true adb shell setprop persist.vendor.camera.autoImageDumpMask 0x600 adb shell setprop persist.vendor.camera.autoInputImageDumpMask 0x400007ff adb shell setprop persist.vendor.camera.autoImageDumpTFEInstanceMask 0x7 adb shell setprop persist.vendor.camera.autoImageDumpTFEoutputPortMask 0x3FFBFFF adb shell setprop persist.vendor.camera.autoImageDumpOPEoutputPortMask 0x3F00 adb shell setprop persist.vendor.camera.autoImageDumpOPEinputPortMask 0xff adb shell setprop persist.vendor.camera.autoImageDumpOPEInstanceMask 0xFFFFFFFF adb shell pkill camera* provider* //dump YUV -->>data/vendor/camera adb shell setenforce 0 adb shell setprop persist.vendor.camera.autoImageDump true adb shell setprop persist.vendor.camera.autoImageDumpMask 0x400 adb shell setprop persist.vendor.camera.autoInputImageDumpMask 0x400 adb shell setprop persist.vendor.camera.autoImageDumpOPEoutputPortMask 0x3E adb shell setprop persist.vendor.camera.offlineImageDumpOnly false adb shell pkill camera* provider*

    公共部分

    1、查詢當前so依賴關聯的指令

    readelf -d *.so > elf.txt

    2、查看當前焦點所在Activity

    adb shell dumpsys window | findstr Focus

    3、查詢當前SurfaceFlinger信息

    adb shell dumpsys SurfaceFlinger

    4、查看SystemFeature

    adb shell dumpsys package com.xxx.xxxx #或者 adb shell pm list features

    5、adb install -r 安裝apk會報Failure [INSTALL_FAILED_TEST_ONLY],解決辦法:adb shell setprop persist.version.confidential false

    6、符號表解析:addr2line -Cfe

    7、查看當前目錄的文件夾大小:sudo du -sh *

    8、ls -lR|grep “^-”|wc -l 查詢當前文件夾內有多少文件

    9、抓取內存信息:adb shell dumpsys meminfo 或者是 adb shell procrank

    10、/vendor/lib64路徑無法push,可以使用指令adb shell umount -lf /vendor/lib64

    11、三方app屏蔽預覽size的代碼:
    如果使用的是API1:services/camera/libcameraservice/api1/client2/Parameters.cpp Parameters::initialize
    如果使用的是API2:CameraMetadataNative.java getStreamConfigurationMap
    部分size會在services/camera/libcameraservice/api2/CameraDeviceClient.cpp,createSurfaceFromGbp添加過濾

    總結

    以上是生活随笔為你收集整理的随笔笔记的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。