In general, you need to find some obj-c class that is unique to what you are hooking. Ideally, it should be class defined inside that binary, not imported from a framework. For example, in SpringBoard there is SpringBoard
class that can only be found inside SpringBoard's binary. If objc_getClass("SpringBoard")
returns non NULL value then you're inside the SpringBoard.
Now, backboardd. What I'm doing in cases like that is copying binary on my PC and obtaining the list of all classes inside that binary using class-dump or IDA. In case of backboardd, good candidate would be BKApplication
. So
if (objc_getClass("BKApplication")) {
...
}
would do the job. There is no Backboardd
class in backboardd.
And just for the future, use more popular tags for the questions like that. You have a better chance of getting an answer if you use jailbreak
or iphone-privateapi
tags.