by charcircuit · 3y ago · 0 comments
Android.
Do you consider ChromeOS a Linux distro? it's based on Gentoo.
To me, a Linux distribution is an OS where, given that I am very comfortable with another Linux distribution, I will quickly be able to find my way around.
Does Android have services? As root, can I start/stop them? Can I install libraries somewhere and use them somehow? How do I package an app (other than by running "build" in Android-Studio and letting the magic happen)? Could I install my own window manager?
=> I don't know any of that, so it's not a Linux distro.
As a comparison, SteamOS is based on Arch Linux and has a particular setup (with a read-only "core" partition I guess?), but I am pretty sure that if you give me a shell, I will feel like I am in a Linux distro.
Yes, every app can define its own services.
>As root, can I start/stop them?
Yes, you use `am startservice <service>` and `am stopservice`.
>How do I package an app (other than by running "build" in Android-Studio and letting the magic happen)
If you mean to manually do what the android grable plugin does you can manually call javac to compile your Activity, you can manually call d8 to turn the class into a dex, you can manually call aapt2 to compile your resources, you can manually zip all of it up, you can manually call zip align on that zip, and you can manually call apksigner to sign the apk.
>Could I install my own window manager?
Android's window manager service is built into system_server. You can't really install your own. Someone could edit WindowManagerService.java, share it with you, and you can rebuild system_server to include that.
At best it is "based on Linux", or maybe "Linux-compatible".
This is an extremely important distinction, because proprietary kernels and drivers is why you can't install a different Linux distribution on your Samsung or Xiaomi phone.
Of course it is a gradient, but Android goes pretty far away from the common understanding of "Linux distribution".
That isn't true. While AOSP does include 203 patches for Linux, you can run Android with a stock Linux kernel.