Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is libhoudini Available for ARC on Chrome OS

NDK binaries can work in ARC on Chrome OS.

(and there was much rejoicing)

However, many Android developers only ship ARM binaries, as the market penetration of x86 in phones and tablets is modest. This is helped by the presence of libhoudini on many x86 Android devices, which can run ARM NDK code on x86 CPUs, presumably using the same sort of opcode-translation-on-the-fly that the Android ARM emulator uses. It is slower than having native x86 binaries, but it is better than the app not being available at all.

What is the status of libhoudini (or equivalent technology) with respect to ARC apps on Chrome OS?

  • Is it guaranteed to be there, barring hardcore users messing up their Chrome OS environments?

  • Is it possible to be there, but not guaranteed (more or less the current x86-on-Android status)?

  • Is it not going to be available, so if you want your NDK-enabled Android apps to work on Chrome OS, you really really really want to ship ARM and x86 binaries with your app?

  • Is there some other option that I'm not thinking of that better reflects the current (and likely near future) state?

Personally, I'll ship both ARM and x86, but I'd like to know what advice to be giving developers on this issue in general.

like image 570
CommonsWare Avatar asked Apr 08 '15 13:04

CommonsWare


1 Answers

What is the status of libhoudini (or equivalent technology) with respect to ARC apps on Chrome OS?

In ARC, this is called ndk_translation and does function similarly to libhoudini as I understand it. The main functional difference is that ARC's translation layer mostly targets NaCl x86-64 code, which is a sandboxed subset of the x86-64 instruction set.

Is it guaranteed to be there, barring hardcore users messing up their Chrome OS environments?

This translation layer is built into ARC, there is basically nothing a user can do to disable it (except have an old unsupported version of ARC, like the original ARChon runtime, but that will cause many other support issues because of its age)

Is it possible to be there, but not guaranteed (more or less the current x86-on-Android status)?

No, if you ship an ARM binary with your ARC App that will be sufficient to run on every Chromebook (not considering bugs or holes in ARC's translation layer)

Is it not going to be available, so if you want your NDK-enabled Android apps to work on Chrome OS, you really really really want to ship ARM and x86 binaries with your app?

Because the underlying target machine is NaCl x86-64, x86 binaries generated from NDK tools are incompatible with ARC currently. Since ARM dominates in terms of deployment (many apps only have ARM binaries), that was the focus of ARC's NDK translation.

Is there some other option that I'm not thinking of that better reflects the current (and likely near future) state?

I think what you're doing with shipping x86 and ARM binaries is a prudent choice, both for possible future improvements in ARC and also in general better compatibility with other Android devices. But currently ARC will only use your ARM binary and translate to x86 where necessary.

like image 52
Elijah Taylor Avatar answered Sep 29 '22 13:09

Elijah Taylor