Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Azule support #1353

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 71 additions & 39 deletions .github/workflows/buildapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ name: Build and Release uYouPlus
on:
workflow_dispatch:
inputs:
youtube_version:
description: "The version of YouTube"
default: "19.08.2"
required: false
type: string
uyou_version:
description: "The version of uYou"
default: "3.0.3"
required: true
required: false
type: string
decrypted_youtube_url:
description: "Direct URL to the decrypted YouTube ipa. The version of YouTube will be detected automatically."
default: ""
required: true
required: false
type: string
bundle_id:
description: "Modify the bundle ID. Not recommended"
Expand Down Expand Up @@ -61,14 +66,17 @@ jobs:
- name: Set PATH environment variable
run: echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH

- name: Setup Theos
- name: Checkout Theos
uses: actions/[email protected]
with:
repository: theos/theos
ref: master
path: theos
submodules: recursive


- name: Setup Theos
run: echo "THEOS=${{ github.workspace }}/theos" >> $GITHUB_ENV

- name: Caching
id: SDK
uses: actions/[email protected]
Expand All @@ -85,10 +93,9 @@ jobs:
git sparse-checkout set --no-cone iPhoneOS16.5.sdk
git checkout
mv *.sdk $THEOS/sdks
env:
THEOS: ${{ github.workspace }}/theos

- name: Setup Theos Jailed
if: ${{ inputs.decrypted_youtube_url != '' }}
uses: actions/[email protected]
with:
repository: qnblackcat/theos-jailed
Expand All @@ -97,65 +104,90 @@ jobs:
submodules: recursive

- name: Install Theos Jailed
if: ${{ inputs.decrypted_youtube_url != '' }}
run: |
./theos-jailed/install
env:
THEOS: ${{ github.workspace }}/theos

- name: Prepare YouTube iPA
- name: Prepare YouTube IPA
id: prepare_youtube
if: ${{ inputs.decrypted_youtube_url != '' }}
run: |
wget "$YOUTUBE_URL" --no-verbose -O main/YouTube.ipa
cd ${{ github.workspace }}/main
mv YouTube.ipa YouTube.zip
unzip -q YouTube.zip
youtube_version=$(defaults read "$(pwd)/Payload/YouTube.app/Info" CFBundleVersion)
wget "${{ inputs.decrypted_youtube_url }}" -nv -O YouTube.ipa
youtube_version=$(unzip -p YouTube.ipa Payload/YouTube.app/Info.plist | xpath -q -e '//key[text()="CFBundleVersion"]/following-sibling::*[1]/text()')
echo "==> YouTube v$youtube_version downloaded!"
sed -i '' "17s#.*#YOUTUBE_VERSION = ${youtube_version}#g" Makefile
echo "youtube_version=${youtube_version}" >> $GITHUB_OUTPUT

- name: Resolve versions
id: resolve_versions
run: |
youtube_version=${{ steps.prepare_youtube.outputs.youtube_version }}
uyou_version=${{ inputs.uyou_version }}
if [ -z $youtube_version ]; then
youtube_version=${{ inputs.youtube_version }}
fi
if [ -z $youtube_version ]; then
youtube_version="$(cat ${{ github.workspace }}/main/Makefile | grep 'YOUTUBE_VERSION =' | cut -d ' ' -f3)"
fi
if [ -z $uyou_version ]; then
uyou_version="$(cat ${{ github.workspace }}/main/Makefile | grep 'UYOU_VERSION =' | cut -d ' ' -f3)"
fi
echo "youtube_version=${youtube_version}" >> $GITHUB_OUTPUT
echo "uyou_version=${uyou_version}" >> $GITHUB_OUTPUT

- name: Build rootless deb
run: |
cd ${{ github.workspace }}/main
make package
env:
THEOS: ${{ github.workspace }}/theos
YOUTUBE_URL: ${{ inputs.decrypted_youtube_url }}
THEOS_PACKAGE_SCHEME: rootless
UYOU_VERSION: ${{ steps.resolve_versions.outputs.uyou_version }}
FINALPACKAGE: 1

- name: Fix compiling & Build Package
id: build_package
- name: Build rootful deb
run: |
cd ${{ github.workspace }}/main
sed -i '' "27s#.*#BUNDLE_ID = ${{ env.BUNDLE_ID }}#g" Makefile
sed -i '' "26s#.*#DISPLAY_NAME = ${{ env.APP_NAME }}#g" Makefile
make package THEOS_PACKAGE_SCHEME=rootless IPA=Payload/YouTube.app FINALPACKAGE=1
echo "package=$(ls -t packages | head -n1)" >>$GITHUB_OUTPUT
echo -e "==> \033[1mSHASUM256: $(shasum -a 256 packages/*.ipa | cut -f1 -d' ')\033[0m"
echo -e "==> \033[1mBundle ID: ${{ env.BUNDLE_ID }}\033[0m"
make package
env:
UYOU_VERSION: ${{ steps.resolve_versions.outputs.uyou_version }}
FINALPACKAGE: 1

- name: Build IPA
if: ${{ inputs.decrypted_youtube_url != '' }}
run: |
cd ${{ github.workspace }}/main
make package
env:
THEOS: ${{ github.workspace }}/theos
UYOU_VERSION: ${{ inputs.uyou_version }}
IPA: YouTube.ipa
YOUTUBE_VERSION: ${{ steps.resolve_versions.outputs.youtube_version }}
UYOU_VERSION: ${{ steps.resolve_versions.outputs.uyou_version }}
BUNDLE_ID: ${{ inputs.bundle_id }}
APP_NAME: ${{ inputs.app_name }}
FINALPACKAGE: 1

- name: Print SHA256SUMs
run: |
cd ${{ github.workspace }}/main/packages
for f in *; do
printf "\e[0;34m==> \e[1;39m%s\e[m\n" "$(shasum -a 256 $f | tac -bs ' ' | tr -d '\n' | xargs)"
done

- name: Upload Artifact
if: ${{ inputs.upload_artifact }}
uses: actions/[email protected]
env:
UYOU_VERSION: ${{ inputs.uyou_version }}
YOUTUBE_VERSION: ${{ steps.prepare_youtube.outputs.youtube_version }}
with:
name: uYouPlus_${{ env.YOUTUBE_VERSION }}_${{ env.UYOU_VERSION }}
path: ${{ github.workspace }}/main/packages/${{ steps.build_package.outputs.package }}
name: uYouPlus_${{ steps.resolve_versions.outputs.youtube_version }}_${{ steps.resolve_versions.outputs.uyou_version }}
path: ${{ github.workspace }}/main/packages/*
if-no-files-found: error

- name: Create Release
id: create_release
if: ${{ inputs.create_release }}
uses: qnblackcat/action-gh-release@master
with:
tag_name: v${{ steps.resolve_versions.outputs.youtube_version }}-${{ steps.resolve_versions.outputs.uyou_version }}-(${{ github.run_number }})
name: v${{ steps.resolve_versions.outputs.youtube_version }}-${{ steps.resolve_versions.outputs.uyou_version }}-(${{ github.run_number }})
files: main/packages/*
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UYOU_VERSION: ${{ inputs.uyou_version }}
YOUTUBE_VERSION: ${{ steps.prepare_youtube.outputs.youtube_version }}
DRAFT: ${{ inputs.create_release }}
with:
tag_name: v${{ env.YOUTUBE_VERSION }}-${{ env.UYOU_VERSION }}-(${{ github.run_number }})
name: v${{ env.YOUTUBE_VERSION }}-${{ env.UYOU_VERSION }}-(${{ github.run_number }})
files: main/packages/*.ipa
draft: ${{ env.DRAFT }}
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
[submodule "Tweaks/FLEXing"]
path = Tweaks/FLEXing
url = https://github.com/PoomSmart/FLEXing
branch = rootless
branch = master
[submodule "Tweaks/Alderis"]
path = Tweaks/Alderis
url = https://github.com/hbang/Alderis.git
Expand Down
83 changes: 54 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,75 +1,100 @@
export TARGET = iphone:clang:latest:14.0
export ARCHS = arm64

export ADDITIONAL_CFLAGS = -I$(THEOS_PROJECT_DIR)/Tweaks -Wno-module-import-in-extern-c
export libcolorpicker_ARCHS = arm64
export libFLEX_ARCHS = arm64
export Alderis_XCODEOPTS = LD_DYLIB_INSTALL_NAME=@rpath/Alderis.framework/Alderis
export Alderis_XCODEFLAGS = DYLIB_INSTALL_NAME_BASE=/Library/Frameworks BUILD_LIBRARY_FOR_DISTRIBUTION=YES ARCHS="$(ARCHS)"
export libcolorpicker_LDFLAGS = -F$(TARGET_PRIVATE_FRAMEWORK_PATH) -install_name @rpath/libcolorpicker.dylib
export ADDITIONAL_CFLAGS = -I$(THEOS_PROJECT_DIR)/Tweaks/RemoteLog -I$(THEOS_PROJECT_DIR)/Tweaks

ifneq ($(JAILBROKEN),1)
export DEBUGFLAG = -ggdb -Wno-unused-command-line-argument -L$(THEOS_OBJ_DIR) -F$(_THEOS_LOCAL_DATA_DIR)/$(THEOS_OBJ_DIR_NAME)/install/Library/Frameworks
MODULES = jailed
endif

ifndef YOUTUBE_VERSION
YOUTUBE_VERSION = 19.08.2
YOUTUBE_VERSION = 19.08.2
endif
ifndef UYOU_VERSION
UYOU_VERSION = 3.0.3
UYOU_VERSION = 3.0.3
endif
PACKAGE_VERSION = $(YOUTUBE_VERSION)-$(UYOU_VERSION)

INSTALL_TARGET_PROCESSES = YouTube
TWEAK_NAME = uYouPlus
DISPLAY_NAME = YouTube
BUNDLE_ID = com.google.ios.youtube

ifeq ($(THEOS_PACKAGE_SCHEME),rootless)
export ROOTLESS = 1
else ifeq ($(ROOTLESS),1)
export THEOS_PACKAGE_SCHEME = rootless
endif

ifneq ($(or $(IPA),$($(TWEAK_NAME)_IPA)),)
MODULES = jailed
undefine THEOS_PACKAGE_SCHEME
endif

$(TWEAK_NAME)_FILES := $(wildcard Sources/*.xm) $(wildcard Sources/*.x)
$(TWEAK_NAME)_FRAMEWORKS = UIKit Security
$(TWEAK_NAME)_CFLAGS = -fobjc-arc -DTWEAK_VERSION=\"$(PACKAGE_VERSION)\"
$(TWEAK_NAME)_INJECT_DYLIBS = Tweaks/uYou/Library/MobileSubstrate/DynamicLibraries/uYou.dylib $(THEOS_OBJ_DIR)/libFLEX.dylib $(THEOS_OBJ_DIR)/iSponsorBlock.dylib $(THEOS_OBJ_DIR)/YouTubeDislikesReturn.dylib $(THEOS_OBJ_DIR)/YouPiP.dylib $(THEOS_OBJ_DIR)/YTABConfig.dylib $(THEOS_OBJ_DIR)/YTUHD.dylib $(THEOS_OBJ_DIR)/DontEatMyContent.dylib $(THEOS_OBJ_DIR)/YTVideoOverlay.dylib $(THEOS_OBJ_DIR)/YouMute.dylib $(THEOS_OBJ_DIR)/YouQuality.dylib $(THEOS_OBJ_DIR)/IAmYouTube.dylib $(THEOS_OBJ_DIR)/YTClassicVideoQuality.dylib $(THEOS_OBJ_DIR)/NoYTPremium.dylib $(THEOS_OBJ_DIR)/YoutubeSpeed.dylib
$(TWEAK_NAME)_EMBED_LIBRARIES = $(THEOS_OBJ_DIR)/libcolorpicker.dylib
$(TWEAK_NAME)_EMBED_FRAMEWORKS = $(_THEOS_LOCAL_DATA_DIR)/$(THEOS_OBJ_DIR_NAME)/install_Alderis.xcarchive/Products/var/jb/Library/Frameworks/Alderis.framework
$(TWEAK_NAME)_EMBED_BUNDLES = $(wildcard Bundles/*.bundle)
$(TWEAK_NAME)_EMBED_EXTENSIONS = $(wildcard Extensions/*.appex)

include $(THEOS)/makefiles/common.mk
ifneq ($(JAILBROKEN),1)
SUBPROJECTS += Tweaks/Alderis Tweaks/FLEXing/libflex Tweaks/iSponsorBlock Tweaks/Return-YouTube-Dislikes Tweaks/YouPiP Tweaks/YTABConfig Tweaks/YTUHD Tweaks/DontEatMyContent Tweaks/YTVideoOverlay Tweaks/YouMute Tweaks/YouQuality Tweaks/IAmYouTube Tweaks/YTClassicVideoQuality Tweaks/NoYTPremium Tweaks/YTSpeed

_ALDERIS_INSTALL_DIR_NAME = install_Alderis$(if $(_THEOS_FINAL_PACKAGE),.xcarchive/Products)
_ALDERIS_INSTALL_DIR = $(_THEOS_LOCAL_DATA_DIR)/$(THEOS_OBJ_DIR_NAME)/$(_ALDERIS_INSTALL_DIR_NAME)
_ALDERIS_BUILD_PATH = $(_ALDERIS_INSTALL_DIR)$(THEOS_PACKAGE_INSTALL_PREFIX)/Library/Frameworks
export _THEOS_INTERNAL_COLORFLAGS += -L$(THEOS_OBJ_DIR) -F$(_ALDERIS_BUILD_PATH) -rpath /Library/Frameworks -rpath /usr/lib
$(TWEAK_NAME)_EMBED_FRAMEWORKS += $(_ALDERIS_BUILD_PATH)/Alderis.framework

SUBPROJECTS += Tweaks/Alderis Tweaks/FLEXing/libflex Tweaks/iSponsorBlock Tweaks/Return-YouTube-Dislikes Tweaks/YouPiP Tweaks/YTABConfig Tweaks/YTUHD Tweaks/DontEatMyContent Tweaks/YTVideoOverlay Tweaks/YouMute Tweaks/YouQuality Tweaks/YTClassicVideoQuality Tweaks/NoYTPremium Tweaks/YTSpeed # Tweaks/IAmYouTube
include $(THEOS_MAKE_PATH)/aggregate.mk
endif

include $(THEOS_MAKE_PATH)/tweak.mk

REMOVE_EXTENSIONS = 1
CODESIGN_IPA = 0

UYOU_PATH = Tweaks/uYou
UYOU_DEB = $(UYOU_PATH)/com.miro.uyou_$(UYOU_VERSION)_iphoneos-arm.deb
UYOU_DYLIB = $(UYOU_PATH)/Library/MobileSubstrate/DynamicLibraries/uYou.dylib
UYOU_BUNDLE = $(UYOU_PATH)/Library/Application\ Support/uYouBundle.bundle
UYOU_DEB_NAME = com.miro.uyou_$(UYOU_VERSION)_iphoneos-arm$(if $(filter $(THEOS_PACKAGE_SCHEME),rootless),64).deb
UYOU_DEB = $(UYOU_PATH)/$(UYOU_DEB_NAME)
UYOU_DYLIB = $(UYOU_PATH)$(THEOS_PACKAGE_INSTALL_PREFIX)/Library/MobileSubstrate/DynamicLibraries/uYou.dylib
UYOU_FILTER = $(UYOU_PATH)$(THEOS_PACKAGE_INSTALL_PREFIX)/Library/MobileSubstrate/DynamicLibraries/uYou.plist
UYOU_BUNDLE = $(UYOU_PATH)$(THEOS_PACKAGE_INSTALL_PREFIX)/Library/Application\ Support/uYouBundle.bundle

# uYou
internal-clean::
@rm -rf $(UYOU_PATH)/*

ifneq ($(JAILBROKEN),1)
before-all::
@if [[ ! -f $(UYOU_DEB) ]]; then \
rm -rf $(UYOU_PATH)/*; \
$(PRINT_FORMAT_BLUE) "Downloading uYou"; \
fi
before-all::
@if [[ ! -f $(UYOU_DEB) ]]; then \
curl -s https://miro92.com/repo/debs/com.miro.uyou_$(UYOU_VERSION)_iphoneos-arm.deb -o $(UYOU_DEB); \
curl -s https://miro92.com/repo/debs/$(UYOU_DEB_NAME) -o $(UYOU_DEB); \
fi; \
tar -xf $(UYOU_DEB) -C Tweaks/uYou; tar -xf Tweaks/uYou/data.tar* -C Tweaks/uYou; \
if [[ ! -f $(UYOU_DYLIB) || ! -d $(UYOU_BUNDLE) ]]; then \
tar -xf Tweaks/uYou/com.miro.uyou_$(UYOU_VERSION)_iphoneos-arm.deb -C Tweaks/uYou; tar -xf Tweaks/uYou/data.tar* -C Tweaks/uYou; \
if [[ ! -f $(UYOU_DYLIB) || ! -d $(UYOU_BUNDLE) ]]; then \
$(PRINT_FORMAT_ERROR) "Failed to extract uYou"; exit 1; \
fi; \
$(PRINT_FORMAT_ERROR) "Failed to extract uYou"; exit 1; \
fi;
else
before-package::
@cp $(UYOU_DYLIB) $(THEOS_STAGING_DIR)/Library/MobileSubstrate/DynamicLibraries
@cp $(UYOU_FILTER) $(THEOS_STAGING_DIR)/Library/MobileSubstrate/DynamicLibraries
@cp -r $(UYOU_BUNDLE) $(THEOS_STAGING_DIR)/Library/Application\ Support/
@mkdir -p $(THEOS_STAGING_DIR)/Library/PlugIns; cp -r $(THEOS_PROJECT_DIR)/Extensions/*.appex $(THEOS_STAGING_DIR)/Library/PlugIns
@mkdir -p $(THEOS_STAGING_DIR)/Library/Application\ Support; cp -r Localizations/uYouPlus.bundle $(THEOS_STAGING_DIR)/Library/Application\ Support/

# Alderis
ifeq ($(ROOTLESS),1)
before-all::
@mkdir -p $(THEOS_OBJ_DIR)
@ln -sf $(_ALDERIS_INSTALL_DIR_NAME) $(THEOS_OBJ_DIR)/install
after-all::
@rm $(THEOS_OBJ_DIR)/install
before-package::
# Alderis should not already be in /var/jb
@mkdir -p $(THEOS_STAGING_DIR)/Library/Frameworks
@mv $(THEOS_STAGING_DIR)$(THEOS_PACKAGE_INSTALL_PREFIX)/Library/Frameworks/Alderis.framework $(THEOS_STAGING_DIR)/Library/Frameworks/Alderis.framework
@mkdir -p $(THEOS_STAGING_DIR)/usr/lib
@mv $(THEOS_STAGING_DIR)$(THEOS_PACKAGE_INSTALL_PREFIX)/usr/lib/libcolorpicker.dylib $(THEOS_STAGING_DIR)/usr/lib/libcolorpicker.dylib
@rm -rf $(THEOS_STAGING_DIR)/var
endif
before-package::
@mv $(THEOS_STAGING_DIR)/Library/Frameworks/Alderis.framework/Alderis $(THEOS_STAGING_DIR)/Library/Frameworks/Alderis.framework/Alderis-ios14
@ln -sf Alderis-ios14 $(THEOS_STAGING_DIR)/Library/Frameworks/Alderis.framework/Alderis
4 changes: 2 additions & 2 deletions Sources/uYouPlusPatches.xm
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
%hook NSBundle
- (NSDictionary *)infoDictionary {
NSMutableDictionary *info = %orig.mutableCopy;
NSString *altBundleIdentifier = info[@"ALTBundleIdentifier"];
if (altBundleIdentifier) info[@"CFBundleIdentifier"] = altBundleIdentifier;
if ([self isEqual:NSBundle.mainBundle])
info[@"CFBundleIdentifier"] = @"com.google.ios.youtube";
return info;
}
%end
Expand Down
2 changes: 1 addition & 1 deletion Tweaks/FLEXing
Submodule FLEXing updated 7 files
+1 −6 Interfaces.h
+5 −6 Makefile
+1 −1 README.md
+3 −7 Tweak.xm
+1 −0 control
+1 −1 libflex/FLEX
+2 −3 libflex/Makefile
8 changes: 5 additions & 3 deletions control
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Description: Modified version of uYou
Maintainer: qnblackcat
Author: qnblackcat
Section: Tweaks
Depends: mobilesubstrate (>= 0.9.5000), com.miro.uyou
Conflicts: com.level3tjg.ytminiplayerenabler, com.level3tjg.ytnohovercards, com.ps.noytpremium, com.ps.ytnopaidpromo, com.ps.ytreexplore, com.galacticdev.bigytminiplayer, com.lilacvibes.ytstockvolumehud, net.sarahh12099.youtubereborn, com.twickd.sarahh12099.youtube-reborn, h.ryan.youtubereborn, weeb.lillie.enhancerforyoutubepremium, com.ps.uyoucompat, com.ichitaso.uyouplus
Recommends: com.ps.youmute, com.ps.youpip, com.ps.youquality, com.ps.ytabconfig, com.ps.ytvideooverlay, libflex, weeb.lillie.youtubedislikesreturn
Depends: mobilesubstrate (>= 0.9.5000), firmware (>= 14.0)
Replaces: org.thebigboss.libcolorpicker, me.nepeta.libcolorpicker, ws.hbang.alderis, libflex
Provides: org.thebigboss.libcolorpicker (= 99.0), me.nepeta.libcolorpicker (= 99.0), ws.hbang.alderis (= 99.0), libflex (= 99.0)
Conflicts: com.miro.uyou, org.thebigboss.libcolorpicker, me.nepeta.libcolorpicker, ws.hbang.alderis, libflex, com.ps.youmute, com.ps.youpip, com.ps.youquality, com.ps.ytabconfig, com.ps.ytvideooverlay, weeb.lillie.youtubedislikesreturn, com.level3tjg.ytminiplayerenabler, com.level3tjg.ytnohovercards, com.ps.noytpremium, com.ps.ytnopaidpromo, com.ps.ytreexplore, com.galacticdev.bigytminiplayer, com.lilacvibes.ytstockvolumehud, net.sarahh12099.youtubereborn, com.twickd.sarahh12099.youtube-reborn, h.ryan.youtubereborn, weeb.lillie.enhancerforyoutubepremium, com.ps.uyoucompat, com.ichitaso.uyouplus, com.dvntm.ytlite, com.arichorn.uyouenhanced
Recommends: com.miro.uyouimport