Hacker News new | ask | show | jobs
by pjmlp 3423 days ago
Android phones run on a Java runtime with constrained access to native libraries. Google can replace Linux for something else, no one will notice.

Normal people use shared hosting, with runtimes that don't require Linux. It could be something else and PHP, Perl, ASP, JEE stacks will still run.

Normal people use Linux on devices, because it is the best OS OEMs can get their hands on without paying a dime for it.

1 comments

Android apps can use native binaries. Replacing linux without breaking compatibility with apps is rather impossible (unless with some linux compatibility layer)
Have you ever used the NDK?

Android apps are only allowed to link to these specific set of libraries.

https://developer.android.com/ndk/guides/stable_apis.html

To put an hand to the cowboy programmers that were linking to system libraries not part of that list, starting with Android 7, they will be terminated if they try to do so.

https://developer.android.com/about/versions/nougat/android-...

The only form of binaries allowed on a standard Android device are shared objects.

The Native Activity is actually just the native method calls of https://developer.android.com/reference/android/app/NativeAc... that loads a shared object with a predefined name.

None of the stable NDK APIs are GNU/Linux specific and the POSIX layer isn't fully compliant with the standard, many APIs like e.g. SYS V IPC are missing.

http://www.cs.columbia.edu/~vatlidak/resources/POSIXmagazine...

https://roxanageambasu.github.io/publications/eurosys2016pos...

Rooted devices don't count, as that is not what people get on the store when they buy an Android device.