ios - 使用 vb.net 将包含文件的文件夹导入到越狱的 iPhone 中

标签 ios iphone vb.net jailbreak

我正在 VB.NET (Visual Studio 2013) 中编写一个应用程序,作为最后一步,它有两个将文件夹(其中包含多个文件)复制到iPhone 中的某个目录。

iPhone 已越狱,因此可以访问各种目录,并且还应通过 USB 连接到 PC。这可能吗?

提前致谢!

最佳答案

我的 visual basic 很烂,但我可以告诉您如何以编程方式执行此操作:

首先,您需要通过 USB 建立 SSH 隧道。您可以通过编程方式执行来自 this zip. 的 itunnel_mux.exe 来做到这一点(您必须先提取所有内容。)像这样使用它:

itunnel_mux.exe --tunnel -iport 22 -lport 2222

然后,您可以使用 SCP(我推荐 this library)从 root@127.0.0.1:2222(密码 alpine)复制文件。

这是一些示例伪代码(请记住,我不懂 VB):

'Extract the exe and dll file from that zip
extract_files()
'I'm making a new variable containing the port number. 
Dim port As string = "2222"
'I made up this function. Lets pretend it executes Batch code in the current directory (like a bat file)
execbat("itunnel_mux.exe --tunnel -iport 22 -lport " + port)
Using scp As New Rebex.Net.Scp
    ' connect to a server
    scp.Connect(hostname)
    ' authenticate (change alpine if you changed your root passwd)
    scp.Login("root", "alpine")

    ' Here, you can use "scp" to upload and download files
    scp.PutFile("C:\Users\KevinKZ\Desktop\fileToUpload.jpg", "/var/mobile/Documents/fileToUpload.jpg")
    scp.GetFile("/var/mobile/Library/SMS/sms.db", "C:\Users\KevinKZ\Desktop\SMS_Backups\2-1-14.db")
    scp.Disconnect()
End Using

这个解决方案远非优雅。它还需要 OpenSSH(我认为)。如果您想要更简单和/或更灵活的东西,请告诉我。您最好使用 libimobiledevice。如果您仍然需要帮助,请告诉我。你可以给我发电子邮件 alex@alexhulbert.com

关于ios - 使用 vb.net 将包含文件的文件夹导入到越狱的 iPhone 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21239301/

相关文章:

ios - 如何开发一个自定义的 UICollectionViewLayout,它具有带有自动调整单元格的交错列?

ios - 处理程序不接收 batteryState 通知

.net - 如何通过 COM 将未初始化的数组从 VB6 传递到 .NET?

asp.net - Visual Basic 编译器 (vbc.exe) 用完所有系统内存(RAM 和虚拟)

iphone - 释放/解除分配标签栏 View Controller

javascript - 在 cordova 中从 objective-c 调用 javascript

iphone - NSMutableArray 对象认为它是一个 NSArray :(

ios - 上周 Itunes 连接变化

iphone - 开始/结束外观转换的不平衡调用

css - &lt;style&gt; 在 Outlook 2007 上无法按 <table> 的预期工作