5 ms·
The actual issue is that Android does not allow executing any code that wasn't downloaded through the play store. And even then only if they're signed by the sa
by kuschku 6y ago
The actual issue is that Android does not allow executing any code that wasn't downloaded through the play store. And even then only if they're signed by the same user.
1. You can only execute binaries together if they're signed by the same key.
2. Each person has to have a unique signing key.
3. If a user wants to execute a pre-existing software, and something compiled by themselves, both need to be signed by the same key.
4. This means you need to re-package and sign every single program you'd ever want to use together with your own code again, in new packages, and submit it all to Google Play.
This means every Termux user that would want to ever run gcc would have to
(a) submit every single hello world they write to the play store to try it. And every single run requires a full app update, and
(b) additionally repackage and submit all linux packages, signed with their own key, to the Play Store.
This means to even compile and run Hello World, you need to submit several hundredthousand packages to the Play Store, wait for approval, and download them all.
Yet at the same time, Google Chrome can use WebAPK and auto-generate APKs on the fly with custom code and install them on the device without going through the Play Store.
The alternative of course is not being able to use a phone as general purpose computing device, but considering Google advertised Android as exactly that, that's getting close to fraud on Google's part, removing functionality after a sale.
- pjmlp 6y agoInstead of trying to use POSIX on Android, use the Java based APIs, several shells written in Java available on the store. As well as programming environments. I use a couple of them to code on the go.
- fxj 6y agoJust curious: which shells do you mean?
- pjmlp 6y agoOn my specific case I just use language REPLs like: - ProtoShade - Pydroid If you mean a classical shell, I guess something like Another Term might do.
- fxj 6y agoCorrect me, but pydroid looks like it is a native python interpreter very much like what termux has to offer. They write in the description: - Full-featured Terminal Emulator, with a readline support (available in pip). - Built-in C, C++ and even Fortran compiler designed specially for Pydroid 3. It lets Pydroid 3 build any library from pip, even if it is using native code. You can also build & install dependencies from a command line. So when SElinux comes to Android this app will be broken, too.
- pjmlp 6y agoSElinux is already on Android.
- kuschku 6y agoThat's also not possible anymore. The new rules explicitly forbid loading any Java code that wasn't previously verified, signed, and published through the Play Store. Those apps are affected by the same rules as Termux.
- pjmlp 6y agoWho said anything about loading remote Java code? And yes you need to install application extensions via the store, so what?
- kuschku 6y ago> And yes you need to install application extensions via the store, so what? Writing your own code and executing that is explicitly forbidden. Be it REPLs or compiler suites. That too would have to go through the store. Only interpreters are allowed. The other issue is obviously that you can’t have an extension developed by person A for an app developed by person B. It’s very common to see mods, plugins, addons whatever you may call them on many other platforms, but Android explicitly forbids this.
- pjmlp 6y agoYou can perfectly do plugins on Android, that is how printer drivers work for example. Just use Android IPC mechanisms instead of trying to copy UNIX patterns.
- Liquid_Fire 6y agoThe real problem is not the shell itself, but all the other software that you can install using Termux.
- wvenable 6y agoI've attempted to use many different Android programming environments on my tablet and they're all terrible compared to basic Linux tools and VSCode. I even managed to get .NET core running on my tablet. There's a real possibility to do real work, everything you're suggesting is a toy at best.
- pjmlp 6y agoProgramming on the go is for toy programs anyway. For real work there are laptops and desktops.
- wvenable 6y agoNo, I've done real work on the go. The manufacturer of my tablet sells it as a productivity device. My tablet is more powerful than my laptop and I have a portable keyboard and mouse for it. Why have all this power if all I can do is play Candy Crush?
- pjmlp 6y agoTo use it as a Java based platform, not as yet another example of UNIX monoculture stuck in V6 CLI mindset. Also, plenty of musicians, painters, designers, writers do real work on Android, my previous remark about real work was playing devil's advocate.
- wvenable 6y agoAs a programmer, literally no work can be done using it as a "Java based platform". We're effectively unsupported. Why do you continue to argue this over and over when there's no way Android is productive for programmers as-is? Yes, plenty of musicians, painters, designers, can do real on Android. We cannot. The unix nonoculture, as you call it, is effectively programmer culture -- even Microsoft has included Linux with Windows now. Supporting a Linux user land on Android would be easy (given it's Linux kernel roots) and instantly give developers a massive library of software to work with. In 12 years, not a single decent useful developer tool has ever been built natively for Android. With a few small moves, Google could give developers 50 years worth of software to be productive with. Instead they continue to make it more difficult.