Comments (5)
在执行 adb shell screencap -p | sed "s/\r$//" > sc.png的时候保存的图片是一张错误的图片
通过截图到手机再导出发现了图片里的\n仍然翻译成了\r\n导致图片错误,想问一下楼主这个问题应该怎么处理
操作系统、adb 版本可以发算来看看么?
- 试过
adb exec-out screencap -p > sc.png
没有呢? - 你说的“通过截图到手机再导出”,这里具体用的命令发出来看一下
- 如果确定问题就是
\n
和\r\n
的问题,你可以在电脑上使用 sed 处理
from awesome-adb.
我使用的window 10,android 9 华为nov3
1.使用adb exec-out screencap -p > sc.png可以得到正常的截图
2.使用截图到手机指的是adb shell screencap -p sdcard/screen.png && adb pull sdcard/screen.png C:\Users\hzjy\Desktop合并操作的方式
3.确定是\n和\r\n的问题,但是使用在使用sed的时候并没有处理到对应的地方去
在使用sed的添加了双引号,不然无法识别到sed操作指令
from awesome-adb.
我使用的window 10,android 9 华为nov3
1.使用adb exec-out screencap -p > sc.png可以得到正常的截图
2.使用截图到手机指的是adb shell screencap -p sdcard/screen.png && adb pull sdcard/screen.png C:\Users\hzjy\Desktop合并操作的方式
3.确定是\n和\r\n的问题,但是使用在使用sed的时候并没有处理到对应的地方去
在使用sed的添加了双引号,不然无法识别到sed操作指令
今天梯子不正常,图片下不下来……看不到情况。那就不纠缠它了吧,就用第一条命令 😆
from awesome-adb.
好吧,谢谢您的解答
from awesome-adb.
我试了下,在 Mac 下用 gnu sed 处理成功啦……命令应该没问题,怀疑是与 Windows 下的 sed 的版本差异。
from awesome-adb.
Related Issues (20)
- Stuff I might need later
- 有没有启用“禁止权限监控”的命令
- adb 启用adb键盘 HOT 1
- Why y'all on my phone? I ain't been fucking with y'all in a hot min. HOT 1
- screencap截取横屏,结果是竖屏比例 HOT 1
- 请问知道如何通过 adb 打开 USB 网络共享 HOT 2
- 快速设置date的命令
- munmap_chunk(): invalid pointer * failed to start daemon error: cannot connect to daemon
- bootloader刷入recovery
- 打开activity传参数问题
- ? HOT 1
- 添加备份指令的介绍 HOT 3
- Adb Pull Error HOT 23
- 运行ADB直接显示已退出进程,代码为1 HOT 1
- Adb she'll simplify
- 屏幕旋转
- Android 10 无法使用相应命令查询 IP 和 MAC 地址 HOT 5
- 1. Open system setting app 2. Click 'About phone' - <img src="./../image/openMobileAdb/01.png" width="270" height="480"> 3. Click on 'Build number' until developer mode is enabled - <img src="./../image/openMobileAdb/02.png" width="270" height="480"> - <img src="./../image/openMobileAdb/03.png" width="270" height="480"> 4. Click 'System' - <img src="./../image/openMobileAdb/04.png" width="270" height="480"> 5. Click 'Developer options' - <img src="./../image/openMobileAdb/05.png" width="270" height="480"> - <img src="./../image/openMobileAdb/06.png" width="270" height="480"> 6. Enable 'USB debugging' - <img src="./../image/openMobileAdb/07.png" width="270" height="480"> 7. Click 'OK' - <img src="./../image/openMobileAdb/08.png" width="270" height="480"> 8. Enable 'Wireless debugging' - <img src="./../image/openMobileAdb/13.png" width="270" height="480"> - <img src="./../image/openMobileAdb/12.png" width="270" height="480">
- Debug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awesome-adb.