<div dir="ltr"><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Saba Arshad</b> <span dir="ltr"><<a href="mailto:sabarshad1000@gmail.com">sabarshad1000@gmail.com</a>></span><br>Date: Tue, Feb 21, 2017 at 6:21 PM<br>Subject: Fwd: How to call Strace native library in Android application?<br>To: <a href="mailto:strace-devel@lists.sourceforge.net">strace-devel@lists.sourceforge.net</a><br><br><br><div dir="ltr"><br><div class="gmail_quote"><span class="">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Saba Arshad</b> <span dir="ltr"><<a href="mailto:sabarshad1000@gmail.com" target="_blank">sabarshad1000@gmail.com</a>></span><br>Date: Tue, Feb 21, 2017 at 6:18 PM<br>Subject: How to call Strace native library in Android application?<br>To: <a href="mailto:strace-devel@lists.sourceforge.net" target="_blank">strace-devel@lists.<wbr>sourceforge.net</a><br><br><br></span><div dir="ltr"><span class=""><div><span style="color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif;font-size:15px">Hello Sir,</span></div><div><span style="color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif;font-size:15px"><br></span></div><span style="color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif;font-size:15px">I am developing an android security application in my MS Research where I want to use Strace by an android application programmatically, So I imported Strace for Android from the source [1] </span><span style="color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif;font-size:15px">which contains .c files, </span><span style="color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif;font-size:15px">shown in the image below, 1.png.</span></span><div><font color="#242729" face="arial, helvetica neue, helvetica, sans-serif"><span style="font-size:15px"><br></span></font><div><span class=""><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif">All the .c files are added automatically in the <code style="margin:0px;padding:1px 5px;border:0px;font-size:13px;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;background-color:rgb(239,240,241);white-space:pre-wrap">cpp</code> folder when i gave the path of <code style="margin:0px;padding:1px 5px;border:0px;font-size:13px;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;background-color:rgb(239,240,241);white-space:pre-wrap">Android.mk</code> file. the Android.mk file is given in link [2] and <code style="margin:0px;padding:1px 5px;border:0px;font-size:13px;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;background-color:rgb(239,240,241);white-space:pre-wrap">MainActivity.java</code> is given in the image 2.png.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif"><span style="font-family:arial,"helvetica neue",helvetica,sans-serif">Now i want to call the strace from the android application by adding strace.c native library. The problem is that when I give the name of starce.c as the native library the application stops unexpectedly. Anyone knows why this is happening? please let me know if i am missing something.</span><br></p></span><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif"><span style="font-family:arial,"helvetica neue",helvetica,sans-serif">I have already posted this question at stack overflow [3] but could not find any help unfortunately.</span></p><span class=""><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif"><span style="font-family:arial,"helvetica neue",helvetica,sans-serif"><br></span></p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif"><span style="font-family:arial,"helvetica neue",helvetica,sans-serif">Thanks in Advance.</span></p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif"><span style="font-family:arial,"helvetica neue",helvetica,sans-serif">Saba Arshad</span></p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif"><span style="font-family:arial,"helvetica neue",helvetica,sans-serif">MS Research Student</span></p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif"><span style="font-family:arial,"helvetica neue",helvetica,sans-serif">COMSATS Institute of Information Technology, Islamabad.</span></p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif"><span style="font-family:arial,"helvetica neue",helvetica,sans-serif"><br></span></p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif"><span style="font-family:arial,"helvetica neue",helvetica,sans-serif">References:</span></p><p style="margin:0px 0px 1em;padding:0px;border:0px;clear:both"><span style="color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif;font-size:15px">[1] </span><font color="#242729" face="arial, helvetica neue, helvetica, sans-serif"><span style="font-size:15px"><a href="https://github.com/android/platform_external_strace" target="_blank">https://github.com/android<wbr>/platform_external_strace</a></span></font></p><p style="margin:0px 0px 1em;padding:0px;border:0px;clear:both"><span style="color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif;font-size:15px">[2] </span><font color="#242729" face="arial, helvetica neue, helvetica, sans-serif"><span style="font-size:15px"><a href="https://github.com/android/platform_external_strace/blob/master/Android.mk" target="_blank">https://github.com/android<wbr>/platform_external_strace/<wbr>blob/master/Android.mk</a></span></font></p></span><p style="margin:0px 0px 1em;padding:0px;border:0px;clear:both"><font color="#242729" face="arial, helvetica neue, helvetica, sans-serif">[3] <a href="http://stackoverflow.com/questions/42293495/how-to-call-strace-native-library-in-android-application" target="_blank">http://stackoverflow.com/<wbr>questions/42293495/how-to-<wbr>call-strace-native-library-in-<wbr>android-application</a></font></p><p style="margin:0px 0px 1em;padding:0px;border:0px;clear:both"><font color="#242729" face="arial, helvetica neue, helvetica, sans-serif"><br></font></p></div><div><br></div></div></div>
</div><br></div>
</div><br></div>