Intel Confronts a Big Mobile Challenge: Native Compatibility
smaxp writes: "Intel has solved the problem of ARM-native incompatibility. But will developers bite? App developers now frequently bypass Android's Dalvik VM for some parts of their apps in favor of the faster native C language. According to Intel, two thirds of the top 2,000 apps in the Google Play Store use natively compiled C code, the same language in which Android, the Dalvik VM, and the Android libraries are mostly written.
The natively compiled apps run faster and more efficiently, but at the cost of compatibility. The compiled code is targeted to a particular processor core's instruction set. In the Android universe, this instruction set is almost always the ARM instruction set. This is a compatibility problem for Intel because its Atom mobile processors use its X86 instruction set."
The natively compiled apps run faster and more efficiently, but at the cost of compatibility. The compiled code is targeted to a particular processor core's instruction set. In the Android universe, this instruction set is almost always the ARM instruction set. This is a compatibility problem for Intel because its Atom mobile processors use its X86 instruction set."
Can I just say that I remember people moaning about the ARM not being x86 compatible when it came out in '87 or thereabouts.
(Yes, am I that old.)
I like compatability, but I've had it with x86. Let ARM hog the limelight for a while, no reason it shouldn't have its fifteen minutes. And let x86 die, it's way past its BBE date and has outstayed its welcome by several generations.
Even according to their own developer website, only three phones on the entire market use x86.
This is a problem for tablets, then. But wait! This could all be solved by Google simply filtering their store offerings by what's available to x86 tablets vs ARM phones, which would be a real kick in the nuts for Intel.
Somehow missing from TFS...
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
Well-written C can be cross-platform compatible. It's all in how you write things (or the libraries you use).
Custom electronics and digital signage for your business: www.evcircuits.com
For a while they had their XScale line of ARM processors and SoCs. I think one of the dumber moves they've made was to sell that line of business off to Marvell in 2006 and go "all-in" on x86 before they were ready.
It worked amazingly well, but it still sucked.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
taking x64 except for one or two instructions to hurt AMD
or their SSE extensions
This isn't news. Anyone who's been watching the Android space even casually for the past few years has seen this coming. ARM gets a strong foothold and a huge, predominant market share on the hardware side of Android. Intel then decides they want to shoehorn x86 into the mobile space, and they like Android. Chaos ensues.
A more interesting study would be to see what percentage of those top 2000 apps have dual-arch natives depending on your platform. MX Player, for instance, ships a bunch of different native codec packs (separate "apps" you install from the Play Store), compiled for different versions of ARM. Given their build process for this setup, they could probably add x86 (if they haven't already) very easily. There are production x86 Android devices on the market right now, so this needs to happen.
ARM ran a survey of the top 500 Android apps in the market and found that only 20% are pure Java, 30% are native x86, 42% require binary translation and 6% do not work at all on Intel's platform. To make matters worse the level of compatibility is falling. They also found that running an app in binary translation mode takes a huge performance hit."
http://www.theregister.co.uk/2...
You has a probrem with dat?
> two thirds of the top 2,000 apps in the Google Play Store use natively compiled C code
Of course, how else would one make code portable between platforms? Yet their support for using their native Java API from C or C++ is horrible. JNI is unsafe and crash prone and the NativeActivity is so limited that barely anyhthing can be made with it.
So the core of the app, the 'engine', is in C++ and must be natively compiled, while the UI and such is in Java. Naturally, the binary's compiled for ARM first. This actually runs on a lot of Intel Android tablets because they have ARM emulators. But, thanks to a user finally asking, I put in some time and now I can make an Intel version. (Heck, the original source was written for Intel anyway, so it wasn't a big stretch.) The existing tools are sufficient for my purposes. And it runs dramatically faster now on Intel.
However, for the developer it's mildly painful. The main issue is that you have a choice to make, with drawbacks no matter which way you go. You can include native libraries for multiple platforms, but that makes the APK larger - and according to a Google dev video I saw, users tend to uninstall larger apps first. In my case, it'd nearly double the size. So instead I'm putting together multiple APKs, so that ARM users get the ARM version and Intel users get the Intel version - but only Google Play supports that, not third-party app stores. I haven't looked into other app stores, and now it's less likely I will.
Note that native development can be important to apps for a non-technical reason: preventing piracy. An app written purely in Java is relatively easy to decompile and analyze, and pirates have a lot of techniques for removing or disabling licensing code. Adding a native component makes the app much harder to reverse-engineer, at least delaying the day that your app appears on pirate sites.
PHEM - party like it's 1997-2003!
Though I do agree that JNI is a serious pain. On the other hand, I've developed for Netware and Palm OS, so my standards for pain are probably artificially high.
PHEM - party like it's 1997-2003!
I think they do that already; filter apps you see via a device compatibility matrix.
The challenge is to make the filtered list other-than-empty without having to convince developers to recompile. I imagine that some developers are likely to refuse to recompile in order to price discriminate between the desktop market and the mobile market, where people aren't willing to pay as much per app as in the desktop market.
Microsoft and Intel spent 20 years building bigger. Intel made bigger more complex silicon and Microsoft bloat happily expanded to fill that bigger silicon.
I remember times in the 90s where I was upgrading CPUs for clients that were 6 months old - crazy.
These two companies where wholly unprepared for the mobile revolution that required small and efficient. Neither company could shrink their offerings down fast enough. Unix on ARM was there to fill the need.
I say to both companies - tough cookies. Had they had an eye toward efficiency instead of bloat from the very beginning, they would have been much better prepared for the mobile/app revolution.
I still don't understand why APKs are not just pure LLVM byte code, and either the store or the phone completes the byte code to native compile, including the final optimization passes...
Regards,
-Jeremy
Unless the native code includes ARM-specific inline assembly or uses ARM-specific processor features then the lack of x86 libs is just due to laziness on the part of developers. All the dev would need to do is compile his native code for x86 and include it in the APK. Devs feel free to be "lazy" in this way because ARM is so prevalent relative to x86.
what would be even better is if you could submit your source code to the Google store and it would compile it for you on a server farm and produce APKs optimised for each chipset they support.
i remember the days when sourceforge had such a thing, you supplied your code and it got built for all manner of Linux and (IIRC) windows architectures/platforms.
In fact, this is the opposite of a solution, it is a capitulation. A solution was part of the AZ210 phone by Intel, which had an ARM to Intel translator. This phone was quickly abandoned by Intel, and it is now irrelevant, stuck on Android 4.0, and it only supports ARMv6 code. Adobe AIR still does not work, although Flash did at some point.
Fat binaries just shift the blame to the developers. And with the track record that Intel has in abandoning mobile solutions, I doubt anybody will take it serious. Yes, there is the Galaxy Tab series, but it is a budget series - not where the money is. Otherwise mobile Intel is pretty much dead in Android land.
"They've been actively focusing on increasing power efficiency for a number of years now, so I have no doubt they'll be able to bring strong competition."
It Intel wants to, they can bring strong competition. They used to have their own ARM variant, but sold it off. They decided that there was no future in low power. Oops.
When they do get a low power chip they seem to lose interest, and then crank up its performance, and its power budget. Then Steve Jobs would yell at them, and they would produce another low power chip. Then repeat the cycle. Now that Steve is gone, will they go back to thinking a 135W CPU is acceptable?
In Intel's world, Grand Coulee dam exists to power their CPU, and the rest of the hydropower on the Columbia is to run the cooling system for that chip. Institutionally they haven't figured out that we have all the cycles per second we need, and battery life is now the critical parameter. Obviously if your dream PC has a 1000 W power supply on a dedicated circuit you will not care about power the same way you will if your phone keeps going dead every time you need it.
As is often the case, the problem is Management, not Engineering.
For the record, I'm using a 2.5 Ghz Core 2 Duo P8700. It's 6 year old technology and entirely fast enough. It has a 25 W power budget. The "ultra-low power" 2 core Haswell has a 35 w power budget. So they have gone backwards. Remember, I don't need more speed, so I don't care if the Haswell CPU is faster.
The question is does Intel get this point? If they say "you are not our target demographic" then fine, and I'll pay them just as much attention as I pay to Miley Cyrus. Which is to say none.
Welcome to Linux on PXA! We are just repeating more-or-less the same thing, at least it was good... very good.
Hey Juden, don't make it bad.
Take your sad chip and make it better.
Remember to put it into their phones
Then you can own
The Android market.
Slow Down Cowboy! It's been 1 hour, 47 minutes since you last successfully posted a comment
For I minute I though we had it bad because Apple is now creating a brand new language we have to learn just for "Apple development".
But actually it seems...
You're the ones getting fucked.
-- I was raised on the command line, bitch
I think some Intel PR wanker is recycling this story now that the launch of their K800 phone in India is two years old, and was updated by the K900 a year later. I guess they don't have a phone this year so they're making a news cycle instead. Intel wrote libraries for this phone to JIT-compile arm to x86, like Rosetta on Mac OS X. The libraries made their way into androvm as warez and have been there ever since.
two YEARS old, guys.
It's not (just) for speed, if at all, it's BECAUSE YOU HAVE PORTABILITY WITH iOS (and other platforms)
If you use Java you're hosed. If you use regular C you can compile on both platforms, with a shim to interface to either iOS or Android as required.
The GLES code can easily be compatible. The UI stuff not so much but (high end) games generally implement their own UI in GL for specifically this reason.
It's not pretty but it's what most pro game developers have been doing since at least 2010, and it's a _hell_ of a lot better than having to totally rewrite your Java app in ObjectiveC or vice versa.
The extra performance is sometimes useful in some places but it's almost always about compatibility with iOS or (more rarely) with existing C libraries e.g. video encoding or whatever.
[FrLz]
When building with the Android NDK you already specify ABI(s). Newer NDK's are already x86 compatible and have been for some time. So your line line like this: := armeabi armeabi-v7a
APP_ABI
Becomes this: := armeabi armeabi-v7a x86
APP_ABI
And viola! Your code is now built for all three.
This is really not a issue.
Only life important.
Oh wait, wrong topic...
When we talk about mobile devices, efficiency comes before compatibility.
Get free satoshi (Bitcoin) and Dogecoins
For one thing, I've written plenty of programs that work in emulators but fail on hardware. (It takes literally four instructions to get Nesticle's behavior to diverge from that of an actual NES, for instance.) For another, the x86-64 box under a developer's desk is unlikely to support multi-touch input for pinch zoom, virtual gamepad, and anything else needing two points of contact.
How to these different apks work, do they share the same bundle id so that if I upgrade from an ARM device to an INTEL one I still get the proper binary or will it suddenly stop working?
Google is your friend, but I'll save you a little time. Some info from Google and Intel.
PHEM - party like it's 1997-2003!
Google should have designed Android around C or possibly C++. It would be more power efficient, but, more importantly, it would be free from involvement with Oracle. There is no reason why apps written in C for Android shouldn't be recompilable for X86 or ARM. It does require a bit more care. Fat binaries would also work well enough. Any large app is likely to be mostly data anyway.
Ray Seyfarth, ray.seyfarth@gmail.com, http://rayseyfarth.blogspot.com
The very next sentence in the article explains that these natively compiled apps _do_ run on x86.
"Apps that use the ARM instruction set still run on Intel mobile devices because Intel-specific Android versions have a compatibility layer called Houdini that maps ARM instructions into X86 instructions."
You could offer the ARM-only and Intel-only APK's on Google Play store, and then offer the larger combined APK file on other stores that do not support processor specific binaries. Make the app version number somehow indicate which one it is, maybe with a one letter value in the version. Then insert these lines into your header files...
#define struct union
#define while if
I'll see your senator, and I'll raise you two judges.
Java is faster than C! Java is faster than C! The profiler just has to run..the GC just has to run..the hot spot just has to run...
So if Java is indeed faster, or as-fast as C, we need to run the Java VM, on a Java VM, written in a Java VM running on a Java VM. More recursion == more speed!
Java is simply a nice sandbox, to limit the damage non programmers and other tinkerers can do, but at a cost of performance.
Want speed? Go native.
With the pushing back on Samzung/Tizen, and new Google Silver program, Google seems to be trying to tighten up. The fact that growing Android with more chipsets has a side effect of making Google Play more central to the experience will make some Mountain View folks very happy.
And lets be real in our comparisons. The 35W Haswell is going to destroy your P8700.
The i5-4202Y still beats the P8700 handily in cpu benchmarks and has a max TDP of 11.5W, including memory controller and graphics.
Nobody does x86 natively any more, it's all just additional translation. Back when IBM was producing Pentium and PowerPC, they pretty much only changed the front-end and kept the same exec stack, caches, etc.
If you really needed it Arm could be just another byte code, with just another front end.
Well, this is an unfortunate simplification of reality.
Apple has changed processor architectures for various reasons, but the generally accepted reason for moving to the x86 architecture from PowerPC was that IBM was unwilling to continue to invest in a low-power version of the PowerPC line. You can't build a Macbook air with a PowerPC unless you have a lap made of asbestos.
There were other benefits as well, but that was a significant one.
Apple didn't move to x86 because it was popular, Apple moved to x86 because Intel was able to provide them the thermal envelope they wanted.
I find the comments from so-called experts who claim that x86 can never ever run Android apps to be rather amusing considering every Android app out there is developed on an x86 PC and the first round of testing & debugging takes place in an Android emulator running on an x86 processor. Apparently the concept of compiling code for some random Android app is now considered to be FAR too difficult.
Here's something else that will blow your little minds: Every single iOS application that exists has not only been compiled for x86, but x86 has run every iOS app there is BEFORE Apple's ARM chips. That's right kids, the iOS development environment includes an iOS simulator -- not an emulated ARM environment but a simulator that run x86 code compiled apps -- for the initial build & testing before the apps get tested on actual phones.
But go on believing that a "compiler barrier" prevents your fart app from running on an x86 processor. After all, we all know for a fact that Linux has never EVER been ported to different hardware platforms... oh wait.
Might remember to do so at the same process node.
An Intel x86 chip build on 22 nm stands a very good chance of blowing the doors off of an ARM (or MIPS, or ...) built on 45 nm. However, this is not a decisive win for the x86 ISA.
Lacking <sarcasm> tags,
Got your citation right here!
It's worth noting the inventor of the MIPS processor (John L. Hennessy) also coauthored the leading computer engineering texts. Write what you know, they say....
/. -- the Free Republic of technology.
If Intel is serious about smartphone/tablet SoC's anyways, the radio baseband will likely be ARM anyways, combine into a single monolithic hybrid chip, with x86 and multiple ARM cores. Since most discrete chips for Bluetooth/WiFi and GSM/UMTS/HSPA/LTE have an ARM core already, combining would reduce power consumption and possibly eliminate an ARM core or two. The final obnoxiousness would be effectively running a heterogeneous cluster OS variant of Android on the phone, but to a lesser degree Intel had already started research on this with NTT for hybrid phone/cloud VM personal cluster instances, telegraphing HID actions to the cloud VM and streaming display info back so the VM does the grunt work usually.