2022-10-12 04:57:08 +08:00
|
|
|
TOPTARGETS := all clean
|
|
|
|
|
2023-11-27 22:49:54 +08:00
|
|
|
$(TOPTARGETS): pre_build make_fastPathSign make_roothelper make_trollstore make_trollhelper_embedded make_trollhelper_package assemble_trollstore build_installer15 build_installer64e
|
2022-10-12 04:57:08 +08:00
|
|
|
|
2022-11-06 06:32:44 +08:00
|
|
|
pre_build:
|
2022-10-12 04:57:08 +08:00
|
|
|
@rm -rf ./_build 2>/dev/null || true
|
|
|
|
@mkdir -p ./_build
|
|
|
|
|
2023-11-27 03:43:30 +08:00
|
|
|
make_fastPathSign:
|
|
|
|
@$(MAKE) -C ./Exploits/fastPathSign $(MAKECMDGOALS)
|
2023-11-27 00:43:01 +08:00
|
|
|
|
2022-10-12 04:57:08 +08:00
|
|
|
make_roothelper:
|
|
|
|
@$(MAKE) -C ./RootHelper FINALPACKAGE=1 $(MAKECMDGOALS)
|
|
|
|
|
|
|
|
make_trollstore:
|
|
|
|
@$(MAKE) -C ./TrollStore FINALPACKAGE=1 $(MAKECMDGOALS)
|
|
|
|
|
|
|
|
ifneq ($(MAKECMDGOALS),clean)
|
|
|
|
|
|
|
|
make_trollhelper_package:
|
|
|
|
@$(MAKE) clean -C ./TrollHelper
|
|
|
|
@cp ./RootHelper/.theos/obj/trollstorehelper ./TrollHelper/Resources/trollstorehelper
|
|
|
|
@$(MAKE) -C ./TrollHelper FINALPACKAGE=1 package $(MAKECMDGOALS)
|
2023-11-28 03:46:33 +08:00
|
|
|
@$(MAKE) clean -C ./TrollHelper
|
|
|
|
@$(MAKE) -C ./TrollHelper THEOS_PACKAGE_SCHEME=rootless FINALPACKAGE=1 package $(MAKECMDGOALS)
|
2022-10-12 04:57:08 +08:00
|
|
|
@rm ./TrollHelper/Resources/trollstorehelper
|
|
|
|
|
|
|
|
make_trollhelper_embedded:
|
|
|
|
@$(MAKE) clean -C ./TrollHelper
|
|
|
|
@$(MAKE) -C ./TrollHelper FINALPACKAGE=1 EMBEDDED_ROOT_HELPER=1 $(MAKECMDGOALS)
|
2023-11-27 22:49:54 +08:00
|
|
|
@cp ./TrollHelper/.theos/obj/TrollStorePersistenceHelper.app/TrollStorePersistenceHelper ./_build/PersistenceHelper_Embedded
|
|
|
|
@$(MAKE) clean -C ./TrollHelper
|
|
|
|
@$(MAKE) -C ./TrollHelper FINALPACKAGE=1 EMBEDDED_ROOT_HELPER=1 LEGACY_CT_BUG=1 $(MAKECMDGOALS)
|
2023-11-27 23:30:34 +08:00
|
|
|
@cp ./TrollHelper/.theos/obj/TrollStorePersistenceHelper.app/TrollStorePersistenceHelper ./_build/PersistenceHelper_Embedded_Legacy_arm64
|
|
|
|
@$(MAKE) clean -C ./TrollHelper
|
|
|
|
@$(MAKE) -C ./TrollHelper FINALPACKAGE=1 EMBEDDED_ROOT_HELPER=1 CUSTOM_ARCHS=arm64e $(MAKECMDGOALS)
|
|
|
|
@cp ./TrollHelper/.theos/obj/TrollStorePersistenceHelper.app/TrollStorePersistenceHelper ./_build/PersistenceHelper_Embedded_Legacy_arm64e
|
2023-11-27 22:49:54 +08:00
|
|
|
@$(MAKE) clean -C ./TrollHelper
|
2022-10-12 04:57:08 +08:00
|
|
|
|
|
|
|
assemble_trollstore:
|
|
|
|
@cp ./RootHelper/.theos/obj/trollstorehelper ./TrollStore/.theos/obj/TrollStore.app/trollstorehelper
|
|
|
|
@cp ./TrollHelper/.theos/obj/TrollStorePersistenceHelper.app/TrollStorePersistenceHelper ./TrollStore/.theos/obj/TrollStore.app/PersistenceHelper
|
|
|
|
@export COPYFILE_DISABLE=1
|
|
|
|
@tar -czvf ./_build/TrollStore.tar -C ./TrollStore/.theos/obj TrollStore.app
|
|
|
|
|
|
|
|
build_installer15:
|
|
|
|
@mkdir -p ./_build/tmp15
|
|
|
|
@unzip ./Victim/InstallerVictim.ipa -d ./_build/tmp15
|
2023-11-27 23:30:34 +08:00
|
|
|
@cp ./_build/PersistenceHelper_Embedded_Legacy_arm64 ./_build/TrollStorePersistenceHelperToInject
|
2022-10-12 04:57:08 +08:00
|
|
|
@pwnify set-cpusubtype ./_build/TrollStorePersistenceHelperToInject 1
|
2022-10-15 21:46:38 +08:00
|
|
|
@ldid -s -K./Victim/victim.p12 ./_build/TrollStorePersistenceHelperToInject
|
2022-10-12 04:57:08 +08:00
|
|
|
APP_PATH=$$(find ./_build/tmp15/Payload -name "*" -depth 1) ; \
|
|
|
|
APP_NAME=$$(basename $$APP_PATH) ; \
|
|
|
|
BINARY_NAME=$$(echo "$$APP_NAME" | cut -f 1 -d '.') ; \
|
|
|
|
echo $$BINARY_NAME ; \
|
|
|
|
pwnify pwn ./_build/tmp15/Payload/$$APP_NAME/$$BINARY_NAME ./_build/TrollStorePersistenceHelperToInject
|
|
|
|
@pushd ./_build/tmp15 ; \
|
|
|
|
zip -vrD ../../_build/TrollHelper_iOS15.ipa * ; \
|
|
|
|
popd
|
|
|
|
@rm ./_build/TrollStorePersistenceHelperToInject
|
|
|
|
@rm -rf ./_build/tmp15
|
|
|
|
|
|
|
|
build_installer64e:
|
|
|
|
@mkdir -p ./_build/tmp64e
|
|
|
|
@unzip ./Victim/InstallerVictim.ipa -d ./_build/tmp64e
|
|
|
|
APP_PATH=$$(find ./_build/tmp64e/Payload -name "*" -depth 1) ; \
|
|
|
|
APP_NAME=$$(basename $$APP_PATH) ; \
|
|
|
|
BINARY_NAME=$$(echo "$$APP_NAME" | cut -f 1 -d '.') ; \
|
|
|
|
echo $$BINARY_NAME ; \
|
2023-11-27 23:30:34 +08:00
|
|
|
pwnify pwn64e ./_build/tmp64e/Payload/$$APP_NAME/$$BINARY_NAME ./_build/PersistenceHelper_Embedded_Legacy_arm64e
|
2022-10-12 04:57:08 +08:00
|
|
|
@pushd ./_build/tmp64e ; \
|
|
|
|
zip -vrD ../../_build/TrollHelper_arm64e.ipa * ; \
|
|
|
|
popd
|
|
|
|
@rm -rf ./_build/tmp64e
|
|
|
|
endif
|
|
|
|
|
2022-11-06 06:32:44 +08:00
|
|
|
.PHONY: $(TOPTARGETS) pre_build assemble_trollstore make_trollhelper_package make_trollhelper_embedded build_installer15 build_installer64e
|