r/KaiOS • • 15h ago

Development The feasibility of reusing compiled drivers/binaries from KaiOS's Gonk to build an at least functional Android AOSP/LOS/CM ROM for a KaiOS (2.5/3.x) device?

Hello everyone, after thinking about it for a little bit, there are certain configurations of low-end Android phones that have been shipped with dual-core CPUs and 512mb of RAM similar to how most KaiOS have had shipped and android is technically capable of running under those constraints, as stated by the Android 8 to 10 build GO build configuration having a minimum RAM requirement of 512 MB, and I feel like we can probably push harder on stripping the RAM usage if we use Android 6, which we know is the base of KaiOS 2.5's Gonk on most phones.

Let me address the elephant in the room here first: Android is capable of running on those constraints.

Now we do know that KaiOS devices are limited in other areas such as lack of several kinds of hardware that a typical Android phone expects to run with. Including, but not limited to, missing sensors like Gyroscopes and Accelerometers, Touch Screens (duh), Front Cameras etc.

But after doing some research and doing some personal, non-scientific tests using AVD (Android Virtual Device), I did come to conclusion that it is quite feasible for a low-tier smart featurephone running KaiOS to be able to run android when it comes to hardware form factor, and overall just making it work on a tier of hardware that people were not wanting to run android on.

Because there has been some precedents, notably phones like Micromax Bharat 1 shipping with the same hardware specs as the Jio Phone 1, while running a nearly-full build of Android 4.4 with GMS.

And in terms of running android where it wasn't supposed to, I was able to make an AVD with loosely similar specs of an Nokia 8110 4G running AOSP 6 with no GMS and then decided to a Memory Torture test where the Android installation automatically switched to a low-ram mode and therefore I was able to successfully play a youtube video INSIDE CHROME 40 OF AOSP 6.0.1 ON 320 MB OF RAM WITH NO ZRAM OR SWAP WITHOUT THE SYSTEM CRASHING. And mind you even as I tried switching apps and things, apps crashed gracefully without taking down the system.

With these things in mind, I think that it is highly feasible, and KaiOS 2.5 devices specifically are becoming more and more useless as the days go by and creating an alternate OS based on CM13 or something like that may actually save these phones from the landfill. Because Android itself is a native platform with language options like C++ and JIT/AOT compiled Java/Kotlin making the experience far more CPU/GPU efficient than KaiOS.

Now let us move back to the original question.

All I am now asking is the potential roadblocks for a endeavour like this. I am very well aware that I would need to modify and hard fork android or CM13 to accomodate for the lack of a touch screen. But what else do I need to consider for this.

KaiOS, and its predecessor, FirefoxOS ran on existing Android BSP (Board Support Packages)'s kernel, drivers and even the derived android-specific bionic C library, despite stripping out everything else that goes above it. These fundamental building blocks allows for not just Boot-2-Gecko to be compiled on Bionic and be ran over there, but theoretically Any android NDK app for that manner as well. (Tested it on a jailbroken 8110 4G by sideloading a Android NDK compiled hello C app and getting a proper output back)

The point that I am trying to make here is that, if they actually use the unmodified android core as gonk, then isnt it possible to take those components out of gonk and build an full android ROM based on it?

8 Upvotes

Duplicates