initial release

This commit is contained in:
qnblackcat 2021-10-01 10:20:33 +07:00
commit e64c55f777
53 changed files with 295 additions and 0 deletions

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
.theos
.DS_Store
packages
obj

23
Makefile Normal file
View file

@ -0,0 +1,23 @@
TARGET = iphone:clang:latest:13.0
uYouPlus_INJECT_DYLIBS = uYou.dylib iSponsorBlock.dylib libcolorpicker.dylib YTUHD.dylib YouPiP.dylib
ARCHS = arm64
MODULES = jailed
FINALPACKAGE = 1
CODESIGN_IPA = 0
PACKAGE_VERSION = 16.38.2
TWEAK_NAME = uYouPlus
DISPLAY_NAME = YouTube
BUNDLE_ID = com.google.ios.youtube
uYouPlus_FILES = Tweak.x
uYouPlus_IPA = /Volumes/Data_Macintosh/Sideloads/IPAs/YouTube_16.38.2.ipa
uYouPlus_FRAMEWORKS = Alderis
include $(THEOS)/makefiles/common.mk
include $(THEOS_MAKE_PATH)/tweak.mk

138
README.md Normal file
View file

@ -0,0 +1,138 @@
## Cercube with extra features!
![cydia-1900000833-iphone-0-1628581139 2](https://user-images.githubusercontent.com/52943116/135557251-f4be8ccf-8f0b-4d19-9fcf-6c9544aba281.PNG)
# Table of Contents
* [Credits](#credits)
* [Features](#features)
* [Known issues](#known-issues)
* [Download (IPA)](#download-ipa)
* [Building (optional)](#building-optional)
* [Method 1: azule (simple way)](#method-1-azule-simple-way)
* [Method 2: theos-jailed (complex way)](#method-2-theos-jailed-complex-way)
# Credits
- [Majd Alfhaily](https://twitter.com/freemanrepo?s=21) for [Cercube](https://apt.alfhaily.me/depiction/FDXO5R).
- [Galactic-Dev](https://github.com/Galactic-Dev) and [Luewii](https://github.com/Luewii) for [iSponsorBlock](https://github.com/Galactic-Dev/iSponsorBlock).
- [PoomSmart](https://twitter.com/poomsmart?s=21) - the developer of many tweaks used by CercubePlus, include: [YTABGoodies](https://poomsmart.github.io/repo/depictions/ytabgoodies.html), [YTClassicVideoQuality](https://poomsmart.github.io/repo/depictions/ytclassicvideoquality.html), [NOYTPremium](https://poomsmart.github.io/repo/depictions/noytpremium.html), [YTUHD](https://poomsmart.github.io/repo/depictions/ytuhd.html) and [YouPiP](https://poomsmart.github.io/repo/depictions/youpip.html).
- [level3tjg](https://twitter.com/level3tjg?s=21) - for [YTNoHoverCards](https://github.com/level3tjg/YTNoHoverCards).
- [Al4ise](https://github.com/Al4ise) for [Azule](https://github.com/Al4ise/Azule), a tool used to inject jailbreak tweaks into jailed iOS apps.
- [theos team](https://github.com/theos/theos) for theos & theos-jailed.
# Features
1. **Cercube:**
> - Block all advertisements.
>
> - Enable background playback.
>
> - Set default player quality on WiFi & Celullar.
>
> - Save videos in high resolution, save videos as audio-only, save public playlists (beta).
>
> - Manage and share downloads to any app.
>
> - And more...
2. **iSponsorBlock:** Skips annoying sponsor ads inside videos. iSponsorBlock is based on [SponsorBlock engine](https://sponsor.ajay.app/). This is the iOS version of the SponsorBlock extension.
3. **YTABGoodies:** allow you to disable some YouTube A/B testing features. It is a combination of several tweaks, such as:
> - YouAreThere: disable "Video paused. Continue watching?" popup in the YouTube app when you play a long video.
>
> - YouRememberCaption: make YouTube remember your video caption setting (if not already).
>
> - YTNoCheckLocalNetwork: block the Local Network permission popup.
>
> - YTSystemAppearance: sync the YouTube theme (dark/light) with the system theme.
4. **YTClassicVideoQuality:** since YouTube v16.xx, you need one more step to change the video quality. YTClassicVideoQuality brings back the old video quality selector, which is a lot better than the new one.
5. **NOYTPremium:** remove YouTube Premium upsell alerts.
6. **YTUHD:** unlock VP9 codec and in effect, enables video quality of 2K and 4K. You can enable/disable YTUHD in YouTube Settings => Video quality preferences.
7. **YouPiP:** enable YouTube's **native PiP**. More options are in YouTube Settings => General.
8. **YTNoHoverCards:** offer an option to enable/disable the annoying suggested videos show up at the end of the videos.
# Known issues
1. **Cercube**: Hide Cast button is not working.
2. **iSponsorBlock**: the modified time doesn't show up in the seek bar
3. **YTUHD**: Stuttering on 4K videos (sometimes).
4. **YouPiP** (iOS 14.0 - 14.4.2): due to Apple's fault, you may encounter the *speedup-bug* as described [here](https://drive.google.com/file/d/1NKdv1fr_KRWgD8nhkMDfG2eLBnbdeVtX/view?usp=sharing). The bug also happens when you try to play multi-sources of sound at the same time. Enable **LegacyPiP** is a workaround. Keep in mind that LegacyPiP also removes UHD quality and breaks YouTube Autoplay next. Use it at your own risk.
5. **Not a bug**: the app won't be able to receive push notifications if you use a free developer account to sideload it.
# Download (IPA)
- **CercubePlus+** requires iOS & iPadOS 13.0 and later. The latest version of **CercubePlus** can be found in the [Release tab]().
- Version info:
| **Tweak/App** | **Version** |
| ------------- | -------------|
| YouTube | 16.38.2 |
| Cercube | 5.3.3 |
| iSponsorBlock | 1.0-10 |
| YTABGoodies | 1.0 |
| YTClassicVideoQuality | 1.0.1 |
| NOYTPremium | 1.0.2 |
| YTUHD | 1.2.4 |
| YouPiP | 1.5.10 |
# Building (optional)
## Method 1: azule (simple way)
1. Setup [Azule](https://github.com/Al4ise/Azule) on your machine (macOS/Linux/iOS).
2. Download all the tweaks you want to inject.
> - **[iOS Repo Updates]**(https://www.ios-repo-updates.com/) is a trust-able source. [cydownload](https://github.com/borishonman/cydownload) and [Windows Repo Tool](https://github.com/SarahH12099/Windows-Repo-Tool) are good alternative.
>
> - The sideloaded version of iSponsorBlock is here ([Luewii's fork](https://github.com/Luewii/iSponsorBlock)).
3. Run `azule` in any Terminal window and follow the instruction.
4. Select `1. Inject tweaks`, then Drag & drop the **decrypted** YouTube IPA and your prepared tweaks into the azule window. Other options are optional.
5. Done! Azule will take care of the rest!
## Method 2: theos-jailed (complex way)
1. 1. Setup [theos-jailed](https://github.com/kabiroberai/theos-jailed/wiki/Installation)
2. Clone this repo:
```
git clone https://github.com/qnblackcat/CercubePlus.git
```
3. Open `Makefile` and edit the path to your decrypted YouTube IPA.
4. Optional: Modify the app the way you want. I suggest you take a look at the [theos-jailed wiki](https://github.com/kabiroberai/theos-jailed/wiki/Usage) and my `Makefile`.
5. `cd` to the project folder, run
```
make clean package
```

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1 @@
{"v":"5.7.1","fr":25,"ip":0,"op":26,"w":24,"h":24,"nm":"folder_download","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"Null 1","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.31,"y":1},"o":{"x":0.69,"y":0},"t":0,"s":[16.41,15.3,0],"to":[0,0.617,0],"ti":[0,-0.617,0]},{"t":25,"s":[16.41,19,0]}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.47,0.47,0.47],"y":[1,1,1]},"o":{"x":[0.53,0.53,0.53],"y":[0,0,0]},"t":12,"s":[6,6,100]},{"t":25,"s":[0,0,100]}],"ix":6}},"ao":0,"ip":0,"op":324,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 1","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[0.614,-145.97,0],"ix":2},"a":{"a":0,"k":[102.114,-19.97,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.47,0.47,0.47],"y":[1,1,1]},"o":{"x":[0.53,0.53,0.53],"y":[0,0,0]},"t":0,"s":[0,0,100]},{"t":12,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[250,268.441],[305.322,268.441],[305.322,194.678],[342.203,194.678],[342.203,268.441],[397.525,268.441],[323.762,342.203]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-221.648,-214.648],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":324,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"folder_download Outlines 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[12,12,0],"ix":2},"a":{"a":0,"k":[12,12,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,-1.1],[0,0],[0,0],[1.1,0],[0,0],[0,0],[0,1.1],[0,0],[0,0],[-1.1,0],[0,0]],"o":[[0,0],[0,0],[1.1,0],[0,0],[0,0],[0,1.1],[0,0],[0,0],[-1.1,0],[0,0],[0,0],[0,-1.1],[0,0],[0,0]],"v":[[-2,-8],[0,-6],[8,-6],[10,-4],[10,-4],[10,6],[8,8],[8,8],[-8,8],[-10,6],[-10,6],[-9.99,-6],[-8,-8],[-8,-8]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"tr","p":{"a":0,"k":[12,12],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.9215686274509803,0.2823529411764706,0.3254901960784314,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":324,"st":0,"bm":0}],"markers":[]}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

120
Tweak.x Normal file
View file

@ -0,0 +1,120 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
//Mni
%hook YTIMiniplayerRenderer
- (BOOL)hasMinimizedEndpoint {
return NO;
}
- (int)playbackMode {
return 2;
}
%end
//NoLocalCheck
%hook YTHotConfig
- (BOOL)isPromptForLocalNetworkPermissionsEnabled {
return NO;
}
%end
//YouRememberCaption
%hook YTColdConfig
- (BOOL)respectDeviceCaptionSetting {
return NO;
}
%end
// Alert
%hook YTCommerceEventGroupHandler
- (void)addEventHandlers {}
%end
// Full-screen
%hook YTInterstitialPromoEventGroupHandler
- (void)addEventHandlers {}
%end
%hook YTIShowFullscreenInterstitialCommand
- (BOOL)shouldThrottleInterstitial { return YES; }
%end
// YT-PRE--Whatever these are for
%hook YTPromoThrottleController
- (BOOL)canShowThrottledPromo { return NO; }
- (BOOL)canShowThrottledPromoWithFrequencyCap:(id)frequencyCap { return NO; }
%end
%hook YTSurveyController
- (void)showSurveyWithRenderer:(id)arg1 surveyParentResponder:(id)arg2 {}
%end
//YTClassicVideoQuality
@interface YTVideoQualitySwitchOriginalController : NSObject
- (instancetype)initWithParentResponder:(id)responder;
@end
%hook YTVideoQualitySwitchControllerFactory
- (id)videoQualitySwitchControllerWithParentResponder:(id)responder {
Class originalClass = %c(YTVideoQualitySwitchOriginalController);
return originalClass ? [[originalClass alloc] initWithParentResponder:responder] : %orig;
}
%end
//YTNoHoverCards 0.0.3
@interface YTCollectionViewCell : UICollectionViewCell
@end
@interface YTSettingsCell : YTCollectionViewCell
@end
@interface YTSettingsSectionItem : NSObject
@property BOOL hasSwitch;
@property BOOL switchVisible;
@property BOOL on;
@property BOOL (^switchBlock)(YTSettingsCell *, BOOL);
@property int settingItemId;
- (instancetype)initWithTitle:(NSString *)title titleDescription:(NSString *)titleDescription;
@end
%hook YTSettingsViewController
- (void)setSectionItems:(NSMutableArray <YTSettingsSectionItem *>*)sectionItems forCategory:(NSInteger)category title:(NSString *)title titleDescription:(NSString *)titleDescription headerHidden:(BOOL)headerHidden {
if (category == 1) {
NSInteger appropriateIdx = [sectionItems indexOfObjectPassingTest:^BOOL(YTSettingsSectionItem *item, NSUInteger idx, BOOL *stop) {
return item.settingItemId == 294;
}];
if (appropriateIdx != NSNotFound) {
YTSettingsSectionItem *hoverCardItem = [[%c(YTSettingsSectionItem) alloc] initWithTitle:@"Show End screens hover cards" titleDescription:@"Allows creator End screens (thumbnails) to appear at the end of videos"];
hoverCardItem.hasSwitch = YES;
hoverCardItem.switchVisible = YES;
hoverCardItem.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"hover_cards_enabled"];
hoverCardItem.switchBlock = ^BOOL (YTSettingsCell *cell, BOOL enabled) {
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"hover_cards_enabled"];
return YES;
};
[sectionItems insertObject:hoverCardItem atIndex:appropriateIdx + 1];
}
}
%orig;
}
%end
%hook YTCreatorEndscreenView
- (void)setHidden:(BOOL)hidden {
if (![[NSUserDefaults standardUserDefaults] boolForKey:@"hover_cards_enabled"])
hidden = YES;
%orig;
}
%end
//YTSystemTheme
%hook YTColdConfig
- (BOOL)shouldUseAppThemeSetting {
return YES;
}
%end

BIN
YTUHD.dylib Executable file

Binary file not shown.

BIN
YouPiP.dylib Executable file

Binary file not shown.

BIN
iSponsorBlock.dylib Executable file

Binary file not shown.

BIN
libcolorpicker.dylib Executable file

Binary file not shown.

BIN
uYou.dylib Executable file

Binary file not shown.