IOS jailbreaking

iOS jailbreaking is the use of a privilege escalation exploit to remove software restrictions imposed by Apple on devices running iOS and iOS-based operating systems. It is typically done through a series of kernel patches. A jailbroken device typically permits root access within the operating system and provides the right to install software unavailable through the App Store. Different devices and versions are exploited with a variety of tools. Apple views jailbreaking as a violation of the end-user license agreement and strongly cautions device owners not to try to achieve root access through the exploitation of vulnerabilities.

While sometimes compared to rooting an Android device, jailbreaking bypasses several types of Apple prohibitions for the end-user. Since it includes modifying the operating system (enforced by a "locked bootloader"), installing non-officially approved (not available on the App Store) applications via sideloading, and granting the user elevated administration-level privileges (rooting), the concepts of iOS jailbreaking are therefore technically different from Android device rooting.

Motivation
Expanding the feature set that Apple and its App Store have restricted is one of the motivations for jailbreaking. Apple checks apps for compliance with its iOS Developer Program License Agreement before accepting them for distribution in the App Store. However, the reasons for Apple to ban apps are not limited to safety and security and may be regarded as arbitrary and capricious. In one case, Apple mistakenly banned an app by a Pulitzer-Winning cartoonist because it violated its developer license agreement, which specifically bans apps that "contain content that ridicules public figures." To access banned apps, users rely on jailbreaking to circumvent Apple's censorship of content and features. Jailbreaking permits the downloading of programs not approved by Apple, such as user interface customization and tweaks.

Device customization
Software programs that are available through APT or Installer.app (legacy) are not required to adhere to App Store guidelines. Most of them are not typical self-contained apps, but instead are extensions and customizations for iOS or other apps (commonly called tweaks). Users can install these programs for purposes including personalization and customization of the interface using tweaks developed by developers and designers, adding desired features such as access to the root file system and fixing annoyances, and making development work on the device easier by providing access to the file system and command-line tools. Many Chinese iOS device owners also jailbreak their phones to install third-party Chinese character input systems because they are easier to use than Apple's.

In some cases, jailbreak features are adopted by Apple and used as inspiration for features that are incorporated into iOS and iPadOS.

Carrier unlocking
Jailbreaking also opens the possibility for using software to unofficially unlock carrier-locked iPhones so they can be used with other carriers. Software-based unlocks have been available since September 2007, with each tool applying to a specific iPhone model and baseband version (or multiple models and versions). This includes the iPhone 4S, iPhone 4, iPhone 3GS, and iPhone 3G models. An example of unlocking an iPhone through a Jailbreak utility would be Redsn0w. Through this software, iPhone users will be able to create a custom IPSW and unlock their device. Moreover, during the unlocking process, there are options to install Cydia the iPad baseband.

Installation of malware
Cybercriminals may jailbreak an iPhone to install malware or target jailbroken iPhones on which malware can be installed more easily. The Italian cybersecurity company Hacking Team, which sells hacking software to law enforcement agencies, advised police to jailbreak iPhones to allow tracking software to be installed on them.

Software piracy
On iOS devices, the installation of consumer software is generally restricted to installation through the App Store. Jailbreaking, therefore, allows the installation of pirated applications. It has been suggested that a major motivation for Apple to prevent jailbreaking is to protect the income of its App Store, including third-party developers and allow the buildup of a sustainable market for third-party software. However, the installation of pirated applications is also possible without jailbreaking, taking advantage of enterprise certificates to facilitate the distribution of modified or pirated releases of popular applications.

Package managers
A package manager or package-management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs. For jailbreaks, this is essential for the installation of third-party content. There are a few package managers specifically for jailbroken iOS devices, of which the most popular are Cydia, Sileo, Zebra and Installer 5.

Security of the device
Once a device is jailbroken, the built-in security is compromised due to the vast amount of kernel patches that go into building the tool. Security structures like Apple Mobile File Integrity, Sandbox, Read-Only Root File system, and trusted apps get disabled or otherwise tampered with, to achieve the goals of the jailbreaking tool. This, in turn, creates potential security issues for the user of a jailbroken device.

Users of a jailbroken device are also often forced to stay on an inferior iOS version that is no longer supported by Apple because newer versions usually cannot be jailbroken right away. This has the potential to introduce security issues because for these older versions there are known security vulnerabilities, exploits, and exploit proof of concepts published.

In March 2021, jailbreak developer GeoSn0w released a tweak called iSecureOS which can alert the users of security issues found on their devices. The application works akin to antivirus software, in that it scans the files on the user's device and checks them against a database of known malware or unsafe repos.

