Skip to content

Commit

Permalink
Support ios rootless jailbreak devices
Browse files Browse the repository at this point in the history
  • Loading branch information
cosdon authored and trufae committed Jan 21, 2025
1 parent 9495e4e commit 5273bee
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 18 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: ldid2
run: |
git clone https://github.com/razum2um/ldid
cd ldid && make && cp -f ldid ldid2 /usr/local/bin
- name: Building
run: make ios
- uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -74,7 +70,7 @@ jobs:
path: fsmon-and-arm64
linux:
name: linux
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/dist/cydia/build
/dist/cydia/control
/dist/cydia/data
/dist/cydia/out
/dist/cydia/root
/dist/cydia/debian-binary
/dist/cydia/*.deb
/fsmon-ios
/fsmon-ios.dSYM
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ PREFIX?=/usr/local
IOS_ARCHS=$(addprefix -arch ,$(ARCHS))
IOS_CFLAGS+=$(IOS_ARCHS)
IOS_CFLAGS+=-isysroot ${IOS_SYSROOT}
IOS_CFLAGS+=-fembed-bitcode
IOS_CFLAGS+=-flto
IOS_CFLAGS+=-target arm64-apple-ios10.0
IOS_CFLAGS+=-miphoneos-version-min=10.0
Expand All @@ -75,14 +74,13 @@ IOS_ON_DEVICE_COMPILE=0
IOS_SYSROOT=$(shell xcrun --sdk iphoneos --show-sdk-path)
IOS_CC=$(shell xcrun --sdk iphoneos --find clang) $(IOS_CFLAGS)
IOS_STRIP=xcrun --sdk iphoneos strip
LDID=ldid2
LDID=bin/ldid_macosx_$(shell uname -m)
endif

# iWatch
WCH_CFLAGS=-arch armv7k
WCH_SYSROOT=$(shell xcrun --sdk watchos --show-sdk-path)
WCH_CFLAGS+=-isysroot ${WCH_SYSROOT}
IOS_CFLAGS+=-fembed-bitcode
WCH_CC=$(shell xcrun --sdk iphoneos --find clang) $(WCH_CFLAGS)

CC?=gcc
Expand Down Expand Up @@ -124,6 +122,7 @@ ios-patch:
rm -rf fsmon-ios.fat

cydia: ios
rm -rf dist/cydia/out
$(MAKE) -C dist/cydia

macos:
Expand Down
7 changes: 7 additions & 0 deletions bin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## ldid (Link Identity Editor) binaries

Downloaded from the [Procursus ldid repo](https://github.com/ProcursusTeam/ldid/releases)

Current version `v2.1.5-procursus7`

Use `xattr -c ldid*` to clear the extended attributes if you download via a browser.
Binary file added bin/ldid_macosx_arm64
Binary file not shown.
Binary file added bin/ldid_macosx_x86_64
Binary file not shown.
1 change: 0 additions & 1 deletion dist/cydia/CONFIG
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
PACKAGE=fsmon
include ../../config.mk
ARCH=iphoneos-arm
SECTION=Utilities
PRIORITY=optional
MAINTAINER=pancake <[email protected]>
23 changes: 16 additions & 7 deletions dist/cydia/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,24 @@ include ./CONFIG
DEPENDS=
PACKAGE_DIR?=$(shell pwd)

all:
all: arm64 arm

arm:
$(MAKE) ARCH=iphoneos-arm USR_PATH=usr target

arm64:
$(MAKE) ARCH=iphoneos-arm64 USR_PATH=var/jb/usr target

target:
$(SUDO) $(MAKE) mrproper
mkdir -p data root/usr/bin
mkdir -p data root/${USR_PATH}/bin out
$(MAKE) -C ../.. ios
cp -f ../../fsmon-ios root/usr/bin/fsmon
chmod +x root/usr/bin/fsmon
mkdir -p root/usr/share/man/man1
cp -f ../../fsmon.1 root/usr/share/man/man1/fsmon.1
$(SUDO) $(MAKE) debroot
cp -f ../../fsmon-ios root/${USR_PATH}/bin/fsmon
chmod +x root/${USR_PATH}/bin/fsmon
mkdir -p root/${USR_PATH}/share/man/man1
cp -f ../../fsmon.1 root/${USR_PATH}/share/man/man1/fsmon.1
$(SUDO) $(MAKE) ARCH=${ARCH} debroot
cp *.deb out

clean:
$(SUDO) $(MAKE) deb_clean
Expand Down
4 changes: 2 additions & 2 deletions dist/cydia/deb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ ${PACKAGE_DIR}/build: ${PACKAGE_DIR}/debian-binary ${PACKAGE_DIR}/control ${PACK
rm -rf $@
mkdir $@
cp ${PACKAGE_DIR}/debian-binary $@/
cd ${PACKAGE_DIR}/control && tar czvf $@/control.tar.gz *
cd ${PACKAGE_DIR}/control && tar --no-xattrs -czvf $@/control.tar.gz *
cd ${PACKAGE_DIR}/data && \
COPY_EXTENDED_ATTRIBUTES_DISABLE=true \
COPYFILE_DISABLE=true \
tar cpzvf $@/data.tar.gz *
tar --no-xattrs -cpzvf $@/data.tar.gz *

# Convert GNU ar to BSD ar that debian requires.
# Note: Order of files within ar archive is important!
Expand Down

0 comments on commit 5273bee

Please sign in to comment.