简体   繁体   English

通过命令行在iOS 5上启动GUI应用程序(越狱)

[英]Launch GUI app on iOS 5 through the command line (jailbreak)

I believe you used to be able to launch GUI apps on jailbroken iOS devices via the command line (over SSH) by executing a command like this: 我相信你曾经能够通过执行如下命令,通过命令行(通过SSH)在越狱的iOS设备上启动GUI应用程序:

launch com.apple.Calculator

but that is not working on my iOS 5 device ( launch not found ). 但这不适用于我的iOS 5设备( launch not found )。

I also tried: 我也尝试过:

launchctl start com.apple.Calculator

but that also gives me an error ( no such process ). 但这也给了我一个错误( no such process )。

Those launch / launchctl commands didn't work for me either. 那些launch / launchctl命令对我来说也不起作用。 What did work was to install the command-line utilty open from Cydia and just execute 什么做的工作是安装命令行utilty open在Cydia,只是执行

open com.apple.calculator

Notice the lowercase c in calculator, that was the bundle identifier for my calculator app. 注意calculator,的小写c calculator,这是我的计算器应用程序的包标识符。

Here's the developer's website for Cydia stuff: 这是Cydia开发人员的网站:

http://kramerapps.com/cydia/ http://kramerapps.com/cydia/

This links to the repo site: 这链接到repo站点:

http://moreinfo.thebigboss.org/moreinfo/depiction.php?file=openData http://moreinfo.thebigboss.org/moreinfo/depiction.php?file=openData

Update: For iOS 6.x, this current version of open doesn't seem to work. 更新:对于iOS 6.x,此当前版本的open似乎不起作用。 See @Nate's answer to another question linked below in the comments. 请参阅@ Nate对评论中下面链接的另一个问题的回答。

Update 2: The open package in Cydia has been updated and now works with iOS 6. 更新2:Cydia中的open包已更新,现在可以与iOS 6一起使用。

Update 3: Here is the source for the package: https://github.com/conradev/Open . 更新3:以下是该软件包的来源: https//github.com/conradev/Open If you look at the open.m file, you can see that the function SBSLaunchApplicationWithIdentifier from the SpringBoardServices private framework is what actually opens the app. 如果查看open.m文件,可以看到SpringBoardServices私有框架中的函数SBSLaunchApplicationWithIdentifier实际上是打开应用程序的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM