iPhone/Shell调试桥命令提示符 [英] debug bridge for iPhone / shell command prompt

查看:115
本文介绍了iPhone/Shell调试桥命令提示符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于Android,有一个ADB(Android调试桥),它允许在连接的设备上获取外壳程序:

For Android there is ADB (Android debug bridge) which allows to get a shell on the connected device:

adb shell

iOS是否有类似的东西?

Is there something similar for iOS?

我想在Mac上键入一些将在连接的iPhone上执行的shell命令.
iPhone上是否有内置终端?

I'd like to type some shell commands on my Mac that would be executed on the connected iPhone.
Is there a built-in Terminal on iPhone?

推荐答案

没有内置的功能,但是如果您越狱或可以旁载应用程序(又名,您的Mac带有XCode),则可以运行 local 终端,其中包含 MobileTerminal 之类的应用,应用商店.

There isn't anything for it built in, but if you are jailbroken or can sideload apps (a.k.a., you have a mac with XCode), you can run a local terminal with apps like MobileTerminal, which aren't available on the app store.

要从计算机访问外壳,如果您已越狱(甚至可能不是,则可以旁加载应用程序),则可以安装 openssh openssh-server 来自Cydia(我相信它在GUI中只是被称为"OpenSSH").一旦在设备上运行,您就可以通过USB连接设备并使用此我制作的名为的外壳程序脚本idb 来访问外壳程序,推入和拉出文件等.这将建立一个USB链路,以中继来自设备上SSH服务器的TCP数据包,然后包装" SSH和SCP以执行所需的任务.

To access a shell from a computer, if you are jailbroken (and possibly even if you aren't, if you can sideload apps) you can install openssh or openssh-server from Cydia (I believe it is just called "OpenSSH" in the GUI). Once that is running on your device, you can connect the device over USB and use this shell script I made called idb to access a shell, push and pull files, and so on. This sets up a USB link to relay TCP packets from the SSH server on the device, and then 'wraps' around SSH and SCP to perform the required tasks.

您必须编译一个程序以使其运行,该程序称为 iproxy ;该程序通过USB总线中继TCP,以允许通过电缆进行ssh.我写的脚本中的注释说明了如何执行此操作(抱歉,我打算最终将其移至 README.md 中).

You'll have to compile a program to make it work called iproxy; this program relays TCP over the USB bus to allow ssh over a cable. The comments in the script I wrote explain how to do this (sorry... I plan to move it into README.md eventually).

该程序遵循 adb 的大多数语法,并实现了该程序的一些更常用的操作.

The program follows most of the syntax of adb and implements some of the more commonly used operations of it.

在没有越狱的情况下,您的选择会受到更多的限制,但是有可能做点什么.我没有尝试过,因为我不再定期使用iOS.

Without jailbreaking, your options are more limited, but it may be possible to do something. I haven't tried since I don't regularly use iOS anymore.

这篇关于iPhone/Shell调试桥命令提示符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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