Unable to use Valgrind on the Android Apps

Nikhil Agrawal <[email protected]>
Newsgroups gmane.comp.debugging.valgrind
Message-ID <CAFuTg+X70gdU9b5yx_P1VEdwn=Wwz_KdMGXi5p_cFR06=Xst+A@mail.gmail.com>
Hi everyone,

I want to use Valgrind to get the dynamic instruction trace for the Android
Apps. I installed Valgrind through termux app (using apt-get) and I
confirmed the installation’s success by executing the command *./valgrind
--help *and also from Valgrind version 3.16.1 (./valgrind --version). The
output of the command is showing the desired usage. I am also successful in
executing the ls binary by executing

*./valgrind --tool=memcheck -- ls* and I got the equivalent output.

But when I wanted to use Valgrind for the *android App* by executing the
command

*./valgrind --tool=memcheck -- /path/to/the/app’s/odex/file* I am getting
Segmentation fault:

==30335== Memcheck, a memory error detector

==30335== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.

==30335== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info

==30335== Command:
/data/app/com.khaalijeb.inkdrops-aKgulq0D9iHWWdZa1l-EBA==/oat/arm64/base.odex

==30335==

==30335==

==30335== Process terminating with default action of signal 11 (SIGSEGV)

==30335==  Bad permissions for mapped region at address 0x108000

==30335==    at 0x108000: ??? (in
/data/app/com.khaalijeb.inkdrops-aKgulq0D9iHWWdZa1l-EBA==/oat/arm64/base.odex)

==30335==

==30335== HEAP SUMMARY:

==30335==     in use at exit: 0 bytes in 0 blocks

==30335==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated

==30335==

==30335== All heap blocks were freed -- no leaks are possible

==30335==

==30335== For lists of detected and suppressed errors, rerun with: -s

==30335== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Segmentation fault


*Device Configuration*: LG Nexus 5x rooted device 64-bit machine with
arm64-v8a architecture.


I wanted to know why I am getting the segmentation fault? I am not getting
the segmentation fault when I am attaching the ls binary with Valgrind. May
I know the reasons behind it.

Thank you for helping in my research journey.
-- 
Nikhil Agrawal,
MTech(Research) Student,
Computer Science and Automation Department
IISc Bangalore-560012

_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.