Dynamorio for Android for dynamic instruction trace

459 views
Skip to first unread message

Nikhil Agrawal

unread,
Mar 3, 2021, 9:37:02 AM3/3/21
to dynamor...@googlegroups.com
Hi everyone,
I want to use Dynamorio to get the dynamic instruction trace of Android Apps. I am using DynamoRIO-ARM-Android-EABI-8.0.0-1.tar.gz from this page.
I tried using the above tar file on my LG Nexus 5X (64 bit ARM) by executing the following command after setting the environment variable TMPDIR to /data/data/packagename and then ran the following command:
./drrun -- path/to/base.odex
I got this error message:
Target process is for the wrong architecture.
 Is this error coming because(my smartphone is 64 bit and the dynamorio is for the 32 bit?)
Now, when I executed the below two commands
./drrun -- path/to/base.apk
./drrun -- path/to/base.vdex
I got the error unable to inject: exec of | (null)
  • Can someone provide their insights regarding where I am going wrong w.r.t configuring dynamorio with Android? I followed this article.
  • If we will launch the same app two times (after freshly installed the same apk), then will the dynamic instruction trace be the same or different?
  • Is there an equivalent tool (like instrace for Linux, Windows) available for the Android platform also? (When I executed ddrun after extracting tar file to my smartphone, it will show available tools as drmemory drmemory_light and drcov (code coverage))
If anyone in this group can help me answer my above queries, it will be a big help for my project as I really want to get the dynamic instruction trace of the Android Apps.

Thank you and Regards
Nikhil Agrawal
M.Tech(Research) Student,
Department of Computer Science and Automation,
IISc Bangalore - 560012

Derek Bruening

unread,
Mar 4, 2021, 11:33:05 AM3/4/21
to dynamor...@googlegroups.com
DynamoRIO-ARM-Android-EABI-8.0.0-1 is for AArch32 only.  I believe plain DR works on AArch64 Android, but client support is not yet there: https://github.com/DynamoRIO/dynamorio/issues/2154.  (Or at least private loader support is not there: maybe if you built the instrace client to not use any libraries it might run: turn off DynamoRIO_USE_LIBC.)  That issue points out the system loader and Bionic details that are missing.  Help is wanted implementing that.  It sounds like there is a lot of interest in AArch64 Android: hopefully someone will find the time to contribute.

--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/CAFuTg%2BWu84zzM_8yswV6fROrbEpU6W1-6hucKJW1wxb7SvNLmw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages