Requirements
- Jailbroken iPhone if you need jailbreak the use Absinthe tool and perform jailbreak quick.
- OpenSSH allows Mac to give commands to you iPhone. If you need to install OpenSSH use this link that will help you to do it.
- APT 0.7 Strict, go to Cydia => Manage => Packages and there it must be installed. It’s for increasing amount of commands that you can give.
- Install Python on iPhone - Java library for scripting SSH sessions. You can make scripts for commands. You need these scripts because each of it gives you root access to iPhone. So you need to use Python to write scripts.
- Mac
How to Launch Apps on iPhone Using Alfred App for Mac
Step 1. Download Alfred app for Mac for free. Step 2. Now download these two files: enchanter-core-0.6.jar enchanter-python-0.6.jar Step 3. Copy these files on your Mac here:/System/Library/Java/Extensions/Note: You may need to enter password to pass authentication in your Mac. Step 4. Create a directory to keep your scripts for Python. For example you can call it control-iphone and put ~/control-iphone/script.py into Alfred extensions. Note: Each iOS device must use different scripts so you need to create a folder for each of them. Well, the main part of this tutorial has just begun. Now I will show you how to create a script. I took as an example to show you how to make Respring script to restart Springboard.
How to create a script to use Alfred app for Mac
Step 1. Use TextWrangler (or BBEdit if you have) to create a new file calledrespring.pyand save it in control-iphone folder you have previously created. Open this file and will see this:
conn.connect("highPhone.local", 22, "root", "alpine"); conn.waitFor("root# "); conn.sendLine("killall SpringBoard"); conn.waitFor("root# "); conn.sendLine("exit"); conn.disconnect();Step 2. Put your iPhone details in the first line. It can be IP address of your iPhone or its local domain.
- It is very good if you now the iPhone’s name. But what is really great if it doesn’t have spaces. For example, myiPhone.local.
- Now put SSH port number which is 22.
- Also you need to put root name which you used to login as a root and root password. As you may know, the root password is alpine if you didn’t change it. If you want to change it the go here and change your root password.
ssh root@your_iPhone_ip_addressand press Enter. Type your root password (then type Yes if needed). Note: When you see DNS Spoofing warning - remove known_hosts file in ~/.ssh and try again Step 3. Step 4. If you see myiPhone:~ root# it would be meant that you may send commands. Step 5. Type this command to respring:
killall SpringBoardAfter that the new root# will appear. You can use myiPhone:~ root# or root#, it doesn’t matter. Now you can add exit command to close the SSH session. Step 6. Now you need to create Alfred Extension. Launch Alfred app for Mac and go to preferences. To create an extension just click on Shell Script feature and you can call it iPhone Respring. Step 7. Now you need to change the icon; just drag and drop a image file onto the icon. You can locate a collection of images here:
/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Step 8. Now click the Create button. Also you can write a title and a description and make sure the checkbox for Silent and Action is unchecked. Step 9. To verify if everything is all right the command should be like this:
java -jar /System/Library/Java/Extensions/enchanter-python-0.6.jar ~/alfred-iphone/respring.py”You can try it in new Terminal window without log in trough SSH. Save your just created extension. Step 10. Now create AppleScript extension to add Growl support. Just paste a code below before extension:
try tell application "Growl" set the allNotificationsList to ¬ {"Alfred iPhone"} set the enabledNotificationsList to ¬ {"Alfred iPhone"} register as application ¬ "Alfred iPhone" all notifications allNotificationsList ¬ default notifications enabledNotificationsList ¬ icon of application "Terminal" end tell end tryStep 11. Now you need to launch Python. Just add this:
do shell script "java -jar /System/Library/Java/Extensions/enchanter-python-0.6.jar ~/alfred-iphone/respring.py" tell application "Growl" notify with name ¬ "Alfred iPhone" title ¬ "Success!" description ¬ "You have successfully restarted your iPhone SpringBoard." application name "Alfred iPhone" image from location ¬ "file:////System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/com.apple.iphone-4-black.icns" end tellNote: Use AppleScript Editor which is on your Mac to create, compile and rut this script. You can use this editor to write every script you want. For example to update or upgrade Cydia sources write ‘apt-get update’ or ‘apt-get upgrade’. So it can be extended by adding Cydia packages for command line. Also you can open any url in Safary. Just type this:
openURLor launch app adding this:
launch com.Apple.CalculatorTake a look how to write launchcalculator.py to use it with Python:
conn.connect("highPhone.local", 22, "root", "alpine"); conn.waitFor("root# "); conn.sendLine("launch com.Apple.Calculator"); conn.waitFor("root# "); conn.sendLine("exit"); conn.disconnect();If you know how to use AppleScript editor you can easily add Alfred query options to the extension. So if you named your extension Respring you have query options for iPad and iPhone just like you have extension called iPhone with such query options as respring, reboot, update. Take a look at queries examples which Alfred AppleScript Extesion use:
on alfred_script(q) try tell application “Growl” set the allNotificationsList to ¬ {“Alfred iPhone”} set the enabledNotificationsList to ¬ {“Alfred iPhone”} register as application ¬ “Alfred iPhone” all notifications allNotificationsList ¬ default notifications enabledNotificationsList ¬ icon of application “Terminal”
end tell end try if q is “respring” then do shell script “java -jar /System/Library/Java/Extensions/enchanter-python-0.6.jar ~/alfred-iphone/respring.py” tell application “Growl” notify with name ¬ “Alfred iPhone” title ¬ “Success!” description ¬ “You have successfully restarted your iPhone SpringBoard.” application name “Alfred iPhone” image from location ¬ “file:////System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/com.apple.iphone-4-black.icns” end tell else if q is “update” then tell application “Growl” notify with name ¬ “Alfred iPhone” title ¬ “Updating” description ¬ “Looking for new Cydia packages.” application name “Alfred iPhone” end tell
do shell script “java -jar /System/Library/Java/Extensions/enchanter-python-0.6.jar ~/alfred-iphone/update.py” tell application “Growl” notify with name ¬ “Alfred iPhone” title ¬ “Success!” description ¬ “You have refreshed your Cydia updates.” application name “Alfred iPhone” image from location ¬ “file:////System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/com.apple.iphone-4-black.icns” end tell else if q is “upgrade” then do shell script “java -jar /System/Library/Java/Extensions/enchanter-python-0.6.jar ~/alfred-iphone/upgrade.py” tell application “Growl” notify with name ¬ “Alfred iPhone” title ¬ “Success!” description ¬ “You have updated your Cydia packages.” application name “Alfred iPhone” image from location ¬ “file:////System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/com.apple.iphone-4-black.icns” end tell end if end alfred_scriptSo as you see you can create your own scripts to us Alfred app for Mac and launch iPhone apps. I hope it was not difficult for you. But if it was then let me know using comment section below and I’ll try to help you. All you need is to be acquainted with Terminal, OpenSSH and have basic knowledges of SSH clints . Update: You can also use the link to find out how to use Alfred app snippets on your Mac.
Recent Blog
Ultimate Guide: How to turn Off Restricted Mode on iPhone?
Automate Apple GSX check result obtaining?
iRemove Unlock iPhone 5S, 5C, 5, SE, 4S/4 Software
MacOS High Sierra Features: Set Up Websites in Safari on Mac
How to Enable iOS 11 Mail Reply Notification on iPhone 7
How to Bypass Apple Watch Passcode Problem
LetsUnlock Services List
iPhone & iPad Activation Lock Bypass
Use LetsUnlock iCloud Tool to bypass Activation Lock Screen on iPhone and iPad running on iOS version up to 14.6.
Read MoreUnlock Passcode Disabled iPhone or iPad
LetsUnlock iCloud Tool is ready to remove Find My and unlock your passcode disable device running on iOS 13.x.x in one click!
Read MoreMacOS iCloud Activation Lock Bypass
The LetsUnlock Mac iCloud Activation Lock Bypass Tool will help you to remove Activation Lock on an iCloud locked Mac which is stuck on Activation Lock Screen with no need to enter the correct Apple ID and password.
Read MoreMac EFI Firmware Passcode Bypass
The LetsUnlock EFI Bypass Tool is a one button solution, which you click to start the EFI Unlock process. Bypass EFI with out password! Everything else does the software.
Read MoreMacOS iCloud System PIN Bypass
The LetsUnlock MacOS iCloud System PIN Bypass Tool was designed to bypass iCloud PIN lock on macOS without passcode!
Read More