This directory contain support tools for HoolockLinux. They are intended to be ran under jailbroken iOS/tvOS/bridgeOS, or a SSH ramdisk.
Download precompiled tools: iOS/iPadOS | tvOS | bridgeOS
The recommended environment to run these tools is with palera1n jailbreak. For older systems, checkra1n may be used. You need to run these tools until you can access SSH / Terminal. "Rootless" or "Rootful" does not matter. For details on jailbreaking devices, check https://ios.cfw.guide/.
Warning
These tools could potentially destroy all data on the main disk, so double check.
These tools allow you to make space on the disk for Linux. Note internal storage is currently supported on Apple A11 only.
This is an apfs container resize tool. It should be signed with
entitlements in resize.xml. Due to limitations in
embedded SDK, headers must be copied from macOS SDK and edited.
Check the CI script for details.
Usage: ./resize_apfs <container BSD name> <size in bytes>
Resize the container to N bytes, such as 21474836480 in the following example. There are alignment restrictions so pick a 4096-byte aligned size.
./resize_apfs disk0s1 21474836480
It is also possible to resize the container to the max size:
Caution
On iOS 13 and below this might ignore the gpt and resize the apfs to max which would break the filesystem. Recommend specifying the exact partition size instead.
./resize_apfs disk0s1 0
During an online resize, all file system operations will be frozen, so in normal iOS the device will become unresponsive
After resizing, the gpt can be modified with gdisk.
This is the usual gpt partitioning tool found on many unixes.
It is used to inspect and modify the partition table. It should be
signed with entitlements in gdisk.xml. Due to limitations in
embedded SDK, headers must be copied from macOS SDK and edited.
Check the CI script for details.
Each sector/block in gdisk is 4096 bytes long. Tutorial
On iOS 11-13 the default snapshot makes the container unresizable.
One can delete and recreate the snapshot with a tool like snaputil from ramdisk and resizing should work.
In order for a resize to work, the SEP firmware must be loaded, and gigalocker must be initialized. This is already done in normal iOS. In a ramdisk, this is not be possible on Apple A10(X), A11 on iOS/iPadOS 16 and above.
Resize in ramdisk is still possible on tvOS 16+/bridgeOS 7+ as well as previous chips.
If you use SSHRD_Script, the following command should do:
mount_filesystems
In a ramdisk, you might need somewhere writable to put the tools. On iOS 14 and above this is simple:
mount_tmpfs /mnt5
On iOS 13 and below, tmpfs is not supported, so a ramdisk needs to be created and formatted:
disk=$(hdik ram://16384) # 16384 KiB
newfs_hfs $disk
mount_hfs $disk /mnt5