feat: sideload fixer in tweak

This commit is contained in:
Vlad Frangu 2023-11-11 21:23:30 +02:00
parent 042dcbf786
commit a9b7068e8d
No known key found for this signature in database
GPG key ID: 9E307D4EA83977AC
3 changed files with 23 additions and 1 deletions

7
README.md Normal file
View file

@ -0,0 +1,7 @@
# VendettaTweak
A rootful/rootless tweak to inject Vendetta into a Discord IPA.
## Installation
When injecting this via [`azule`](https://github.com/Al4ise/Azule/tree/main), use the rootful `deb` files (the ones ending in `arm.deb` NOT `arm64.deb`)

View file

@ -1,6 +1,7 @@
import Orion
import VendettaTweakC
import os
import Foundation
let vendettaLog = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "vendetta")
let source = URL(string: "vendetta")!
@ -13,6 +14,20 @@ let vendettaPatchesBundlePath =
? "\(install_prefix)/Library/Application Support/VendettaTweak/VendettaPatches.bundle"
: "\(Bundle.main.bundleURL.path)/VendettaPatches.bundle"
class FileManagerLoadHook: ClassHook<FileManager> {
func containerURLForSecurityApplicationGroupIdentifier(_ groupIdentifier: NSString?) -> URL? {
os_log("containerURLForSecurityApplicationGroupIdentifier called! %{public}@ groupIdentifier", log: vendettaLog, type: .debug, groupIdentifier ?? "nil")
if groupIdentifier != nil {
let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)
let lastPath = paths.last!
return lastPath.appendingPathComponent("AppGroup")
}
return orig.containerURLForSecurityApplicationGroupIdentifier(groupIdentifier)
}
}
class LoadHook: ClassHook<RCTCxxBridge> {
func executeApplicationScript(_ script: Data, url: URL, async: Bool) {
os_log("executeApplicationScript called!", log: vendettaLog, type: .debug)

View file

@ -1,6 +1,6 @@
Package: dev.beefers.vendetta
Name: Vendetta
Version: 0.0.1
Version: 0.0.2
Architecture: iphoneos-arm
Description: A mod for Discord's mobile apps.
Maintainer: FieryFlames