Debug bridge for iPhone / shell command line

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

adb shell

Is there something similar for iOS?

I would like to type some shell commands on my Mac that will run on the connected iPhone.
Is there a built-in terminal on the iPhone?

+6
source share
2 answers

use ssh over a network (e.g. Wi-Fi), and iphone / ipad needs to download and enable the ssh service, firstly.

0
source

It has nothing but built-in, but if you are hacked or can download applications (for example, you have a Mac with Xcode), you can start a local terminal with applications such as MobileTerminal that are not available in the application store.

To access the shell from the computer if you are jailbroken (and perhaps even if it is not, if you can download applications), you can install openssh or openssh-server from Cydia (I believe that it is simply called "OpenSSH" in the graphical interface). Once it is running on your device, you can connect the device via USB and use the shell script. I made an idb call to access the shell, push and pull files, etc. This establishes a USB connection to transfer TCP packets from the SSH server to the device, and then wraps around SSH and SCP to complete the required tasks.

You will need to compile the program so that it works under the name iproxy ; this program transmits TCP via the USB bus to enable ssh via cable. The comments in the script that I wrote explain how to do this (sorry ... I plan to move it to README.md in the end).

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

Without jailbreak your options are more limited, but maybe something can be done. I have not tried since I no longer use iOS.

0
source

Source: https://habr.com/ru/post/948275/


All Articles