Redirect file contents from android to computer

This question already has an answer here:

  • Read binary stdout data from adb shell? 15 answers

  • If you know the beginning string of your jpg file you can pipe it to sed before redirecting to the file:

    adb shell "screencap | /data/local/tmp/tools/./ffmpeg -f rawvideo -vcodec mjpeg -q:v 5 - | sed -n ‘/PATTERN/,$p’" > C:/Users/User/Desktop/new.jpg
    

    Sed will match from pattern to the end of file and print only these lines to your jpg file.


    If you have a grep utility for your either your Android device or your Windows host, you could pipe the output through a grep -v command and suppress the extraneous lines. To minimize the number of patterns that you'd need to supply to grep, you could set the ffmpeg logging option to quiet via -loglevel quiet .

    链接地址: http://www.djcxy.com/p/21472.html

    上一篇: 从本地化中排除占位符文本

    下一篇: 将文件内容从android重定向到计算机