In June 2021, ESET Research confirmed that malware did exist on one of the piracy repositories in the jailbreak community. The malware actively targeted iSecureOS to try to bypass the detection, but updates to the security app were quickly released and have mitigated the malware.

Comparison to Android rooting
Jailbreaking of iOS devices has sometimes been compared to "rooting" of Android devices. Although both concepts involve privilege escalation, they do differ in scope.

Where Android rooting and jailbreaking are similar is that both are used to grant the owner of the device superuser system-level privileges, which may be transferred to one or more apps. However, unlike iOS phones and tablets, nearly all Android devices already offer an option to allow the user to sideload 3rd-party apps onto the device without having to install from an official source such as the Google Play store. Many Android devices also provide owners the capability to modify or even replace the full operating system after unlocking the bootloader, although doing this requires a factory reset.

In contrast, iOS devices are engineered with restrictions including a "locked bootloader" which can not be unlocked by the owner to modify the operating system without violating Apple's end-user license agreement. And on iOS, until 2015, while corporations could install private applications onto corporate phones, sideloading unsanctioned, 3rd-party apps onto iOS devices from sources other than the App Store was prohibited for most individual users without a purchased developer membership. After 2015, the ability to install 3rd-party apps became free for all users; however, doing so requires a basic understanding of Xcode and compiling iOS apps.

Jailbreaking an iOS device to defeat all these security restrictions presents a significant technical challenge. Similar to Android, alternative iOS app stores utilizing enterprise certificates are available, offering modified or pirated releases of popular applications and video games, some of which were either previously released through Cydia or are unavailable on the App Store due to these apps not complying with Apple developer guidelines.

Types
Many different types of jailbreaks have been developed over the years, differing in how and when the exploit is applied.

Untethered
When a jailbroken device is booting, it loads Apple's own boot software initially. The device is then exploited and the kernel is patched every time it is turned on. An untethered jailbreak is a jailbreak that does not require any assistance when it reboots up. The kernel will be patched without the help of a computer or an application.

Tethered
A tethered jailbreak is the opposite of an untethered jailbreak, in the sense that a computer is required to boot the device. Without a computer running the jailbreaking software, the iOS device will not be able to boot at all. While using a tethered jailbreak, the user will still be able to restart/kill the device's SpringBoard process without needing to reboot. Many early jailbreaks were offered initially as tethered jailbreaks.

Semi-tethered
This type of jailbreak allows a user to reboot their phone normally, but upon doing so, the jailbreak and any modified code will be effectively disabled, as it will have an unpatched kernel. Any functionality independent of the jailbreak will still run as normal, such as making a phone call, texting, or using App Store applications. To be able to have a patched kernel and run modified code again, the device must be booted using a computer.

Semi-untethered
This type of jailbreak is like a semi-tethered jailbreak in which when the device reboots, it no longer has a patched kernel, but the key difference is that the kernel can be patched without using a computer. The kernel is usually patched using an application installed on the device without patches. This type of jailbreak has become increasingly popular, with most recent jailbreaks classified as semi-untethered.

JailbreakMe and AppSnapp
A few days after the original iPhone became available in July 2007, developers released the first jailbreaking tool for it, and soon a jailbreak-only game app became available. In October 2007, JailbreakMe 1.0 (also called "AppSnapp") allowed people to jailbreak iPhone OS 1.1.1 on both the iPhone and iPod Touch, and it included Installer.app as a way to get software for the jailbroken device.

ZiPhone
In February 2008, Zibri released ZiPhone, a tool for jailbreaking iPhone OS 1.1.3 and iPhone OS 1.1.4.

PwnageTool
The iPhone Dev Team, which is not affiliated with Apple, has released a series of free desktop-based jailbreaking tools. In July 2008 it released a version of PwnageTool to jailbreak the then new iPhone 3G on iPhone OS 2.0 as well as the iPod Touch, newly including Cydia as the primary third-party installer for jailbroken software. PwnageTool continues to be updated for untethered jailbreaks of newer iOS versions.

QuickPwn
In November 2008 the iPhone Dev Team released QuickPwn to jailbreak iPhone OS 2.2 on iPhone and iPod Touch, with options to enable past functionality that Apple had disabled on certain devices.

redsn0w
After Apple released iPhone OS 3.0 in June 2009, the Dev Team published redsn0w as a simple jailbreaking tool for Mac and Windows, and also updated PwnageTool primarily intended for expert users making custom firmware, and only for Mac. It continues to maintain redsn0w for jailbreaking most versions of iOS 4 and iOS 5 on most devices.

