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

Function methodInBeat

js/text_view.js:1–13  ·  view source on GitHub ↗
(invokeId, timestamp, methodName, executor)

Source from the content-addressed store, hash-verified

1function methodInBeat(invokeId, timestamp, methodName, executor) {
2 var startTime = timestamp;
3 var androidLogClz = Java.use("android.util.Log");
4 var exceptionClz = Java.use("java.lang.Exception");
5 var threadClz = Java.use("java.lang.Thread");
6 var currentThread = threadClz.currentThread();
7 var stackInfo = androidLogClz.getStackTraceString(exceptionClz.$new());
8 var str = ("------------startFlag:" + invokeId + ",objectHash:"+executor+",thread(id:" + currentThread.getId() +",name:" + currentThread.getName() + "),timestamp:" + startTime+"---------------\n");
9 str += methodName + "\n";
10 str += stackInfo.substring(20);
11 str += ("------------endFlag:" + invokeId + ",usedtime:" + (new Date().getTime() - startTime) +"---------------\n");
12 console.log(str);
13};
14
15Java.perform(function() {
16 var androidLogClz = Java.use("android.util.Log");

Callers 1

text_view.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected