How to instrument Android Dalvik Interpreter patched by TaintDroid?

Skip to first unread message


Aug 27, 2016, 2:44:13 PM8/27/16
to TaintDroid


What is the goal?

I need to instrument the Android 4.3 Dalvik Interpreter patched by TaintDroid to calculate the execution time overhead by all TaintDroid instructions.

What did I do so far?

I insert the following code between any TaintDroid statement(s) in the Android Dalvik VM source code:

start = get_time() 
<TaintDroid statements> 
end = end_time()
elapsed_time = end-start

Why the above code does not work?

The above code does not work for the following reasons:

  1. 1-The get_time() function, more specifically gettimeofday() or clock_gettime(), has higher resolution than some TaintDroid instructions such as the assignment and hence gives negative values.
  2. 2-To solve the negative values above, I end up using a for-loop to loop 1 billion times for each code that has TaintDroid instructions. However, the Android code becomes extremely slow and does not work.

What do I need to do to solve the problem?

I need to instrument the Dalvik compiler to: 

1-identify the TaintDroid instructions and 

2-calculate/estimate their execution times at the compile-time (not at run-time). 

Does anyone know how to do that?

Thank you,


Reply all
Reply to author
0 new messages