purplera1n & blackra1n
George Hotz developed the first iPhone unlock, which was a hardware-based solution. Later, in 2009, he released a jailbreaking tool for the iPhone 3G and iPhone 3GS on iPhone OS 3.0 called purplera1n, and blackra1n for iPhone OS version 3.1.2 on the 3rd generation iPod Touch and other devices.

limera1n
In October 2010, George Hotz released limera1n, a low-level boot ROM exploit that permanently works to jailbreak the iPhone 4 and is used as a part of tools including redsn0w.

Spirit and JailbreakMe
Nicholas Allegra (better known as "comex") released a program called Spirit in May 2010. Spirit jailbreaks devices including iPhones running iPhone OS 3.1.2, 3.1.3, and iPad running iPhone OS 3.2. In August 2010, comex released JailbreakMe 2.0, the first web-based tool to jailbreak the iPhone 4 (on iOS 4.0.1). In July 2011, he released JailbreakMe 3.0, a web-based tool for jailbreaking all devices on certain versions of iOS 4.3, including the iPad 2 for the first time (on iOS 4.3.3). It used a flaw in PDF file rendering in mobile Safari.

Greenpois0n
Chronic Dev Team initially released Greenpois0n in October 2010, a desktop-based tool for untethered jailbreaking iOS 4.1 and later iOS 4.2.1 on most devices including the Apple TV, as well as iOS 4.2.6 on CDMA (Verizon) iPhones.

ultrasn0w
As of December 2011, redsn0w included the "Corona" untether by pod2g for iOS 5.0.1 for iPhone 3GS, iPhone 4, iPad (1st generation), and iPod Touch (3rd and 4th generation). As of June 2012, redsn0w also includes the "Rocky Racoon" untether by pod2g for iOS 5.1.1 on all iPhone, iPad, and iPod Touch models that support iOS 5.1.1.

Absinthe
The iPhone Dev Team, Chronic Dev Team, and pod2g collaborated to release Absinthe in January 2012, a desktop-based tool to jailbreak the iPhone 4S for the first time and the iPad 2 for the second time, on iOS 5.0.1 for both devices and also iOS 5.0 for iPhone 4S. In May 2012 it released Absinthe 2.0, which can jailbreak iOS 5.1.1 untethered on all iPhone, iPad, and iPod Touch models that support iOS 5.1.1, including jailbreaking the third-generation iPad for the first time.

evasi0n
An iOS 6.X untethered jailbreak tool called "evasi0n" was released for Linux, OS X, and Windows on February 4, 2013. Due to the high volume of interest in downloading the jailbreak utility, the site initially gave anticipating users download errors. When Apple upgraded its software to iOS 6.1.3 it permanently patched out the evasi0n jailbreak.

TaiG
On November 29, 2014, TaiG team released their untethered jailbreak tool called "TaiG" for devices running iOS 8.0–8.1.1. On December 10, 2014, the app was updated to include support for iOS 8.1.2. On July 3, 2015, TaiG 2.3.0 was released, which includes support for iOS 8.0–8.4.

Pangu9
On October 14, 2015, Pangu Team released Pangu9, their untethered jailbreak tool for iOS 9.0 through 9.0.2. On March 11, 2016, Pangu Team updated their tool to support iOS 9.1 for 64-bit devices.

History of exploit-disabling patch releases
Apple has released various updates to iOS that patch exploits used by jailbreak utilities; this includes a patch released in iOS 6.1.3 to software exploits used by the original evasi0n iOS 6–6.1.2 jailbreak, in iOS 7.1 patching the Evasi0n 7 jailbreak for iOS 7–7.0.6-7.1 beta 3. Boot ROM exploits (exploits found in the hardware of the device) cannot be patched by Apple system updates but can be fixed in hardware revisions such as new chips or new hardware in its entirety, as occurred with the iPhone 3GS in 2009.

On July 15, 2011, Apple released a new iOS version that closed the exploit used in JailbreakMe 3.0. The German Federal Office for Information Security had reported that JailbreakMe uncovered the "critical weakness" that information could be stolen or malware unwillingly downloaded by iOS users clicking on maliciously crafted PDF files.

On August 13, 2015, Apple updated iOS to 8.4.1, patching the TaiG exploit. Pangu and Taig teams both said they were working on exploiting iOS 8.4.1, and Pangu demonstrated these chances at the WWDC 2015.

On September 16, 2015, iOS 9 was announced and made available; it was released with a new "Rootless" security system, dubbed a "heavy blow" to the jailbreaking community.

On October 21, 2015, seven days after the Pangu iOS 9.0–9.0.2 Jailbreak release, Apple pushed the iOS 9.1 update, which contained a patch that rendered it nonfunctional.

