m (Created page with 'notifyd is the daemon for exchanging Darwin notifications. == Receive current status of all listeners == With help of Cycript, the information of all listeners can easi…') |
(explicit <source> block and daemon category) |
||
Line 18: | Line 18: | ||
</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"> | |||
--- NAME com.apple.springboard.edgeEnabledChanged --- | --- NAME com.apple.springboard.edgeEnabledChanged --- | ||
name: com.apple.springboard.edgeEnabledChanged | name: com.apple.springboard.edgeEnabledChanged | ||
Line 41: | Line 42: | ||
gid: 0 | gid: 0 | ||
...... | ...... | ||
</source> | |||
[[Category:Daemons]] |
Revision as of 02:11, 7 September 2013
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
......