使用终端通过USB将文件从计算机(Mac)传输到iOS设备(如有必要,请越狱) [英] Transfer files from computer (Mac) to iOS device (jailbroken if necessary) via USB using terminal

查看:318
本文介绍了使用终端通过USB将文件从计算机(Mac)传输到iOS设备(如有必要,请越狱)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种通过USB将文件从Mac传输到iPhone的方法,这需要使用终端或以编程方式完成.

I am looking for a way to transfer files from my Mac to the iPhone via USB, and it needs to be done either using the terminal or programmatically.

到目前为止,我在StackOverflow上还看到了关于该主题的其他一些问题,最常见的答复是使用诸如iExplorer之类的GUI工具.不幸的是,我不能使用基于GUI的工具.

So far, I have seen some other questions on that topic on StackOverflow, and the most common reply was to use GUI-tools such as iExplorer. Unfortunately, I cannot use GUI-based tools.

一个有趣的答案是这个( https://stackoverflow.com/a/15795578​​/299711 ),它是提到了MobileDevice库,但是可惜的是,它的文献记载似乎很少(相反,根本没有文献记载,考虑到它是私有API的事实,这不足为奇).

One interesting answer was this one (https://stackoverflow.com/a/15795578/299711), which mentioned the MobileDevice library, but alas, it seems very poorly documented (rather, not documented at all, which is not surprising given the fact that it's a private API).

我发现的另一个答案提到了水果陷阱( https://stackoverflow.com/a/11061932/299711 ),但是,a)我需要能够双向复制文件,并且b)我需要复制应用程序中未包含但可以位于iOS设备上任何位置的文件.

Another answer I found mentioned fruitstrap (https://stackoverflow.com/a/11061932/299711), however, a) I need to be able to copy files in both directions, and b) I need to copy files that are not contained within an application, but which can be located anywhere on the iOS device.

如果我发现有关如何使用MobileDevice框架的任何文档,我将愿意自己开发一个命令行工具.但是,如果已经有了支持双向文件传输的命令行工具,请指向我.另外,如果有必要,我不介意将设备越狱.谢谢!

I would be willing to develop a command-line tool myself, if I were to find any documentation is to how to use the MobileDevice framework. But if there already is such a command-line tool which supports bidirectional file transfers, please point me to it. Also, I do not mind having to jailbreak the device if necessary. Thanks!

推荐答案

有一种方法可以执行此操作,但是您必须越狱设备,然后从Cydia AFC2进行调整(如果越狱未提供,则为最新版本)盘古的地图包括AFC2).

There is a way to do this, but you have to jailbreak the device and then install from Cydia AFC2 tweak (if not provided with the jailbreak; the latest version of Pangu includes AFC2).

这样,您将不再受限于设备上的Media文件夹.对于如何实现通信,我建议看看Github上的一个项目

This way you are no longer limited to the Media folder on the device. For how to implement the comunication, i recomend having a look on a project from Github

https://github.com/Moligaloo/iPhoneFS

iTunes随附PC上的移动设备库,因此您必须安装iTunes,找到该库并再次链接它.希望这会有所帮助

The Mobile Device library on PC comes with iTunes, so you have to install iTunes, locate the library and link agains it. Hope this helps

这篇关于使用终端通过USB将文件从计算机(Mac)传输到iOS设备(如有必要,请越狱)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