by yjftsjthsd-h · 2y ago · 0 comments
EDIT to add: I also think packaging up an application plus the compatibility layer using flatpak[0] is a really nice idea; it lets you 1. make those apps available in a way that nearly appears native, 2. lets you get users/testers on your compat layer easily, while 3. scoping it to a single app at a time to make it easier to do things like "well we've got this one app working, but how do we tell people that without them expecting other things to work that aren't implemented yet?". Excellent symbiosis:)
[0] Strictly speaking there shouldn't be anything requiring flatpak here... I think there's no technical blocker preventing you making a debian package for the ATL and another for NewPipe and sticking them in a repo/PPA that people could add. But I do somewhat feel that flatpak lends itself to this usecase.
Services ? Binder. Intents (even internal ones) ? Binder. Play Services / microG which 90% of apps use ? Binder. Permissions ? Binder.
DirectX uses direct hardware access. DirectX uses direct hardware access. That doesn't mean you can't rewrite a DirectX-API implementation without direct hardware access. Likewise, Android's original implementation of MediaCodec uses binder. That doesn't mean that a reimplementation of MediaCodec API requires binder. The vast majority of Android public APIs do not assume binder. The only exception is Service binding, and even then, it's an assumption in name: It assumes that android.os.Binder will provide you an IPC. Most usages of android.os.Binder will be local to an app, so you can easily replace it with any IPC. Even the usage towards multiple app (whose only real usage would be Play Services) doesn't actually require binder. The requirement on that part is just the ""stable"" ser-des.
As an app developer, you (should) never connect directly to /dev/binder, because its API/ABI isn't stable. (it changed like 3 times in the last 6 years?)
A new strategy is used that is much faster: https://www.phoronix.com/news/Syscall-User-Dispatch-Queued
1. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
2. https://packages.debian.org/search?suite=buster&arch=any&mod...
I'm pretty sure the overhead for something like Windows Subsystem Android is a few percentage points max, assuming the video card supports the proper OpenGL subsystem (so doesn't require software fallbacks). In fact, given that most x86 laptop CPUs and GPUs offer much more performance than most phone ARM chips, it's basically a moot point. The big problem is finding packages built universally or specifically for x86 (not sure what the status is for WSA on Windows ARM, but that could be an option too).
I'm still waiting for the day Linux offers something similar. Or FreeBSD does something similar to their Linux ABI compatibility.
Edit: looks like WSA is being ended in early 2025:
https://learn.microsoft.com/en-us/windows/android/wsa/
Due to not being able to integrate a store and make revenuue:
https://www.windowscentral.com/software-apps/windows-11/here...
What a shame.
Waiting? Waydroid is several years old at this point, and you've always been able to run Android in a VM via either Google's official device emulator in the SDK or just running https://www.android-x86.org/ et al. in whatever hypervisor you prefer.
Waydroid is slightly more alive, but only barely. And it itself is a fork of now defunct Anbox.
I'm still waiting for Linux to offer a good version of that. I currently use waydroid, and it's barely functional.
You mean a full VM?
It does tend to be very unhappy when the system gets under load though, and might be sluggish if you're running a dozen IDEs on the side.
(Which, as comment under says, is technically a VM. But QEMU gets a pass at pretending not to be a VM and rather just black wizardry that makes bytes happy)
It seems like there were changes made to Binder between the version in Linux mainline and the one in Android.
Until that is properly synched up then using something else will be easier.
But I feel I don't know much about binder/kernel/IPC: maybe I overestimate what that means?
A few years ago we stopped distributing on Linux outside of Flatpak. It was tiring getting bug reports that were only reproducible on certain drivers and setups, not to mention the weekly "how do I install this on <new distro here>".
We've seen people complain about the extra space it takes on disk, but after deduplication and compression the tradeoff to have Linux apps "just work" is worth it (imo)
I dislike the way flatpak is effectively a second distro on top of whatever else I'm running; it eats a rather lot of additional disk space (and network bandwidth), requires that I run updates for it in addition to everything else, and I'm not sold on its security patching story (last I looked, it strongly favored everyone effectively vendoring most dependencies and I don't trust them to keep up with patches like my actual distro).
To be fair, there's also a list of reasons I do like it, just... both pros and cons.
> It was tiring getting bug reports that were only reproducible on certain drivers and setups
I'll give you userspace, but drivers should be like the one thing that flatpak doesn't help with? It's the same kernel, not a VM.
Isolated self contained containers are cool for enterprise setting with huge fleets of machines, frequent updates, etc. But it's not optimal for desktop Linux atm because no one secured any of desktop APIs and there are no easy way to inspect WTF each container is doing and why. Is it ships outdated deps? Is there crypto miner in or its just random hung process eating 100% of one cpu core?
Basically each app in self contained container have its own universe and you will never figure out what exactly its doing. So its turn your system into a black box.
As maintainer of OSS software and game developer I totally get the appeal, but as user I love Linux exactly because it's give me more transparency and I dont want to lose it.
Anyway, I'd rather use flatpack than snap. I left Ubuntu for Debian because of it. I hope it goes the way of the other Canonical's unsuccessful attempts at building their own proprietary system and moat.
Something like nix solves the second problem so much more elegantly.
See https://gitlab.com/android_translation_layer/android_transla...
The problem with Waydroid is that you need to boot up a whole Android system, which is not great for app startup time.