- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在为 iOS 7 中的应用寻找全局函数
。
更具体地说,我想在启动时将代码注入(inject)到应用程序中,这只会影响应用程序
,而不影响SpringBoard
。
我尝试了一些方法,但它们只影响 SpringBoard
:
%hook SBApplicationIcon
- (id)application {
return %orig;
}
- (id)initWithApplication:(id)arg1 {
return %orig;
}
%end
%hook SBApplicationController
- (id)init {
return %orig;
}
%end
%hook SBUIController
- (void)launchIcon:(id)arg1 fromLocation:(int)arg2 {
%orig;
}
- (id)contentView {
return %orig;
}
%end
%hook SBApplication
- (void)didLaunch:(id)arg1 {
%orig;
}
%end
这些只是我尝试过的函数
的几个例子。
我怀疑过滤器也需要更改,但这取决于函数所在的位置(com.apple.springboard
设置为 atm)。
我收到了将过滤器设置为 *
的提示,但如果我不知道 的
.function
是什么,那对我没有多大帮助%hook
如果可能,请解释你的答案。
最佳答案
您的代码仅在 SpringBoard 中运行,因为您已选择 hook SpringBoard 类中的方法(例如 SBUIController
、SBApplicationController
等),并且您的过滤器设置为仅 Hook SpringBoard 本身。
Try checking out the MobileSubstrate docs here
我不是 100% 确定我理解您想要做什么,但听起来您只是想要任何可以在所有普通“应用程序”中运行的方法?
如果是这样,你可能会改变你的过滤器来 Hook 所有使用 UIKit 的东西:
Filter = {
Bundles = (com.apple.UIKit);
};
然后您可以尝试使用 MSHookFunction()
Hook C 函数,as shown in this example .
在你的代码中,尝试 Hook UIApplicationMain() ,我相信所有普通应用程序都会使用它。
另一种可能的技术是从 UIApplicationDelegate
protocol Hook 任何常用的启动回调方法。但是,为了使用 Hook ,您需要发现哪些类 实现了该协议(protocol)。 See this answer for an example of doing this (with another protocol) .
关于objective-c - (iOS, TheOS) %hook into global app function,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20775715/
我刚刚开始使用 THEOS,发现它很好用。但不幸的是我遇到了以下错误。 theos/makefiles/common.mk:64: //makefiles/legacy.mk: No such fil
我的调整有问题,实际上是设置部分。当我“make package install”时,它给了我几十个与首选项相关的错误。 在Tweak.xm中默认添加了#import。我在网上找到的 IOS(即 5.
我正在使用 theos 为 iOS 编写我的第一个调整,我一直在优化。正如我所看到的,dylib 将每次(每秒?)检查“([[settings objectForKey:@“something”] b
我是一名业余开发人员,在 Objective-C 中具有一些基本技能。 我做了一些小的基板调整——我最后做的调整是 Facebook 的全屏。现在,我想为我的调整制作一个偏好包。 我在网上阅读了大量指
我正在设置 theos 来进行我的第一次调整。现在,我已经使用 logify 生成了 .xm 文件,并将该文件放入我的项目目录(使用 NIC 创建的)中。 当我尝试编译时,我收到许多 unknown
基本上,我要做的是从 SBDeviceLockScreenViewController 的 lockScreenView 方法调用 attemptDeviceUnlockWithPassword 方法
我将 iOSOpenDev 与 Xcode 一起使用,我能够编译调整并生成 dylib 文件。它是一个简单的 hello world 类程序,它在 springboard 重新启动时打招呼。 如何在越
我一直在学习本教程: http://brandontreb.com/beginning-jailbroken-ios-development-building-and-deployment/ 启动一个
我按照教程 here 使用 theos 设置了一个简单的调整。 .但是,当我使用 here 中的 header 运行 make 时,我得到 Making all for tweak WelcomeWa
我关注了http://brandontreb.com/beginning-jailbroken-ios-development-building-and-deployment进行调整。但在我成功完成
我正在尝试将首选项包添加到我正在构建的调整中。我关注了this tutorial的部分他们在哪里添加首选项包。在我尝试添加首选项包后,我的调整无法编译并出现以下错误: Making all for t
我是 cydia dev 的新手,我从 iphonedevwiki 下载了几个示例。我的 iPad 已越狱,如何将演示版 Theos tweak 安装到我的设备上?谢谢。 顺便说一句,iOSOpenD
有一位荷兰艺术家/工程师创造了一种非常精细的行走机制。工作原理可以看这里: http://www.strandbeest.com/beests_leg.php 奇怪的是,他使用了自制的进化算法来计算理
我用 theos 做了一个功能齐全的调整,我需要使用一个图像文件其中,获取图像的代码是正确的(在Xcode上测试)。但该图像未包含在最终的 DEB 文件中。 我有这个 makefile : SDKVE
我正在使用 Theos,当我使用 Make Package 时,出现错误: In file included from /Users/jordan/welcomer/theos/include/IOK
我想用theos制作应用程序,但它似乎不适合4inch iPhone/iPod。我该如何解决这个问题? 当我在下面编写代码并安装时, View 变成了这个截图。 #import "RootViewCo
我在将 Neo4j Theo SDK 依赖项安装到我的 Vapor 3 项目 (Swift 4.2) 时遇到问题。我已经像这样配置了我的 Package.swift 文件: // swift-tool
我想使用 PhoneGap 制作一个 Cydia 应用程序,但是 iOS instructions在他们的网站上只显示如何使用 Xcode。 我没有 Mac,但我希望能够使用 theos 为 Cydi
我正在开发一个使用 IOKit 获取电池信息的调整,但它无法构建。 Undefined symbols for architecture armv7: "_IOPSCopyPowerSources
我正在尝试在 Windows 8.1(64 位)上使用 Theos 打包越狱调整。如果我不指定 Arm64,它可以正常编译并在我的 iPhone 5 上运行。但不是我的 6s。控制台说了一个我不明白的
我是一名优秀的程序员,十分优秀!