Supposing we have an open source android app, (how) could one convert it to a linux distro package? (Like for debian, nixos, etc.)
Android is essentially a linux distro if I get it correctly, a heavily modified one.
Many android apps are written with java and the newer ones tend to go with kotlin, which I think should be able to run cross-platform.
Would hard of an attempt would this be?
Edit: Thank you people! From what I gather android is very far from the rest of linux distros (practically having in common only a few parts of the kernel) and the fact that apps tend to be written in java/kotlin doesnt have much of a difference if they are not built in a way that makes the cross-platform compatible (like godot engine does). Those apps will probably need to do many system calls to the android OS, soI can’t just compile them for a different architecture. I’d either need an android translation layer or an emulator to run them.
Unrelated, but cool to see some familiar usernames:)
Last time I checked, Waydroid was one of the more common ways to launch Android apps on Linux. I mean you can’t just package the bare app file, since you need all the runtime and graphical environment of Android. Plus an app could include machine code for a different architecture than a desktop computer. So either you use some layer like Waydroid, or bundle this together with some app in a Linux package…
Android includes lots of things more than just a Linux kernel. An app could request access to your GPS, or to your contacts or calendar or storage. And that’s not part of Linux. In fact not even asking to run something in the background or opening a window is something that translates to Linux. An Android app can do none of that unless the framework to deal with it is in place. That’s why we need emulation or translation layers.
Android isn’t Linux, Android is a Java implementation using a Linux kernel (IIRC) - the Linux part isn’t even “complete” - when you root you find there are tools you need to add to get typical Linux capability (busybox, init-d, etc). .
So you’re not going to install an Android APK on Linux or anything else, unless it emulates Android.
The language used doesn’t mean much - lots of stuff for Windows was written using C languages, and those would never run on Linux or Unix.
I think this depends on too many factors to give general advice. Android is very different from other Linux distros because they share almost none of the supporting libraries and software. Even the Linux Kernel they share is heavily modified.
The are many apps that are made for both Linux and Android but I think they have to be built with portability in mind for that to work. Godot for instance can make Linux, Windows, Mac OS and Android packages.
On the other side there are Sober for Roblox and the Minecraft Bedrock Launcher that use the respective Android packages and make them run on Linux. But they are specialised for Roblox and Minecraft and don’t work on all Android packages.
Roblox doesn’t have native linux support? Is understandable for Minecraft bedrock as Microsoft are [censored] but the lackthereof on roblox is interesting
They go out of their way to block Linux. There was “Vinegar” bootstrapper, then “Grapejuice”, leading to the current closed-source “Sober” client that streamlines running Roblox for ARM Android on x86_64 Linux PC.
Yeah, and they specifically block Wine from running Roblox.