MCPcopy Create free account
hub / github.com/CreditTone/hooker / methodInBeat

Function methodInBeat

js/param_hook.js:66–78  ·  view source on GitHub ↗
(invokeId, timestamp, methodName, executor)

Source from the content-addressed store, hash-verified

64}
65
66function methodInBeat(invokeId, timestamp, methodName, executor) {
67 var startTime = timestamp;
68 var androidLogClz = Java.use("android.util.Log");
69 var exceptionClz = Java.use("java.lang.Exception");
70 var threadClz = Java.use("java.lang.Thread");
71 var currentThread = threadClz.currentThread();
72 var stackInfo = androidLogClz.getStackTraceString(exceptionClz.$new());
73 var str = ("------------startFlag:" + invokeId + ",objectHash:" + executor + ",thread(id:" + currentThread.getId() + ",name:" + currentThread.getName() + "),timestamp:" + startTime + "---------------\n");
74 str += methodName + "\n";
75 str += stackInfo.substring(20);
76 str += ("------------endFlag:" + invokeId + ",usedtime:" + (new Date().getTime() - startTime) + "---------------\n");
77 console.log(str);
78};
79
80function log(str) {
81 console.log(str);

Callers 1

param_hook.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected