android - 使用 adb 和 perl 捕获 android 设备屏幕截图

标签 android windows perl adb screenshot

<分区>

我尝试了 one liner 解决方案通过 adb 捕获屏幕截图,文件在 PC 上成功创建但不可读:

 C:\Program Files\Android\android-sdk\platform-tools>adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > c:\users\utilisateur\desktop\android_screenshot1.png

enter image description here

该文件似乎是正确的,但我认为 Magic 不正确: enter image description here

编辑:适用于 Windows 的 Git Bash 也发生了同样的问题。

最佳答案

adb exec-out screencap -p > screen.png

会直接保存在你的机器上

关于android - 使用 adb 和 perl 捕获 android 设备屏幕截图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29573291/

相关文章:

android - 首次运行 AS 2.0 和 gradle 2.0 所花费的时间

c# - WPF:使窗口不可调整大小,但保留框架?

python - 在 linux 中导入错误,但在 windows 中导入成功

windows - 如何打开 File::Find 从所需函数中找到的文件?

perl - DBIx::Class:ResultSet 获取大小

perl - 如何使用 CGI.pm 获取整个请求正文?

Perl - Hash::Merge 丢失 key

android - 使用 Kotlin Android Extensions 以编程方式扩展布局

android - 三星 Galaxy S II AVD(Android 虚拟设备)基本设置?

Android- 支持手势的选项卡布局和列表