412 points · by cft · 6y ago · 314 comments
One of the other awesome things about Termux is that you can use it to setup a pretty complete ARM Linux environment on an Android device in a few steps: https://wiki.termux.com/wiki/PRoot
You can even get a GUI running if you have an XServer: https://wiki.termux.com/wiki/Graphical_Environment & https://github.com/adi1090x/termux-desktop
I've used this in the past to get a pseudo-Linux dev environment running on an Oculus Quest: https://www.reddit.com/r/cyberDeck/comments/fc5sfr/oculus_qu...
Sure, replaceable battery and open hardware are a _very_ good thing, but the value/$ of these phones are horrendous. That's not to defend OnePlus or any other manufacturer, but when I can get a high end Samsung or Xiaomi device with 4 times the specs at every corner for the same price or less and simply install Lineage on it.
I definitely support the effort and I love that they finally got the design modern, but those prices are hard to swallow, even for someone pretty privacy-focused.
Also, honest question; What do you actually 'use' the latest specs for? These Android/iOS phones are basically all about media consumption, something that has been sufficiently performant for years. You have great hardware, but no software to take real advantage of it.
On the other hand, the Linux phones can do so much more on the software side that if they do become successful enough for a second/third... generation with more powerful hardware, it would be much more noticeable than a paper spec bump.
"First hardware kill switches; first replaceable cellular modem and Wi-Fi/ Bluetooth (on M.2 cards); first smart card reader (for 2FF OpenPGP card); first running 100% free software; only current phone to offer convergence as PC without special hardware"
“It's also one of the few phones to have hardware baseband isolation - making you immune to IMSI catchers and other cellular-based attacks.”
More in the link.
Sounds like you value the open/libre aspect at $0. Not everyone feels the same way: Those phones are for people who value the replaceable battery and libre stack at $x where x > 0.
No mention of the headphone jack, how sad
The answer is to either hack Android/iOS so you can patch out all the bundled bs or to regulate them and force them to offer a "clean" OS version.
I also don't see how a process that requires rooting, patching etc, is any more prone to mainstream adoption than an actual Linux phone.
The thing is, if one wants to move a cause somewhere, it may require some inconveniencing at the start for the long-term vision to pan out.
Working with GCC was surely a bit painful at the start of the 90s, but it was worth it for the goal of having a free software stack on the desktop and now it's time to do the same for the phone.
If Google gave a shit about e-waste, they'd mandate UEFI+ARM like Microsoft did with their phones (except without the locked bootloader). Trying to get drivers to load an work on every ARM variant is a nightmare compared to x86.
It could be running BSD or Windows and we would hardly notice.
Imagine if websites couldn’t be developed on normal desktop computers and you had to run an extremely inefficient emulator every time you wanted to make a small notification.
The use of a Linux environment in ChromeOS should only be viewed as a toy, because the ChromeOS developers are willing to break it at any time.
Remember who owns Android.
It's not worth investing time into a platform that will be further restricted sooner or later. Why should they treat the tablet differently?
I got caught up in the Apple fanfare, and shame on me for not doing better research, but the thing was near impossible to use for coding. It’s a beautiful tool, but not one that fit my development needs. I ended up using it as a 2 monitor for my Mac Mini and a media consumption device. In hindsight, I shoulda went with the Surface.
All I wanna do is be able to code on an iPad. Yeah I know it’s currently possible, but have you tried it!? Is that asking too much?
There's a lot wrong with Android development (IMO), but the lack of an on-device dev environment isn't one of them...
The tablet functions as a messaging device and phone, and then if I want to sit in a coffee shop and code I break out the keyboard.
Admittedly so long as I could get mosh as an app I'd probably survive without termux, but it wouldn't be nearly as nice a setup.
What do you base this statement on?
Or do you want access to the whole terminal experience?
Sounds like a horror title.
Nope.
The school chromebooks are locked down tighter than a crab's ass. What a waste.
If there's devices missing, send a PR to that repo: https://chromium.googlesource.com/chromiumos/docs/+/master/R...
You don't need to open it up for developer mode, which lets you mess around as root, chroot into a Linux distro, give the chroot control of the screen...
I'm not even considering *nix distros here because honestly the market for every day users for something like Ubuntu or Mint is really small, and those are possibly the most end-user friendly.
I hate that macOS is starting to go the iOS route of only letting me run applications that are Apple certified. No, I do not want to open system preferences every time I want to launch something. I am a power user. Put it behind some shell command or something... but have it easily documented and marketed towards people like me.
At least we can still sideload with Android. Some changes to the API like this those are just so annoying. Yeah there's going to be some apps that just need pretty much unlimited access to my device. But that's OK. I've accepted that.
1) Linux is usually easier in the "happy case", where everything works as it should, and it supports everything that the user needs.
2) Linux is way way way less likely to just change something and break the whole system while the user is sleeping. (This was REAL fun with my grandparents-in-law when their Dell All-in-One PC decided to upgrade itself from Windows 8.1 to Win10 despite Dell not having drivers for Win10 on their fancy custom monitor. I have to fix it for them every 6 months now.)
3) Searching the web for Windows solutions to your issues without being a computer expert feels like it has a >80% of infecting your computer with malware or getting you on the phone with a scammer. As a computer expert it's like 20% (not even zero!).
4) Fixing a Linux problem can be painful, but is often "copy and paste these config lines into this config". Arcane.
5) Fixing a Windows problem can involve having to go into the registry, which can't be copy/pasted and is extremely difficult AND dangerous. (There probably IS a way to copy/paste it, but I don't know it).
6) That said, it's easier to fall off the "happy path" and into real trouble in Linux. Fixing the issue by randomly clicking stuff is more likely to work in Windows than Linux.
7) It's way easier to find someone you know to help you on Windows than Linux, for now.
8) Gaming is still so much better on Windows, unfortunately, but the gap is closing.
9) The few times I've gotten family members to try Linux, they called me LESS often for support. Even on laptops!
10) Windows is becoming increasingly user hostile in every way. Ads, forced updates, forced settings changes, privacy issues, etc.
This is so true.
All my family members are on Ubuntu, and it just works without any support. For many many years. Sometimes when I visit them I click on update to the next LTS. By the time I have to leave it is updated and runs again for 2 more years.
There's like an uncanny valley of competence, between completely naive users who just let things run and experienced users who know where the red lines are when using sudo.
So far I've seen the following breakages:
- completely fuck up apt somehow such that it refuses to update or fix itself
- overwrite packages with their own compiled versions
- mess with the system installed scripting environments
- try and install a new kernel or graphics drivers (usually not even to get something working but because it's "new") and consequently break the boot somehow.
You absolutely can copy/paste registry edits.
You paste the edit in a plain text .reg file and let the system patch it in for you.
[1]https://www.howtogeek.com/382727/what-is-a-reg-file-and-how-...
I take it you have never had to try and correct a system broken by seemingly innocent-looking aptitude or RPM package upgrades. :-)
> Fixing a Windows problem can involve having to go into the registry, which can't be copy/pasted and is extremely difficult AND dangerous. (There probably IS a way to copy/paste it, but I don't know it).
I’m really not sure the registry is any more “dangerous”. For many everyday users, I would guess that the perceived complexity of the registry and of configuration files scattered throughout the system are really about the same. Both can appear cryptic and fragile.
On the one hand, you might accidentally delete something important in the registry. On the other hand, you might forget a quotemark/character or get some indentation wrong in a configuration file and be surprised when the entire thing breaks.
Keep in mind that on Win10 you don't even have to click a button, and the updates aren't even avoidable.
> I’m really not sure the registry is any more “dangerous”. For many everyday users, I would guess that the perceived complexity of the registry and of configuration files scattered throughout the system are really about the same. Both can appear cryptic and fragile.
I dunno, once they are in the registry, it's like putting every config file on the whole system into their home/documents directory...
Not on Slackware, no.
Instead of weekly complaints (lost windows, things changing, sound not working, etc). I get the occasional query once a year or so. I can login remotely to tweak things, or share their screen if need be.
WAY WAY WAY less pain then it was under windows.
Zoom works and video hangouts work. Webex does not, but that doesn't seem very popular with home users.
Really? Windows seems to be losing developer mindshare pretty fast and I’m not convinced this isn’t already the case. In college the capture the flag group had a serious problem finding people familiar with windows development and most junior software engineers I’ve met are much more familiar with GNU/Linux than windows.
7) It's way easier to find someone you know to help you on Windows than Linux, for now.
I visit my parents once a year and always mark out a day to spend fixing/updating/removing junk on my dad's Windows laptop. Three times I installed Linux and when I came back the following year Windows was back on the laptop. The reason being people just know Windows where I am from and the moment they see Linux they feel that's the problem. Even if my dad is struggling to print something which has nothing to do with Linux, the first thing they do is remove Linux.They are all in their 70s. No regular user has a problem with Ubuntu these days, but they regularly did have all kinds of trouble with Windows.
I also run a business and for the last 13 years have had countless new hires (non developers) who have never seen Ubuntu and were productive on it instantly, without any problems with the OS ever.
So it is simply not true that people "feel there is a problem the moment they see Linux". Ubuntu is the most friendly and reliable OS for a regular person out there, I say it from decades of experience.
Keeping billions of unpatched devices is disastrous form the point of view of malware.
> "copy and paste these config lines into this config"
Copy-pasting things you don't understand into configs on Linux is hugely dangerous. It just happens that Linux desktop users aren't high value targets, so you usually get lucky.
This pretty much sums it up. You just simply do not have enough Windows experience. Nothing to be ashamed of but doing comparison in this case will give skewed results.
Yeah, such a power user that you can't use any one of the easy, documented ways to deal with that? You're not exactly helping your case here.
>Put it behind some shell command or something... but have it easily documented and marketed towards people like me.
sudo spctl --master-disable
Man page for spctl is all there. Or how about quarantine? That's just controlled by an extended attribute (com.apple.quarantine) and you can remove it (interactively or via script including recursively down a directory tree) with xattr. Want to totally disable SIP too? That's also documented and there, boot to recovery, pull up the terminal and csrutil disable
With SIP off you can also then modify what it applies to in a more fine grained way if you want.Yeah, Apple has put up more guardrails in macOS. But contrary to your assertion, enhanced security is plenty useful for "power users" too. Being a power user doesn't mean that it's nice to have some bad software clobber your install or a zero-day nail you. Some of the new security features could definitely be made much more easily useful for power users sure, up to and including having a GUI on them. It'd be nice if Apple had functionality to easily have your own root signing setup alongside theirs, so that we could take advantage of all the signing mojo as well. And it's reasonable long term to be concerned about a day when Macs also have hardware trust chains and what happens then.
But for the time being macOS remains 100% modifiable for an actual genuine power user. The new stuff can be turned off, and more easily arguably then back when you needed to recompile your own kernel to mess with kern.securelevel and the like. Somehow someone in the company continues to open source a certain amount of macOS same as the old days, see https://opensource.apple.com/.
> It'd be nice if Apple had functionality to easily have your own root signing setup alongside theirs, so that we could take advantage of all the signing mojo as well.
Yeah, that would be very developer friendly without breaking their shields too much.
Also no argument that macOS isn't modifiable. However with the general dismantlement of things like AppleScript I feel like we've already passed the golden age of the OS.
Please, anyone, tell me how I can disable the animation for switching between spaces. As far as I know, that isn't possible.
You don't have to. Right click on the icon and select 'open.'
https://support.apple.com/en-gu/guide/mac-help/mh40616/10.15...
sudo spctl --master-disable
Then choose "Anywhere" under "Allow apps from..." in the Security & Privacy preferences. You'll never be bothered again.Also, there was never unlimited access in Android unless you had a rooted device. Probably there will be a way around no-exec for rooted users, probably setting up an app as trusted. Nevertheless, this change is really cumbersome and it seems Android is slowly turning to iOS lockdown-wise.
Yes, it is fine, but that doesn't mean people actually use it. I'm just highlighting that Linux is generally not thought of as a large market for most consumers.
The point about root is a good one.
I guess it depends on what kind of "power user" you are because windows is pretty limited (why else would they frankestein an Ubuntu terminal into the latest Windows versions?).
Cygwin (OSS compiled to Win APIs)
Powershell (Native Windows fun)
WSL 1 (Linux ABI Bindings to Win Kernel)
WSL 2 (Thin Hyper-V running a full Linux Kernel, with Plan9 FS mappings to Windows filesystem) (Insider Preview, should be releasing this quarter)
Hyper-V
DOSBox
Docker (Hyper-V, soon to take advantage of WSL-2)
Most of the above also benefit from the work being done over at the new Terminal https://github.com/Microsoft/TerminalMuch as I love DOSBox, I don't think it belongs on your list.
In fact, DOSBox's command line capabilities are weak compared to genuine MS-DOS (which is already quite weak to begin with) – it doesn't fully support COMMAND.COM's syntax, it lacks many of the commands/utilities that come with MS-DOS, etc. – it is just the bare minimum to get most game launcher batch files to work. And that's unlikely to ever change, since DOSBox devs generally aren't interested in improving the accuracy of the MS-DOS emulation unless that improvement helps run some game – if you want a more accurate emulation of MS-DOS, they'll point you to FreeDOS instead.
maybe I'm not what you would call a "power user", but I do write code for a living. I'm sure you would have a bad time if you expect windows to work like your favorite linux distro, but I find it perfectly serviceable for my work. it gets in my way far less than macOS.
I use Windows to develop Linux applications and am happy like a clam with this approach.
Certainly not to help you administer your Windows system, which is not at all what it is intended for.
- Me: can install a distro/troubleshoot things on cli/like to endlessly tinker with DEs etc. Linux lets me do all this and more.
- My daugther: just wants to get on with classwork, music, videos, Zoom/Skype/Google Meet etc. Too young to ask which OS the laptop was running. Was comfortable on XFCE within few days for her daily needs.
Linux serves both of us so well without restricting us or getting in the way. Being rock solid and friendly enough for average users while having the freedom/flexibility under the hood have been the big reasons why I have stuck with it for more than a decade.
Windows, on the other hand.... the amount of times I've yelled "I AM THE ADMINISTRATOR!" at my PC is too damn high. Getting a "You do not have permission to access that file" even when I'm logged in as an Administrator is my bane.
> I'm not even considering *nix distros here because honestly the market for every day users for something like Ubuntu or Mint is really small, and those are possibly the most end-user friendly.
Like, I sympathize, I really do, but you're complaining about OSs restricting your freedom while avoiding the OSs that don't restrict your freedom. Yes, Darwin and NT should behave better, but they don't. It absolutely sucks that the options are "supports most commercial software" XOR "lets user control their own device", with some options splitting the difference (ex. ChromeOS possibly with developer mode, Android rooted or with a custom ROM), but the option is there.
Even linux distros go down this path from time to time. For example, with systemd linger, or when ubuntu got rid of the root account. I don't like thinking of it as user-stupid. For example when I type sudo, I tend to automatically think a little harder about what I am about to do.
"How Windows 10X runs UWP and Win32 apps"
https://www.youtube.com/watch?v=ztrmrIlgbIc&list=PLWZJrkeLOr...
That is what root access is for. Non-root should never have "pretty much unlimited access" to a device.
- Android 10 is not killing anything. Targeting API level 29, the native API level of Android 10, prevents the mechanism Termux uses, but you can target a lower API level and run just fine on Android 10, and in fact Termux does run just fine on Android 10.
- API level 29 blocks a specific mechanism that Termux happens to use to run arbitrary code. There are other ways to do anywhere from most to all of what Termux wants to do, with some tradeoffs. It's not as good as the old way, but it's hardly "killing".
I donated, but I'm obviously part of a minority of users.
I am the first one to decry the absurd power that apple and (to a lesser extent) google have on what you can run on your own device, but this isn't it.
Targeting 29, the only replacement for apt get that they could come up with is to stuff Linux binaries into 100s of apps and upload those apps to the play store. I am not sure this is usable anymore. You might want to read this:
https://github.com/termux/termux-app/issues/1072#issuecommen...
https://github.com/termux/termux-app/issues/1072#issuecommen...
So the app will not work on the OS level
If I wanted a paternalistic platform I would be an iOS user (I don't mean that as a slam, iOS obviously has its place, but it's not for me).
It does not look like they contacted the platform team or even tried to come up with any solution.
They had one year before the change was included in Android. And then another year before 29 became the mandatory version to support to publish on the play store.
I would have much preferred they release a "play store" version and then a full version to F-Droid or something.
The possibilities are (or were) endless, which is what I love about a platform. I've always hated the UX of SMS, but people insist on using it anyway. At least this way I use it on my own terms.
I haven't kept the fork up to date with the latest patches as I haven't need anything yet, but it's here: https://github.com/FreedomBen/termux-api
You have to both `termux` the app and `termux-api` to get SMS functionality. I build both at the same version so there aren't any compatibility issues. Then make sure you don't have automatic updates turned on otherwise the Play store will "update" you to a non-sideloaded one that does not have the SMS ability.
I really can't be arsed with this stuff any more.
Why are the developers at Google acting in such boneheaded ways? Is it literally just "I get paid loads of money, lol"? Do people not grow out of that eventually when they have enough?
Like, you're literally a developer. Why would you make something you wouldn't want to use? Is the company just wholly made up of people who actually don't care about computing?
(I'm a developer at Google, but I'm not on the Android team and am definitely not providing any sort of official response here - this is personal opinion and may be inaccurate)
If apps can download arbitrary code and then execute it, they can bypass the validation that's done as part of the Play Protect program. My understanding is that there's plenty of evidence of malware in the wild that presents as a harmless app and then downloads the actual payload after being installed on the user's device.
- Run and use other applications without your consent
Unless you know precisely that this behavior is necessary for this application's main functionality, we recommend you do not proceed". And use some design pattern to make "Cancel" the "go-to" action for the user.
Or even more palatable for whoever's behind Play Protect: Forbid these apps from the Play Store, and force it be done through a 3rd party store or manually, and this can be combined with the big popup.
We know it's important to protect grandma from malware, but it's also important to give the advanced user the option to ignore this, specially for a platform like Android that has gained the favor of many technical users through providing some reasonable degree of control over their phones.
Rugged Individualists can run TempleOS
The entire ecosystem is built on a model that turns it into a disposable toy and there's no sign that this is going away any time soon.
Why do we need hobbyist movements to produce devices that we can actually run real software on and that won't be completely useless as soon as Google decide to update the API?
Google could use mainline kernels and force manufactures in the OHA to open source all their drivers, maybe even back PostmarketOS to prevent e-waste.
You can take an old Pentium 4 laptop and still put modern Linux on it and still use it for some tasks. Good luck trying to do that with any ARM system.
https://play.google.com/store/search?q=flashlight
GPS location, full network access, prevent device from sleeping, run at startup, microtransactions, read contacts and accounts, read your filesystem... for a flashlight app. These are malware. The Play store is 95% malware, or worse.
Moves like the one that locks out Termux aren't protecting the user at all; Google has never been interested in that. They centralize power. That's what it's all about.
And if Android implements a policy like Apple's to block all execution of foreign code (which is the apparently inevitable conclusion of this type of security arguments), then browsers and everything else will be gone, exactly like Apple (for the record, where every browser is just a wrapper over Webkit).
I used to think that Android was more open than iOS based on principle, but now I realize that no, it was more open than iOS just because they lacked the technical means to enforce the draconian restrictions.
Having corporate control over the device is paramount.
Therefore, the user must not install software from other sources.
It doesn't answer the question for developers.
I actually can't fathom it at all, I find it completely impossible to sustainably perform tasks that I think are socially negative, pretty much regardless of the reward, I'd just shut down and get sacked if they pushed it.
The general response I get to this sort of thing is some variant on "you are privileged", which completely misses the point, it assumes that I have a choice in the matter of whether I do bad stuff.
Maybe I just have too much free time to think about this stuff in and that could be the 'privilege'?
What worries me more is behaviour of Termux developers. They make dubious claims and effectively sabotage their own application (more on that below).
The solution to Android 10 problems — a software wrapper called "proot" [1] — has already been found. That solution would allow to keep all of Termux functionality and preserve existing package managers (such as apt). Proot allows Android user to compile C code in Termux (which they currently can do) and does not require major changes to Termux itself.
Termux developers refused to adopt proot as solution and even removed it's mention from their wiki on Github. Instead they are insisting that all Termux packages should be distributed in Android apk files, published on Google Play. That "solution" has major usability issues, does not scale (it uses shoddy Android PackageManager to track all Termux packages) and would prevent users from using Gcc and other compilers in Termux. The only claimed upside of using apk files is that it would better comply with Google's policies.
Termux developers justify their actions by following arguments:
1. Termux packages require a lot of bandwidth to host, and Termux does not have money to pay for their mirrors; hosting packages in Google Play would be preferable. That statement is nonsense — even fringe Linux distributions like Artix can find FREE mirrors, willing to host their packages. This is usually done by contacting curators of existing servers, that host Linux packages, and asking them for support. Termux is more popular than some of Linux distributions, but it does not look like Termux devs even TRY to do that — they apparently just sit on their hands, occasionally begging their sole mirror provider (JFrog) for more bandwidth.
2. Termux currently does not comply with Google's policy and it's developers are afraid, that this will result in removal from Google Play. They are technically right, but they are making mistake by downgrading experience of their app in attempt to pacify Google Play censors. They are making even bigger mistake by displaying guilt about that — Termux does nothing wrong, and the display of guilt is a better excuse to punish them than their actions.
1: despite it's name, proot does not require root access
Some of them _literally_ just package existing Linux distros such as Debian (e.g. GNUroot) in a way thatis much more compatible and easier to mantain than something ad-hoc such as Termux.
Termux became popular _precisely_ because they did NOT use proot. Proot is great in theory -- using ptrace and hooks in order to simulate a more Linux-like environment, ala Cygwin. In practice, it is just goddamn slow, and ptrace just introduce MORE compatibility issues than the native Android does.
Termux had a shitton of disadvantages compared to the proot-based distributions, such as for example the fact that every package had to be patched in order to use the non-standard Android directory structure, making compatibility with native Linux binaries utright difficult (not even ld is where it should be) and reusing Linux distro scripts impossible. But _still_ it became the most popular because proot is just worse.
No wonder they completely ignore all requests to use proot.
If you want to use proot, there is no point at all for Termux to exist (or at least, for Termux the distro; the terminal emulator itself may still be interesting, your mileage may vary). There's little point remaining for patching packages for Termux; you can use Debian packages, so just go and use Debian.
And to to top it off, what if a future Android breaks proot, which looks likely?
Do you know of any documentation on how to use proot to get around this restriction?
Like a few others on this thread, I've got a PinePhone on order, and now I'm even more stoked to have access to a terminal through it now that Termux isn't going to be an option on my Android.
And here I guess that's vindicated. Whether now or in a few years, the whole concept of Termux is not long for this world. I guess these types of restrictions are essentially required to keep insecure and abusive apps off of the majority of users' devices.
https://blog.lessonslearned.org/building-a-more-secure-devel...
I don't know, but we have a small android tablet with a bunch of games. If you ask me - Play Store is a cesspool of ad-ware ridden junk with some of the games showing you an ad after every single screen (5-10 clicks / taps). After installing more than 10 games the tablet starts showing full screen adds spontaneously at different times and in different screens. And I haven't installed any "shady" apps, just games with "4 stars" or more rating on them.
Somehow that is ok, but running GNU grep in a terminal is now a crime on Android. And you can review grep's code, while these games run amok with spyware.
Google is "fixing" security in all the wrong places. Which means security has nothing to do with what Google does. It is locking the android appliance to ensure uninterrupted consumption of ads. Anything else, be that development, tinkering, etc. which interferes with ad consumption must be restricted, limited and removed.
I.e., anything more useful than a cat picture gallery from a pre-approved list of cat picture providers?
Glad I'm a luddite stuck in the 'insecure and abusive' computing ghetto!
1: https://play.google.com/store/apps/details?id=com.sonelli.ju...
This is currently a big backdoor for apps to sneak unvetted code in at runtime, bypasses Google's review policy. Sure Termux was using this for good, but I guarantee that Google has examples of apps doing this to sneak hostile code onto user devices.
Development tools often need higher security permissions on Desktop, maybe Android just needs a "development" class of app that is more privileged? They'd just need to enforce the limitation to development focused apps really strongly in the review process.
In actual fact the Play Store is full of perfectly "vetted" malware, as it stands. What this actually does is prevent the user from coding on the device.
What I don't get: why aren't they creating a separate entitlement for runtime code execution that requires manual approval in the Play Store?
The obvious solution is to use isolatedProcess, the isolated_app SELinux domain, just as web browsers do. The restriction on executable code "does not apply to code that runs in a virtual machine and has limited access to Android APIs". Of course everything depends on what "limited access" means. Filtering out paths that start with "/../this-is-a-limitation/../" probably isn't enough.
Another solution is to ship all of the executable bytes. Turn an entire Linux distribution into something like busybox. It would be possible to exclude the non-executable pages of memory, shipping those separately as code-free ELF files. Installing programs would work the normal way, except that the .text sections would be empty holes in the files. As long as the mremap system call works, a loader should be easy to implement.
What alternatives to Android are people using? I'm already not using the Play Store, just F-Droid and a couple of third-party apks.
https://topjohnwu.github.io/Magisk/
https://github.com/topjohnwu/Magisk
https://forum.xda-developers.com/apps/magisk/official-magisk...
Personally I no longer consider Android a viable computing platform. As a developer you simply don't have the tools available to give your users control over their data and experience. With the changes to storage security the last couple years, they've essentially dumbed it down to the level of a web browser, and in the process pretty much deprecated running native (C, C++, Rust, Golang, etc) applications.
I'm not opposed to improving security, but when you can't even run software like syncthing or a file explorer without getting special Play store approval, something is wrong.
I've been meaning to write a blog post summarizing what I learned.
This official video is actually a pretty good summary of some the changes made and what the goal is:
Android 10 is killing Termux terminal app.
Hope, Termux devs would now drop back support for Android 5/6.
Edit: seems to have moved here: https://developer.android.com/about/versions/10/behavior-cha...
The way forward is to create Termux like apps in Java/Kotlin.
POSIX is anyway not part of official stable APIs.
>Android 10 does not allow free access to /sdcard (at least file system based).
Yeah that is kind of an issue, with plenty more apps than termux I'm guessing.
[2] https://github.com/syncthing/syncthing-android/issues/29
[1] https://github.com/Catfriend1/syncthing-android/issues/457
[2] https://forum.syncthing.net/t/android-11-all-files-access-fo...
They had 2 years to react to this.
What point there is to forking a platform where the upstream is as big as a mammoth as Google, changing millions of lines per release and actively breaking API compatibility?
Your fork will stay stuck in an API version that in a couple years will have almost no programs written for it. Who would use that?
Your only choice is to try to match the manpower from Google and try to keep your "fork" up-to-date. But that is also guaranteed to eventually fail as someday Google will change something that you literally _lack_ the manpower to revert.
Which is why I can't recommend an "open source" _Android_ phone. I don't feel promoting Android at all, even if open source, encourages my user freedom.
Now android is just buggy (and literally unsexy) There’s no reason at all to use it.
I guess with more reading they are saying they need to declare themselves as targeting android 9 or lower until they find a solution. At some point, I imagine, that will not be an option.
To some degree it should also be on Google to ensure that tightening security (or perceived tightening of security) doesn't break valid use cases.
edit: Ok, for some reason I can't reply, but I see the workaround is to write to another directory.
There's alternatives Termux could take, which the Google issue tracker already mentions such as bundling the executables in the APK & using extractNativeLibs=true so they can be exec'd ( https://issuetracker.google.com/issues/128554619#comment4 ). They could use a loader that mmap's the code with PROT_EXEC but not PROT_WRITE, that also works (this is how JIT's work, and Android is obviously not breaking JITs anytime soon)
It's not entirely clear why Termux hasn't seemingly made any move on the alternative approaches raised a year ago (that's how old the issue is: https://github.com/termux/termux-app/issues/1072 ), and there's a bunch of nonsensical alarmist bullshit muddying up the waters which isn't helping.
Even if the workaround works, this would break apt install from non-termux repos, compiling and running with gcc, maybe Python packages installed with pip.
Google's intent here is to block code execution in the app home Dir. Any workaround would be a security violation and eventually stopped. How is this not killing Termux?
I have a cron running on it that mails my notifications to me, a ssh server which my laptop use to send my backups on my phone, a go http server running a local app that I use in the mobile's browser, I'll often take screenshots on the phone, then scp them on the laptop, etc.
Am I missing something?
EDIT: I won't reply to each of you to not be floody, thanks everyone for the clarifications :)
The Termux maintainers have built their app to tell the operating system that Termux is only aware of how the Android 9 API works. So when you run Termux on your Android 10 device, the operating system tries to behave like it's Android 9. So it allows this.
They (Google) do this to ease the transition so that when a new version of Android is released, they don't force all developers everywhere to immediately fix all compatibility issues.
But they do want developers to do it eventually, so at some point in the future, they will probably stop allowing the Termux maintainers to upload an app that declares "I don't understand Android 10 yet".
It's only an issue if applications target Android 10 APIs. Termux still targets an older API version and is thus not yet affected by this issue. Eventually they'll need to target a newer version because the Google Play store specifies a minimum API version that applications need to use.
[1]: https://developer.android.com/distribute/best-practices/deve...
Long term, I can only assume targeting an old SDK will not be supported at some point.
Off-topic, but that's awesome! How do you get access to your notifications from Termux?
In one project we work around this by shipping a tiny wrapper in the APK to exec that then uses dlopen() on the target, which is now built as a library.
Pretty sure a generic hack could be made to run unmodified executables this way. Certainly in the security community userland ELF loaders are very old news, even X11R6 had its own at one point
And then at some point you realize that, like Cygwin, you have built a system where fork() fails randomly by design.
And then Google blacklists both fork and exec.
In any case - don't editorialize in your titles.
https://github.com/termux/termux-app/issues/1072#issuecommen...
"As i said on another issue, you should really start communicating this to users now , via as many channels as you can. I understand why you are doing what you do, but it is a big change and will annoy and/or confuse users however will you implement it. so getting people prepared now (ie as soon as possible, and before they have to do anything) will avoid a lot of angst and be in your best interests."
The "solution" is to publish 100s of different play store apps with Linux packages or to disable the ability to run installed programs.