Re:Termux is an Android terminal emulator and Linux environm...
by bosswipe on Tuesday November 03, 2020 @05:59PM
(#24985026)
But Java has interfaces for interacting with the host OS, for example you can create a file by writing `new File("myfile").createNewFile()` which makes a Linux call under the hood. Android 11 breaks that File API.
Re:Termux is an Android terminal emulator and Linux environm...
by pjmlp on Wednesday November 04, 2020 @01:02AM
(#24986695)
The same API on Windows does a Windows call under the hood, on IBM I does a TIMI call under the hood and on PTC bare metal it does the work itself.
Android ported to any of those platforms would still make use of File("myfile").createNewFile() with zero dependencies on a Linux implementation.
No it doesn't, the API call is still valid in Android 11, as long as the filesystem reserved for the application is used.
Even so, it has to do with the Java implementation.
Re:Termux is an Android terminal emulator and Linux environm...
by stuaxo on Tuesday November 03, 2020 @05:00PM
(#24984514)
It's a shame as it you can make much more powerful apps with a native API.
Re:Termux is an Android terminal emulator and Linux environm...
by pjmlp on Tuesday November 03, 2020 @05:39PM
(#24984861)
On modern Android Java is native both ways.
It is the main userspace programming APIs are written in. Followed by the increased use of Kotlin.
In both cases, the final execution tier does produce a pure binary, when the device is idle, after getting the PGO data from the JIT tier.
The NDK C and C++ APIs are based on ISO C, ISO C++, OpenGL, Vulkan, OpenSL (now replaced by AAudio), and Android specific native APIs.
Plenty of choice, just not Linux specific APIs.
The NDK was only added in 2.0 to appease game developers and workaround for Dalvik anemic performance.
Any access to Linux APIs was accidental and never part of the official native APIs.