Advertisement
v1ral_ITS

Android ddisplayr.sh

Mar 30th, 2019
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.08 KB | None | 0 0
  1. #!/system/bin/sh
  2.  
  3. #dumpPath="/data/misc/display/zte_frame_dump_primary"
  4. dumpPath="/data/misc/display/zte_dump_layer"
  5. rm -rf $dumpPath/*
  6.  
  7. setprop zte.dumplayer 1
  8. dumpsys SurfaceFlinger
  9.  
  10. cd $dumpPath
  11.  
  12. #echo $dumpPath
  13. for dumpFile in $dumpPath/*.raw
  14. do
  15.   filename=${dumpFile##*/}
  16.   echo "filename="$filename
  17.   filename=${filename%%.raw}                                                      #remove postfix of file name
  18.  
  19.   width=${filename%x*}
  20.   width=${width##*_}
  21.   echo "width="$width
  22.  
  23.   height=${filename#*x}
  24.   height=${height%%_*}
  25.   echo "height="$height
  26.  
  27.   format=${filename#*x}                                                           #remove characters before x
  28.   format=${format#*_}
  29.   echo "format="$format
  30.   format=${format##*_}
  31.   #echo "format="$format
  32.  
  33.   outfilename=${filename#*_}                                                                                                            #remove input
  34.   if [ "$format" = "8888" ] ; then
  35.     yuvtool G $dumpFile un_ubwc_${outfilename}.raw $width $height
  36.   fi
  37.   if [ "$format" = "565" ] ; then
  38.     yuvtool B $dumpFile un_ubwc_${outfilename}.raw $width $height
  39.   fi
  40. done
  41. setprop zte.dumplayer 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement