Open
Conversation
Add hiylx to credits Remove the incompatibility warning of 16.1+ with linux as that was resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
I added iOS 16.1+ support on Linux by using apfs-fuse to process APFS DMGs.
I used an alternative iBoot64Patcher binary from my repo as the one included did not work
Technical Details
Building a statically linked standalone apfs driver for linux which does not have dependencies
iOS 16.1 support was added to linux by first compiling a statically linked apfs-fuse with the following steps
Spin up a docker container for alpine linux
sudo docker run -it -v $(pwd):/workspace alpine:latest /bin/shInstall dependencies for building
Clone repo
Prepare build folder
mkdir build && cd buildPatch to support static linking
Create statically linked build files
cmake -DCMAKE_EXE_LINKER_FLAGS="-static" -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..Build the executable
makeBuilding a statically linked standalone HFS driver for linux which does not have dependencies
Spin up a docker container for Ubuntu 20.04
sudo docker run -it -v $(pwd):/workspace ubuntu:20.04 /bin/bashInstall dependencies for building
apt-get update && apt-get install -y build-essential clang wget uuid-dev libssl-dev libbsd-dev libblocksruntime-devDownload fedora HFS tools
Compile
Note: It might give an error about fsck, we do not care as the only file we need is newfs_hfs
Logic when APFS ramdisk is used
Create mount points
Mount APFS ramdisk
Create empty image file of 400 MB for a new HFS ramdisk
Format the image as HFS+
Mount the newly created HFS image
Copy over files from the original ramdisk to the new HFS ramdisk
Extract sshtars to the newly created image
Unmounnt both the ramdisks
Delete mount points