diff --git a/README.md b/README.md index 5b87c66..64ef504 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,78 @@ -# BunnyTweak +

+ + + + +
+ + + + + +        + + + + + +        + + + + + +        -Tweak to inject [Bunny](https://github.com/pyoncord/Bunny) into Discord. Forked [VendettaTweak](https://github.com/vendetta-mod/VendettaTweak), modified to match with [BunnyXposed](https://github.com/pyoncord/BunnyXposed) behavior. There are still slight differences between these two, and this tweak may be missing some loader features. + +

+ +# 💊 RevengeTweak + +![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/revenge-mod/revenge-tweak/release.yml) +![Open Software License 3](https://img.shields.io/badge/License-OSL%20v3-yellow.svg) + +Tweak to inject [Revenge](https://github.com/revenge-mod/Revenge) into Discord. Forked [BunnyTweak](https://github.com/pyoncord/BunnyTweak), modified to match with [RevengeXposed](https://github.com/revenge-mod/Revenge-xposed) behavior. There are still slight differences between these two, and this tweak may be missing some loader features. > [!NOTE] -> As of right now this tweak does not encompass some functionalities when running in a jailed environment with a distribution certificate that has a different App ID \ +> As of right now this tweak does not encompass some functionalities when running in a jailed environment with a wildcard certificate \ > If you value these features sign the application with a local dev certificate: -> -> - setAlternateAppIcon does not work, thus breaking dynamic app icons (unlikely to be able to be fixed unless iOS behavior changes) -> - sharing files to the application/selecting items via the Files app does not work (this might be more of a keychain/app group issue) +> - setAlternateAppIcon does not work, thus breaking dynamic app icons +> - sharing files to the application/selecting items via the Files app does not work -## Installation +## 🔽 Installation -Builds can be found in the [Releases](https://github.com/pyoncord/BunnyTweak/releases/latest) tab. +Builds can be found in the [Releases](https://github.com/revenge-mod/revenge-tweak/releases/latest) tab. > [!NOTE] -> Decrypted IPAs are sourced from the [Enmity](https://github.com/enmity-mod/) community. These are also used throughout Enmity related projects such as [enmity-mod/tweak](https://github.com/enmity-mod/tweak/) and [acquitelol/rosiecord](https://github.com/acquitelol/rosiecord).\ -> All credits are attributed to the owner(s). +> Raw decrypted IPAs which are used to provide prepatched IPAs are sourced from the [Enmity](https://github.com/enmity-mod/) community. These raw decrypted IPAs are also used throughout Enmity related projects such as [enmity-mod/tweak](https://github.com/enmity-mod/tweak/) and [acquitelol/rosiecord](https://github.com/acquitelol/rosiecord).\ +> All credits are attributed to the owner(s) of the raw IPAs. ### Jailbroken -1. Install Bunny by downloading the appropriate Debian package (or by building your own, see [Building BunnyTweak locally](#building-bunnytweak-locally)) and adding it to your package manager. Use the file ending in `arm.deb` for rootful jailbreaks, and the file ending in `arm64.deb` for rootless jailbreaks. +1. Install the Orion runtime via your preferred package manager, by adding `https://repo.chariz.com/` to your sources, then finding `Orion Runtime`. +1. Install Revenge by downloading the appropriate Debian package (or by building your own, see [Building RevengeTweak locally](#building-revengetweak-locally)) and adding it to your package manager. Use the file ending in `arm.deb` for rootful jailbreaks, and the file ending in `arm64.deb` for rootless jailbreaks. ### Jailed - - + + > [!NOTE] > TrollStore may display an encryption warning, which you can disregard. -1. Download and install [Bunny.ipa](https://github.com/pyoncord/BunnyTweak/releases/latest/download/Bunny.ipa) using your preferred sideloading method. +1. Download and install [Revenge.ipa](https://github.com/revenge-mod/revenge-tweak/releases/latest/download/Revenge.ipa) using your preferred sideloading method. -## Building BunnyTweak locally +## 🛠️ Building RevengeTweak locally > [!NOTE] -> These steps assume you use macOS. +> These steps assume you use MacOS. 1. Install Xcode from the App Store. If you've previously installed the `Command Line Utilities` package, you will need to run `sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer` to make sure you're using the Xcode tools instead. @@ -42,7 +80,7 @@ Builds can be found in the [Releases](https://github.com/pyoncord/BunnyTweak/rel 2. Install the required dependencies. You can do this by running `brew install make ldid` in your terminal. If you do not have brew installed, follow the instructions [here](https://brew.sh/). -3. Setup your path accordingly. We recommend you run the following before running the next commands, as well as any time you want to build BunnyTweak. +3. Setup your path accordingly. We recommend you run the following before running the next commands, as well as any time you want to build RevengeTweak. ```bash export PATH="$(brew --prefix make)/libexec/gnubin:$PATH" @@ -58,17 +96,17 @@ bash -c "$(curl -fsSL https://raw.githubusercontent.com/theos/theos/master/bin/i If you've already installed theos, you can run `$THEOS/bin/update-theos` to make sure it's up to date. -5. Clone this repository with `git clone git@github.com:pyoncord/BunnyTweak.git` and `cd` into it. Replace the URL with your fork if you've forked this repository. +5. Clone this repository with `git clone git@github.com:revenge-mod/RevengeTweak.git` and `cd` into it. Replace the URL with your fork if you've forked this repository. -6. To build BunnyTweak, you can run `rm -rf packages && make clean && make package FINALPACKAGE=1 && make package FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless`. The first command will remove any previous packages, the second will clean the project, the third will build the rootful package (which is denoted by the `arm.deb` ending), and the fourth will build the rootless package (which is denoted by the `arm64.deb` ending). +6. To build RevengeTweak, you can run `rm -rf packages && make clean && make package FINALPACKAGE=1 && make package FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless`. The first command will remove any previous packages, the second will clean the project, the third will build the rootful package (which is denoted by the `arm.deb` ending), and the fourth will build the rootless package (which is denoted by the `arm64.deb` ending). The first time you run this, it might take a bit longer, but subsequent builds should be much faster. The resulting `.deb` files will be in the `packages` folder. As a reminder, `*arm.deb` is for rootful jailbreaks and sideloading, and `*arm64.deb` is for rootless jailbreaks. -## Contributing +## 📙 Contributing -If you want to contribute, you will basically need to follow the steps for [Building BunnyTweak locally](#building-bunnytweak-locally), as well as run `make spm` for the Swift LSP to work. +If you want to contribute, you will basically need to follow the steps for [Building RevengeTweak locally](#building-revengetweak-locally), as well as run `make spm` for the Swift LSP to work. diff --git a/Sources/LoaderConfig.m b/Sources/LoaderConfig.m index bfc31f4..b04530b 100644 --- a/Sources/LoaderConfig.m +++ b/Sources/LoaderConfig.m @@ -7,20 +7,20 @@ + (instancetype)defaultConfig { LoaderConfig *config = [[LoaderConfig alloc] init]; config.customLoadUrlEnabled = NO; - config.customLoadUrl = [NSURL URLWithString:@"http://localhost:4040/bunny.js"]; + config.customLoadUrl = [NSURL URLWithString:@"http://localhost:4040/revenge.js"]; return config; } + (instancetype)getLoaderConfig { BunnyLog(@"Getting loader config"); - + NSURL *loaderConfigUrl = [getPyoncordDirectory() URLByAppendingPathComponent:@"loader.json"]; - + if ([[NSFileManager defaultManager] fileExistsAtPath:loaderConfigUrl.path]) { NSError *error = nil; NSData *data = [NSData dataWithContentsOfURL:loaderConfigUrl]; NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error]; - + if (json && !error) { LoaderConfig *config = [[LoaderConfig alloc] init]; NSDictionary *customLoadUrl = json[@"customLoadUrl"]; @@ -34,7 +34,7 @@ return config; } } - + BunnyLog(@"Couldn't get loader config"); return [LoaderConfig defaultConfig]; } @@ -47,9 +47,9 @@ @"url": self.customLoadUrl.absoluteString } }; - + NSData *data = [NSJSONSerialization dataWithJSONObject:json options:0 error:nil]; return [data writeToURL:loaderConfigUrl atomically:YES]; } -@end \ No newline at end of file +@end diff --git a/Sources/Tweak.x b/Sources/Tweak.x index 26f995f..ceec006 100644 --- a/Sources/Tweak.x +++ b/Sources/Tweak.x @@ -15,13 +15,13 @@ static LoaderConfig *loaderConfig; %hook NSFileManager - (NSURL *)containerURLForSecurityApplicationGroupIdentifier:(NSString *)groupIdentifier { - BunnyLog(@"containerURLForSecurityApplicationGroupIdentifier called! %@", + BunnyLog(@"containerURLForSecurityApplicationGroupIdentifier called! %@", groupIdentifier ?: @"nil"); - + if (isJailbroken) { return %orig(groupIdentifier); } - + NSArray *paths = [self URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask]; NSURL *lastPath = [paths lastObject]; return [lastPath URLByAppendingPathComponent:@"AppGroup"]; @@ -55,7 +55,7 @@ static LoaderConfig *loaderConfig; %orig(patchData, source, YES); __block NSData *bundle = [NSData dataWithContentsOfURL:[pyoncordDirectory URLByAppendingPathComponent:@"bundle.js"]]; - + dispatch_group_t group = dispatch_group_create(); dispatch_group_enter(group); @@ -64,16 +64,16 @@ static LoaderConfig *loaderConfig; bundleUrl = loaderConfig.customLoadUrl; BunnyLog(@"Using custom load URL: %@", bundleUrl.absoluteString); } else { - bundleUrl = [NSURL URLWithString:@"https://raw.githubusercontent.com/bunny-mod/builds/main/bunny.min.js"]; + bundleUrl = [NSURL URLWithString:@"https://github.com/revenge-mod/revenge-bundle/releases/latest/download/revenge.min.js"]; BunnyLog(@"Using default bundle URL: %@", bundleUrl.absoluteString); } - NSMutableURLRequest *bundleRequest = [NSMutableURLRequest requestWithURL:bundleUrl - cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData + NSMutableURLRequest *bundleRequest = [NSMutableURLRequest requestWithURL:bundleUrl + cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:3.0]; - NSString *bundleEtag = [NSString stringWithContentsOfURL:[pyoncordDirectory URLByAppendingPathComponent:@"etag.txt"] - encoding:NSUTF8StringEncoding + NSString *bundleEtag = [NSString stringWithContentsOfURL:[pyoncordDirectory URLByAppendingPathComponent:@"etag.txt"] + encoding:NSUTF8StringEncoding error:nil]; if (bundleEtag && bundle) { [bundleRequest setValue:bundleEtag forHTTPHeaderField:@"If-None-Match"]; @@ -86,12 +86,12 @@ static LoaderConfig *loaderConfig; if (httpResponse.statusCode == 200) { bundle = data; [bundle writeToURL:[pyoncordDirectory URLByAppendingPathComponent:@"bundle.js"] atomically:YES]; - + NSString *etag = [httpResponse.allHeaderFields objectForKey:@"Etag"]; if (etag) { - [etag writeToURL:[pyoncordDirectory URLByAppendingPathComponent:@"etag.txt"] - atomically:YES - encoding:NSUTF8StringEncoding + [etag writeToURL:[pyoncordDirectory URLByAppendingPathComponent:@"etag.txt"] + atomically:YES + encoding:NSUTF8StringEncoding error:nil]; } } @@ -152,25 +152,25 @@ static LoaderConfig *loaderConfig; %end %ctor { - @autoreleasepool { + @autoreleasepool { source = [NSURL URLWithString:@"bunny"]; - + NSString *install_prefix = @"/var/jb"; isJailbroken = [[NSFileManager defaultManager] fileExistsAtPath:install_prefix]; - + NSString *bundlePath = [NSString stringWithFormat:@"%@/Library/Application Support/BunnyResources.bundle", install_prefix]; BunnyLog(@"Is jailbroken: %d", isJailbroken); BunnyLog(@"Bundle path for jailbroken: %@", bundlePath); - + NSString *jailedPath = [[NSBundle mainBundle].bundleURL.path stringByAppendingPathComponent:@"BunnyResources.bundle"]; BunnyLog(@"Bundle path for jailed: %@", jailedPath); - + bunnyPatchesBundlePath = isJailbroken ? bundlePath : jailedPath; BunnyLog(@"Selected bundle path: %@", bunnyPatchesBundlePath); - + BOOL bundleExists = [[NSFileManager defaultManager] fileExistsAtPath:bunnyPatchesBundlePath]; BunnyLog(@"Bundle exists at path: %d", bundleExists); - + NSError *error = nil; NSArray *bundleContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:bunnyPatchesBundlePath error:&error]; if (error) { @@ -178,10 +178,10 @@ static LoaderConfig *loaderConfig; } else { BunnyLog(@"Bundle contents: %@", bundleContents); } - + pyoncordDirectory = getPyoncordDirectory(); loaderConfig = [[LoaderConfig alloc] init]; - + %init; } -} \ No newline at end of file +} diff --git a/app-repo.json b/app-repo.json index 35c3005..5c6b0cd 100644 --- a/app-repo.json +++ b/app-repo.json @@ -1,76 +1,40 @@ { - "name": "Pyoncord App Repo", - "identifier": "io.github.pyoncord.repo", - "iconURL": "https://pyoncord.github.io/assets/icon-altstore.png", + "name": "Revenge App Repo", + "identifier": "io.github.revenge-mod.repo", + "iconURL": "https://avatars.githubusercontent.com/u/159218871?s=200&v=4", "apps": [ { - "name": "Bunny", + "name": "Revenge", "bundleIdentifier": "com.hammerandchisel.discord", - "developerName": "Pylix", - "iconURL": "https://pyoncord.github.io/assets/icon-altstore.png", + "developerName": "Cristiandis", + "iconURL": "https://avatars.githubusercontent.com/u/159218871?s=200&v=4", "localizedDescription": "A client mod for Discord", "subtitle": "A client mod for Discord", "tintColor": "7289da", "versions": [ { - "version": "247.2", - "date": "2024-09-20", - "size": 96426195, - "downloadURL": "https://github.com/pyoncord/BunnyTweak/releases/download/v247.2/Bunny.ipa" + "version": "250.0", + "date": "2024-10-20", + "size": 101218873, + "downloadURL": "https://github.com/revenge-mod/revenge-tweak/releases/download/v250.0/Revenge.ipa" }, { - "version": "247.0", - "date": "2024-09-18", - "size": 96629525, - "downloadURL": "https://github.com/pyoncord/BunnyTweak/releases/download/v247.0/Bunny.ipa" + "version": "250.0", + "date": "2024-10-17", + "size": 101218840, + "downloadURL": "https://github.com/revenge-mod/revenge-tweak/releases/download/v250.0/Revenge.ipa" + }, + { + "version": "246.0", + "date": "2024-09-15", + "size": 102811465, + "downloadURL": "https://github.com/revenge-mod/RevengeTweak/releases/download/v246.0/Revenge.ipa" }, { "version": "246.0", "date": "2024-09-14", - "size": 103195545, - "downloadURL": "https://github.com/pyoncord/BunnyTweak/releases/download/v246.0/Bunny.ipa" - }, - { - "version": "237.0", - "date": "2024-07-13", - "size": 114323285, - "downloadURL": "https://github.com/pyoncord/BunnyTweak/releases/download/v237.0/Bunny.ipa" - }, - { - "version": "235.0", - "date": "2024-06-27", - "size": 112173273, - "downloadURL": "https://github.com/pyoncord/BunnyTweak/releases/download/v235.0/Bunny.ipa" - }, - { - "version": "234.0", - "date": "2024-06-24", - "size": 111671815, - "downloadURL": "https://github.com/pyoncord/BunnyTweak/releases/download/v234.0/Bunny.ipa" - }, - { - "version": "230.0", - "date": "2024-05-18", - "size": 102457139, - "downloadURL": "https://github.com/pyoncord/BunnyTweak/releases/download/v230.0/Bunny.ipa" - }, - { - "version": "229.0", - "date": "2024-05-16", - "size": 103776118, - "downloadURL": "https://github.com/pyoncord/BunnyTweak/releases/download/v229.0/Bunny.ipa" - }, - { - "version": "226.1", - "date": "2024-04-30", - "size": 102705408, - "downloadURL": "https://github.com/pyoncord/BunnyTweak/releases/download/v226.1/Pyoncord.ipa" - }, - { - "version": "223.0", - "date": "2024-04-08", - "size": 106082919, - "downloadURL": "https://github.com/pyoncord/BunnyTweak/releases/download/v223.0/Pyoncord.ipa" + "size": 103194076, + "downloadURL": "https://github.com/revenge-mod/RevengeTweak/releases/download/v246.0/Revenge.ipa" } ], "appPermissions": {} diff --git a/assets/logo/logo-dark.svg b/assets/logo/logo-dark.svg new file mode 100644 index 0000000..cb34519 --- /dev/null +++ b/assets/logo/logo-dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/logo/logo-light.svg b/assets/logo/logo-light.svg new file mode 100644 index 0000000..b16e22f --- /dev/null +++ b/assets/logo/logo-light.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/wordmark/wordmark+slogan-dark.svg b/assets/wordmark/wordmark+slogan-dark.svg new file mode 100644 index 0000000..2f3c148 --- /dev/null +++ b/assets/wordmark/wordmark+slogan-dark.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/wordmark/wordmark+slogan-light.svg b/assets/wordmark/wordmark+slogan-light.svg new file mode 100644 index 0000000..eefd512 --- /dev/null +++ b/assets/wordmark/wordmark+slogan-light.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/control b/control index 7c3f94f..d1a45b9 100644 --- a/control +++ b/control @@ -1,11 +1,11 @@ -Package: app.pyoncord -Name: Bunny -Version: 0.4.0 +Package: io.github.revenge-mod.app +Name: Revenge +Version: 2.0.0 Architecture: iphoneos-arm -Description: A client modification for Discord's mobile app. -Maintainer: Pylix -Author: Pylix, Adrian Castro, FieryFlames -Icon: https://avatars.githubusercontent.com/u/132727175 +Description: A mod for Discord's mobile apps. +Maintainer: Cristiandis +Author: Pylix, Adrian Castro, FieryFlames, Cristiandis +Icon: https://avatars.githubusercontent.com/u/159218871 Section: Tweaks Depends: mobilesubstrate (>= 0.9.5000) -Conflicts: app.enmity, mod.vendetta +Conflicts: app.enmity, mod.vendetta, app.bunny