0

Environment

  • Android 5
  • Samsung G5
  • Windows Desktop (x64)
  • VisualGDB
  • ndk-r10d

Use-case

Implement an ADB tool that is linking against "libstagefright.so"

Implementation

  • Compile Android Source code ( arm*.* )
  • Take the resulting "libstagefright.so"
  • Link the ADBTool with "libstagefright.so"

Problem description

Running the tool cause SIGILL upon "libstagefright.so" startup ( during ELF load sequence )

Another executable that is using "libstagefright.so" is "screenrecord", The "screenrecord" from the Compiled Android Source perfectly work on the same device where my ADBTool is crashing ( with SIGILL )

The tool is successfully linking against numerous other Shared Libs taken from the Compiled Android Source, when adding "libstagefright.so" the tool crash with SIGILL, Why? What am I doing wrong?

Adding to the above, Same happen when linking against "libstagefright.so" taken from my device...

NadavRub
  • 2,520
  • 27
  • 63
  • 2
    No one is going to be able to help you without a stack trace and corresponding source for what you are doing. Try running it under gdb. – Chris Stratton Jan 04 '15 at 15:50
  • Further to Chris' comment, it would also help if you could check if the version of the `Android` flashed on board and the version with which you are generating `libstagefright.so` match or not. Stack trace is very essential to be of any help here. – Ganesh Jan 05 '15 at 00:13
  • My program is a simple "Hello World" app linking against "libstagefright.so", the app crash before it gets to the first line of code, stack shows raw addresses since there are no symbols for the OS, as for using the right lib, as mentioned above, the SIGILL happen also while taking the compiled "libstagefright.so" directly from the device... – NadavRub Jan 05 '15 at 08:52

0 Answers0