x86 device user somehow running my arm7-only APK from Google Play Store?

554 views
Skip to first unread message

Chuck Moyes

unread,
Mar 18, 2016, 12:49:42 AM3/18/16
to android-ndk
Subject is descriptive. I have a user who has an x86 device that is somehow about to run my arm7-only APK from Google Play Store. As you can see, one of my users has an ASUS x86 tablet (bottom left):




But as you can see here the APK that I uploaded that is live (the only one that is currently published) on Google Play is only arm7:


How can I restrict my app's availability to devices that are arm7 only? My native libraries just aren't compiled for x86 at all.

Could this be one of those faux arm7 devices that are actually x86 with an arm7 emulator?

Xavier Hallade

unread,
Mar 18, 2016, 11:24:30 AM3/18/16
to android-ndk
Hi,

all the x86 devices on the market including the Nexus Players, are capable of running armv7 or armv5 binaries. They aren't "faux arm7 devices" :)

The error message tells the lib is ARM while the system expected it to be x86 and tried to load it as such.
Normally, if your app only have a lib/armeabi-v7a folder, the system has no reason to believe the libs are x86 and should run these well, as ARM. 
Can you list the files in your APK ? Did your app had x86 libs before and got upgraded?
But even in such scenario, on Android 4.x, the system is always supposed to try to load libs as arm if they're failing... Do you know the user or it's just a bug report? His OS could have been modified and made nonfunctional regarding the ARM translation, or be an emulator without this capability.

Regards,
Xavier Hallade.

Alex Lipov

unread,
Mar 19, 2016, 7:00:45 PM3/19/16
to android-ndk

On Friday, March 18, 2016 at 5:24:30 PM UTC+2, Xavier Hallade wrote:

all the x86 devices on the market including the Nexus Players, are capable of running armv7 or armv5 binaries. They aren't "faux arm7 devices" :)


Xavier,

Could you please elaborate on this one (or maybe add some links where I find a decent explanation)? 
I mean, how does armv7/5 binary able to run on a x86 device? Which component responsible for instructions translation?

Thanks!
Alex.

John Gaby

unread,
Mar 20, 2016, 12:43:35 AM3/20/16
to android-ndk
x86 based devices ship with a library called houdini which allows the execution of arm based NDK binaries.  However, you will get better performance with a native x86 binary.

http://stackoverflow.com/questions/21480838/will-the-binaries-built-for-arm-work-on-intel-processors-android

Chuck Moyes

unread,
Apr 14, 2016, 5:45:30 PM4/14/16
to android-ndk
"The error message tells the lib is ARM while the system expected it to be x86 and tried to load it as such."

Yes, seems like that is what's happening.

"Normally, if your app only have a lib/armeabi-v7a folder, the system has no reason to believe the libs are x86 and should run these well, as ARM. "

Correct, my app only has a lib/armeabi-v7a folder -- no lib/x86, etc.

"Can you list the files in your APK ? Did your app had x86 libs before and got upgraded?"

Sure, see later in my post. No x86 libs before or now.

"But even in such scenario, on Android 4.x, the system is always supposed to try to load libs as arm if they're failing."

I agree.

As you can see, there is only an armeabi-v7a folder in my lib folder in my APK (decompressed using apktool) -- my app never had x86 libs before.

$ ls
armeabi-v7a
$ cd armeabi-v7a
$ ls
libLingolandNativeActivity.so  libjingle_peerconnection_so.so libzo.so
libassimp.so                   libjpego.so


"His OS could have been modified and made nonfunctional regarding the ARM translation"

What?! Historically, has this ever been the case? Has any other user ever had this problem? This doesn't make sense to me. Why would somebody modify their OS like this?

"or be an emulator without this capability"

The user is using an ASUS ZenPhone 5 device, not an emulator.

Alex Cohn

unread,
Apr 21, 2016, 10:03:05 AM4/21/16
to android-ndk
It's quite possible that ARM emulator on the ZenFone 5 device is less than perfect. Still, I suggest that you try to load your app on some x86 device with libhoudini installed. If you don't have one, don't despair: you can try it on an emulator, as described in http://forum.xda-developers.com/showthread.php?t=2528952.

Alex
Reply all
Reply to author
Forward
0 new messages