For dynamic method, it will change the execute byte code
using locale library while running. So we also can use the
previous method to detect. That is compute the origianl hash
value while the dex file is mapped to memory at the first time,
then compute this memory’s hash value while running. If ther
are not the same, the memory is changed. The defect of this
detection method is that it is hard to decide the detection point
because the detection procedure will consume system’s
resource while the mobile’s compute resource is limited.
Another method is to hook the critical system function such as
mprotect. While the appliction call this function, system will
analyse the context and if it is suspicious then send an alarm to
user or stop application directly.