From 6a3b0adaa2473659d5603019fe4b1796341ee45e Mon Sep 17 00:00:00 2001 From: Pe13 Date: Mon, 31 Mar 2025 20:49:56 +0200 Subject: [PATCH 1/7] Builds --- .gitignore | 3 + Makefile | 114 +++--------------- control | 12 ++ essentials/Makefile | 11 ++ essentials/control | 9 ++ .../include/libcheck/check.h | 0 .../include/libdycall/dyexec.h | 0 .../include/libfcm/fcm.h | 0 .../include/libfcm/fload.h | 0 .../include/libfcm/proc.h | 0 .../include/libroot/libroot.h | 0 .../include/libsean/Bootloader/bootloader.h | 0 .../include/libsean/Bootloader/proc.h | 0 .../include/libsean/CPU/cpu.h | 0 .../include/libsean/CPU/peripheral.h | 0 .../include/libsean/CPU/rdrand.h | 0 .../include/libsean/GPU/gpu.h | 0 .../libsean/Peripherals/Display/Display.h | 0 .../include/libsean/Peripherals/Mouse/Mouse.h | 0 .../include/libsean/RAM/ram.h | 0 .../include/libsean/VFS/fs.h | 0 .../include/libsean/compiler.h | 0 .../include/libsean/ios.h | 0 .../include/libserver/server.h | 0 .../include/libzip/libzip.h | 0 essentials/libfcm/Makefile | 11 ++ {Essentials => essentials}/libfcm/fcm.m | 0 {Essentials => essentials}/libfcm/fload.m | 0 {Essentials => essentials}/libfcm/proc.c | 0 .../libsean/Compiler/code.c | 0 .../libsean/Compiler/code.h | 0 .../libsean/Compiler/compiler.h | 0 .../libsean/Compiler/compiler.m | 0 essentials/libsean/Makefile | 10 ++ .../libsean/SOC/Bootloader/bootloader.h | 0 .../libsean/SOC/Bootloader/bootloader.m | 0 .../libsean/SOC/Bootloader/proc.c | 0 .../libsean/SOC/Bootloader/proc.h | 0 .../libsean/SOC/CPU/cpu.h | 0 .../libsean/SOC/CPU/cpu.m | 0 .../libsean/SOC/CPU/peripheral.h | 0 .../libsean/SOC/CPU/peripheral.m | 0 .../libsean/SOC/CPU/rdrand.c | 0 .../libsean/SOC/CPU/rdrand.h | 0 .../libsean/SOC/GPU/gpu.h | 0 .../libsean/SOC/GPU/gpu.m | 0 .../libsean/SOC/Peripherals/Display/Display.h | 0 .../libsean/SOC/Peripherals/Display/Display.m | 0 .../libsean/SOC/Peripherals/Mouse/Mouse.h | 0 .../libsean/SOC/Peripherals/Mouse/Mouse.m | 2 +- .../libsean/SOC/RAM/ram.c | 0 .../libsean/SOC/RAM/ram.h | 0 .../libsean/SOC/VFS/fs.h | 0 .../libsean/SOC/VFS/fs.m | 18 +-- .../libsean/SOC/VFS/mgr.m | 0 {Essentials => essentials}/libsean/Sean16.h | 0 .../libsean/kickstart.m | 0 .../libsean/libasmfile.c | 0 .../libsean/libasmfile.h | 0 essentials/libsean/libsean.m | 0 .../lib => essentials}/prebuild/libroot.a | Bin .../lib => essentials}/prebuild/libserver.a | Bin .../lib => essentials}/prebuild/libzip.a | Bin 63 files changed, 83 insertions(+), 107 deletions(-) create mode 100644 control create mode 100644 essentials/Makefile create mode 100644 essentials/control rename {Essentials => essentials}/include/libcheck/check.h (100%) rename {Essentials => essentials}/include/libdycall/dyexec.h (100%) rename {Essentials => essentials}/include/libfcm/fcm.h (100%) rename {Essentials => essentials}/include/libfcm/fload.h (100%) rename {Essentials => essentials}/include/libfcm/proc.h (100%) rename {Essentials => essentials}/include/libroot/libroot.h (100%) rename {Essentials => essentials}/include/libsean/Bootloader/bootloader.h (100%) rename {Essentials => essentials}/include/libsean/Bootloader/proc.h (100%) rename {Essentials => essentials}/include/libsean/CPU/cpu.h (100%) rename {Essentials => essentials}/include/libsean/CPU/peripheral.h (100%) rename {Essentials => essentials}/include/libsean/CPU/rdrand.h (100%) rename {Essentials => essentials}/include/libsean/GPU/gpu.h (100%) rename {Essentials => essentials}/include/libsean/Peripherals/Display/Display.h (100%) rename {Essentials => essentials}/include/libsean/Peripherals/Mouse/Mouse.h (100%) rename {Essentials => essentials}/include/libsean/RAM/ram.h (100%) rename {Essentials => essentials}/include/libsean/VFS/fs.h (100%) rename {Essentials => essentials}/include/libsean/compiler.h (100%) rename {Essentials => essentials}/include/libsean/ios.h (100%) rename {Essentials => essentials}/include/libserver/server.h (100%) rename {Essentials => essentials}/include/libzip/libzip.h (100%) create mode 100644 essentials/libfcm/Makefile rename {Essentials => essentials}/libfcm/fcm.m (100%) rename {Essentials => essentials}/libfcm/fload.m (100%) rename {Essentials => essentials}/libfcm/proc.c (100%) rename {Essentials => essentials}/libsean/Compiler/code.c (100%) rename {Essentials => essentials}/libsean/Compiler/code.h (100%) rename {Essentials => essentials}/libsean/Compiler/compiler.h (100%) rename {Essentials => essentials}/libsean/Compiler/compiler.m (100%) create mode 100644 essentials/libsean/Makefile rename {Essentials => essentials}/libsean/SOC/Bootloader/bootloader.h (100%) rename {Essentials => essentials}/libsean/SOC/Bootloader/bootloader.m (100%) rename {Essentials => essentials}/libsean/SOC/Bootloader/proc.c (100%) rename {Essentials => essentials}/libsean/SOC/Bootloader/proc.h (100%) rename {Essentials => essentials}/libsean/SOC/CPU/cpu.h (100%) rename {Essentials => essentials}/libsean/SOC/CPU/cpu.m (100%) rename {Essentials => essentials}/libsean/SOC/CPU/peripheral.h (100%) rename {Essentials => essentials}/libsean/SOC/CPU/peripheral.m (100%) rename {Essentials => essentials}/libsean/SOC/CPU/rdrand.c (100%) rename {Essentials => essentials}/libsean/SOC/CPU/rdrand.h (100%) rename {Essentials => essentials}/libsean/SOC/GPU/gpu.h (100%) rename {Essentials => essentials}/libsean/SOC/GPU/gpu.m (100%) rename {Essentials => essentials}/libsean/SOC/Peripherals/Display/Display.h (100%) rename {Essentials => essentials}/libsean/SOC/Peripherals/Display/Display.m (100%) rename {Essentials => essentials}/libsean/SOC/Peripherals/Mouse/Mouse.h (100%) rename {Essentials => essentials}/libsean/SOC/Peripherals/Mouse/Mouse.m (98%) rename {Essentials => essentials}/libsean/SOC/RAM/ram.c (100%) rename {Essentials => essentials}/libsean/SOC/RAM/ram.h (100%) rename {Essentials => essentials}/libsean/SOC/VFS/fs.h (100%) rename {Essentials => essentials}/libsean/SOC/VFS/fs.m (91%) rename {Essentials => essentials}/libsean/SOC/VFS/mgr.m (100%) rename {Essentials => essentials}/libsean/Sean16.h (100%) rename {Essentials => essentials}/libsean/kickstart.m (100%) rename {Essentials => essentials}/libsean/libasmfile.c (100%) rename {Essentials => essentials}/libsean/libasmfile.h (100%) create mode 100644 essentials/libsean/libsean.m rename {Essentials/lib => essentials}/prebuild/libroot.a (100%) rename {Essentials/lib => essentials}/prebuild/libserver.a (100%) rename {Essentials/lib => essentials}/prebuild/libzip.a (100%) diff --git a/.gitignore b/.gitignore index 4d6fbd0a..ca7d0de4 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ Essentials/libsean/libsean16.o Essentials/lib/build tmp SDK +*.theos +.vscode +packages \ No newline at end of file diff --git a/Makefile b/Makefile index 2500731e..02b860b7 100644 --- a/Makefile +++ b/Makefile @@ -1,105 +1,25 @@ -# Makefile -SDK_PATH = SDK -OUTPUT_DIR = Blueprint/FridaCodeManager.app -VERSION := 2.0 -BUILD_PATH := .package/ -SWIFT := $(shell find ./FCM/ -name '*.swift') +export TARGET = iphone:clang:latest:15.0 +INSTALL_TARGET_PROCESSES = FridaCodeManager -# Finding SHELL -ifeq ($(wildcard /bin/sh),) -ifeq ($(wildcard /var/jb/bin/sh),) -$(error "Neither /bin/sh nor /var/jb/bin/sh found.") -endif -SHELL := /var/jb/bin/sh -else -SHELL := /bin/sh -endif +export ARCHS = arm64 +export USE_DEPS = 1 -PLF := -LEssentials/lib/prebuild -LEssentials/lib/build -lzip -lsean #-lserver -lcheck +include $(THEOS)/makefiles/common.mk -# Targets -all: LF := -lroot -lfcm -all: ARCH := iphoneos-arm64 -all: JB_PATH := /var/jb/ -all: TARGET := jailbreak -all: greet compile_swift sign package_fs clean done +SUBPROJECTS += essentials +include $(THEOS_MAKE_PATH)/aggregate.mk -roothide: LF := -lroot -lfcm -roothide: ARCH := iphoneos-arm64e -roothide: JB_PATH := / -roothide: TARGET := jailbreak -roothide: greet compile_swift sign package_fs clean done +APPLICATION_NAME = FridaCodeManager -trollstore: LF := -lfcm -trollstore: TARGET := trollstore -trollstore: greet compile_swift sign makechain ipa clean done +FridaCodeManager_FILES = $(shell find ./FCM/ -name '*.swift') +FridaCodeManager_FRAMEWORKS = UIKit CoreGraphics CoreFoundation +FridaCodeManager_PRIVATE_FRAMEWORKS = MobileContainerManager +FridaCodeManager_LDFLAGS = -L$(THEOS_OBJ_DIR) -Lessentials/prebuild +FridaCodeManager_LIBRARIES = sean fcm essentials zip root -# under construction!!! -stock: LF := -lfcm -ldycall -stock: TARGET := stock -stock: greet compile_swift makechain_jailed ipa clean done +FridaCodeManager_SWIFTFLAGS = -Xcc -Iessentials/include -parse-as-library -import-objc-header FCM/bridge.h -Djailbreak -# Functions -greet: - @if [ ! -d tmp ]; then if [ ! -d SDK ]; then mkdir tmp; cd tmp; unzip ../FCM/UI/TabBar/Settings/SDKHub/sdk/iOS15.6.zip; mv iPhoneOS15.6.sdk ../SDK; cd ..; mv SDK/System/Library/PrivateFrameworks/MobileContainerManager.framework SDK/System/Library/Frameworks/MobileContainerManager.framework; rm -rf tmp; fi; fi; if [ ! -d Blueprint/FridaCodeManager.app/include ]; then cd Blueprint/FridaCodeManager.app; git clone https://github.com/theos/headers; mv headers include; fi - @echo "\nIts meant to be compiled on jailbroken iOS devices in terminal, compiling it using macos can cause certain anomalies with UI, etc\n " - @if [ ! -d "Product" ]; then mkdir Product; fi - -compile_swift: - @echo "\033[32mcompiling Essentials\033[0m" - @$(MAKE) -C Essentials all - @echo "\033[32mcompiling FridaCodeManager\033[0m" - @output=$$(swiftc -wmo -warnings-as-errors -Xlinker -lswiftCore -Xcc -IEssentials/include -D$(TARGET) -sdk $(SDK_PATH) $(SWIFT) $(PLF) $(LF) -o "$(OUTPUT_DIR)/swifty" -parse-as-library -import-objc-header FCM/bridge.h -framework MobileContainerManager -target arm64-apple-ios15.0 2>&1); \ - if [ $$? -ne 0 ]; then \ - echo "$$output" | grep -v "remark:"; \ - exit 1; \ - fi - @$(MAKE) -C Essentials clean - -#sign: linkfix -sign: - @echo "\033[32msigning FridaCodeManager $(Version)\033[0m" - @ldid -S./FCM/debug.xml $(OUTPUT_DIR)/swifty - -package_fs: - @echo "\033[32mpackaging FridaCodeManager\033[0m" - @find . -type f -name ".DS_Store" -delete - @-rm -rf $(BUILD_PATH) - @mkdir $(BUILD_PATH) - @mkdir -p $(BUILD_PATH)$(JB_PATH)Applications/FridaCodeManager.app - @find . -type f -name ".DS_Store" -delete - @cp -r Blueprint/FridaCodeManager.app/* $(BUILD_PATH)$(JB_PATH)Applications/FridaCodeManager.app - @mkdir -p $(BUILD_PATH)DEBIAN - @echo "Package: com.sparklechan.swifty\nName: FridaCodeManager\nVersion: $(VERSION)\nArchitecture: $(ARCH)\nDescription: Full fledged Xcode-like IDE for iOS\nDepends: swift, clang-14, ldid, git\nIcon: https://raw.githubusercontent.com/fridakitten/FridaCodeManager/main/Blueprint/FridaCodeManager.app/AppIcon.png\nConflicts: com.sparklechan.sparkkit\nMaintainer: FCCT\nAuthor: FCCT\nSection: Utilities\nTag: role::hacker" > $(BUILD_PATH)DEBIAN/control - @-rm -rf Product/* - @dpkg-deb -b $(BUILD_PATH) Product/FridaCodeManager.deb - -makechain: - @echo "\033[32mbuilding trollstore toolchain\033[0m" - @cd Chainmaker && bash build.sh - -makechain_jailed: - @echo "\033[32mbuilding trollstore toolchain\033[0m" - @cd Chainmaker && bash jailed.sh - -ipa: - @echo "\033[32mcreating .ipa\033[0m" - @-rm -rf Product/* - @mkdir -p Product/Payload/FridaCodeManager.app - @cp -r ./Blueprint/FridaCodeManager.app/* ./Product/Payload/FridaCodeManager.app - @mkdir Product/Payload/FridaCodeManager.app/toolchain - @cp -r Chainmaker/.tmp/toolchain/* Product/Payload/FridaCodeManager.app/toolchain - @cd Product && zip -rq FridaCodeManager.tipa ./Payload/* - @rm -rf Product/Payload - -#linkfix: -# @install_name_tool -add_rpath /var/jb/usr/lib/llvm-16/lib $(OUTPUT_DIR)/swifty -# @install_name_tool -add_rpath @loader_path $(OUTPUT_DIR)/swifty -# @install_name_tool -add_rpath @loader_path/toolchain/lib $(OUTPUT_DIR)/swifty - -clean: - @rm -rf $(OUTPUT_DIR)/swifty $(OUTPUT_DIR)/*.dylib .package - -done: - @echo "\033[32mall done! :)\033[0m" +before-all:: + echo $(THEOS_OBJ_DIR) +include $(THEOS_MAKE_PATH)/application.mk diff --git a/control b/control new file mode 100644 index 00000000..be7eeb88 --- /dev/null +++ b/control @@ -0,0 +1,12 @@ +Package: com.sparklechan.swifty +Name: FridaCodeManager +Version: 2.0 +Architecture: iphoneos-arm64e +Description: Full fledged Xcode-like IDE for iOS +Depends: swift, clang-14, ldid, git +Icon: https://raw.githubusercontent.com/fridakitten/FridaCodeManager/main/Blueprint/FridaCodeManager.app/AppIcon.png +Conflicts: com.sparklechan.sparkkit +Maintainer: FCCT +Author: FCCT +Section: Utilities +Tag: role::hacker \ No newline at end of file diff --git a/essentials/Makefile b/essentials/Makefile new file mode 100644 index 00000000..60b73b7b --- /dev/null +++ b/essentials/Makefile @@ -0,0 +1,11 @@ +include $(THEOS)/makefiles/common.mk + +LIBRARY_NAME = libessentials + +essentials_PUBLIC_HEADERS = $(shell find include -type f -name "*.h") +essentials_INSTALL_PATH = /usr/local/lib + +include $(THEOS_MAKE_PATH)/library.mk +SUBPROJECTS += libfcm +SUBPROJECTS += libsean +include $(THEOS_MAKE_PATH)/aggregate.mk diff --git a/essentials/control b/essentials/control new file mode 100644 index 00000000..7925c5e4 --- /dev/null +++ b/essentials/control @@ -0,0 +1,9 @@ +Package: com.yourcompany.essentials +Name: essentials +Version: 0.0.1 +Architecture: iphoneos-arm +Description: An awesome library of some sort!! +Maintainer: pi +Author: pi +Section: System +Tag: role::developer diff --git a/Essentials/include/libcheck/check.h b/essentials/include/libcheck/check.h similarity index 100% rename from Essentials/include/libcheck/check.h rename to essentials/include/libcheck/check.h diff --git a/Essentials/include/libdycall/dyexec.h b/essentials/include/libdycall/dyexec.h similarity index 100% rename from Essentials/include/libdycall/dyexec.h rename to essentials/include/libdycall/dyexec.h diff --git a/Essentials/include/libfcm/fcm.h b/essentials/include/libfcm/fcm.h similarity index 100% rename from Essentials/include/libfcm/fcm.h rename to essentials/include/libfcm/fcm.h diff --git a/Essentials/include/libfcm/fload.h b/essentials/include/libfcm/fload.h similarity index 100% rename from Essentials/include/libfcm/fload.h rename to essentials/include/libfcm/fload.h diff --git a/Essentials/include/libfcm/proc.h b/essentials/include/libfcm/proc.h similarity index 100% rename from Essentials/include/libfcm/proc.h rename to essentials/include/libfcm/proc.h diff --git a/Essentials/include/libroot/libroot.h b/essentials/include/libroot/libroot.h similarity index 100% rename from Essentials/include/libroot/libroot.h rename to essentials/include/libroot/libroot.h diff --git a/Essentials/include/libsean/Bootloader/bootloader.h b/essentials/include/libsean/Bootloader/bootloader.h similarity index 100% rename from Essentials/include/libsean/Bootloader/bootloader.h rename to essentials/include/libsean/Bootloader/bootloader.h diff --git a/Essentials/include/libsean/Bootloader/proc.h b/essentials/include/libsean/Bootloader/proc.h similarity index 100% rename from Essentials/include/libsean/Bootloader/proc.h rename to essentials/include/libsean/Bootloader/proc.h diff --git a/Essentials/include/libsean/CPU/cpu.h b/essentials/include/libsean/CPU/cpu.h similarity index 100% rename from Essentials/include/libsean/CPU/cpu.h rename to essentials/include/libsean/CPU/cpu.h diff --git a/Essentials/include/libsean/CPU/peripheral.h b/essentials/include/libsean/CPU/peripheral.h similarity index 100% rename from Essentials/include/libsean/CPU/peripheral.h rename to essentials/include/libsean/CPU/peripheral.h diff --git a/Essentials/include/libsean/CPU/rdrand.h b/essentials/include/libsean/CPU/rdrand.h similarity index 100% rename from Essentials/include/libsean/CPU/rdrand.h rename to essentials/include/libsean/CPU/rdrand.h diff --git a/Essentials/include/libsean/GPU/gpu.h b/essentials/include/libsean/GPU/gpu.h similarity index 100% rename from Essentials/include/libsean/GPU/gpu.h rename to essentials/include/libsean/GPU/gpu.h diff --git a/Essentials/include/libsean/Peripherals/Display/Display.h b/essentials/include/libsean/Peripherals/Display/Display.h similarity index 100% rename from Essentials/include/libsean/Peripherals/Display/Display.h rename to essentials/include/libsean/Peripherals/Display/Display.h diff --git a/Essentials/include/libsean/Peripherals/Mouse/Mouse.h b/essentials/include/libsean/Peripherals/Mouse/Mouse.h similarity index 100% rename from Essentials/include/libsean/Peripherals/Mouse/Mouse.h rename to essentials/include/libsean/Peripherals/Mouse/Mouse.h diff --git a/Essentials/include/libsean/RAM/ram.h b/essentials/include/libsean/RAM/ram.h similarity index 100% rename from Essentials/include/libsean/RAM/ram.h rename to essentials/include/libsean/RAM/ram.h diff --git a/Essentials/include/libsean/VFS/fs.h b/essentials/include/libsean/VFS/fs.h similarity index 100% rename from Essentials/include/libsean/VFS/fs.h rename to essentials/include/libsean/VFS/fs.h diff --git a/Essentials/include/libsean/compiler.h b/essentials/include/libsean/compiler.h similarity index 100% rename from Essentials/include/libsean/compiler.h rename to essentials/include/libsean/compiler.h diff --git a/Essentials/include/libsean/ios.h b/essentials/include/libsean/ios.h similarity index 100% rename from Essentials/include/libsean/ios.h rename to essentials/include/libsean/ios.h diff --git a/Essentials/include/libserver/server.h b/essentials/include/libserver/server.h similarity index 100% rename from Essentials/include/libserver/server.h rename to essentials/include/libserver/server.h diff --git a/Essentials/include/libzip/libzip.h b/essentials/include/libzip/libzip.h similarity index 100% rename from Essentials/include/libzip/libzip.h rename to essentials/include/libzip/libzip.h diff --git a/essentials/libfcm/Makefile b/essentials/libfcm/Makefile new file mode 100644 index 00000000..b3bbbef4 --- /dev/null +++ b/essentials/libfcm/Makefile @@ -0,0 +1,11 @@ +include $(THEOS)/makefiles/common.mk + +LIBRARY_NAME = libfcm + +libfcm_FILES = $(wildcard *.m) $(wildcard *.c) +libfcm_CFLAGS = -fobjc-arc +libfcm_INSTALL_PATH = /usr/local/lib +libfcm_PRIVATE_FRAMEWORKS = MobileContainerManager +libfcm_DYNAMIC_LIBRARY = 0 + +include $(THEOS_MAKE_PATH)/library.mk diff --git a/Essentials/libfcm/fcm.m b/essentials/libfcm/fcm.m similarity index 100% rename from Essentials/libfcm/fcm.m rename to essentials/libfcm/fcm.m diff --git a/Essentials/libfcm/fload.m b/essentials/libfcm/fload.m similarity index 100% rename from Essentials/libfcm/fload.m rename to essentials/libfcm/fload.m diff --git a/Essentials/libfcm/proc.c b/essentials/libfcm/proc.c similarity index 100% rename from Essentials/libfcm/proc.c rename to essentials/libfcm/proc.c diff --git a/Essentials/libsean/Compiler/code.c b/essentials/libsean/Compiler/code.c similarity index 100% rename from Essentials/libsean/Compiler/code.c rename to essentials/libsean/Compiler/code.c diff --git a/Essentials/libsean/Compiler/code.h b/essentials/libsean/Compiler/code.h similarity index 100% rename from Essentials/libsean/Compiler/code.h rename to essentials/libsean/Compiler/code.h diff --git a/Essentials/libsean/Compiler/compiler.h b/essentials/libsean/Compiler/compiler.h similarity index 100% rename from Essentials/libsean/Compiler/compiler.h rename to essentials/libsean/Compiler/compiler.h diff --git a/Essentials/libsean/Compiler/compiler.m b/essentials/libsean/Compiler/compiler.m similarity index 100% rename from Essentials/libsean/Compiler/compiler.m rename to essentials/libsean/Compiler/compiler.m diff --git a/essentials/libsean/Makefile b/essentials/libsean/Makefile new file mode 100644 index 00000000..aa95f34c --- /dev/null +++ b/essentials/libsean/Makefile @@ -0,0 +1,10 @@ +include $(THEOS)/makefiles/common.mk + +LIBRARY_NAME = libsean + +libsean_FILES = $(shell find . -type f -name "*.c") $(shell find . -type f -name "*.m") +libsean_CFLAGS = -fobjc-arc -ISOC -ICompiler +libsean_INSTALL_PATH = /usr/local/lib +libsean_DYNAMIC_LIBRARY = 0 + +include $(THEOS_MAKE_PATH)/library.mk diff --git a/Essentials/libsean/SOC/Bootloader/bootloader.h b/essentials/libsean/SOC/Bootloader/bootloader.h similarity index 100% rename from Essentials/libsean/SOC/Bootloader/bootloader.h rename to essentials/libsean/SOC/Bootloader/bootloader.h diff --git a/Essentials/libsean/SOC/Bootloader/bootloader.m b/essentials/libsean/SOC/Bootloader/bootloader.m similarity index 100% rename from Essentials/libsean/SOC/Bootloader/bootloader.m rename to essentials/libsean/SOC/Bootloader/bootloader.m diff --git a/Essentials/libsean/SOC/Bootloader/proc.c b/essentials/libsean/SOC/Bootloader/proc.c similarity index 100% rename from Essentials/libsean/SOC/Bootloader/proc.c rename to essentials/libsean/SOC/Bootloader/proc.c diff --git a/Essentials/libsean/SOC/Bootloader/proc.h b/essentials/libsean/SOC/Bootloader/proc.h similarity index 100% rename from Essentials/libsean/SOC/Bootloader/proc.h rename to essentials/libsean/SOC/Bootloader/proc.h diff --git a/Essentials/libsean/SOC/CPU/cpu.h b/essentials/libsean/SOC/CPU/cpu.h similarity index 100% rename from Essentials/libsean/SOC/CPU/cpu.h rename to essentials/libsean/SOC/CPU/cpu.h diff --git a/Essentials/libsean/SOC/CPU/cpu.m b/essentials/libsean/SOC/CPU/cpu.m similarity index 100% rename from Essentials/libsean/SOC/CPU/cpu.m rename to essentials/libsean/SOC/CPU/cpu.m diff --git a/Essentials/libsean/SOC/CPU/peripheral.h b/essentials/libsean/SOC/CPU/peripheral.h similarity index 100% rename from Essentials/libsean/SOC/CPU/peripheral.h rename to essentials/libsean/SOC/CPU/peripheral.h diff --git a/Essentials/libsean/SOC/CPU/peripheral.m b/essentials/libsean/SOC/CPU/peripheral.m similarity index 100% rename from Essentials/libsean/SOC/CPU/peripheral.m rename to essentials/libsean/SOC/CPU/peripheral.m diff --git a/Essentials/libsean/SOC/CPU/rdrand.c b/essentials/libsean/SOC/CPU/rdrand.c similarity index 100% rename from Essentials/libsean/SOC/CPU/rdrand.c rename to essentials/libsean/SOC/CPU/rdrand.c diff --git a/Essentials/libsean/SOC/CPU/rdrand.h b/essentials/libsean/SOC/CPU/rdrand.h similarity index 100% rename from Essentials/libsean/SOC/CPU/rdrand.h rename to essentials/libsean/SOC/CPU/rdrand.h diff --git a/Essentials/libsean/SOC/GPU/gpu.h b/essentials/libsean/SOC/GPU/gpu.h similarity index 100% rename from Essentials/libsean/SOC/GPU/gpu.h rename to essentials/libsean/SOC/GPU/gpu.h diff --git a/Essentials/libsean/SOC/GPU/gpu.m b/essentials/libsean/SOC/GPU/gpu.m similarity index 100% rename from Essentials/libsean/SOC/GPU/gpu.m rename to essentials/libsean/SOC/GPU/gpu.m diff --git a/Essentials/libsean/SOC/Peripherals/Display/Display.h b/essentials/libsean/SOC/Peripherals/Display/Display.h similarity index 100% rename from Essentials/libsean/SOC/Peripherals/Display/Display.h rename to essentials/libsean/SOC/Peripherals/Display/Display.h diff --git a/Essentials/libsean/SOC/Peripherals/Display/Display.m b/essentials/libsean/SOC/Peripherals/Display/Display.m similarity index 100% rename from Essentials/libsean/SOC/Peripherals/Display/Display.m rename to essentials/libsean/SOC/Peripherals/Display/Display.m diff --git a/Essentials/libsean/SOC/Peripherals/Mouse/Mouse.h b/essentials/libsean/SOC/Peripherals/Mouse/Mouse.h similarity index 100% rename from Essentials/libsean/SOC/Peripherals/Mouse/Mouse.h rename to essentials/libsean/SOC/Peripherals/Mouse/Mouse.h diff --git a/Essentials/libsean/SOC/Peripherals/Mouse/Mouse.m b/essentials/libsean/SOC/Peripherals/Mouse/Mouse.m similarity index 98% rename from Essentials/libsean/SOC/Peripherals/Mouse/Mouse.m rename to essentials/libsean/SOC/Peripherals/Mouse/Mouse.m index 9bb1fd2c..43d778fc 100644 --- a/Essentials/libsean/SOC/Peripherals/Mouse/Mouse.m +++ b/essentials/libsean/SOC/Peripherals/Mouse/Mouse.m @@ -104,7 +104,7 @@ - (void)updateTouchPosition:(CGPoint)location { if (touchTrackerInstance == nil) { CGRect screenSize = [[UIScreen mainScreen] bounds]; CGFloat screenWidth = screenSize.size.width; - CGFloat screenHeight = screenSize.size.height; + // CGFloat screenHeight = screenSize.size.height; touchTrackerInstance = [[TouchTracker alloc] initWithView:view scale:(screenWidth / 254.0)]; } diff --git a/Essentials/libsean/SOC/RAM/ram.c b/essentials/libsean/SOC/RAM/ram.c similarity index 100% rename from Essentials/libsean/SOC/RAM/ram.c rename to essentials/libsean/SOC/RAM/ram.c diff --git a/Essentials/libsean/SOC/RAM/ram.h b/essentials/libsean/SOC/RAM/ram.h similarity index 100% rename from Essentials/libsean/SOC/RAM/ram.h rename to essentials/libsean/SOC/RAM/ram.h diff --git a/Essentials/libsean/SOC/VFS/fs.h b/essentials/libsean/SOC/VFS/fs.h similarity index 100% rename from Essentials/libsean/SOC/VFS/fs.h rename to essentials/libsean/SOC/VFS/fs.h diff --git a/Essentials/libsean/SOC/VFS/fs.m b/essentials/libsean/SOC/VFS/fs.m similarity index 91% rename from Essentials/libsean/SOC/VFS/fs.m rename to essentials/libsean/SOC/VFS/fs.m index 502eaa8e..21ac06bb 100644 --- a/Essentials/libsean/SOC/VFS/fs.m +++ b/essentials/libsean/SOC/VFS/fs.m @@ -99,15 +99,15 @@ void vfs_delete_file(VFSDirectory *parentDir, NSString *fileName) { //NSLog(@"File '%@' not found.", fileName); } -void vfs_list_dir(VFSDirectory *dir) { - //NSLog(@"Listing directory: %@", dir.name); - for (VFSDirectory *subdir in dir.directories) { - //NSLog(@"[DIR] %@", subdir.name); - } - for (VFSFile *file in dir.files) { - //NSLog(@"[FILE] %@ (%lu bytes)", file.name, (unsigned long)file.size); - } -} +// void vfs_list_dir(VFSDirectory *dir) { +// //NSLog(@"Listing directory: %@", dir.name); +// for (VFSDirectory *subdir in dir.directories) { +// //NSLog(@"[DIR] %@", subdir.name); +// } +// for (VFSFile *file in dir.files) { +// //NSLog(@"[FILE] %@ (%lu bytes)", file.name, (unsigned long)file.size); +// } +// } NSData *vfs_read_file(VFSDirectory *parentDir, NSString *fileName) { for (VFSFile *file in parentDir.files) { diff --git a/Essentials/libsean/SOC/VFS/mgr.m b/essentials/libsean/SOC/VFS/mgr.m similarity index 100% rename from Essentials/libsean/SOC/VFS/mgr.m rename to essentials/libsean/SOC/VFS/mgr.m diff --git a/Essentials/libsean/Sean16.h b/essentials/libsean/Sean16.h similarity index 100% rename from Essentials/libsean/Sean16.h rename to essentials/libsean/Sean16.h diff --git a/Essentials/libsean/kickstart.m b/essentials/libsean/kickstart.m similarity index 100% rename from Essentials/libsean/kickstart.m rename to essentials/libsean/kickstart.m diff --git a/Essentials/libsean/libasmfile.c b/essentials/libsean/libasmfile.c similarity index 100% rename from Essentials/libsean/libasmfile.c rename to essentials/libsean/libasmfile.c diff --git a/Essentials/libsean/libasmfile.h b/essentials/libsean/libasmfile.h similarity index 100% rename from Essentials/libsean/libasmfile.h rename to essentials/libsean/libasmfile.h diff --git a/essentials/libsean/libsean.m b/essentials/libsean/libsean.m new file mode 100644 index 00000000..e69de29b diff --git a/Essentials/lib/prebuild/libroot.a b/essentials/prebuild/libroot.a similarity index 100% rename from Essentials/lib/prebuild/libroot.a rename to essentials/prebuild/libroot.a diff --git a/Essentials/lib/prebuild/libserver.a b/essentials/prebuild/libserver.a similarity index 100% rename from Essentials/lib/prebuild/libserver.a rename to essentials/prebuild/libserver.a diff --git a/Essentials/lib/prebuild/libzip.a b/essentials/prebuild/libzip.a similarity index 100% rename from Essentials/lib/prebuild/libzip.a rename to essentials/prebuild/libzip.a From 211b569374eb31d9c8a8d3217b409576b333c996 Mon Sep 17 00:00:00 2001 From: Pe13 Date: Tue, 1 Apr 2025 15:06:06 +0200 Subject: [PATCH 2/7] Maybe a better version but still get killed --- .gitignore | 4 +- Blueprint/FridaCodeManager.app/include | 2 +- Essentials/Makefile | 43 ++-------------- .../include/libcheck/check.h | 0 .../include/libdycall/dyexec.h | 0 .../include/libfcm/fcm.h | 0 .../include/libfcm/fload.h | 0 .../include/libfcm/proc.h | 0 .../include/libroot/libroot.h | 0 .../include/libsean/Bootloader/bootloader.h | 0 .../include/libsean/Bootloader/proc.h | 0 .../include/libsean/CPU/cpu.h | 0 .../include/libsean/CPU/peripheral.h | 0 .../include/libsean/CPU/rdrand.h | 0 .../include/libsean/GPU/gpu.h | 0 .../libsean/Peripherals/Display/Display.h | 0 .../include/libsean/Peripherals/Mouse/Mouse.h | 0 .../include/libsean/RAM/ram.h | 0 .../include/libsean/VFS/fs.h | 0 .../include/libsean/compiler.h | 0 .../include/libsean/ios.h | 0 .../include/libserver/server.h | 0 .../include/libzip/libzip.h | 0 Essentials/libfcm/Makefile | 46 +++--------------- {essentials => Essentials}/libfcm/fcm.m | 0 {essentials => Essentials}/libfcm/fload.m | 0 {essentials => Essentials}/libfcm/proc.c | 0 .../libsean/Compiler/code.c | 0 .../libsean/Compiler/code.h | 0 .../libsean/Compiler/compiler.h | 0 .../libsean/Compiler/compiler.m | 0 Essentials/libsean/Makefile | 44 +++-------------- .../libsean/SOC/Bootloader/bootloader.h | 0 .../libsean/SOC/Bootloader/bootloader.m | 0 .../libsean/SOC/Bootloader/proc.c | 0 .../libsean/SOC/Bootloader/proc.h | 0 .../libsean/SOC/CPU/cpu.h | 0 .../libsean/SOC/CPU/cpu.m | 0 .../libsean/SOC/CPU/peripheral.h | 0 .../libsean/SOC/CPU/peripheral.m | 0 .../libsean/SOC/CPU/rdrand.c | 0 .../libsean/SOC/CPU/rdrand.h | 0 .../libsean/SOC/GPU/gpu.h | 0 .../libsean/SOC/GPU/gpu.m | 0 .../libsean/SOC/Peripherals/Display/Display.h | 0 .../libsean/SOC/Peripherals/Display/Display.m | 0 .../libsean/SOC/Peripherals/Mouse/Mouse.h | 0 .../libsean/SOC/Peripherals/Mouse/Mouse.m | 0 .../libsean/SOC/RAM/ram.c | 0 .../libsean/SOC/RAM/ram.h | 0 .../libsean/SOC/VFS/fs.h | 0 .../libsean/SOC/VFS/fs.m | 0 .../libsean/SOC/VFS/mgr.m | 0 {essentials => Essentials}/libsean/Sean16.h | 0 .../libsean/kickstart.m | 0 .../libsean/libasmfile.c | 0 .../libsean/libasmfile.h | 0 {essentials => Essentials}/libsean/libsean.m | 0 {essentials => Essentials}/prebuild/libroot.a | Bin .../prebuild/libserver.a | Bin {essentials => Essentials}/prebuild/libzip.a | Bin Makefile | 31 +++++++++--- control | 13 +---- essentials/Makefile | 11 ----- essentials/control | 9 ---- essentials/libfcm/Makefile | 11 ----- essentials/libsean/Makefile | 10 ---- 67 files changed, 46 insertions(+), 178 deletions(-) rename {essentials => Essentials}/include/libcheck/check.h (100%) rename {essentials => Essentials}/include/libdycall/dyexec.h (100%) rename {essentials => Essentials}/include/libfcm/fcm.h (100%) rename {essentials => Essentials}/include/libfcm/fload.h (100%) rename {essentials => Essentials}/include/libfcm/proc.h (100%) rename {essentials => Essentials}/include/libroot/libroot.h (100%) rename {essentials => Essentials}/include/libsean/Bootloader/bootloader.h (100%) rename {essentials => Essentials}/include/libsean/Bootloader/proc.h (100%) rename {essentials => Essentials}/include/libsean/CPU/cpu.h (100%) rename {essentials => Essentials}/include/libsean/CPU/peripheral.h (100%) rename {essentials => Essentials}/include/libsean/CPU/rdrand.h (100%) rename {essentials => Essentials}/include/libsean/GPU/gpu.h (100%) rename {essentials => Essentials}/include/libsean/Peripherals/Display/Display.h (100%) rename {essentials => Essentials}/include/libsean/Peripherals/Mouse/Mouse.h (100%) rename {essentials => Essentials}/include/libsean/RAM/ram.h (100%) rename {essentials => Essentials}/include/libsean/VFS/fs.h (100%) rename {essentials => Essentials}/include/libsean/compiler.h (100%) rename {essentials => Essentials}/include/libsean/ios.h (100%) rename {essentials => Essentials}/include/libserver/server.h (100%) rename {essentials => Essentials}/include/libzip/libzip.h (100%) rename {essentials => Essentials}/libfcm/fcm.m (100%) rename {essentials => Essentials}/libfcm/fload.m (100%) rename {essentials => Essentials}/libfcm/proc.c (100%) rename {essentials => Essentials}/libsean/Compiler/code.c (100%) rename {essentials => Essentials}/libsean/Compiler/code.h (100%) rename {essentials => Essentials}/libsean/Compiler/compiler.h (100%) rename {essentials => Essentials}/libsean/Compiler/compiler.m (100%) rename {essentials => Essentials}/libsean/SOC/Bootloader/bootloader.h (100%) rename {essentials => Essentials}/libsean/SOC/Bootloader/bootloader.m (100%) rename {essentials => Essentials}/libsean/SOC/Bootloader/proc.c (100%) rename {essentials => Essentials}/libsean/SOC/Bootloader/proc.h (100%) rename {essentials => Essentials}/libsean/SOC/CPU/cpu.h (100%) rename {essentials => Essentials}/libsean/SOC/CPU/cpu.m (100%) rename {essentials => Essentials}/libsean/SOC/CPU/peripheral.h (100%) rename {essentials => Essentials}/libsean/SOC/CPU/peripheral.m (100%) rename {essentials => Essentials}/libsean/SOC/CPU/rdrand.c (100%) rename {essentials => Essentials}/libsean/SOC/CPU/rdrand.h (100%) rename {essentials => Essentials}/libsean/SOC/GPU/gpu.h (100%) rename {essentials => Essentials}/libsean/SOC/GPU/gpu.m (100%) rename {essentials => Essentials}/libsean/SOC/Peripherals/Display/Display.h (100%) rename {essentials => Essentials}/libsean/SOC/Peripherals/Display/Display.m (100%) rename {essentials => Essentials}/libsean/SOC/Peripherals/Mouse/Mouse.h (100%) rename {essentials => Essentials}/libsean/SOC/Peripherals/Mouse/Mouse.m (100%) rename {essentials => Essentials}/libsean/SOC/RAM/ram.c (100%) rename {essentials => Essentials}/libsean/SOC/RAM/ram.h (100%) rename {essentials => Essentials}/libsean/SOC/VFS/fs.h (100%) rename {essentials => Essentials}/libsean/SOC/VFS/fs.m (100%) rename {essentials => Essentials}/libsean/SOC/VFS/mgr.m (100%) rename {essentials => Essentials}/libsean/Sean16.h (100%) rename {essentials => Essentials}/libsean/kickstart.m (100%) rename {essentials => Essentials}/libsean/libasmfile.c (100%) rename {essentials => Essentials}/libsean/libasmfile.h (100%) rename {essentials => Essentials}/libsean/libsean.m (100%) rename {essentials => Essentials}/prebuild/libroot.a (100%) rename {essentials => Essentials}/prebuild/libserver.a (100%) rename {essentials => Essentials}/prebuild/libzip.a (100%) delete mode 100644 essentials/Makefile delete mode 100644 essentials/control delete mode 100644 essentials/libfcm/Makefile delete mode 100644 essentials/libsean/Makefile diff --git a/.gitignore b/.gitignore index ca7d0de4..08e7e63f 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,6 @@ tmp SDK *.theos .vscode -packages \ No newline at end of file +packages +compile_commands.json +control \ No newline at end of file diff --git a/Blueprint/FridaCodeManager.app/include b/Blueprint/FridaCodeManager.app/include index 5ff7d77c..af3fd498 160000 --- a/Blueprint/FridaCodeManager.app/include +++ b/Blueprint/FridaCodeManager.app/include @@ -1 +1 @@ -Subproject commit 5ff7d77c115b40212ee642d413b2b078ab253628 +Subproject commit af3fd498606fea35d6c4ed83d66beffa3a902a42 diff --git a/Essentials/Makefile b/Essentials/Makefile index 4a97e061..eef07d94 100644 --- a/Essentials/Makefile +++ b/Essentials/Makefile @@ -1,40 +1,5 @@ -# Makefile -# -# Compile all FridaCodeManager essentials -# :3 -# +include $(THEOS)/makefiles/common.mk -SHELL := /var/jb/bin/bash - -all: prepare libfcm-compile libdycall-compile libsean-compile #libcheck-compile - -prepare: - @if [ -d lib/build ]; then \ - rm -rf lib/build; \ - mkdir lib/build; \ - else \ - mkdir lib/build; \ - fi - -libfcm-compile: - @$(MAKE) -C libfcm all - @cp libfcm/tmp/lib/libfcm.a lib/build/libfcm.a - @$(MAKE) -C libfcm clean - -libsean-compile: - @$(MAKE) -C libsean all - @cp libsean/tmp/lib/libsean.a lib/build/libsean.a - @$(MAKE) -C libsean clean - -libdycall-compile: - @$(MAKE) -C libdycall all - @cp libdycall/tmp/lib/libdycall.a lib/build/libdycall.a - @$(MAKE) -C libdycall clean - -libcheck-compile: - @$(MAKE) -C libcheck all - @cp libcheck/tmp/lib/libcheck.a lib/build/libcheck.a - @$(MAKE) -C libcheck clean - -clean: - @rm -rf lib/build +SUBPROJECTS += libfcm +SUBPROJECTS += libsean +include $(THEOS_MAKE_PATH)/aggregate.mk diff --git a/essentials/include/libcheck/check.h b/Essentials/include/libcheck/check.h similarity index 100% rename from essentials/include/libcheck/check.h rename to Essentials/include/libcheck/check.h diff --git a/essentials/include/libdycall/dyexec.h b/Essentials/include/libdycall/dyexec.h similarity index 100% rename from essentials/include/libdycall/dyexec.h rename to Essentials/include/libdycall/dyexec.h diff --git a/essentials/include/libfcm/fcm.h b/Essentials/include/libfcm/fcm.h similarity index 100% rename from essentials/include/libfcm/fcm.h rename to Essentials/include/libfcm/fcm.h diff --git a/essentials/include/libfcm/fload.h b/Essentials/include/libfcm/fload.h similarity index 100% rename from essentials/include/libfcm/fload.h rename to Essentials/include/libfcm/fload.h diff --git a/essentials/include/libfcm/proc.h b/Essentials/include/libfcm/proc.h similarity index 100% rename from essentials/include/libfcm/proc.h rename to Essentials/include/libfcm/proc.h diff --git a/essentials/include/libroot/libroot.h b/Essentials/include/libroot/libroot.h similarity index 100% rename from essentials/include/libroot/libroot.h rename to Essentials/include/libroot/libroot.h diff --git a/essentials/include/libsean/Bootloader/bootloader.h b/Essentials/include/libsean/Bootloader/bootloader.h similarity index 100% rename from essentials/include/libsean/Bootloader/bootloader.h rename to Essentials/include/libsean/Bootloader/bootloader.h diff --git a/essentials/include/libsean/Bootloader/proc.h b/Essentials/include/libsean/Bootloader/proc.h similarity index 100% rename from essentials/include/libsean/Bootloader/proc.h rename to Essentials/include/libsean/Bootloader/proc.h diff --git a/essentials/include/libsean/CPU/cpu.h b/Essentials/include/libsean/CPU/cpu.h similarity index 100% rename from essentials/include/libsean/CPU/cpu.h rename to Essentials/include/libsean/CPU/cpu.h diff --git a/essentials/include/libsean/CPU/peripheral.h b/Essentials/include/libsean/CPU/peripheral.h similarity index 100% rename from essentials/include/libsean/CPU/peripheral.h rename to Essentials/include/libsean/CPU/peripheral.h diff --git a/essentials/include/libsean/CPU/rdrand.h b/Essentials/include/libsean/CPU/rdrand.h similarity index 100% rename from essentials/include/libsean/CPU/rdrand.h rename to Essentials/include/libsean/CPU/rdrand.h diff --git a/essentials/include/libsean/GPU/gpu.h b/Essentials/include/libsean/GPU/gpu.h similarity index 100% rename from essentials/include/libsean/GPU/gpu.h rename to Essentials/include/libsean/GPU/gpu.h diff --git a/essentials/include/libsean/Peripherals/Display/Display.h b/Essentials/include/libsean/Peripherals/Display/Display.h similarity index 100% rename from essentials/include/libsean/Peripherals/Display/Display.h rename to Essentials/include/libsean/Peripherals/Display/Display.h diff --git a/essentials/include/libsean/Peripherals/Mouse/Mouse.h b/Essentials/include/libsean/Peripherals/Mouse/Mouse.h similarity index 100% rename from essentials/include/libsean/Peripherals/Mouse/Mouse.h rename to Essentials/include/libsean/Peripherals/Mouse/Mouse.h diff --git a/essentials/include/libsean/RAM/ram.h b/Essentials/include/libsean/RAM/ram.h similarity index 100% rename from essentials/include/libsean/RAM/ram.h rename to Essentials/include/libsean/RAM/ram.h diff --git a/essentials/include/libsean/VFS/fs.h b/Essentials/include/libsean/VFS/fs.h similarity index 100% rename from essentials/include/libsean/VFS/fs.h rename to Essentials/include/libsean/VFS/fs.h diff --git a/essentials/include/libsean/compiler.h b/Essentials/include/libsean/compiler.h similarity index 100% rename from essentials/include/libsean/compiler.h rename to Essentials/include/libsean/compiler.h diff --git a/essentials/include/libsean/ios.h b/Essentials/include/libsean/ios.h similarity index 100% rename from essentials/include/libsean/ios.h rename to Essentials/include/libsean/ios.h diff --git a/essentials/include/libserver/server.h b/Essentials/include/libserver/server.h similarity index 100% rename from essentials/include/libserver/server.h rename to Essentials/include/libserver/server.h diff --git a/essentials/include/libzip/libzip.h b/Essentials/include/libzip/libzip.h similarity index 100% rename from essentials/include/libzip/libzip.h rename to Essentials/include/libzip/libzip.h diff --git a/Essentials/libfcm/Makefile b/Essentials/libfcm/Makefile index fa7d1e55..c63119c4 100644 --- a/Essentials/libfcm/Makefile +++ b/Essentials/libfcm/Makefile @@ -1,42 +1,10 @@ -# Makefile -# -# libfcm -# Meow :3 -# Created by SeanIsNotAConstant on October the 12th 2024 -# +include $(THEOS)/makefiles/common.mk -# config -SHELL := /var/jb/bin/sh -SDKROOT := ./sdk -CC := clang -CF := -target arm64-apple-ios15 -arch arm64 +LIBRARY_NAME = libfcm +libfcm_INSTALL = 0 -# finding all C and Objective-C files -CFILES := $(shell find . -name "*.c") -MFILES := $(shell find . -name '*.m') +libfcm_FILES = $(wildcard *.m) $(wildcard *.c) +libfcm_CFLAGS = -fobjc-arc +libfcm_PRIVATE_FRAMEWORKS = MobileContainerManager -# compiling them to libsean16 -# fishy patch -uuid := uuid - -all: compile bind - -compile: - @if [ -d tmp ]; then \ - rm -rf tmp; \ - mkdir tmp tmp/out tmp/lib; \ - else \ - mkdir tmp tmp/out tmp/lib; \ - fi - @for file in $(CFILES); do \ - $(CC) -isysroot $(SDKROOT) $(CF) -c $$file -o "tmp/out/$$($(uuid)).o"; \ - done - @for file in $(MFILES); do \ - $(CC) -isysroot $(SDKROOT) $(CF) -c $$file -o "tmp/out/$$($(uuid)).o"; \ - done - -bind: - @ar rcs tmp/lib/libfcm.a tmp/out/*.o - -clean: - @rm -rf tmp +include $(THEOS_MAKE_PATH)/library.mk diff --git a/essentials/libfcm/fcm.m b/Essentials/libfcm/fcm.m similarity index 100% rename from essentials/libfcm/fcm.m rename to Essentials/libfcm/fcm.m diff --git a/essentials/libfcm/fload.m b/Essentials/libfcm/fload.m similarity index 100% rename from essentials/libfcm/fload.m rename to Essentials/libfcm/fload.m diff --git a/essentials/libfcm/proc.c b/Essentials/libfcm/proc.c similarity index 100% rename from essentials/libfcm/proc.c rename to Essentials/libfcm/proc.c diff --git a/essentials/libsean/Compiler/code.c b/Essentials/libsean/Compiler/code.c similarity index 100% rename from essentials/libsean/Compiler/code.c rename to Essentials/libsean/Compiler/code.c diff --git a/essentials/libsean/Compiler/code.h b/Essentials/libsean/Compiler/code.h similarity index 100% rename from essentials/libsean/Compiler/code.h rename to Essentials/libsean/Compiler/code.h diff --git a/essentials/libsean/Compiler/compiler.h b/Essentials/libsean/Compiler/compiler.h similarity index 100% rename from essentials/libsean/Compiler/compiler.h rename to Essentials/libsean/Compiler/compiler.h diff --git a/essentials/libsean/Compiler/compiler.m b/Essentials/libsean/Compiler/compiler.m similarity index 100% rename from essentials/libsean/Compiler/compiler.m rename to Essentials/libsean/Compiler/compiler.m diff --git a/Essentials/libsean/Makefile b/Essentials/libsean/Makefile index 77019420..5fe0fa4e 100644 --- a/Essentials/libsean/Makefile +++ b/Essentials/libsean/Makefile @@ -1,42 +1,10 @@ -# Makefile -# -# Sean16 SOC for iOS -# Meow :3 -# Created by SeanIsNotAConstant on October the 12th 2024 -# +include $(THEOS)/makefiles/common.mk -# config -SHELL := /var/jb/bin/sh -SDKROOT := ./sdk -CC := clang -CF := -target arm64-apple-ios15 -arch arm64 -ISOC -ICompiler +LIBRARY_NAME = libsean -# finding all C and Objective-C files -CFILES := $(shell find . -name "*.c") -MFILES := $(shell find . -name '*.m') +libsean_INSTALL = 0 -# compiling them to libsean16 -# fishy patch -uuid := uuid +libsean_FILES = $(shell find . -type f -name "*.c") $(shell find . -type f -name "*.m") +libsean_CFLAGS = -fobjc-arc -ISOC -ICompiler -all: compile bind - -compile: - @if [ -d tmp ]; then \ - rm -rf tmp; \ - mkdir tmp tmp/out tmp/lib; \ - else \ - mkdir tmp tmp/out tmp/lib; \ - fi - @for file in $(CFILES); do \ - $(CC) -isysroot $(SDKROOT) $(CF) -ISOC -c $$file -o "tmp/out/$$($(uuid)).o"; \ - done - @for file in $(MFILES); do \ - $(CC) -isysroot $(SDKROOT) $(CF) -ISOC -c $$file -o "tmp/out/$$($(uuid)).o"; \ - done - -bind: - @ar rcs tmp/lib/libsean.a tmp/out/*.o - -clean: - @rm -rf tmp +include $(THEOS_MAKE_PATH)/library.mk diff --git a/essentials/libsean/SOC/Bootloader/bootloader.h b/Essentials/libsean/SOC/Bootloader/bootloader.h similarity index 100% rename from essentials/libsean/SOC/Bootloader/bootloader.h rename to Essentials/libsean/SOC/Bootloader/bootloader.h diff --git a/essentials/libsean/SOC/Bootloader/bootloader.m b/Essentials/libsean/SOC/Bootloader/bootloader.m similarity index 100% rename from essentials/libsean/SOC/Bootloader/bootloader.m rename to Essentials/libsean/SOC/Bootloader/bootloader.m diff --git a/essentials/libsean/SOC/Bootloader/proc.c b/Essentials/libsean/SOC/Bootloader/proc.c similarity index 100% rename from essentials/libsean/SOC/Bootloader/proc.c rename to Essentials/libsean/SOC/Bootloader/proc.c diff --git a/essentials/libsean/SOC/Bootloader/proc.h b/Essentials/libsean/SOC/Bootloader/proc.h similarity index 100% rename from essentials/libsean/SOC/Bootloader/proc.h rename to Essentials/libsean/SOC/Bootloader/proc.h diff --git a/essentials/libsean/SOC/CPU/cpu.h b/Essentials/libsean/SOC/CPU/cpu.h similarity index 100% rename from essentials/libsean/SOC/CPU/cpu.h rename to Essentials/libsean/SOC/CPU/cpu.h diff --git a/essentials/libsean/SOC/CPU/cpu.m b/Essentials/libsean/SOC/CPU/cpu.m similarity index 100% rename from essentials/libsean/SOC/CPU/cpu.m rename to Essentials/libsean/SOC/CPU/cpu.m diff --git a/essentials/libsean/SOC/CPU/peripheral.h b/Essentials/libsean/SOC/CPU/peripheral.h similarity index 100% rename from essentials/libsean/SOC/CPU/peripheral.h rename to Essentials/libsean/SOC/CPU/peripheral.h diff --git a/essentials/libsean/SOC/CPU/peripheral.m b/Essentials/libsean/SOC/CPU/peripheral.m similarity index 100% rename from essentials/libsean/SOC/CPU/peripheral.m rename to Essentials/libsean/SOC/CPU/peripheral.m diff --git a/essentials/libsean/SOC/CPU/rdrand.c b/Essentials/libsean/SOC/CPU/rdrand.c similarity index 100% rename from essentials/libsean/SOC/CPU/rdrand.c rename to Essentials/libsean/SOC/CPU/rdrand.c diff --git a/essentials/libsean/SOC/CPU/rdrand.h b/Essentials/libsean/SOC/CPU/rdrand.h similarity index 100% rename from essentials/libsean/SOC/CPU/rdrand.h rename to Essentials/libsean/SOC/CPU/rdrand.h diff --git a/essentials/libsean/SOC/GPU/gpu.h b/Essentials/libsean/SOC/GPU/gpu.h similarity index 100% rename from essentials/libsean/SOC/GPU/gpu.h rename to Essentials/libsean/SOC/GPU/gpu.h diff --git a/essentials/libsean/SOC/GPU/gpu.m b/Essentials/libsean/SOC/GPU/gpu.m similarity index 100% rename from essentials/libsean/SOC/GPU/gpu.m rename to Essentials/libsean/SOC/GPU/gpu.m diff --git a/essentials/libsean/SOC/Peripherals/Display/Display.h b/Essentials/libsean/SOC/Peripherals/Display/Display.h similarity index 100% rename from essentials/libsean/SOC/Peripherals/Display/Display.h rename to Essentials/libsean/SOC/Peripherals/Display/Display.h diff --git a/essentials/libsean/SOC/Peripherals/Display/Display.m b/Essentials/libsean/SOC/Peripherals/Display/Display.m similarity index 100% rename from essentials/libsean/SOC/Peripherals/Display/Display.m rename to Essentials/libsean/SOC/Peripherals/Display/Display.m diff --git a/essentials/libsean/SOC/Peripherals/Mouse/Mouse.h b/Essentials/libsean/SOC/Peripherals/Mouse/Mouse.h similarity index 100% rename from essentials/libsean/SOC/Peripherals/Mouse/Mouse.h rename to Essentials/libsean/SOC/Peripherals/Mouse/Mouse.h diff --git a/essentials/libsean/SOC/Peripherals/Mouse/Mouse.m b/Essentials/libsean/SOC/Peripherals/Mouse/Mouse.m similarity index 100% rename from essentials/libsean/SOC/Peripherals/Mouse/Mouse.m rename to Essentials/libsean/SOC/Peripherals/Mouse/Mouse.m diff --git a/essentials/libsean/SOC/RAM/ram.c b/Essentials/libsean/SOC/RAM/ram.c similarity index 100% rename from essentials/libsean/SOC/RAM/ram.c rename to Essentials/libsean/SOC/RAM/ram.c diff --git a/essentials/libsean/SOC/RAM/ram.h b/Essentials/libsean/SOC/RAM/ram.h similarity index 100% rename from essentials/libsean/SOC/RAM/ram.h rename to Essentials/libsean/SOC/RAM/ram.h diff --git a/essentials/libsean/SOC/VFS/fs.h b/Essentials/libsean/SOC/VFS/fs.h similarity index 100% rename from essentials/libsean/SOC/VFS/fs.h rename to Essentials/libsean/SOC/VFS/fs.h diff --git a/essentials/libsean/SOC/VFS/fs.m b/Essentials/libsean/SOC/VFS/fs.m similarity index 100% rename from essentials/libsean/SOC/VFS/fs.m rename to Essentials/libsean/SOC/VFS/fs.m diff --git a/essentials/libsean/SOC/VFS/mgr.m b/Essentials/libsean/SOC/VFS/mgr.m similarity index 100% rename from essentials/libsean/SOC/VFS/mgr.m rename to Essentials/libsean/SOC/VFS/mgr.m diff --git a/essentials/libsean/Sean16.h b/Essentials/libsean/Sean16.h similarity index 100% rename from essentials/libsean/Sean16.h rename to Essentials/libsean/Sean16.h diff --git a/essentials/libsean/kickstart.m b/Essentials/libsean/kickstart.m similarity index 100% rename from essentials/libsean/kickstart.m rename to Essentials/libsean/kickstart.m diff --git a/essentials/libsean/libasmfile.c b/Essentials/libsean/libasmfile.c similarity index 100% rename from essentials/libsean/libasmfile.c rename to Essentials/libsean/libasmfile.c diff --git a/essentials/libsean/libasmfile.h b/Essentials/libsean/libasmfile.h similarity index 100% rename from essentials/libsean/libasmfile.h rename to Essentials/libsean/libasmfile.h diff --git a/essentials/libsean/libsean.m b/Essentials/libsean/libsean.m similarity index 100% rename from essentials/libsean/libsean.m rename to Essentials/libsean/libsean.m diff --git a/essentials/prebuild/libroot.a b/Essentials/prebuild/libroot.a similarity index 100% rename from essentials/prebuild/libroot.a rename to Essentials/prebuild/libroot.a diff --git a/essentials/prebuild/libserver.a b/Essentials/prebuild/libserver.a similarity index 100% rename from essentials/prebuild/libserver.a rename to Essentials/prebuild/libserver.a diff --git a/essentials/prebuild/libzip.a b/Essentials/prebuild/libzip.a similarity index 100% rename from essentials/prebuild/libzip.a rename to Essentials/prebuild/libzip.a diff --git a/Makefile b/Makefile index 02b860b7..5d291800 100644 --- a/Makefile +++ b/Makefile @@ -1,25 +1,42 @@ export TARGET = iphone:clang:latest:15.0 INSTALL_TARGET_PROCESSES = FridaCodeManager +export THEOS_PACKAGE_SCHEME = roothide +GO_EASY_ON_ME = 1 + +VERSION = 2.0 export ARCHS = arm64 -export USE_DEPS = 1 +export THEOS_LINKAGE_TYPE = static +TARGET_CODESIGN_FLAGS = -SFCM/debug.xml include $(THEOS)/makefiles/common.mk -SUBPROJECTS += essentials +SUBPROJECTS += Essentials include $(THEOS_MAKE_PATH)/aggregate.mk APPLICATION_NAME = FridaCodeManager FridaCodeManager_FILES = $(shell find ./FCM/ -name '*.swift') + +FridaCodeManager_SWIFT_BRIDGING_HEADER = FCM/bridge.h FridaCodeManager_FRAMEWORKS = UIKit CoreGraphics CoreFoundation FridaCodeManager_PRIVATE_FRAMEWORKS = MobileContainerManager -FridaCodeManager_LDFLAGS = -L$(THEOS_OBJ_DIR) -Lessentials/prebuild -FridaCodeManager_LIBRARIES = sean fcm essentials zip root -FridaCodeManager_SWIFTFLAGS = -Xcc -Iessentials/include -parse-as-library -import-objc-header FCM/bridge.h -Djailbreak +FridaCodeManager_LDFLAGS = -L$(THEOS_OBJ_DIR) -LEssentials/prebuild +FridaCodeManager_LIBRARIES = sean fcm zip root swiftCore + +FridaCodeManager_SWIFTFLAGS = -Xcc -IEssentials/include -parse-as-library -Djailbreak + +FridaCodeManager_BUNDLE_RESOURCE_DIRS = Blueprint/FridaCodeManager.app + +before-stage:: + @if [ ! -d $(FridaCodeManager_BUNDLE_RESOURCE_DIRS)/include ]; then \ + cd $(FridaCodeManager_BUNDLE_RESOURCE_DIRS); \ + git clone --depth=1 https://github.com/theos/headers; \ + mv headers include; \ + fi -before-all:: - echo $(THEOS_OBJ_DIR) +before-package:: + @echo "Package: com.sparklechan.fridacodemanager\nName: FridaCodeManager\nVersion: $(VERSION)\nDescription: Full fledged Xcode-like IDE for iOS\nDepends: swift, clang-14, ldid, git\nIcon: https://raw.githubusercontent.com/fridakitten/FridaCodeManager/main/Blueprint/FridaCodeManager.app/AppIcon.png\nConflicts: com.sparklechan.sparkkit\nMaintainer: FCCT\nAuthor: FCCT\nSection: Utilities\nTag: role::hacker" > control include $(THEOS_MAKE_PATH)/application.mk diff --git a/control b/control index be7eeb88..12a3d231 100644 --- a/control +++ b/control @@ -1,12 +1 @@ -Package: com.sparklechan.swifty -Name: FridaCodeManager -Version: 2.0 -Architecture: iphoneos-arm64e -Description: Full fledged Xcode-like IDE for iOS -Depends: swift, clang-14, ldid, git -Icon: https://raw.githubusercontent.com/fridakitten/FridaCodeManager/main/Blueprint/FridaCodeManager.app/AppIcon.png -Conflicts: com.sparklechan.sparkkit -Maintainer: FCCT -Author: FCCT -Section: Utilities -Tag: role::hacker \ No newline at end of file +Package: com.sparklechan.fridacodemanager\nName: FridaCodeManager\nVersion: 2.0\nDescription: Full fledged Xcode-like IDE for iOS\nDepends: swift, clang-14, ldid, git\nIcon: https://raw.githubusercontent.com/fridakitten/FridaCodeManager/main/Blueprint/FridaCodeManager.app/AppIcon.png\nConflicts: com.sparklechan.sparkkit\nMaintainer: FCCT\nAuthor: FCCT\nSection: Utilities\nTag: role::hacker diff --git a/essentials/Makefile b/essentials/Makefile deleted file mode 100644 index 60b73b7b..00000000 --- a/essentials/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include $(THEOS)/makefiles/common.mk - -LIBRARY_NAME = libessentials - -essentials_PUBLIC_HEADERS = $(shell find include -type f -name "*.h") -essentials_INSTALL_PATH = /usr/local/lib - -include $(THEOS_MAKE_PATH)/library.mk -SUBPROJECTS += libfcm -SUBPROJECTS += libsean -include $(THEOS_MAKE_PATH)/aggregate.mk diff --git a/essentials/control b/essentials/control deleted file mode 100644 index 7925c5e4..00000000 --- a/essentials/control +++ /dev/null @@ -1,9 +0,0 @@ -Package: com.yourcompany.essentials -Name: essentials -Version: 0.0.1 -Architecture: iphoneos-arm -Description: An awesome library of some sort!! -Maintainer: pi -Author: pi -Section: System -Tag: role::developer diff --git a/essentials/libfcm/Makefile b/essentials/libfcm/Makefile deleted file mode 100644 index b3bbbef4..00000000 --- a/essentials/libfcm/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include $(THEOS)/makefiles/common.mk - -LIBRARY_NAME = libfcm - -libfcm_FILES = $(wildcard *.m) $(wildcard *.c) -libfcm_CFLAGS = -fobjc-arc -libfcm_INSTALL_PATH = /usr/local/lib -libfcm_PRIVATE_FRAMEWORKS = MobileContainerManager -libfcm_DYNAMIC_LIBRARY = 0 - -include $(THEOS_MAKE_PATH)/library.mk diff --git a/essentials/libsean/Makefile b/essentials/libsean/Makefile deleted file mode 100644 index aa95f34c..00000000 --- a/essentials/libsean/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -include $(THEOS)/makefiles/common.mk - -LIBRARY_NAME = libsean - -libsean_FILES = $(shell find . -type f -name "*.c") $(shell find . -type f -name "*.m") -libsean_CFLAGS = -fobjc-arc -ISOC -ICompiler -libsean_INSTALL_PATH = /usr/local/lib -libsean_DYNAMIC_LIBRARY = 0 - -include $(THEOS_MAKE_PATH)/library.mk From 75f9e6f24e0714ce2f5ced298c6afc58fac26d89 Mon Sep 17 00:00:00 2001 From: paolo Date: Thu, 3 Apr 2025 15:52:28 +0200 Subject: [PATCH 3/7] Better control --- Makefile | 12 +++++++++++- control | 1 - 2 files changed, 11 insertions(+), 2 deletions(-) delete mode 100644 control diff --git a/Makefile b/Makefile index 5d291800..8135d42c 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,16 @@ before-stage:: fi before-package:: - @echo "Package: com.sparklechan.fridacodemanager\nName: FridaCodeManager\nVersion: $(VERSION)\nDescription: Full fledged Xcode-like IDE for iOS\nDepends: swift, clang-14, ldid, git\nIcon: https://raw.githubusercontent.com/fridakitten/FridaCodeManager/main/Blueprint/FridaCodeManager.app/AppIcon.png\nConflicts: com.sparklechan.sparkkit\nMaintainer: FCCT\nAuthor: FCCT\nSection: Utilities\nTag: role::hacker" > control + @echo "Package: com.sparklechan.fridacodemanager" > control + @echo "Name: FridaCodeManager" >> control + @echo "Version: $(VERSION)" >> control + @echo "Description: Full fledged Xcode-like IDE for iOS" >> control + @echo "Depends: swift, clang-14, ldid, git" >> control + @echo "Icon: https://raw.githubusercontent.com/fridakitten/FridaCodeManager/main/Blueprint/FridaCodeManager.app/AppIcon.png" >> control + @echo "Conflicts: com.sparklechan.sparkkit" >> control + @echo "Maintainer: FCCT" >> control + @echo "Author: FCCT" >> control + @echo "Section: Utilities" >> control + @echo "Tag: role::hacker" >> control include $(THEOS_MAKE_PATH)/application.mk diff --git a/control b/control deleted file mode 100644 index 12a3d231..00000000 --- a/control +++ /dev/null @@ -1 +0,0 @@ -Package: com.sparklechan.fridacodemanager\nName: FridaCodeManager\nVersion: 2.0\nDescription: Full fledged Xcode-like IDE for iOS\nDepends: swift, clang-14, ldid, git\nIcon: https://raw.githubusercontent.com/fridakitten/FridaCodeManager/main/Blueprint/FridaCodeManager.app/AppIcon.png\nConflicts: com.sparklechan.sparkkit\nMaintainer: FCCT\nAuthor: FCCT\nSection: Utilities\nTag: role::hacker From 272dd19b3396933baa478860ca6b7600083aec5f Mon Sep 17 00:00:00 2001 From: paolo Date: Thu, 3 Apr 2025 16:13:03 +0200 Subject: [PATCH 4/7] Maybe multiplatform --- Essentials/Makefile | 37 ++++++++++ Essentials/libfcm/Makefile | 43 +++++++++++ Essentials/libsean/Makefile | 46 ++++++++++++ Makefile | 137 +++++++++++++++++++++++++++++++++++- 4 files changed, 261 insertions(+), 2 deletions(-) diff --git a/Essentials/Makefile b/Essentials/Makefile index eef07d94..8a46c6a1 100644 --- a/Essentials/Makefile +++ b/Essentials/Makefile @@ -1,5 +1,42 @@ +# Makefile +# +# Compile all FridaCodeManager essentials +# :3 +# + +ifeq (LINUX, 1) + include $(THEOS)/makefiles/common.mk SUBPROJECTS += libfcm SUBPROJECTS += libsean include $(THEOS_MAKE_PATH)/aggregate.mk + +else # ifeq (LINUX, 0) + +export SDKROOT := sdk + +export CC := clang +export CF := -target arm64-apple-ios15 -arch arm64 -I$(ROOTDIR)/include + +export COBJ_DIR := tmp/out/c +export MOBJ_DIR := tmp/out/m + +# fishy patch +export uuid := uuid + +all: libfcm-compile libdycall-compile libsean-compile #libcheck-compile + +prepare: + @rm -rf lib/build + @mkdir -p lib/build + +%-compile: prepare + @$(MAKE) -C $* all || $(MAKE) -C $* clean + @cp $*/tmp/lib/$*.a lib/build/$*.a + @$(MAKE) -C $* clean + +clean: + @rm -rf lib/build + +endif \ No newline at end of file diff --git a/Essentials/libfcm/Makefile b/Essentials/libfcm/Makefile index c63119c4..5e873a1e 100644 --- a/Essentials/libfcm/Makefile +++ b/Essentials/libfcm/Makefile @@ -1,3 +1,12 @@ +# Makefile +# +# libfcm +# Meow :3 +# Created by SeanIsNotAConstant on October the 12th 2024 +# + +ifeq (LINUX, 1) + include $(THEOS)/makefiles/common.mk LIBRARY_NAME = libfcm @@ -8,3 +17,37 @@ libfcm_CFLAGS = -fobjc-arc libfcm_PRIVATE_FRAMEWORKS = MobileContainerManager include $(THEOS_MAKE_PATH)/library.mk + +else # ifeq (LINUX, 0) + +# finding all C and Objective-C files +CFILES := $(shell find . -name "*.c") +MFILES := $(shell find . -name '*.m') + +# listing all compiled objects +OBJS := $(patsubst %.c,$(COBJ_DIR)/%.o,$(CFILES)) $(patsubst %.m,$(MOBJ_DIR)/%.o,$(MFILES)) + +# compiling them to libsean16 + +all: setup bind + +$(COBJ_DIR)/%.o: %.c setup + @mkdir -p $(dir $@) + @$(CC) -isysroot $(SDKROOT) $(CF) -ISOC -c $< -o $@ + +$(MOBJ_DIR)/%.o: %.m setup + @mkdir -p $(dir $@) + @$(CC) -isysroot $(SDKROOT) $(CF) -ISOC -c $< -o $@ + +setup: + @rm -rf tmp + @mkdir -p $(COBJ_DIR) $(MOBJ_DIR) + @mkdir -p tmp/lib + +bind: setup $(OBJS) + @ar rcs tmp/lib/libfcm.a $(OBJS) + +clean: + @rm -rf tmp + +endif \ No newline at end of file diff --git a/Essentials/libsean/Makefile b/Essentials/libsean/Makefile index 5fe0fa4e..73e88e49 100644 --- a/Essentials/libsean/Makefile +++ b/Essentials/libsean/Makefile @@ -1,3 +1,12 @@ +# Makefile +# +# Sean16 SOC for iOS +# Meow :3 +# Created by SeanIsNotAConstant on October the 12th 2024 +# + +ifeq (LINUX, 1) + include $(THEOS)/makefiles/common.mk LIBRARY_NAME = libsean @@ -8,3 +17,40 @@ libsean_FILES = $(shell find . -type f -name "*.c") $(shell find . -type f -name libsean_CFLAGS = -fobjc-arc -ISOC -ICompiler include $(THEOS_MAKE_PATH)/library.mk + +else # ifeq (LINUX, 0) + +# config +CF := $(CF) -ISOC -ICompiler + +# finding all C and Objective-C files +CFILES := $(shell find . -name "*.c") +MFILES := $(shell find . -name "*.m") + +# listing all compiled objects +OBJS := $(patsubst %.c,$(COBJ_DIR)/%.o,$(CFILES)) $(patsubst %.m,$(MOBJ_DIR)/%.o,$(MFILES)) + +# compiling them to libsean16 + +all: setup bind + +$(COBJ_DIR)/%.o: %.c setup + @mkdir -p $(dir $@) + @$(CC) -isysroot $(SDKROOT) $(CF) -ISOC -c $< -o $@ + +$(MOBJ_DIR)/%.o: %.m setup + @mkdir -p $(dir $@) + @$(CC) -isysroot $(SDKROOT) $(CF) -ISOC -c $< -o $@ + +setup: + @rm -rf tmp + @mkdir -p $(COBJ_DIR) $(MOBJ_DIR) + @mkdir -p tmp/lib + +bind: setup $(OBJS) + @ar rcs tmp/lib/libsean.a $(OBJS) + +clean: + @rm -rf tmp + +endif \ No newline at end of file diff --git a/Makefile b/Makefile index 8135d42c..a3d58b2a 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,16 @@ +ifeq ($(shell uname -s),Linux) +export LINUX = 1 +endif + +VERSION = 2.0 + +ifeq (LINUX, 1) + export TARGET = iphone:clang:latest:15.0 INSTALL_TARGET_PROCESSES = FridaCodeManager export THEOS_PACKAGE_SCHEME = roothide GO_EASY_ON_ME = 1 -VERSION = 2.0 - export ARCHS = arm64 export THEOS_LINKAGE_TYPE = static TARGET_CODESIGN_FLAGS = -SFCM/debug.xml @@ -50,3 +56,130 @@ before-package:: @echo "Tag: role::hacker" >> control include $(THEOS_MAKE_PATH)/application.mk + +else # ifeq (LINUX, 0) + +export ROOTDIR = $(shell pwd) +export SDK_PATH = $(ROOTDIR)/SDK +export OUTPUT_DIR = $(ROOTDIR)/Blueprint/FridaCodeManager.app +BUILD_PATH := .package/ +SWIFT := $(shell find ./FCM/ -name '*.swift') + +# Finding SHELL +ifeq ($(wildcard /bin/sh),) +ifeq ($(wildcard /var/jb/bin/sh),) +$(error "Neither /bin/sh nor /var/jb/bin/sh found.") +endif +SHELL := /var/jb/bin/sh +else +SHELL := /bin/sh +endif + +export SHELL + +PLF := -LEssentials/lib/prebuild -LEssentials/lib/build -lzip -lsean #-lserver -lcheck + +# Targets +all: LF := -lroot -lfcm +all: ARCH := iphoneos-arm64 +all: JB_PATH := /var/jb/ +all: TARGET := jailbreak +all: greet compile_swift sign package_fs clean done + +roothide: LF := -lroot -lfcm +roothide: ARCH := iphoneos-arm64e +roothide: JB_PATH := / +roothide: TARGET := jailbreak +roothide: greet compile_swift sign package_fs clean done + +trollstore: LF := -lfcm +trollstore: TARGET := trollstore +trollstore: greet compile_swift sign makechain ipa clean done + +# under construction!!! +stock: LF := -lfcm -ldycall +stock: TARGET := stock +stock: greet compile_swift makechain_jailed ipa clean done + +get_sdk: + @if [ ! -d SDK ]; then \ + mkdir -p tmp; \ + cd tmp; \ + unzip ../FCM/UI/TabBar/Settings/SDKHub/sdk/iOS15.6.zip; \ + mv iPhoneOS15.6.sdk ../SDK; \ + cd ../SDK; \ + mv System/Library/PrivateFrameworks/MobileContainerManager.framework System/Library/Frameworks/MobileContainerManager.framework; \ + rm -rf tmp; \ + fi + @if [ ! -d $(OUTPUT_DIR)/include ]; then \ + cd $(OUTPUT_DIR); \ + git clone https://github.com/theos/headers; \ + mv headers include; \ + fi + +greet: + @echo "\nIts meant to be compiled on jailbroken iOS devices in terminal, compiling it using macos can cause certain anomalies with UI, etc\n " + @#echo "PATH = $(PATH)" + @if [ ! -d "Product" ]; then mkdir Product; fi + +compile_swift: greet get_sdk + @echo "\033[32mcompiling Essentials\033[0m" + @$(MAKE) -C Essentials all + @echo "\033[32mcompiling FridaCodeManager\033[0m" + @output=$$(swiftc -wmo -warnings-as-errors -Xlinker -lswiftCore -Xcc -IEssentials/include -D$(TARGET) -sdk $(SDK_PATH) $(SWIFT) $(PLF) $(LF) -o "$(OUTPUT_DIR)/swifty" -parse-as-library -import-objc-header FCM/bridge.h -I$(OUTPUT_DIR)/include -framework MobileContainerManager -target arm64-apple-ios15.0 2>&1); \ + if [ $$? -ne 0 ]; then \ + echo "$$output" | grep -v "remark:"; \ + exit 1; \ + fi + @$(MAKE) -C Essentials clean + +sign: compile_swift + @echo "\033[32msigning FridaCodeManager $(Version)\033[0m" + @ldid -S./FCM/debug.xml $(OUTPUT_DIR)/swifty + +package_fs: sign + @echo "\033[32mpackaging FridaCodeManager\033[0m" + @find . -type f -name ".DS_Store" -delete + @-rm -rf $(BUILD_PATH) + @mkdir $(BUILD_PATH) + @mkdir -p $(BUILD_PATH)$(JB_PATH)Applications/FridaCodeManager.app + @find . -type f -name ".DS_Store" -delete + @cp -r Blueprint/FridaCodeManager.app/* $(BUILD_PATH)$(JB_PATH)Applications/FridaCodeManager.app + @mkdir -p $(BUILD_PATH)DEBIAN + @echo "Package: com.sparklechan.swifty\nName: FridaCodeManager\nVersion: $(VERSION)\nArchitecture: $(ARCH)\nDescription: Full fledged Xcode-like IDE for iOS\nDepends: swift, clang-14, ldid, git\nIcon: https://raw.githubusercontent.com/fridakitten/FridaCodeManager/main/Blueprint/FridaCodeManager.app/AppIcon.png\nConflicts: com.sparklechan.sparkkit\nMaintainer: FCCT\nAuthor: FCCT\nSection: Utilities\nTag: role::hacker" > $(BUILD_PATH)DEBIAN/control + @-rm -rf Product/* + @dpkg-deb -b $(BUILD_PATH) Product/FridaCodeManager.deb + +makechain: + @echo "\033[32mbuilding trollstore toolchain\033[0m" + @cd Chainmaker && bash build.sh + +makechain_jailed: + @echo "\033[32mbuilding trollstore toolchain\033[0m" + @cd Chainmaker && bash jailed.sh + +ipa: + @echo "\033[32mcreating .ipa\033[0m" + @-rm -rf Product/* + @mkdir -p Product/Payload/FridaCodeManager.app + @cp -r ./Blueprint/FridaCodeManager.app/* ./Product/Payload/FridaCodeManager.app + @mkdir Product/Payload/FridaCodeManager.app/toolchain + @cp -r Chainmaker/.tmp/toolchain/* Product/Payload/FridaCodeManager.app/toolchain + @cd Product && zip -rq FridaCodeManager.tipa ./Payload/* + @rm -rf Product/Payload + +#linkfix: +# @install_name_tool -add_rpath /var/jb/usr/lib/llvm-16/lib $(OUTPUT_DIR)/swifty +# @install_name_tool -add_rpath @loader_path $(OUTPUT_DIR)/swifty +# @install_name_tool -add_rpath @loader_path/toolchain/lib $(OUTPUT_DIR)/swifty + +clean: package_fs + @rm -rf $(OUTPUT_DIR)/swifty $(OUTPUT_DIR)/*.dylib .package + +extreme-clean: + rm -rf SDK $(OUTPUT_DIR)/include + +done: clean + @echo "\033[32mall done! :)\033[0m" + +endif \ No newline at end of file From b038e979c72aa908bbe6af14418c11e2f842e617 Mon Sep 17 00:00:00 2001 From: paolo Date: Fri, 4 Apr 2025 12:21:52 +0200 Subject: [PATCH 5/7] Merge theos-rebase changes --- .gitignore | 3 ++- Essentials/Makefile | 4 ++-- Essentials/{ => lib}/prebuild/libroot.a | Bin Essentials/{ => lib}/prebuild/libserver.a | Bin Essentials/{ => lib}/prebuild/libzip.a | Bin Essentials/libfcm/Makefile | 4 ++-- Essentials/libsean/Makefile | 4 ++-- .../TabBar/ProjectManagement/MacroManager.swift | 2 +- FCM/UI/TabBar/ProjectManagement/Project.swift | 4 ++-- FCM/UI/UINeoEditor.swift | 3 ++- Makefile | 14 ++++++++------ 11 files changed, 21 insertions(+), 17 deletions(-) rename Essentials/{ => lib}/prebuild/libroot.a (100%) rename Essentials/{ => lib}/prebuild/libserver.a (100%) rename Essentials/{ => lib}/prebuild/libzip.a (100%) diff --git a/.gitignore b/.gitignore index 08e7e63f..3d46bc1a 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ SDK .vscode packages compile_commands.json -control \ No newline at end of file +control +FridaCodeManager.o \ No newline at end of file diff --git a/Essentials/Makefile b/Essentials/Makefile index 8a46c6a1..b32fcf7e 100644 --- a/Essentials/Makefile +++ b/Essentials/Makefile @@ -4,7 +4,7 @@ # :3 # -ifeq (LINUX, 1) +ifeq ($(LINUX), 1) include $(THEOS)/makefiles/common.mk @@ -12,7 +12,7 @@ SUBPROJECTS += libfcm SUBPROJECTS += libsean include $(THEOS_MAKE_PATH)/aggregate.mk -else # ifeq (LINUX, 0) +else # ifeq ($(LINUX), 0) export SDKROOT := sdk diff --git a/Essentials/prebuild/libroot.a b/Essentials/lib/prebuild/libroot.a similarity index 100% rename from Essentials/prebuild/libroot.a rename to Essentials/lib/prebuild/libroot.a diff --git a/Essentials/prebuild/libserver.a b/Essentials/lib/prebuild/libserver.a similarity index 100% rename from Essentials/prebuild/libserver.a rename to Essentials/lib/prebuild/libserver.a diff --git a/Essentials/prebuild/libzip.a b/Essentials/lib/prebuild/libzip.a similarity index 100% rename from Essentials/prebuild/libzip.a rename to Essentials/lib/prebuild/libzip.a diff --git a/Essentials/libfcm/Makefile b/Essentials/libfcm/Makefile index 5e873a1e..11ecd969 100644 --- a/Essentials/libfcm/Makefile +++ b/Essentials/libfcm/Makefile @@ -5,7 +5,7 @@ # Created by SeanIsNotAConstant on October the 12th 2024 # -ifeq (LINUX, 1) +ifeq ($(LINUX), 1) include $(THEOS)/makefiles/common.mk @@ -18,7 +18,7 @@ libfcm_PRIVATE_FRAMEWORKS = MobileContainerManager include $(THEOS_MAKE_PATH)/library.mk -else # ifeq (LINUX, 0) +else # ifeq ($(LINUX), 0) # finding all C and Objective-C files CFILES := $(shell find . -name "*.c") diff --git a/Essentials/libsean/Makefile b/Essentials/libsean/Makefile index 73e88e49..a87684f3 100644 --- a/Essentials/libsean/Makefile +++ b/Essentials/libsean/Makefile @@ -5,7 +5,7 @@ # Created by SeanIsNotAConstant on October the 12th 2024 # -ifeq (LINUX, 1) +ifeq ($(LINUX), 1) include $(THEOS)/makefiles/common.mk @@ -18,7 +18,7 @@ libsean_CFLAGS = -fobjc-arc -ISOC -ICompiler include $(THEOS_MAKE_PATH)/library.mk -else # ifeq (LINUX, 0) +else # ifeq ($(LINUX), 0) # config CF := $(CF) -ISOC -ICompiler diff --git a/FCM/UI/TabBar/ProjectManagement/MacroManager.swift b/FCM/UI/TabBar/ProjectManagement/MacroManager.swift index d8f43d7c..cf6e4686 100644 --- a/FCM/UI/TabBar/ProjectManagement/MacroManager.swift +++ b/FCM/UI/TabBar/ProjectManagement/MacroManager.swift @@ -21,7 +21,7 @@ class MacroManager { func addMacro(_ macroName: String) { var macroDict = plistData["Macro"] as? [String: Any] ?? [:] - macroDict[macroName] = [:] + macroDict[macroName] = [:] as [String: Any] plistData["Macro"] = macroDict } diff --git a/FCM/UI/TabBar/ProjectManagement/Project.swift b/FCM/UI/TabBar/ProjectManagement/Project.swift index 3a583e86..c4d94c7f 100644 --- a/FCM/UI/TabBar/ProjectManagement/Project.swift +++ b/FCM/UI/TabBar/ProjectManagement/Project.swift @@ -103,8 +103,8 @@ func MakeApplicationProject(_ Name: String, _ BundleID: String, type: Int) -> In "TYPE": TYPE, "CMacro": "stable", "Macro": [ - "stable": [:], - "debug": [:], + "stable": [:] as [String: Any], + "debug": [:] as [String: Any], ] ] diff --git a/FCM/UI/UINeoEditor.swift b/FCM/UI/UINeoEditor.swift index c137e85f..c377a8d2 100644 --- a/FCM/UI/UINeoEditor.swift +++ b/FCM/UI/UINeoEditor.swift @@ -1302,7 +1302,8 @@ extension UserDefaults { } func color(forKey key: String) -> UIColor { if let colorData = self.data(forKey: key), - let color = try? NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(colorData) as? UIColor { + // let color = try? NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(colorData) as? UIColor + let color = try? NSKeyedUnarchiver.unarchivedObject(ofClasses: [UIColor.self], from: colorData) as? UIColor { return color } return UIColor.clear diff --git a/Makefile b/Makefile index a3d58b2a..01b1fefa 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ endif VERSION = 2.0 -ifeq (LINUX, 1) +ifeq ($(LINUX),1) export TARGET = iphone:clang:latest:15.0 INSTALL_TARGET_PROCESSES = FridaCodeManager @@ -28,7 +28,7 @@ FridaCodeManager_SWIFT_BRIDGING_HEADER = FCM/bridge.h FridaCodeManager_FRAMEWORKS = UIKit CoreGraphics CoreFoundation FridaCodeManager_PRIVATE_FRAMEWORKS = MobileContainerManager -FridaCodeManager_LDFLAGS = -L$(THEOS_OBJ_DIR) -LEssentials/prebuild +FridaCodeManager_LDFLAGS = -L$(THEOS_OBJ_DIR) -LEssentials/lib/prebuild FridaCodeManager_LIBRARIES = sean fcm zip root swiftCore FridaCodeManager_SWIFTFLAGS = -Xcc -IEssentials/include -parse-as-library -Djailbreak @@ -43,7 +43,7 @@ before-stage:: fi before-package:: - @echo "Package: com.sparklechan.fridacodemanager" > control + @echo "Package: com.sparklechan.swifty" > control @echo "Name: FridaCodeManager" >> control @echo "Version: $(VERSION)" >> control @echo "Description: Full fledged Xcode-like IDE for iOS" >> control @@ -57,7 +57,7 @@ before-package:: include $(THEOS_MAKE_PATH)/application.mk -else # ifeq (LINUX, 0) +else # ifeq ($(LINUX), 0) export ROOTDIR = $(shell pwd) export SDK_PATH = $(ROOTDIR)/SDK @@ -77,6 +77,8 @@ endif export SHELL +export SHELL + PLF := -LEssentials/lib/prebuild -LEssentials/lib/build -lzip -lsean #-lserver -lcheck # Targets @@ -105,8 +107,8 @@ get_sdk: @if [ ! -d SDK ]; then \ mkdir -p tmp; \ cd tmp; \ - unzip ../FCM/UI/TabBar/Settings/SDKHub/sdk/iOS15.6.zip; \ - mv iPhoneOS15.6.sdk ../SDK; \ + unzip ../FCM/UI/TabBar/Settings/SDKHub/sdk/iOS16.5.zip; \ + mv iPhoneOS16.5.sdk ../SDK; \ cd ../SDK; \ mv System/Library/PrivateFrameworks/MobileContainerManager.framework System/Library/Frameworks/MobileContainerManager.framework; \ rm -rf tmp; \ From 826659b149b8faa6a13b82c184c11b2f9ba9873b Mon Sep 17 00:00:00 2001 From: Pe13 Date: Sun, 6 Apr 2025 23:31:31 +0200 Subject: [PATCH 6/7] Fix CFBundleExecutable --- Blueprint/FridaCodeManager.app/Info.plist | 352 +++++++++++----------- 1 file changed, 176 insertions(+), 176 deletions(-) diff --git a/Blueprint/FridaCodeManager.app/Info.plist b/Blueprint/FridaCodeManager.app/Info.plist index 4292e574..8aade1ee 100644 --- a/Blueprint/FridaCodeManager.app/Info.plist +++ b/Blueprint/FridaCodeManager.app/Info.plist @@ -1,179 +1,179 @@ - - CFBundleDevelopmentRegion - en - CFBundleDocumentTypes - - - CFBundleTypeName - FCM Project - CFBundleTypeRole - Viewer - LSHandlerRank - Owner - LSItemContentTypes - - com.sparklechan.swifty.sproj - - - - CFBundleExecutable - swifty - CFBundleIconFile - AppIcon.png - CFBundleIdentifier - com.sparklechan.swifty - CFBundleName - FCM - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleSupportedPlatforms - - iPhoneOS - - CFBundleVersion - 2.0 - LSRequiresIPhoneOS - - MinimumOSVersion - 15.0 - UILaunchImageFile - LaunchImage - UILaunchImages - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - LaunchImage-800-Portrait-736h - UILaunchImageOrientation - Portrait - UILaunchImageSize - {414, 736} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - LaunchImage-800-Landscape-736h - UILaunchImageOrientation - Landscape - UILaunchImageSize - {414, 736} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - LaunchImage-800-667h - UILaunchImageOrientation - Portrait - UILaunchImageSize - {375, 667} - - - UILaunchImageMinimumOSVersion - 7.0 - UILaunchImageName - LaunchImage-700 - UILaunchImageOrientation - Portrait - UILaunchImageSize - {320, 480} - - - UILaunchImageMinimumOSVersion - 7.0 - UILaunchImageName - LaunchImage-700-568h - UILaunchImageOrientation - Portrait - UILaunchImageSize - {320, 568} - - - UILaunchImageMinimumOSVersion - 7.0 - UILaunchImageName - LaunchImage-700-Portrait - UILaunchImageOrientation - Portrait - UILaunchImageSize - {768, 1024} - - - UILaunchImageMinimumOSVersion - 7.0 - UILaunchImageName - LaunchImage-700-Landscape - UILaunchImageOrientation - Landscape - UILaunchImageSize - {768, 1024} - - - UILaunchStoryboardName - Launch Screen - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UTExportedTypeDeclarations - - - UTTypeConformsTo - - public.data - - UTTypeDescription - FCM Project - UTTypeIdentifier - com.sparklechan.swifty.sproj - UTTypeTagSpecification - - public.filename-extension - - sproj - - public.mime-type - application/octet-stream - - - - UTImportedTypeDeclarations - - - CFBundleTypeRole - Editor - UTTypeConformsTo - - public.data - - UTTypeDescription - FCM Project - UTTypeIdentifier - com.sparklechan.swifty.sproj - UTTypeTagSpecification - - public.filename-extension - - sproj - - public.mime-type - application/octet-stream - - - - - + + CFBundleDevelopmentRegion + en + CFBundleDocumentTypes + + + CFBundleTypeName + FCM Project + CFBundleTypeRole + Viewer + LSHandlerRank + Owner + LSItemContentTypes + + com.sparklechan.swifty.sproj + + + + CFBundleExecutable + FridaCodeManager + CFBundleIconFile + AppIcon.png + CFBundleIdentifier + com.sparklechan.swifty + CFBundleName + FCM + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + iPhoneOS + + CFBundleVersion + 2.0 + LSRequiresIPhoneOS + + MinimumOSVersion + 15.0 + UILaunchImageFile + LaunchImage + UILaunchImages + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + LaunchImage-800-Portrait-736h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + LaunchImage-800-Landscape-736h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + LaunchImage-800-667h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 7.0 + UILaunchImageName + LaunchImage-700 + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 7.0 + UILaunchImageName + LaunchImage-700-568h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 7.0 + UILaunchImageName + LaunchImage-700-Portrait + UILaunchImageOrientation + Portrait + UILaunchImageSize + {768, 1024} + + + UILaunchImageMinimumOSVersion + 7.0 + UILaunchImageName + LaunchImage-700-Landscape + UILaunchImageOrientation + Landscape + UILaunchImageSize + {768, 1024} + + + UILaunchStoryboardName + Launch Screen + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UTExportedTypeDeclarations + + + UTTypeConformsTo + + public.data + + UTTypeDescription + FCM Project + UTTypeIdentifier + com.sparklechan.swifty.sproj + UTTypeTagSpecification + + public.filename-extension + + sproj + + public.mime-type + application/octet-stream + + + + UTImportedTypeDeclarations + + + CFBundleTypeRole + Editor + UTTypeConformsTo + + public.data + + UTTypeDescription + FCM Project + UTTypeIdentifier + com.sparklechan.swifty.sproj + UTTypeTagSpecification + + public.filename-extension + + sproj + + public.mime-type + application/octet-stream + + + + + \ No newline at end of file From ca25ba2b2df3b7955f3f863cf7f7ded9016309b3 Mon Sep 17 00:00:00 2001 From: Pe13 Date: Mon, 7 Apr 2025 00:37:43 +0200 Subject: [PATCH 7/7] Fix build on iOS removine unused libdycall --- Essentials/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/Makefile b/Essentials/Makefile index b32fcf7e..bc15dda8 100644 --- a/Essentials/Makefile +++ b/Essentials/Makefile @@ -25,7 +25,7 @@ export MOBJ_DIR := tmp/out/m # fishy patch export uuid := uuid -all: libfcm-compile libdycall-compile libsean-compile #libcheck-compile +all: libfcm-compile libsean-compile #libcheck-compile prepare: @rm -rf lib/build