I would like to execute some scripts on my Mac, to which an iOS device is connected. The intent of the script would be to identify whether the connected device is jailbroken or not. Would be great if you could suggest the solution using bash or py.
You can attempt to SSH into it via the iPhone's connection program "usbmux" (to forward the wired data connection to a port on your computer). There is a script, as well as instructions on this GitHub page
Try this https://github.com/libimobiledevice/ifuse You can check if device allows you to access it's root folder. If you can access root folder then it's definitely jailbroken.
It's true that jailbreak doesn't necessarily mean you can access it's entire filesystem but all modern jailbreak solutions install AFC2 service which allows full filesystem access.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.