Loaging righ native platform library (armeabi & armeabi-v7a)

815 views
Skip to first unread message

Yuri Andronachi

unread,
Nov 23, 2012, 3:28:16 AM11/23/12
to andro...@googlegroups.com
Hello.

I have 2 libraries in my Eclipce project. libs/armeabi/libmy.so and libs/armeabi-v7a/libmy.so

When i run application without v7a processor (it is v7 ) armeabi-v7a/libmy.so is loaded instead of armeabi.

How to load right one?

David Turner

unread,
Nov 23, 2012, 3:40:01 AM11/23/12
to andro...@googlegroups.com
Mmm, ARMv7 is not a real processor type. There is ARMv7-A for real CPUs, and ARMv7-M for micro-controllers.
All Android devices should be ARMv7-A, or something earlier like ARMv5TE or ARMv6.

What is the result of the following command when your device is connected to adb:

  adb shell getprop | grep cpu.abi

That should be one or more lines containing 'armeabi', 'armeabi-v7a', 'x86' or 'mips'. Anytthing else is not a compatible Android device.

 
How to load right one?

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/65S1qde9Bx0J.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

Yuri Andronachi

unread,
Nov 23, 2012, 3:57:47 AM11/23/12
to andro...@googlegroups.com
Thx.

Here some info:
On my samsung.

11-23 08:50:08.570: I/System.out(23487): Processor    : ARMv7 Processor rev 0 (v7l)

cpu.abi:
[ro.product.cpu.abi2]: [armeabi]
[ro.product.cpu.abi]: [armeabi-v7a]

 On my Asus:

11-23 10:53:26.311: I/System.out(4676): Processor    : ARMv7 Processor rev 9 (v7l)

cpu.abi:
[ro.product.cpu.abi2]: [armeabi]
[ro.product.cpu.abi]: [armeabi-v7a]

Whem i compile library with APP_ABI := armeabi  flag. App run on both devices but with some strange bugs on Asus.

When i add to mk file armeabi-v7a flag. App runs on Asus fine but crashes on the Samsung.

So i thought its platform difference.

David Turner

unread,
Nov 23, 2012, 4:05:56 AM11/23/12
to andro...@googlegroups.com
Thanks,

the kernel reporting is a bit wonky, but in essence you have two ARMv7-A devices, which both support 'armeabi-v7a' as their primary ABI.
This means that if your APK contains both 'armeabi' and 'armeabi-v7a' libraries, only the latter will be installed and used, by design.

I doubt the bug you're seeing are related to the CPU architecture. The fact that it crashes on the Samsung device might indicate what's wrong with your binary.
E.g. try to collect the stack trace from the log, then use ndk-stack to add symbols to it to understand what happens.

hope this helps

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/UhLzx0Ure0EJ.

Yuri Andronachi

unread,
Nov 23, 2012, 8:29:49 AM11/23/12
to andro...@googlegroups.com

Thx for info. I did some research  in the code and i've found that code crashes when it tries to call fmodf(float,float) when library is compiled with armeabi-v7a flag.

David Turner

unread,
Nov 23, 2012, 10:57:36 AM11/23/12
to andro...@googlegroups.com
Probably a division by zero then :) There is a bug in ligcc where this issue doesn't generate a full stack frame I believe.

On Fri, Nov 23, 2012 at 2:29 PM, Yuri Andronachi <andro...@gmail.com> wrote:

Thx for info. I did some research  in the code and i've found that code crashes when it tries to call fmodf(float,float) when library is compiled with armeabi-v7a flag.

E.g. try to collect the stack trace from the log, then use ndk-stack to add symbols to it to understand what happens.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/5dEWqoUTwYwJ.

Alex Cohn

unread,
Nov 25, 2012, 3:34:32 AM11/25/12
to andro...@googlegroups.com
Maybe your armeabi-v7a build assumes NEON support? This may not be available on your Samsung device (e.g. if it's based on Tegra 2).

BR,
Alex
Reply all
Reply to author
Forward
0 new messages