[英]Android ADB: pull to memory
Is it possible to somehow redirect the outputs of adb pull not to a file but to some place in memory? 是否有可能以某种方式将adb pull的输出重定向到文件而不是内存中的某个位置?
specifically i am writing a java program, that executes 特别是我正在编写一个执行的java程序
adb pull /dev/graphics/fb0
and in the same program i want to process the results without having to read the fb0
file from disk again. 并且在同一程序中我想处理结果而不必再次从磁盘读取fb0
文件。
You can make sure to write the file into shared memory. 您可以确保将文件写入共享内存。 Assuming your using a linux system just pull the file into the 假设您使用的是Linux系统,只需将文件拉入
/dev/shm/ directory. / dev / shm /目录。
See this post for more details. 有关详细信息,请参阅此帖子。
http://www.howtoforge.com/storing-files-directories-in-memory-with-tmpfs http://www.howtoforge.com/storing-files-directories-in-memory-with-tmpfs
You can always do something like 你可以随时做点什么
adb shell cat /dev/graphics/fb0 | myprogramthatprocessestheresult
and you don't have to save the file as long as myprogramthatprocessestheresult
reads from stdin. 只要myprogramthatprocessestheresult
从stdin读取,你就不必保存文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.