THEOS: Shell Terminal Commands using THEOS - iphone

I am making a jailbreak app using theos for iPhone. But, I need to know how to run terminal commands using theos to complete my app. Thanks,
Jacob

You can use system("yourcommand");

Related

Flutter App can't launching in iPhone without connecting to the computer?

I can build & launching app well in my iPhone when my phone is connecting to the macbook , and launching by the command line flutter run.
But when i disconnect my iPhone from the macbook . and I want to launch the app from the iPhone's desktop. the app seems can't launch , and will exit very soon.
Is there any way to launch flutter app from the iPhone's desktop?
This is happen because you are building iOS app in debug mode, run app in profile or release mode and it will fix.
Thanks for the #eamirho3ein's answer: change the debug to release fix the problem.
In fact, there is one thing to be metioned: the default config in xcode for command-line build is release already, but if you change this mode won't help. the mode needed to be change is the flutter run mode.
there are many ways to do this.

Launch my iPhone app on device through instruments

An app I've created is already installed on my device that I simply want to launch using instruments. It is already installed on my device. I simply want to launch the app. I am using this
instruments -w <device_id> -t "/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Activity Monitor.tracetemplate" -D /tmp/ignoredtracedata.trace <app_name>
This is what I get
Instruments Trace Error : (null)
I had this working at one point. Then without making any changes the next day I came to work on it and it wasn't working :(. I've tried things for a couple of hours and heven't made much progress.
I am using the Ruby gem Frank to run tests. I'd like to launch the app in different languages which is why I want to use instruments instead of simply adding the -d debug flag to launch the app on the device.
Does anyone have anything that will help me?
I don't know exactly why this fixed my problem. But I checked which processes were running with $ ps and instruments was running. I just killed instruments sudo killall instruments and it worked.
I'm going to go out on a limb here and assume that the app you're trying to run instruments on is an app you've developed? You can't use Instruments on someone else's app, or you'd have access to their written code.
If it's you're own code, why do it through terminal? You can launch instruments directly from Xcode. Open your project, press and hold on the "Run" button in the toolbar, and select "Profile". Choose your instrument of choice and voila.

Launch an application on the iOS simulator with using command line

Good Morning,
I am trying to launch an application on the iOS Simulator with command line so i put this command in the terminal:
open `xcode-select --print-path`/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app
With this command, the simulator is launched. My question is how can I start an application from the terminal?
I have used WaxSim (referenced in rog's comment) and it works pretty well. You can find it at https://github.com/square/WaxSim. For what it's worth, there have been no commits for something like two years and there are a number of open pull requests.
Recently I have started using ios-sim which can be found at https://github.com/phonegap/ios-sim. It looks like (currently) it is active and seems to have more functionality. So far, I haven't had any problems with it (although I have not used it in anger yet).
I do not have enough reps to write it as comment.
ios-sim is used by Facebook and lot of other companies for running automated tests and launching stuff via commandline into iOS simulator.
You can download it from the git repo, just open it in XCode and build it.
The executable will be generated in the Build>products folder.
(For XCode 6 ~/Library/Developer/Xcode/DerivedData/ios-sim-xxxxxx.../Build/Products/)
https://github.com/phonegap/ios-sim
Here is a command to run the .app in iOS6 simulator:
ios-sim launch ./MyApp.app --devicetypeid "com.apple.CoreSimulator.SimDeviceType.iPhone-6"

Running compiled native code inside an iOS App

I have a compiled program I wrote in native c, which i can run on the my Iphone using
terminal and the command "./myCApp"
Is there a way to launch it through Code?
I've tried System("./myCApp")
or popen("./myCApp","r+)
and both didn't work.
I don't think you can launch a code in device programmatically unless it has some url scheme.

How to create a MobileSubstrate Plugin for iPhone?

i have googled alot on how to create a mobilesubstrate plugin for iPhone but couldnt get any basic tutorial for that. Anybody having any knowledge of how to do this? I am looking for a basic understanding of it.
Thanks :)
This script automatically setup iphone toolchain for you, runs on Mac OS X, thanks to #rpetrich. http://gist.github.com/403608
First, remember to
apt-get remove iphone-gcc on the iphone
before running this script on your mac, if you don't want to collect headers files from iphone sdk, follow the Darwin arm part of the script and I think you should be good.