mirror of
https://github.com/NohamR/Tweaks.git
synced 2026-05-25 04:17:15 +00:00
Compare commits
3 Commits
TF1Plus-tv
...
OqeePlus-t
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4475f596d5 | ||
|
|
75f7add11f | ||
|
|
0fa7d613d8 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,5 +1,2 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
/CreditAgricoleTweak
|
|
||||||
/RMHook
|
|
||||||
/rootless
|
|
||||||
Build.md
|
Build.md
|
||||||
3
OqeePlus/OqeePlus-iOS/.gitignore
vendored
Normal file
3
OqeePlus/OqeePlus-iOS/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.theos/
|
||||||
|
packages/
|
||||||
|
.DS_Store
|
||||||
12
OqeePlus/OqeePlus-iOS/Makefile
Normal file
12
OqeePlus/OqeePlus-iOS/Makefile
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
TARGET = iphone:latest:14.0
|
||||||
|
ARCHS = arm64
|
||||||
|
INSTALL_TARGET_PROCESSES = Oqee
|
||||||
|
|
||||||
|
include $(THEOS)/makefiles/common.mk
|
||||||
|
|
||||||
|
TWEAK_NAME = OqeePlus
|
||||||
|
|
||||||
|
OqeePlus_FILES = Tweak.x
|
||||||
|
OqeePlus_CFLAGS = -fobjc-arc
|
||||||
|
|
||||||
|
include $(THEOS_MAKE_PATH)/tweak.mk
|
||||||
10
OqeePlus/OqeePlus-iOS/OqeePlus.plist
Normal file
10
OqeePlus/OqeePlus-iOS/OqeePlus.plist
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
Filter = {
|
||||||
|
Bundles = (
|
||||||
|
"net.oqee.appleos",
|
||||||
|
);
|
||||||
|
Executables = (
|
||||||
|
App,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
143
OqeePlus/OqeePlus-iOS/Tweak.x
Normal file
143
OqeePlus/OqeePlus-iOS/Tweak.x
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
#import <substrate.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import <AVFoundation/AVFoundation.h>
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#include <mach-o/dyld.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define TAG @"[OQAdsLogger]"
|
||||||
|
|
||||||
|
%hook IMAAdsRequest
|
||||||
|
- (instancetype)initWithAdsResponse:(NSString *)adsResponse
|
||||||
|
adDisplayContainer:(id)adDisplayContainer
|
||||||
|
avPlayerVideoDisplay:(id)avPlayerVideoDisplay
|
||||||
|
pictureInPictureProxy:(id)pipProxy
|
||||||
|
userContext:(id)userContext {
|
||||||
|
|
||||||
|
NSLog(@"%@-[IMAAdsRequest init] [PiP path]", TAG);
|
||||||
|
NSLog(@"%@ adDisplayContainer = %@", TAG, adDisplayContainer);
|
||||||
|
NSLog(@"%@ avPlayerVideoDisplay = %@", TAG, avPlayerVideoDisplay);
|
||||||
|
NSLog(@"%@ pictureInPictureProxy = %@", TAG, pipProxy);
|
||||||
|
NSLog(@"%@ VMAP payload (%lu bytes):\n%@",
|
||||||
|
TAG, (unsigned long)adsResponse.length, adsResponse);
|
||||||
|
|
||||||
|
id result = %orig;
|
||||||
|
NSLog(@"%@ -> IMAAdsRequest = %p", TAG, result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// - (instancetype)initWithAdsResponse:(NSString *)adsResponse
|
||||||
|
// adDisplayContainer:(id)adDisplayContainer
|
||||||
|
// contentPlayhead:(id)contentPlayhead
|
||||||
|
// userContext:(id)userContext {
|
||||||
|
|
||||||
|
// NSLog(@"%@-[IMAAdsRequest init] [non-PiP path]", TAG);
|
||||||
|
// NSLog(@"%@ adDisplayContainer = %@", TAG, adDisplayContainer);
|
||||||
|
// NSLog(@"%@ contentPlayhead = %@", TAG, contentPlayhead);
|
||||||
|
// NSLog(@"%@ VMAP payload (%lu bytes):\n%@",
|
||||||
|
// TAG, (unsigned long)adsResponse.length, adsResponse);
|
||||||
|
|
||||||
|
// id result = %orig;
|
||||||
|
// NSLog(@"%@ -> IMAAdsRequest = %p", TAG, result);
|
||||||
|
// return result;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// - (instancetype)initWithAdsResponse:(NSString *)adsResponse
|
||||||
|
// adDisplayContainer:(id)adDisplayContainer
|
||||||
|
// contentPlayhead:(id)contentPlayhead
|
||||||
|
// userContext:(id)userContext {
|
||||||
|
// NSString *tweakedVMAP = @"<?xml version='1.0' encoding='utf-8'?>\n"
|
||||||
|
// @"<vmap:VMAP\n"
|
||||||
|
// @" xmlns:vmap=\"http://www.iab.net/vmap-1.0\" version=\"1.0\">\n"
|
||||||
|
// @" <vmap:AdBreak breakId=\"pre-roll-intro\" breakType=\"linear\" timeOffset=\"start\">\n"
|
||||||
|
// @" <vmap:AdSource allowMultipleAds=\"false\" followRedirects=\"true\" id=\"1\">\n"
|
||||||
|
// @" <vmap:VASTAdData>\n"
|
||||||
|
// @" <VAST\n"
|
||||||
|
// @" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" version=\"3.0\" xsi:noNamespaceSchemaLocation=\"vast.xsd\">\n"
|
||||||
|
// @" <Ad id=\"breakIntro\" sequence=\"1\">\n"
|
||||||
|
// @" <InLine>\n"
|
||||||
|
// @" <AdSystem>VizChoice</AdSystem>\n"
|
||||||
|
// @" <AdTitle>Oqee Cine Break Intro</AdTitle>\n"
|
||||||
|
// @" <Creatives>\n"
|
||||||
|
// @" <Creative>\n"
|
||||||
|
// @" <Linear>\n"
|
||||||
|
// @" <Duration>00:00:03</Duration>\n"
|
||||||
|
// @" <MediaFiles>\n"
|
||||||
|
// @" <MediaFile delivery=\"progressive\" width=\"1920\" height=\"1080\" type=\"video/mp4\">https://noh.am/rick.mp4</MediaFile>\n"
|
||||||
|
// @" <MediaFile delivery=\"streaming\" width=\"1920\" height=\"1080\" type=\"application/dash+xml\">https://replay-01.bzn.oqee.net/oqee-static/barkers/oqee-cine/2025-10-21/adaptative/playlist_214c3e5132137e02.mpd</MediaFile>\n"
|
||||||
|
// @" <MediaFile delivery=\"streaming\" width=\"1920\" height=\"1080\" type=\"application/x-mpegURL\">https://replay-01.bzn.oqee.net/oqee-static/barkers/oqee-cine/2025-10-21/adaptative/playlist_214c3e5132137e02.m3u8</MediaFile>\n"
|
||||||
|
// @" </MediaFiles>\n"
|
||||||
|
// @" </Linear>\n"
|
||||||
|
// @" </Creative>\n"
|
||||||
|
// @" </Creatives>\n"
|
||||||
|
// @" </InLine>\n"
|
||||||
|
// @" </Ad>\n"
|
||||||
|
// @" </VAST>\n"
|
||||||
|
// @" </vmap:VASTAdData>\n"
|
||||||
|
// @" </vmap:AdSource>\n"
|
||||||
|
// @" </vmap:AdBreak>\n"
|
||||||
|
// @"</vmap:VMAP>\n";
|
||||||
|
// NSLog(@"%@ Replaced VMAP (%lu bytes) with tweaked document", TAG, adsResponse.length);
|
||||||
|
// return %orig(tweakedVMAP, adDisplayContainer, contentPlayhead, userContext);
|
||||||
|
// }
|
||||||
|
|
||||||
|
- (instancetype)initWithAdsResponse:(NSString *)adsResponse
|
||||||
|
adDisplayContainer:(id)adDisplayContainer
|
||||||
|
contentPlayhead:(id)contentPlayhead
|
||||||
|
userContext:(id)userContext {
|
||||||
|
// Replace the VMAP with an empty document
|
||||||
|
NSString *emptyVMAP = @"<?xml version='1.0' encoding='utf-8'?>"
|
||||||
|
@"<vmap:VMAP xmlns:vmap=\"http://www.iab.net/vmap-1.0\" version=\"1.0\"/>";
|
||||||
|
NSLog(@"%@ Replaced VMAP (%lu bytes) with empty document", TAG, adsResponse.length);
|
||||||
|
return %orig(emptyVMAP, adDisplayContainer, contentPlayhead, userContext);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// IMAAdsLoader — confirms dispatch to IMA SDK
|
||||||
|
//
|
||||||
|
// Called from OQPlayerAdsLoader.requestAds(_:loader:) (sub_10008FC08)
|
||||||
|
// after Swift dynamic-cast guards pass. This is the point of no return —
|
||||||
|
// the IMA SDK takes ownership of the request and starts network I/O.
|
||||||
|
|
||||||
|
%hook IMAAdsLoader
|
||||||
|
- (void)requestAdsWithRequest:(id)request {
|
||||||
|
NSLog(@"%@ -[IMAAdsLoader requestAdsWithRequest:]", TAG);
|
||||||
|
NSLog(@"%@ loader = %@", TAG, self);
|
||||||
|
NSLog(@"%@ request = %@", TAG, [request debugDescription]);
|
||||||
|
%orig;
|
||||||
|
NSLog(@"%@ requestAdsWithRequest dispatched ✓", TAG);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// IMAAdsManager — SDK parsed the VMAP, breaks are scheduled
|
||||||
|
//
|
||||||
|
// Called from the IMAAdsLoaderDelegate callback in OQImaManager
|
||||||
|
// At this point the IMA SDK has parsed the VMAP and knows all ad break
|
||||||
|
// positions. Passing nil for renderingSettings means OQEE uses defaults.
|
||||||
|
|
||||||
|
%hook IMAAdsManager
|
||||||
|
- (void)initializeWithAdsRenderingSettings:(id)renderingSettings {
|
||||||
|
NSLog(@"%@ -[IMAAdsManager initializeWithAdsRenderingSettings:]", TAG);
|
||||||
|
NSLog(@"%@ adsManager = %@", TAG, self);
|
||||||
|
NSLog(@"%@ renderingSettings = %@", TAG, renderingSettings ?: @"(nil — default)");
|
||||||
|
%orig;
|
||||||
|
NSLog(@"%@ VMAP parsed, ad breaks scheduled ✓", TAG);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
|
||||||
|
%hook VSSubscriptionRegistrationCenter
|
||||||
|
- (void)setCurrentSubscription:(id)subscription
|
||||||
|
{
|
||||||
|
NSLog(@"Blocked VSSubscriptionRegistrationCenter");
|
||||||
|
NSLog(@"Subscription: %@", subscription);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%ctor {
|
||||||
|
// activate dev mode
|
||||||
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
[defaults setBool:YES forKey:@"tv.oqee.devModeEnabled"];
|
||||||
|
}
|
||||||
9
OqeePlus/OqeePlus-iOS/control
Normal file
9
OqeePlus/OqeePlus-iOS/control
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Package: xyz.nohamr.oqeeplus
|
||||||
|
Name: Oqee+ (iOS)
|
||||||
|
Version: 1.0
|
||||||
|
Architecture: iphoneos-arm64
|
||||||
|
Description: Oqee+ Ads blocker hook for iOS
|
||||||
|
Maintainer: NohamR
|
||||||
|
Author: NohamR
|
||||||
|
Section: Tweaks
|
||||||
|
Depends: mobilesubstrate (>= 0.9.5000)
|
||||||
22
OqeePlus/OqeePlus-iOS/index.md
Normal file
22
OqeePlus/OqeePlus-iOS/index.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# OqeePlus iOS
|
||||||
|
|
||||||
|
Block ads initialization on Oqee.
|
||||||
|
|
||||||
|
- **App**: [OqeePlus : Streaming, TV en Direct](https://apps.apple.com/fr/app/free-tv/id1542614107)
|
||||||
|
- **Tested version**: 2.40
|
||||||
|
- **Target**: iOS
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
```sh
|
||||||
|
make package FINALPACKAGE=1
|
||||||
|
```
|
||||||
|
|
||||||
|
## Inject
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cyan -i oqeeplus.ipa \
|
||||||
|
-o oqeeplus_patched.ipa \
|
||||||
|
-f xyz.nohamr.oqeeplus_1.0_iphoneos-arm64.deb \
|
||||||
|
-u
|
||||||
|
```
|
||||||
3
OqeePlus/OqeePlus-tvOS/.gitignore
vendored
Normal file
3
OqeePlus/OqeePlus-tvOS/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.theos/
|
||||||
|
packages/
|
||||||
|
.DS_Store
|
||||||
13
OqeePlus/OqeePlus-tvOS/Makefile
Normal file
13
OqeePlus/OqeePlus-tvOS/Makefile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
TARGET = appletv:latest:18.3
|
||||||
|
ARCHS = arm64
|
||||||
|
INSTALL_TARGET_PROCESSES = Oqee
|
||||||
|
THEOS_PACKAGE_SCHEME = rootless
|
||||||
|
|
||||||
|
include $(THEOS)/makefiles/common.mk
|
||||||
|
|
||||||
|
TWEAK_NAME = OqeePlus
|
||||||
|
|
||||||
|
OqeePlus_FILES = Tweak.x
|
||||||
|
OqeePlus_CFLAGS = -fobjc-arc
|
||||||
|
|
||||||
|
include $(THEOS_MAKE_PATH)/tweak.mk
|
||||||
10
OqeePlus/OqeePlus-tvOS/OqeePlus.plist
Normal file
10
OqeePlus/OqeePlus-tvOS/OqeePlus.plist
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
Filter = {
|
||||||
|
Bundles = (
|
||||||
|
"net.oqee.appleos",
|
||||||
|
);
|
||||||
|
Executables = (
|
||||||
|
App,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
88
OqeePlus/OqeePlus-tvOS/Tweak.x
Normal file
88
OqeePlus/OqeePlus-tvOS/Tweak.x
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
#import <substrate.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import <AVFoundation/AVFoundation.h>
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#include <mach-o/dyld.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define TAG @"[OQAdsLogger]"
|
||||||
|
|
||||||
|
%hook IMAAdsRequest
|
||||||
|
- (instancetype)initWithAdsResponse:(NSString *)adsResponse
|
||||||
|
adDisplayContainer:(id)adDisplayContainer
|
||||||
|
avPlayerVideoDisplay:(id)avPlayerVideoDisplay
|
||||||
|
pictureInPictureProxy:(id)pipProxy
|
||||||
|
userContext:(id)userContext {
|
||||||
|
|
||||||
|
NSLog(@"%@-[IMAAdsRequest init] [PiP path]", TAG);
|
||||||
|
NSLog(@"%@ adDisplayContainer = %@", TAG, adDisplayContainer);
|
||||||
|
NSLog(@"%@ avPlayerVideoDisplay = %@", TAG, avPlayerVideoDisplay);
|
||||||
|
NSLog(@"%@ pictureInPictureProxy = %@", TAG, pipProxy);
|
||||||
|
NSLog(@"%@ VMAP payload (%lu bytes):\n%@",
|
||||||
|
TAG, (unsigned long)adsResponse.length, adsResponse);
|
||||||
|
|
||||||
|
id result = %orig;
|
||||||
|
NSLog(@"%@ -> IMAAdsRequest = %p", TAG, result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (instancetype)initWithAdsResponse:(NSString *)adsResponse
|
||||||
|
adDisplayContainer:(id)adDisplayContainer
|
||||||
|
contentPlayhead:(id)contentPlayhead
|
||||||
|
userContext:(id)userContext {
|
||||||
|
// Replace the VMAP with an empty document
|
||||||
|
NSString *emptyVMAP = @"<?xml version='1.0' encoding='utf-8'?>"
|
||||||
|
@"<vmap:VMAP xmlns:vmap=\"http://www.iab.net/vmap-1.0\" version=\"1.0\"/>";
|
||||||
|
NSLog(@"%@ Replaced VMAP (%lu bytes) with empty document", TAG, adsResponse.length);
|
||||||
|
return %orig(emptyVMAP, adDisplayContainer, contentPlayhead, userContext);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// IMAAdsLoader — confirms dispatch to IMA SDK
|
||||||
|
//
|
||||||
|
// Called from OQPlayerAdsLoader.requestAds(_:loader:) (sub_10008FC08)
|
||||||
|
// after Swift dynamic-cast guards pass. This is the point of no return —
|
||||||
|
// the IMA SDK takes ownership of the request and starts network I/O.
|
||||||
|
|
||||||
|
%hook IMAAdsLoader
|
||||||
|
- (void)requestAdsWithRequest:(id)request {
|
||||||
|
NSLog(@"%@ -[IMAAdsLoader requestAdsWithRequest:]", TAG);
|
||||||
|
NSLog(@"%@ loader = %@", TAG, self);
|
||||||
|
NSLog(@"%@ request = %@", TAG, [request debugDescription]);
|
||||||
|
%orig;
|
||||||
|
NSLog(@"%@ requestAdsWithRequest dispatched ✓", TAG);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
// IMAAdsManager — SDK parsed the VMAP, breaks are scheduled
|
||||||
|
//
|
||||||
|
// Called from the IMAAdsLoaderDelegate callback in OQImaManager
|
||||||
|
// At this point the IMA SDK has parsed the VMAP and knows all ad break
|
||||||
|
// positions. Passing nil for renderingSettings means OQEE uses defaults.
|
||||||
|
|
||||||
|
%hook IMAAdsManager
|
||||||
|
- (void)initializeWithAdsRenderingSettings:(id)renderingSettings {
|
||||||
|
NSLog(@"%@ -[IMAAdsManager initializeWithAdsRenderingSettings:]", TAG);
|
||||||
|
NSLog(@"%@ adsManager = %@", TAG, self);
|
||||||
|
NSLog(@"%@ renderingSettings = %@", TAG, renderingSettings ?: @"(nil — default)");
|
||||||
|
%orig;
|
||||||
|
NSLog(@"%@ VMAP parsed, ad breaks scheduled ✓", TAG);
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
|
||||||
|
%hook VSSubscriptionRegistrationCenter
|
||||||
|
- (void)setCurrentSubscription:(id)subscription
|
||||||
|
{
|
||||||
|
NSLog(@"Blocked VSSubscriptionRegistrationCenter");
|
||||||
|
NSLog(@"Subscription: %@", subscription);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
|
||||||
|
%ctor {
|
||||||
|
// activate dev mode
|
||||||
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
[defaults setBool:YES forKey:@"tv.oqee.devModeEnabled"];
|
||||||
|
}
|
||||||
9
OqeePlus/OqeePlus-tvOS/control
Normal file
9
OqeePlus/OqeePlus-tvOS/control
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Package: xyz.nohamr.oqeeplus
|
||||||
|
Name: Oqee+ (tvOS)
|
||||||
|
Version: 1.0
|
||||||
|
Architecture: appletvos-arm64
|
||||||
|
Description: Oqee+ Ads blocker hook for tvOS
|
||||||
|
Maintainer: NohamR
|
||||||
|
Author: NohamR
|
||||||
|
Section: Tweaks
|
||||||
|
Depends: mobilesubstrate (>= 0.9.5000)
|
||||||
22
OqeePlus/OqeePlus-tvOS/index.md
Normal file
22
OqeePlus/OqeePlus-tvOS/index.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# OqeePlus tvOS
|
||||||
|
|
||||||
|
Block ads initialization on Oqee.
|
||||||
|
|
||||||
|
- **App**: [OqeePlus : Streaming, TV en Direct](https://apps.apple.com/fr/app/free-tv/id1542614107)
|
||||||
|
- **Tested version**: 2.40
|
||||||
|
- **Target**: tvOS
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
```sh
|
||||||
|
make package FINALPACKAGE=1
|
||||||
|
```
|
||||||
|
|
||||||
|
## Inject
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cyan -i oqeeplus.ipa \
|
||||||
|
-o oqeeplus_patched.ipa \
|
||||||
|
-f xyz.nohamr.oqeeplus_1.0_appletvos-arm64.deb \
|
||||||
|
-u
|
||||||
|
```
|
||||||
@@ -15,6 +15,8 @@ iOS tweaks built with [Theos](https://theos.dev), injected into IPAs via [cyan](
|
|||||||
| [Infuse (iOS)](Infuse/Infuse-iOS/index.md) | Infuse 8.4.2 | iOS 18+ |
|
| [Infuse (iOS)](Infuse/Infuse-iOS/index.md) | Infuse 8.4.2 | iOS 18+ |
|
||||||
| [TF1+ (tvOS)](TF1Plus/TF1Plus-tvOS/index.md) | TF1+ 11.36.0 | tvOS |
|
| [TF1+ (tvOS)](TF1Plus/TF1Plus-tvOS/index.md) | TF1+ 11.36.0 | tvOS |
|
||||||
| [TF1+ (iOS)](TF1Plus/TF1Plus-iOS/index.md) | TF1+ 11.36.0 | iOS 14+ |
|
| [TF1+ (iOS)](TF1Plus/TF1Plus-iOS/index.md) | TF1+ 11.36.0 | iOS 14+ |
|
||||||
|
| [OqeePlus (tvOS)](OqeePlus/OqeePlus-tvOS/index.md) | Oqee 2.40 | tvOS 18.3 |
|
||||||
|
| [OqeePlus (iOS)](OqeePlus/OqeePlus-iOS/index.md) | Oqee 2.40 | iOS 18+ |
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
|
|||||||
5
RMHook/index.md
Normal file
5
RMHook/index.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# RMHook-iOS
|
||||||
|
|
||||||
|
A dynamic library injection tweak for the reMarkable iOS app, enabling connection to self-hosted [rmfakecloud](https://github.com/ddvk/rmfakecloud) servers.
|
||||||
|
|
||||||
|
See the [GitHub Repository](https://github.com/NohamR/RMHook-iOS) for full details, building instructions, and credits.
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
"com.tf1.applitf1",
|
"com.tf1.applitf1",
|
||||||
);
|
);
|
||||||
Executables = (
|
Executables = (
|
||||||
mytf1,
|
App,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -5,3 +5,12 @@
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
%hook VSSubscriptionRegistrationCenter
|
||||||
|
- (void)setCurrentSubscription:(id)subscription
|
||||||
|
{
|
||||||
|
NSLog(@"Blocked VSSubscriptionRegistrationCenter");
|
||||||
|
NSLog(@"Subscription: %@", subscription);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
%end
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
Block ads initialization on TF1+.
|
Block ads initialization on TF1+.
|
||||||
|
|
||||||
- **App**: [TF1+ : Streaming, TV en Direct](https://apps.apple.com/fr/app/tf1-streaming-tv-en-direct/id407248490)
|
- **App**: [TF1+ : Streaming, TV en Direct](https://apps.apple.com/fr/app/tf1-streaming-tv-en-direct/id407248490)
|
||||||
- **Tested version**: 11.36.0
|
- **Tested version**: 23.3.1
|
||||||
- **Target**: iOS
|
- **Target**: iOS
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|||||||
128
scripts/patch_and_server.py
Normal file
128
scripts/patch_and_server.py
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import shutil
|
||||||
|
import socket
|
||||||
|
|
||||||
|
|
||||||
|
def get_local_ip():
|
||||||
|
try:
|
||||||
|
# Try macOS command
|
||||||
|
output = subprocess.check_output(
|
||||||
|
["ipconfig", "getifaddr", "en0"], stderr=subprocess.DEVNULL
|
||||||
|
)
|
||||||
|
return output.decode("utf-8").strip()
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
try:
|
||||||
|
# Try Linux command
|
||||||
|
output = subprocess.check_output(
|
||||||
|
["hostname", "-I"], stderr=subprocess.DEVNULL
|
||||||
|
)
|
||||||
|
return output.decode("utf-8").split()[0].strip()
|
||||||
|
except (subprocess.CalledProcessError, IndexError):
|
||||||
|
pass
|
||||||
|
|
||||||
|
# Fallback to socket method
|
||||||
|
try:
|
||||||
|
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||||
|
s.connect(("8.8.8.8", 80))
|
||||||
|
ip = s.getsockname()[0]
|
||||||
|
s.close()
|
||||||
|
return ip
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
if len(sys.argv) != 3:
|
||||||
|
print(f"Usage: {os.path.basename(sys.argv[0])} <file.ipa> <file.deb>")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
ipa_file = None
|
||||||
|
deb_file = None
|
||||||
|
|
||||||
|
for arg in sys.argv[1:]:
|
||||||
|
if arg.endswith(".ipa"):
|
||||||
|
ipa_file = arg
|
||||||
|
elif arg.endswith(".deb"):
|
||||||
|
deb_file = arg
|
||||||
|
else:
|
||||||
|
print(f"Unknown file type: {arg}")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
if not ipa_file or not deb_file:
|
||||||
|
print("You must provide one .ipa and one .deb file.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
out_dir = "/tmp/ipa_patched"
|
||||||
|
os.makedirs(out_dir, exist_ok=True)
|
||||||
|
|
||||||
|
ipa_name = os.path.basename(ipa_file)
|
||||||
|
output_ipa = os.path.join(out_dir, ipa_name)
|
||||||
|
|
||||||
|
print("[+] Patching IPA with cyan...")
|
||||||
|
try:
|
||||||
|
subprocess.run(
|
||||||
|
[
|
||||||
|
"cyan",
|
||||||
|
"-i",
|
||||||
|
ipa_file,
|
||||||
|
"-o",
|
||||||
|
output_ipa,
|
||||||
|
"-f",
|
||||||
|
deb_file,
|
||||||
|
"-u",
|
||||||
|
"--overwrite",
|
||||||
|
],
|
||||||
|
check=True,
|
||||||
|
)
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
print("[-] Patch failed.")
|
||||||
|
sys.exit(1)
|
||||||
|
except FileNotFoundError:
|
||||||
|
print(
|
||||||
|
"[-] 'cyan' command not found. Please ensure it is installed and in your PATH."
|
||||||
|
)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
print("[+] Patch complete.")
|
||||||
|
|
||||||
|
local_ip = get_local_ip()
|
||||||
|
if not local_ip:
|
||||||
|
print("Could not detect local IP automatically.")
|
||||||
|
local_ip = "YOUR_IP"
|
||||||
|
|
||||||
|
download_link = f"http://{local_ip}:8000/{ipa_name}"
|
||||||
|
|
||||||
|
print()
|
||||||
|
print("==========================================")
|
||||||
|
print("Download link:")
|
||||||
|
print(download_link)
|
||||||
|
print("==========================================")
|
||||||
|
print()
|
||||||
|
|
||||||
|
# Try to copy to clipboard using pbcopy on macOS
|
||||||
|
try:
|
||||||
|
if shutil.which("pbcopy"):
|
||||||
|
subprocess.run(["pbcopy"], input=download_link.encode("utf-8"), check=True)
|
||||||
|
print("[+] Download link copied to clipboard.")
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
print("[+] Starting HTTP server...")
|
||||||
|
print("Press Ctrl+C to stop.")
|
||||||
|
print()
|
||||||
|
|
||||||
|
# Start python HTTP server
|
||||||
|
try:
|
||||||
|
subprocess.run(
|
||||||
|
[sys.executable, "-m", "http.server", "8000", "--directory", out_dir]
|
||||||
|
)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("\nStopping HTTP server...")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
159
scripts/watch_and_server.py
Normal file
159
scripts/watch_and_server.py
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import shutil
|
||||||
|
import socket
|
||||||
|
import time
|
||||||
|
import glob
|
||||||
|
import threading
|
||||||
|
|
||||||
|
|
||||||
|
def get_local_ip():
|
||||||
|
try:
|
||||||
|
output = subprocess.check_output(
|
||||||
|
["ipconfig", "getifaddr", "en0"], stderr=subprocess.DEVNULL
|
||||||
|
)
|
||||||
|
return output.decode("utf-8").strip()
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
try:
|
||||||
|
output = subprocess.check_output(
|
||||||
|
["hostname", "-I"], stderr=subprocess.DEVNULL
|
||||||
|
)
|
||||||
|
return output.decode("utf-8").split()[0].strip()
|
||||||
|
except (subprocess.CalledProcessError, IndexError):
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||||
|
s.connect(("8.8.8.8", 80))
|
||||||
|
ip = s.getsockname()[0]
|
||||||
|
s.close()
|
||||||
|
return ip
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def patch_ipa(ipa_file, deb_file, output_ipa):
|
||||||
|
print(f"\n[+] Patching IPA with cyan using {os.path.basename(deb_file)}...")
|
||||||
|
try:
|
||||||
|
subprocess.run(
|
||||||
|
[
|
||||||
|
"cyan",
|
||||||
|
"-i",
|
||||||
|
ipa_file,
|
||||||
|
"-o",
|
||||||
|
output_ipa,
|
||||||
|
"-f",
|
||||||
|
deb_file,
|
||||||
|
"-u",
|
||||||
|
"--overwrite",
|
||||||
|
],
|
||||||
|
check=True,
|
||||||
|
)
|
||||||
|
print("[+] Patch complete.")
|
||||||
|
return True
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
print("[-] Patch failed.")
|
||||||
|
return False
|
||||||
|
except FileNotFoundError:
|
||||||
|
print(
|
||||||
|
"[-] 'cyan' command not found. Please ensure it is installed and in your PATH."
|
||||||
|
)
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def get_newest_deb(directory):
|
||||||
|
deb_files = glob.glob(os.path.join(directory, "*.deb"))
|
||||||
|
if not deb_files:
|
||||||
|
return None
|
||||||
|
return max(deb_files, key=os.path.getmtime)
|
||||||
|
|
||||||
|
|
||||||
|
def start_server(out_dir):
|
||||||
|
server_process = subprocess.Popen(
|
||||||
|
[sys.executable, "-m", "http.server", "8000", "--directory", out_dir]
|
||||||
|
)
|
||||||
|
return server_process
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
if len(sys.argv) != 3:
|
||||||
|
print(f"Usage: {os.path.basename(sys.argv[0])} <file.ipa> <file.deb>")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
ipa_file = None
|
||||||
|
initial_deb_file = None
|
||||||
|
|
||||||
|
for arg in sys.argv[1:]:
|
||||||
|
if arg.endswith(".ipa"):
|
||||||
|
ipa_file = arg
|
||||||
|
elif arg.endswith(".deb"):
|
||||||
|
initial_deb_file = arg
|
||||||
|
else:
|
||||||
|
print(f"Unknown file type: {arg}")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
if not ipa_file or not initial_deb_file:
|
||||||
|
print("You must provide one .ipa and one .deb file.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
out_dir = "/tmp/ipa_patched"
|
||||||
|
os.makedirs(out_dir, exist_ok=True)
|
||||||
|
|
||||||
|
ipa_name = os.path.basename(ipa_file)
|
||||||
|
output_ipa = os.path.join(out_dir, ipa_name)
|
||||||
|
|
||||||
|
deb_dir = os.path.dirname(os.path.abspath(initial_deb_file))
|
||||||
|
current_deb_file = get_newest_deb(deb_dir) or initial_deb_file
|
||||||
|
last_mtime = (
|
||||||
|
os.path.getmtime(current_deb_file) if os.path.exists(current_deb_file) else 0
|
||||||
|
)
|
||||||
|
|
||||||
|
if not patch_ipa(ipa_file, current_deb_file, output_ipa):
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
local_ip = get_local_ip() or "YOUR_IP"
|
||||||
|
download_link = f"http://{local_ip}:8000/{ipa_name}"
|
||||||
|
|
||||||
|
print()
|
||||||
|
print("==========================================")
|
||||||
|
print("Download link:")
|
||||||
|
print(download_link)
|
||||||
|
print("==========================================")
|
||||||
|
print()
|
||||||
|
|
||||||
|
try:
|
||||||
|
if shutil.which("pbcopy"):
|
||||||
|
subprocess.run(["pbcopy"], input=download_link.encode("utf-8"), check=True)
|
||||||
|
print("[+] Download link copied to clipboard.")
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
print("[+] Starting HTTP server...")
|
||||||
|
server_process = start_server(out_dir)
|
||||||
|
|
||||||
|
print(f"[+] Watching for new .deb files in {deb_dir} every 2 seconds...")
|
||||||
|
print("Press Ctrl+C to stop.")
|
||||||
|
|
||||||
|
try:
|
||||||
|
while True:
|
||||||
|
time.sleep(2)
|
||||||
|
newest_deb = get_newest_deb(deb_dir)
|
||||||
|
if newest_deb:
|
||||||
|
current_mtime = os.path.getmtime(newest_deb)
|
||||||
|
if current_mtime > last_mtime:
|
||||||
|
print(
|
||||||
|
f"\n[*] Detected new/updated .deb file: {os.path.basename(newest_deb)}"
|
||||||
|
)
|
||||||
|
patch_ipa(ipa_file, newest_deb, output_ipa)
|
||||||
|
last_mtime = current_mtime
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("\nStopping HTTP server and watcher...")
|
||||||
|
server_process.terminate()
|
||||||
|
server_process.wait()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
Reference in New Issue
Block a user