On January 23, 2017, Apple released iOS 10.2.1 to patch jailbreak exploits released by Google for the Yalu iOS 10 jailbreak created by Luca Todesco.

On December 10, 2019, Apple used DMCA takedown requests to remove posts from Twitter. The tweet contained an encryption key that could potentially be used to reverse engineer the iPhone's Secure Enclave. Apple later retracted the claim, and the tweet was reinstated.

On June 1, 2020, Apple released the 13.5.1 update, patching the 0 day exploit used by the Unc0ver jailbreak.

On September 20, 2021, Apple released iOS/iPadOS 15, which introduced signed system volume security to iOS/iPadOS, meaning that any changes to the root file system would revert to the latest snapshot on a reboot, and changes to the snapshot would make the device unbootable. As a result, jailbreak development slowed considerably, and for the first time in jailbreaking history, the latest iPhone did not get a jailbreak before a new model was released.

On September 12, 2022, Apple released iOS 16, which introduced a new firmware component known as Cryptex1. New Cryptex1 versions are almost never compatible with old iOS versions, making downgrading impossible except within patch versions (i.e. 16.3 and 16.3.1).

Legality
The legal status of jailbreaking is affected by laws regarding circumvention of digital locks, such as laws protecting digital rights management (DRM) mechanisms. Many countries do not have such laws, and some countries have laws including exceptions for jailbreaking.

International treaties have influenced the development of laws affecting jailbreaking. The 1996 World Intellectual Property Organization (WIPO) Copyright Treaty requires nations party to the treaties to enact laws against DRM circumvention. The American implementation is the Digital Millennium Copyright Act (DMCA), which includes a process for establishing exemptions for non-copyright-infringing purposes such as jailbreaking. The 2001 European Copyright Directive implemented the treaty in Europe, requiring member states of the European Union to implement legal protections for technological protection measures. The Copyright Directive includes exceptions to allow breaking those measures for non-copyright-infringing purposes, such as jailbreaking to run alternative software, but member states vary on the implementation of the directive.

While Apple technically does not support jailbreaking as a violation of its EULA, jailbreaking communities have generally not been legally threatened by Apple. At least two prominent jailbreakers have been given positions at Apple, albeit in at least one case a temporary one. Apple has also regularly credited jailbreak developers with detecting security holes in iOS release notes.

Apple's support article concerning jailbreaking claims that they "may deny service for an iPhone, iPad, or iPod Touch that has installed any unauthorized software," which includes jailbreaking.

Australia
In 2010, Electronic Frontiers Australia said that it is unclear whether jailbreaking is legal in Australia, and that anti-circumvention laws may apply. These laws had been strengthened by the Copyright Amendment Act 2006.

Canada
In November 2012, Canada amended its Copyright Act with new provisions prohibiting tampering with DRM protection, with exceptions including software interoperability. Jailbreaking a device to run alternative software is a form of circumventing digital locks for the purpose of software interoperability.

There had been several efforts from 2008–2011 to amend the Copyright Act (Bill C-60, Bill C-61, and Bill C-32) to prohibit tampering with digital locks, along with initial proposals for C-11 that were more restrictive, but those bills were set aside. In 2011, Michael Geist, a Canadian copyright scholar, cited iPhone jailbreaking as a non-copyright-related activity that overly-broad Copyright Act amendments could prohibit.

India
India's copyright law permits circumventing DRM for non-copyright-infringing purposes. Parliament introduced a bill including this DRM provision in 2010 and passed it in 2012 as Copyright (Amendment) Bill 2012. India is not a signatory to the WIPO Copyright Treaty that requires laws against DRM circumvention, but being listed on the US Special 301 Report "Priority Watch List" applied pressure to develop stricter copyright laws in line with the WIPO treaty.

New Zealand
New Zealand's copyright law allows the use of technological protection measure (TPM) circumvention methods as long as the use is for legal, non-copyright-infringing purposes. This law was added to the Copyright Act 1994 as part of the Copyright (New Technologies) Amendment Act 2008.

Singapore
Jailbreaking might be legal in Singapore if done to provide interoperability and not circumvent copyright, but that has not been tested in court.

United Kingdom
The law Copyright and Related Rights Regulations 2003 makes circumventing DRM protection measures legal for the purpose of interoperability but not copyright infringement. Jailbreaking may be a form of circumvention covered by that law, but this has not been tested in court. Competition laws may also be relevant.

