Is it possible to use an iOS browser for Mac such as Phone Disk to apply a jailbreak tweak to a non-jailbroken iOS device?
-
What sort of tweaks?– VladCommented Mar 21, 2012 at 22:24
-
@Vlad This is mostly hypothetical, but in general, probably system tweaks (specifically to the lock screen and Springboard).– TuesdayCommented Mar 21, 2012 at 22:26
-
I have not tried Phone Disk but my guess is there are areas (such as /System) where a non-jailbroken iPhone won't allow you to write (due to missing privileges). You can mess around with apps' data though, since that will not require superuser access.– VladCommented Mar 21, 2012 at 22:37
-
2The carrier name (or iPod or iPad text in the upper left corner) can be changed by editing backup files.– bot47Commented Oct 31, 2012 at 6:41
-
1Another one that can be done without jailbreaking: hbang.ws/infolder.– Andrew LarssonCommented Oct 18, 2013 at 19:12
5 Answers
No, you cannot run jailbreak tweaks without being jailbroken.
To jailbreak, from the lowest-level point-of-view, means that you have the ability to patch the kernel (modify the core operating system code). A couple of the kernel patches that are common in every jailbreak is one that mounts the /
partition as read-write (so you can modify operating system files) and one that makes it so you can run unsigned code (either code that isn't approved by Apple or approved code that has been modified).
Almost all jailbreak tweaks make use of CydiaSubstrate (MobileSubstrate) which allows you to hook into running processes (run your own code inside them). Hooking works by rewriting the beginning of functions in a process's code, and that requires code signing to be disabled (which requires the kernel patch mentioned earlier). Also, CydiaSubstrate needs to inject itself into launchd
(the process that manages all other processes in iOS), and that can only be done as root (the superuser) which requires placing a script in /private/etc/rc.d
(a directory whose contents are each executed as root when the operating system boots) which requires write access to the /
partition.
Additional Information
The actual iOS operating system is on a partition separate from your data. The user/data partition (/dev/disk0s1s2
) is mounted at /private/var
and can be written to. The operating system partition (/dev/disk0s1s1
) is mounted at /
and cannot be written to unless you've patched the kernel.
In your iOS filesystem browser on your computer, you can only access files in /private/var/mobile/Media
. This is because the USB filesystem access daemon afcd
(the code that your iOS filesystem browser connects to on the device) is jailed to that directory (it cannot access anything outside of it). When you jailbreak, you can install afc2d
which is a replacement for afc
that is no longer jailed.
iOS apps are jailed to their own directory and cannot access anything outside of themselves.
Editing your iOS backup does allow some simple modifications to be made. The backup, however, only contains files from the user/data partition (/private/var
), so you will only be able to modify files there.
It depends.
There are some hacks, such as a hidden panorama mode, which reportedly work without a jailbreak. The App to use on your Mac or PC to make the necessary changes to tweak your iPhone is called iBackupBot. I'll bet if you dig around those files, you may find more cool things.
Remember, a jailbreak consists of a firmware image which has been modified, presumably at the binary level. (Odds are that jail breakers don't have access to iOS's actual source code. So, they'd use tools like binary/hex editors.) Hacks that require binary changes can't be used without changing the code that the phone executes. Changing the binary code is the essence of a jailbreak.
However, sometimes, as in the case of the hidden panorama mode mentioned above, apps (or even parts of iOS, more below) will read "settings" or "preferences" from external files. In those cases, simply supplying another value by editing property-list files may cause the app to act differently.
Apps that tap into the Settings app to store their settings write those settings to the phone's persistent storage as property-lists, which are simply a special form of XML.
In the panorama mode example, the Camera app looks inside the relevant property-list file to check for a "flag" or a switch which will turn panorama mode on or off. There just isn't any user interface for turning the mode on or off. (For clarity's sake: The XML to turn panorama on is not in the same place that most settings are.)
Using the tool mentioned in the article, I've noticed that technically, which icons are shown on SpringBoard is also editable. There are tens of property-list files which configure the system, you just need to have access to them and know what values might be useful.
iOS uses a lot of "Property Lists" and XML, and knowing what does what can yield interesting results. Just bear in mind that most of the "useful" hacks are either available via Settings, or only via a binary jailbreak.
-
2That is pretty cool. Kind of like a way to bypass the need to jailbreak if all the "tweak" involves is a
defaults write
command to set a hidden preference that the device has code to handle. So the real answer to this question is a resounding - no you can't get new code to run or change existing code, but yes - some plist files can be edited or created within an app's sandbox to enable non-default and hidden behavior of existing apps.– bmike ♦Commented Mar 22, 2012 at 15:47 -
That looks interesting. A program that lets you modify
.plist
files from an iPhone backup could come in handy. Commented Mar 22, 2012 at 16:21 -
2Besides the panorama mode preference (which I discovered) there is also a preference to enable an autocorrections bar. And, actually, tweaks are dynamic libraries loaded into executables by something called CydiaSubstrate, and they modify the Objective-C runtime.– conradevCommented Mar 23, 2012 at 2:37
-
@conradev - Wow, thanks for the insight! Do you have any websites I can use to as a reference? Also, totally forgot about the autocorrect bar.– MosheCommented Mar 23, 2012 at 2:51
No. Tweaks and items found outside of the App Store are not given permission to run on iOS. Any program must pass a series of checks before it is allowed to execute. Jailbreaking removes (most of) these checks.
Moreover, they all require various frameworks and libraries also not included in Apple's mobile operating system.
Lastly, you may only copy things to your user account. Tweaks and apps found in Cydia require root access (and that can only come by way of jailbreaking).
Some of these old posts contain misinformation. You can install cydia apps/tweaks and maintain a sandbox.
The weblin and ipwnstore are cool stuff. Most of my tweaks still do rely on being out of the sandbox.
-
Please expand on this a bit. I can help with grammar if you are not a native speaker - just flag it and let us know. Thanks for pointing out old information by an edit or a new answer.– bmike ♦Commented Oct 31, 2012 at 20:18
-
I took a look at those two stores. They only install apps (or tweaks that modify files in the strictly in the mobile user's partition), so this is technically nothing that hasn't already been said. Commented Nov 6, 2012 at 0:06
If the tweak is for a specific app that is in the Appstore. for example phantom for Snapchat. since you can get to the app folders of Snapchat could you manually extract each file to where it goes