Apple iPhone X (Global) (apple-d22)
This device is supported as part of a generic port. Refer to Apple_Generic_iDevice_(apple-idevice) for installation instructions and more information. |
![]() Apple iPhone X booting postmarketOS edge/systemd | |
Manufacturer | Apple |
---|---|
Name | iPhone X (Global) |
Codename | apple-d22 |
Released | 2017 |
Type | handset |
Hardware | |
Chipset | Apple A11 |
CPU |
2x 2.376 GHz Monsoon 4x 1.68 GHz Mistral |
GPU | Apple H10 (3 cores) |
Display | 1125 x 2436 |
Storage | 64, 256 GB |
Memory | 3 GB |
Architecture | aarch64 |
Software | |
Original software The software and version the device was shipped with. |
iOS 11 |
Extended version The most recent supported version from the manufacturer. |
iOS |
postmarketOS | |
Category | testing |
Mainline Instead of a Linux kernel fork, it is possible to run (Close to) Mainline. |
yes |
pmOS kernel The kernel version that runs on the device's port. |
6.16.0_rc1 |
Generic port | Apple_Generic_iDevice_(apple-idevice) |
Device package |
![]() |
Kernel package |
![]() |
Flashing It is possible to flash the device with pmbootstrap flasher . |
Broken
|
---|---|
USB Networking After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system). |
Works
|
Internal storage eMMC, SD cards, UFS, ... |
Partial
|
Battery Charging and battery level reporting works |
Broken
|
Screen Display works. Ideally with sleep mode and brightness control. |
Partial
|
Touchscreen |
Broken
|
Multimedia | |
3D Acceleration |
Broken
|
Audio Audio playback, microphone, headset and buttons. |
Broken
|
Camera |
Broken
|
Connectivity | |
WiFi |
Broken
|
Bluetooth |
Broken
|
GPS |
Broken
|
Modem | |
Calls |
Broken
|
SMS |
Broken
|
Mobile data |
Broken
|
Miscellaneous | |
FDE Full disk encryption and unlocking with unl0kr. |
Broken
|
USB OTG USB On-The-Go or USB-C Role switching |
Broken
|
Sensors | |
Accelerometer Auto screen rotation works in desktops e.g. Phosh or Plasma Mobile |
Broken
|
Apple iPhone X is the flagship smartphone from Apple in 2017.
Contributors
How to Enter Flash Mode
libirecovery is required as Apple A11 cannot boot from DFU if entered with force reset.
1. Plug the device into your computer.
- Some lightning to USB-C cables will not work. Lightning to USB-A cables works fine and for USB-C only hosts, USB-A to USB-C adapters can be used.
2. Power off the device.
3. Enter recovery mode.
- Hold until Apple logo appears, then disappears.
- The Apple logo will then appear again soon after then the device goes into recovery mode.
3. Enter DFU mode.
- On the host, do
irecovery -c reset
, which will reset the device. Feel free to add asleep
command so you can perform the following step in time. - From the point of reset, hold and for 2 seconds.
- Release but keep holding for 8 seconds.
Internal Storage
Internal storage on iPhone X is Apple's ANS2 NVMe. It is similar to the one in M1 but with less quirks. Currently internal storage in Linux requires the firmware used to boot Linux to be at least iOS 14 due to RTKit protocol support limitation. There are multiple namespaces, the first one holds the main storage and the second one holds the bootloader.
Booting
- m1n1 m1n1 bootloader
- linux kernel repository
- libusbmuxd You will need the iproxy tool if you want to use the iOS ssh ramdisk.
$ pmbootstrap init
Select 'apple' for vendor and 'd22' for codename
$ pmbootstrap install
Optionally enable netboot
$ pmbootstrap initfs hook_add netboot
Get the linux and initramfs
$ pmbootstrap export
Prep the m1n1 bootloader
$ cat path/to/m1n1/build/m1n1-idevice.macho \
path/to/boot/dtbs/apple/*.dtb \
/tmp/postmarketOS-export/vmlinuz \
/tmp/postmarketOS-export/initramfs \
> m1n1-linux.macho
This m1n1-linux.macho
is to be booted in place of Apple's XNU kernel.
Actually pwning and booting the thing is quite tedious, so use something like SSHRD_Script which will set up a
flashless pwned boot chain.
Set up a SSH ramdisk using SSHRD_Script, example boots iOS 15.5 ramdisk (need at least 14.0 for internal storage)
$ ./sshrd.sh 15.5
This will boot an iOS 15.5 SSH ramdisk, which can be used for flashing with dd. Username is root and password is alpine
$ ./sshrd.sh boot
For now though, skip over that part and start booting Linux, since it should also be possible to flash from Linux
Copy SSHRD_Script folder if you still want to boot the SSH ramdisk, since we will be replacing Apple's XNU kernel with the m1n1-linux.macho
Extract the (fake) IMG4 manifest signature file
$ ./Linux/img4 -i sshramdisk/kernelcache.img4 -M IM4M
Create the m1n1 img4, replacing the kernel
$ ./Linux/img4 -i /path/to/m1n1-linux.macho -A -T rkrn -M IM4M -o sshramdisk/kernelcache.img4
Now attempting to boot the ramdisk would result in m1n1 and Linux booting!
$ ./sshrd.sh boot
Netboot
WARNING: Netbooting is broken currently for all devices. For more information look here. |
If you enabled netbooting during the flashing setup you can use it to boot a rootfs. To serve the rootfs, run:
$ pmbootstrap netboot serve
Flashing
WARNING: This is irreversible! While you can always revert to iOS using idevicerestore, you can only revert to a signed version, which is usually the latest version. |
- After
setup_usb_storage /dev/nvme0n1
in the postmarketOS initramfs, the device's internal storage will appears as a USB mass storage device on the host, from that point ondd
and the usual partitioning tools can be used.
Users Owning This Device
See Also
- pmaports!6642 Initial merge request