United States
The main law that affects the legality of iOS jailbreaking in the United States is the 1998 Digital Millennium Copyright Act (DMCA), which says "no person shall circumvent a technological measure that effectively controls access to a work protected under" the DMCA, since this may apply to jailbreaking. Every three years, the law allows the public to propose exemptions for legitimate reasons for circumvention, which last three years if approved. In 2010 and 2012, the U.S. Copyright Office approved exemptions that allowed smartphone users to jailbreak their devices legally, and in 2015 the Copyright Office approved an expanded exemption that also covers other all-purpose mobile computing devices, such as tablets. It is still possible Apple may employ technical countermeasures to prevent jailbreaking or prevent jailbroken phones from functioning. It is unclear whether it is legal to traffic in the tools used to make jailbreaking easy.

In 2010, Apple announced that jailbreaking "can violate the warranty".

Digital Millennium Copyright Act exemptions
In 2007, Tim Wu, a professor at Columbia Law School, argued that jailbreaking "Apple's superphone is legal, ethical, and just plain fun." Wu cited an explicit exemption issued by the Library of Congress in 2006 for personal carrier unlocking, which notes that locks "are used by wireless carriers to limit the ability of subscribers to switch to other carriers, a business decision that has nothing whatsoever to do with the interests protected by copyright" and thus do not implicate the DMCA. Wu did not claim that this exemption applies to those who help others unlock a device or "traffic" in software to do so.

In 2010, in response to a request by the Electronic Frontier Foundation, the U.S. Copyright Office explicitly recognized an exemption to the DMCA to permit jailbreaking in order to allow iPhone owners to use their phones with applications that are not available from Apple's store, and to unlock their iPhones for use with unapproved carriers. Apple had previously filed comments opposing this exemption and indicated that it had considered jailbreaking to be a violation of copyright (and by implication prosecutable under the DMCA). Apple's request to define copyright law to include jailbreaking as a violation was denied as part of the 2009 DMCA rulemaking. In their ruling, the Library of Congress affirmed on July 26, 2010, that jailbreaking is exempt from DMCA rules with respect to circumventing digital locks. DMCA exemptions must be reviewed and renewed every three years or else they expire.

On October 28, 2012, the US Copyright Office released a new exemption ruling. The jailbreaking of smartphones continued to be legal "where circumvention is accomplished for the sole purpose of enabling interoperability of [lawfully obtained software] applications with computer programs on the telephone handset." However, the U.S. Copyright office refused to extend this exemption to tablets, such as iPads, arguing that the term "tablets" is broad and ill-defined, and an exemption to this class of devices could have unintended side effects. The Copyright Office also renewed the 2010 exemption for unofficially unlocking phones to use them on unapproved carriers, but restricted this exemption to phones purchased before January 26, 2013. In 2015, these exemptions were extended to include other devices, including tablets.

Security, privacy and stability
The first iPhone worm, iKee, appeared in early November 2009, created by a 21-year-old Australian student in the town of Wollongong. He told Australian media that he created the worm to raise awareness of security issues: jailbreaking allows users to install an SSH service, which those users can leave in the default insecure state. In the same month, F-Secure reported on a new malicious worm compromising bank transactions from jailbroken phones in the Netherlands, similarly affecting devices where the owner had installed SSH without changing the default password.

Restoring a device with iTunes removes a jailbreak. However, doing so generally updates the device to the latest, and possibly non-jailbreakable, version, due to Apple's use of SHSH blobs. There are many applications that aim to prevent this, by restoring the devices to the same version they are currently running whilst removing the jailbreaks. Examples are, Succession, Semi-Restore and Cydia Eraser.

In 2012, Forbes staff analyzed a UCSB study on 1,407 free programs available from Apple and a third-party source. Of the 1,407 free apps investigated, 825 were downloaded from Apple's App Store using the website App Tracker, and 526 from BigBoss (Cydia's default repository). 21% of official apps tested leaked device ID and 4% leaked location. Unofficial apps leaked 4% and 0.2% respectively. 0.2% of apps from Cydia leaked photos and browsing history, while the App Store leaked none. Unauthorized apps tended to respect privacy better than official ones. Also, a program available in Cydia called PrivaCy allows user to control the upload of usage statistics to remote servers.

In August 2015, the KeyRaider malware was discovered, affecting only jailbroken iPhones.

Fake/scam jailbreaks
In recent years, due to the technical complexity and often rarity of legitimate jailbreaking software (especially untethered jailbreaks) there has been an increase in websites offering fake iOS jailbreaks. These websites often ask for payment or make heavy use of advertising, but have no actual jailbreak to offer. Others install a fake, lookalike version of the Cydia package manager. In some cases, users have been asked to download free-to-play apps or fill out surveys to complete a (non-existent) jailbreak.