tweak

How to take screenshot for the entire screen no matter which app is at front most in iOS 7(Jailbroken)

血红的双手。 提交于 2019-12-03 06:51:13
问题 Before iOS7 I use UIGetScreenImage() function to take the screenshot easily, but in iOS7, it becomes deprecated, now are there any good methods to archive this?Thank you! Addition: I need take screenshot for the entire screen at any view 回答1: I came across the same problem, but have no ideas how to solve it. I tried IOSurface - IOS Private API - Capture screenshot in background , which works well in some apps but returns a black screen in games. Then I tried this app https://github.com/k06a

Theos 常见指令

匿名 (未验证) 提交于 2019-12-03 00:17:01
在利用 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)

How to take screenshot for the entire screen no matter which app is at front most in iOS 7(Jailbroken)

和自甴很熟 提交于 2019-12-02 19:26:51
Before iOS7 I use UIGetScreenImage() function to take the screenshot easily, but in iOS7, it becomes deprecated, now are there any good methods to archive this?Thank you! Addition: I need take screenshot for the entire screen at any view cloudycliff I came across the same problem, but have no ideas how to solve it. I tried IOSurface - IOS Private API - Capture screenshot in background , which works well in some apps but returns a black screen in games. Then I tried this app https://github.com/k06a/UIView-FastScreenshot/blob/master/UIView%2BFastScreenshot.m , which works well using private apis

kill application from other application on ios 6 using void kill dont work

巧了我就是萌 提交于 2019-12-02 07:13:36
问题 i got jailbreak iphone ios 6 in my tweak on ios 4&5 I used (void) kill to close other app running in the background. this is my code: #import "SBApplication.h" SBApplication *app ; app = [[objc_getClass("SBApplicationController") sharedInstance] applicationWithDisplayIdentifier:@"my killed program id "]; if(app) [app kill]; now when i trying that in ios 6 i cant get this to work ! need help? 回答1: Just to expand on Victors answer a bit... you want to get the pid from the application and if it

How to simulate multi-touch with GSEvent on jailbroken device?

空扰寡人 提交于 2019-12-02 03:30:50
问题 I want to simulate multi-touch event on jailbroken device, I tried the GSEvent , I couldn't known each field of the structs, so I just assumed each pathInfo meant one finger info, but no effect, could anyone give me some help?Thank you very much. typedef struct touch { int identity; int x; int y; GSHandInfoType type; } touch; static void sendTouches(touch touches[]) { if (touches_count<1) { return; } uint8_t touchEvent[sizeof(GSEventRecord) + sizeof(GSHandInfo) + sizeof(GSPathInfo)*touches

kill application from other application on ios 6 using void kill dont work

核能气质少年 提交于 2019-12-02 00:16:07
i got jailbreak iphone ios 6 in my tweak on ios 4&5 I used (void) kill to close other app running in the background. this is my code: #import "SBApplication.h" SBApplication *app ; app = [[objc_getClass("SBApplicationController") sharedInstance] applicationWithDisplayIdentifier:@"my killed program id "]; if(app) [app kill]; now when i trying that in ios 6 i cant get this to work ! need help? Just to expand on Victors answer a bit... you want to get the pid from the application and if it is greater than 0(a valid pid), kill it with either SIGTERM(Nicer, though it's not guaranteed to kill it) or

Facebook will begin testing hiding

╄→尐↘猪︶ㄣ 提交于 2019-11-30 18:40:09
Facebook will begin testing hiding like counts, starting in Australia on September 27th, according to TechCrunch. The test will hide the number of likes on a post, only displaying that a post was liked by “[a friend] and others,” instead of displaying the actual number to the public. The limited test is a gauge of whether the feature can improve users’ sense of well-being, and if the experiment is successful, the test may roll out to more regions. “We are running a limited test where like, reaction, and video view counts are made private across Facebook. We will gather feedback to understand

if basic, sample GWT app takes 30sec to load in browser, is that normal? will real apps take 2 mins?

白昼怎懂夜的黑 提交于 2019-11-30 10:02:23
I have a decent machine capable of running 64 bit Windows 7. So how come any time I stop a small sample GWT app in "development mode", edit it and restart it it takes 30 sec to become responsive in the browser, both in latest Firefox and latest Chrome? Is that sort of molasses-based edit-compile cycle just the normal, expected thing for GWT developers nowadays? Will it get much worse for more realistic apps or is the whole of those 30 sec just the framework overhead, and my own code would not make it much more bloated than that any time soon? Can this problem be alleviated by using some other

Simulate all physical buttons like the pressure on the home button on iOS 7 (Jailbreak)

牧云@^-^@ 提交于 2019-11-30 09:39:59
I'm trying to simulate the "home button pressed" on iOS 7 but the previous method used on iOS 6 doesn't work. I speak of course of a jailbroken device. #include "GSEvent.h" - (void)simulateHomeButton { struct GSEventRecord record; memset(&record, 0, sizeof(record)); record.type = kGSEventMenuButtonDown; record.timestamp = GSCurrentEventTimestamp(); GSSendSystemEvent(&record); record.type = kGSEventMenuButtonUp; GSSendSystemEvent(&record); } *UPDATE What I really need is a generic method like the old one that let me to simulate the pressure of all physical buttons Try this. [[%c(SBUIController)

Android 自定义View中,四个参数的构造函数的含义

坚强是说给别人听的谎言 提交于 2019-11-30 04:05:54
MyView(Context context) Used when instanciating Views programmatically. MyView(Context context, AttributeSet attrs) Used by the LayoutInflater to apply xml attributes. If one of this attribute is named style , attributes will be looked up the the style before looking for explicit values in the layout xml file. MyView(Context context, AttributeSet attrs, int defStyleAttr) Suppose you want to apply a default style to all widgets without having to specify style in each layout file. For an example make all checkboxes pink by default. You can do this with defStyleAttr and the framework will lookup