(formatting) |
m (Formatting.) |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:notifyd}} | {{DISPLAYTITLE:notifyd}} | ||
'''notifyd''' is the daemon for exchanging Darwin notifications. | '''notifyd''' is the daemon for exchanging Darwin notifications. | ||
= Receive current status of all listeners = | |||
With help of [[Cycript]], the information of all listeners can easily be obtained. First, store the following file as <tt>notstat.cy</tt>: | With help of [[Cycript]], the information of all listeners can easily be obtained. First, store the following file as <tt>notstat.cy</tt>: | ||
<source lang="javascript"> | <source lang="javascript"> | ||
Line 18: | Line 20: | ||
"Please check /tmp/123.txt"; | "Please check /tmp/123.txt"; | ||
</source> | </source> | ||
Then, make <tt>notstat.cy</tt> executable and run it. The result should be stored in <tt>/tmp/123.txt</tt> and the content is like | Then, make <tt>notstat.cy</tt> executable and run it. The result should be stored in <tt>/tmp/123.txt</tt> and the content is like | ||
<source lang="javascript"> | <source lang="javascript"> | ||
--- NAME com.apple.springboard.edgeEnabledChanged --- | --- NAME com.apple.springboard.edgeEnabledChanged --- |
Revision as of 19:28, 2 January 2016
notifyd is the daemon for exchanging Darwin notifications.
Receive current status of all listeners
With help of Cycript, the information of all listeners can easily be obtained. First, store the following file as notstat.cy:
#!/usr/bin/cycript -p notifyd
if (!dlfun) {
function dlfun(fn, encoding, altname) { var f = new Functor(dlsym(RTLD_DEFAULT, fn), encoding); if (f) this[altname || fn] = f; return f; }
dlfun("fprint_status", "v^v");
dlfun("fopen", "^v**");
dlfun("fclose", "i^v");
}
var f = fopen("/tmp/123.txt", "w");
fprint_status(f);
fclose(f);
"Please check /tmp/123.txt";
Then, make notstat.cy executable and run it. The result should be stored in /tmp/123.txt and the content is like
--- NAME com.apple.springboard.edgeEnabledChanged ---
name: com.apple.springboard.edgeEnabledChanged
uid: 0
gid: 0
access: 333
refcount: 1
slot: -unassigned-
val: 1
state: 0
client_id: 2261
session: 0x0000e1bb
pid: 4349
lastval: 0
notify: port
mach port: 0x00003343
token: 98
--- NAME SBDidTurnOffDisplayNotification ---
name: SBDidTurnOffDisplayNotification
uid: 0
gid: 0
......