tweak

Blocking incoming sms in iOS 7

我怕爱的太早我们不能终老 提交于 2019-12-08 02:27:35
问题 I want to write a tweak for jailbroken devices that blocks messages from a phone number(in iOS 7). First I used the second answer of creker in this link for writing the tweak. Here is my code: #import <substrate.h> #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #import <libkern/OSAtomic.h> #import "CTMessage.h" #import "CTMessageCenter.h" id(*_processReceivedMessage_orig)(id, SEL, CTMessage*) = NULL; id _processReceivedMessage_hooked(id self, SEL _cmd, CTMessage* msg); %hook

finding IOSurface headers

旧巷老猫 提交于 2019-12-08 02:26:46
问题 I'm getting this error when I try to compile my tweak. 'IOSurface/IOSurfaceAPI.h' file not found #include <IOSurface/IOSurfaceAPI.h> I've tried this answer, but I can't find /System/Library/Frameworks/IOSurface.framework/Headers on my computer. I'm running osx 10.9.1. Thanks for the help. 回答1: Try this, not sure about the version it comes from: http://ios-toolchain-based-on-clang-for-linux.googlecode.com/files/IOSurfaceAPI.h 来源: https://stackoverflow.com/questions/21009761/finding-iosurface

How to communicate between applications in iOS?

随声附和 提交于 2019-12-06 15:05:58
问题 Before we can use CFMessagePort , but now it's invalid for iOS7 and above, is there any replaced methods? I tried CFMessagePort when hooking the constructor of UIApplication in the jailbreak environment, but in most of the apps, it can't CFMessagePortCreateLocal successfully, it just return NULL.Am I wrong somewhere? static void setupUIApplicationMessagePort() { NSString *identifier = @"com.foo.foo.UIApplication"; CFMessagePortRef local = CFMessagePortCreateLocal(NULL, (__bridge CFStringRef

Errors while running the Code?

坚强是说给别人听的谎言 提交于 2019-12-06 07:31:23
I am trying to compile and use the following code in a background daemon on a jailbroken iphone. #import <AudioToolbox/AudioToolbox.h> #import <libkern/OSAtomic.h> //CoreTelephony.framework extern "C" CFStringRef const kCTCallStatusChangeNotification; extern "C" CFStringRef const kCTCallStatus; extern "C" id CTTelephonyCenterGetDefault(); extern "C" void CTTelephonyCenterAddObserver(id ct, void* observer, CFNotificationCallback callBack, CFStringRef name, void *object, CFNotificationSuspensionBehavior sb); extern "C" int CTGetCurrentCallCount(); enum { kCTCallStatusActive = 1,

Blocking incoming sms in iOS 7

微笑、不失礼 提交于 2019-12-06 05:49:45
I want to write a tweak for jailbroken devices that blocks messages from a phone number(in iOS 7). First I used the second answer of creker in this link for writing the tweak. Here is my code: #import <substrate.h> #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #import <libkern/OSAtomic.h> #import "CTMessage.h" #import "CTMessageCenter.h" id(*_processReceivedMessage_orig)(id, SEL, CTMessage*) = NULL; id _processReceivedMessage_hooked(id self, SEL _cmd, CTMessage* msg); %hook IMDService -(void)loadServiceBundle:(NSBundle*)bundle { if ([[bundle bundleIdentifier] isEqualToString:@"com

How to class-dump AppStore app

我是研究僧i 提交于 2019-12-06 03:47:25
问题 I installed "Class Dump" from Cydia to get application header files. But there is a problem. I can use class-dump in default app. For example, I ran this command: class-dump -H /Applications/MobileSafari.app/MobileSafari -o /Headers/safari and could get header files in "/Headers/safari/". But AppStore app, for example, I ran this command: class-dump -H /var/mobile/Applications/BFF...../Dropbox.app/Dropbox -o /Headers/dropbox and terminal works, but garbled characters appeared (ScreenShot) and

加入PPA自動更新Chrome, Tweak, Gimp, Inkscape, Flash, ...

蹲街弑〆低调 提交于 2019-12-05 02:33:30
在Ubuntu 12.04下 Ctrl+Alt+T(出現終端機畫面) ---------------------- 自動更新Google Chrome時, 執行: wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - 再執行: sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' 按關機鍵,叫出更新管理員來檢查、安裝更新。 引用自: UbuntuUpdates - PPA Google Chrome ---------------------- 自動更新Ubuntu Tweak時, sudo add-apt-repository ppa:tualatrix/ppa 引用自: Ubuntu Tweak Stable PPA 自動更新Gimp時, sudo add-apt-repository ppa:otto-kesselgulasch/gimp 引用自: launchpad.net 自動更新Inkscape時, sudo add-apt-repository ppa:inkscape.dev

How to communicate between applications in iOS?

别等时光非礼了梦想. 提交于 2019-12-04 21:46:13
Before we can use CFMessagePort , but now it's invalid for iOS7 and above, is there any replaced methods? I tried CFMessagePort when hooking the constructor of UIApplication in the jailbreak environment, but in most of the apps, it can't CFMessagePortCreateLocal successfully, it just return NULL.Am I wrong somewhere? static void setupUIApplicationMessagePort() { NSString *identifier = @"com.foo.foo.UIApplication"; CFMessagePortRef local = CFMessagePortCreateLocal(NULL, (__bridge CFStringRef)identifier, callBackForUIApplication, NULL, NULL); if (local) { NSLog(@"local OK: %@", local);

How to class-dump AppStore app

只谈情不闲聊 提交于 2019-12-04 06:58:27
I installed "Class Dump" from Cydia to get application header files. But there is a problem. I can use class-dump in default app. For example, I ran this command: class-dump -H /Applications/MobileSafari.app/MobileSafari -o /Headers/safari and could get header files in "/Headers/safari/". But AppStore app, for example, I ran this command: class-dump -H /var/mobile/Applications/BFF...../Dropbox.app/Dropbox -o /Headers/dropbox and terminal works, but garbled characters appeared ( ScreenShot ) and then terminal crashed. How can I get AppStore app header files? All AppStore apps are encrypted. In

Theos 常见指令

回眸只為那壹抹淺笑 提交于 2019-12-03 14:15:38
在利用 theos 开发一些插件时,我们经常会用到以下几个指令: %hook 指定需要hook的类名,以%end结尾 //hook的是SpringBoard这个类里面的方法 %hook SpringBoard -(void)_menuButtonDown:(id)down { NSLog(@"You've pressed home button"); %orig; //call the original _menuButtonDown } %end %orig 执行被hook函数的原始代码,类似于super.method功能 %hook ClassName - (void) _menuButtonDown: (id)down { NSlog(@"ss"); //如果去掉%orig,那么原始函数不会得到执行。 %orig; } @end %new 该指令用来给现有的class添加一个新的函数。与Runtime中的class_addMethod相同。 %hook SpringBoard //hook内部的代码 默认都是替换被hook类中函数的实现,所以如果不加%new,theos默认是去类中找namespaceNewMethod这个方法,替换它的方法实现。所以如果我们是新增的函数而不是更改原函数的内部实现则需要加%new这个指令 %new -(void)