362 points · by martinlaz · 5y ago · 340 comments
Edit: Note that the Advanced Protection program is opt-in for users that require the highest degree of security Google can offer. Regular users won't be impacted by this.
Edit: proof https://imgur.com/a/yktPNIc
Edit 2: see @haunter's comment for a link to the change announcement
There is no shortage of sketchy apps on the play store.
Through my personal bias I would imagine that most people side-loading apps tend to be people using F-Droid who know more or less what they're doing. Although I'm sure there are some people who blindly follow sketch website telling them to install sketchy APK directly. But do these people really outnumber people installing flashlight app from play store that steals your data?
All this locking down your device "for your own protection" assumes that the play store software is actually vetted and secure, but that second piece never seems to fall in to place.
This random article [1] suggests that 67% of malicious app installs comes from the play store itself. So this whole "Advanced Protection" scheme only protects against 23% of threats. Pretty weak IMO.
[1] - https://www.zdnet.com/article/play-store-identified-as-main-...
The real difference is between "apps that have to give Google 30%, and apps that don't".
Certainly the Play store being a walled garden which appears to be full of weeds, nightshade, and hemlock is one of the key factors in pushing me over to iOS.
If side-loading becomes easy and normalized though...
I have a PinePhone but it is not yet ready as a daily driver, and also the difference in hardware performance between my Android phone (which I bought this year) and PinePhone (or even Librem) is abismal. I wish there was at least one (or many) linux phone ready to be a daily driver and with hardware comparable to modern Android phones (or iPhones), but unfortunately that is not yet the case, although the community has made a massive effort this year to advance the state of linux on phones, at least for PinePhone...
I use a MacBook for work and same thing, almost all the apps I have I installed using homebrew (and the UI apps, with brew cask)
EDIT: I see that, at least for now, it's optional and you can un-enroll, which is good.
It's always going to be optional. It's their solution for high-risk users (think: journalists, whistleblowers, and similar), it's not meant to be for everyone.
Disclaimer: No Google affiliation, but I've tested the program a long time ago before it was available to everyone.
Or people with bitcoin wallets, of which I assume there's going to be more and more.
I don't know about it being so much a hardware performance issue, rather than a software optimization issue. Personally, I don't think I need much performance, but I have had issues unlocking my Pinephone because the lockscreen seems to have a hard time keeping track of my finger as I slide it or press the keypad buttons. I've also had a number of kernel panics in the few times that I've used it (I got it just recently).
For the Pinephone to be my daily driver I just need to be able to run Whatsapp on it (so run an Android emulator with access to the SIM card, I imagine; haven't tried) and take real 5MP images. That's all I really need to switch the SIM card and leave my Android phone at home. It can even drop calls and I won't really care (not that it does; I haven't tried).
EDIT: I see I misread a bit and thought you meant its low performance prevented its use as a daily driver. I don't think it makes sense for linux phones to be offered with more expensive hardware until the software catches up to enable their use as daily drivers for more people. I think we're at a stage where the buyers are primarily people that are looking to possibly contribute to the software to get it to that point. Being a cheap phone is important for that.
You can then use a bridge to connect it to Matrix and chat using Whatsapp from any Matrix client.
I can't see it going away. Google uses it to fend off monopoly accusations, viz you aren't locked in, you can always use another app store. Apple doesn't, and they are in a much more threatening territory when it comes to anti-trust law suites against their app store because of it. https://www.cnbc.com/2020/10/06/house-antitrust-subcommittee...
Google has far worse anti-trust problems than Apple in general because they own 80% of some markets, and is being reminded of it repeatedly by ongoing law suites being brought in various countries. https://www.vox.com/recode/2020/12/16/22179085/google-antitr... But for Google Play they have a free pass, and I don't think they aren't likely to give it up any time soon.
https://landing.google.com/advancedprotection/
There are instructions here for how to unenroll:
It breaks PGP signatures, among other things.
No way to turn it off without disabling all of Advanced Protection. Sweet, huh?
It's still possible to sideload apps if they are installed with ADB.
I use f-droid, and I'm lucky enough to be one Android version behind. Can someone who's upgraded let me know what to expect when I upgrade? The blog post mentions that adb still works. Does this mean I'll have to use adb once to install f-droid and have it work normally after that, or will _every_ app need to be installed using adb?
Edit: See this comment for link to announcement https://news.ycombinator.com/item?id=25645554
Yet. Next step is to make it opt-out for the "safety" of the public.
According this rule, all web browsers should be removed from Google Play too, as JavaScript apps (embedded in webpages) are "sideloading apps" by design.
Yet. Google seems to be restricting Android more and more with each release.
I fully switched to the PinePhone last year because of this.
General sideloading? True, that's anyone's guess.
IMO a better link than a short paragraph on Wiki.
FWIU:
- Android Q+ disallows exec() on anything in $HOME, which is where termux installed binaries that may have been writeable by the executing user.
- Binaries installed from APKs can be exec()'d, so termux must keep APK repacks rebuilt and uploaded to a play store.
- Termux shouldn't be installed from Google Play anymore: you should install termux from the F-Droid APK package repos, and it will install APKs instead of what it was doing.
- Compiling to WASM with e.g. emscripten or WASI was one considered alternative. "Emscripten & WASI & POSIX" https://github.com/emscripten-core/emscripten/issues/9479
- It seems C compiled with clang on the device wouldn't be executable? (If it was, that would be a way around the restriction: distribute packages as source, like the good old days)
> offer users the option of generating an apk wrapping their native code in a usable way. https://github.com/termux/termux-app/issues/1072#issuecommen...
This seems a promising solution: compile from source, create an apk, install - your custom distribution! For popular collections of packages, a pre-built apk.
- Java might be explicitly blocked, being a system language for android, even though its byecode is interpeted and not exec()ed.
- Other interpreted languages should be OK e.g. python
As of Android 10, PGO data files are uploaded into the store and shared across similar devices so that the AOT compilation with PGO can be done right away on installation.
Having bytecodes doesn't mean being interpreted.
Apparently this is plugs a vulnerability known as W^X. See their explanation in the issue here[0]. Personally I would love to know how many real-world exploits they can blame on this specific vulnerability, stacked up against the number of truly useful apps like Termux that have now been hamstrung.
Also, this leaves the state of running native executables on Android as something of a joke. Any executable you want to run has to be named `lib<exe_name>.so`, and included in your jniLib directory at build time.
It's clear what side GOOG has picked in the war on general-purpose computing[1].
> This seems a promising solution: compile from source, create an apk, install - your custom distribution! For popular collections of packages, a pre-built apk.
FPM could probably generate APKs in addition to the source archive and package types that it already supports.
The conda-forge package CI flow is excellent. There's a bot that sends a Pull Request to update the version number in the conda package feedstock meta.yml when it detects that e.g. there's a new version of the source package on e.g. PyPI. When a PR is merged, conda-forge builds on Win/Mac/Lin and publishes the package to the conda-forge package channel (`conda install -y -c conda-forge jupyterlab pandas`)
The Fedora GitOps package workflow is great too, but bugzilla isn't Markdown by default.
Keeping those APKs updated and rebuilt is work.
You can run interpreters, but possibly in a restricted context in the future.
> Support for Android 5.x.x - 6.x.x is dropped forever. Time to upgrade your devices or learn how to backport git changes.[1]
And this part from Termux devs reply is especially cynical:
> ... Time to upgrade your devices...[1]
It looks like they has a contract with devices manufacturers...
... No, I no need such type of "app improvements in new version" which require me to buy a new device.
FTR, In F-Droid Archive[2] repo there is still Termux v0.75 for Android 5.x/6.x (which I'm using on Ido device), but it is horrible because Termux packages repo for Android 5.x/6.x are now disabled[3] too.
[0] https://github.com/termux/termux-app/issues/1516
[1] https://github.com/termux/termux-app/issues/1407#issuecommen...
[2] https://apt.izzysoft.de/fdroid/index/apk/com.termux?repo=arc...
They are not obligated to support them, feel free to support all Android versions at once in your project.
This reply to Termux user is Termux devs fault:
> ... Time to upgrade your devices...[0]
[0] https://github.com/termux/termux-app/issues/1407#issuecommen...
Note that i do not expect someone to do free work for me, i just do not consider a 5 year old device "old" enough to be weird for it to be supported - especially when it works just fine.
And it would "OK" if there would no releases with new features... but bug fix releases which is worse.
Instead, team (owner & core members) just dropped & disabled everything, leaving Android 5.x/6.x device owners in frozen state.
Even more, team not proposed itself & ignored any proposition from others to at least support Termux for Android 5.x/6.x in LTS-way.
Beside Android 5.x/6.x devices, I has Symbian 9.x (Nokia N82) smartphone which works perfectly. And there are a lot of new apps for it:
- https://old.reddit.com/r/symbian/new
P.S. My 10+ year-old laptop perfectly works with latest MX Linux distribution (based on Debian 10 buster) and all modern FLOSS desktop apps (GIMP, FreeCAD, Inkscape, etc.) works like a charm on it.
So, software devs should NOT declare users to buy/upgrade hardware.
But in general, hell fucking no. 5 years is terribly short sighted. Look at how much e-waste is piling up. We can't really recycle phones. They get shipped to Asian and African countries where people melt down the plastic without adequate ventilation and extract out all the metals they can in OSHA free environments.
We should be designing things to be as useful as possible for as long as possible.
A disadvantage is it becomes much harder to make things like terminal emulators and things that want to download random code and run it.
But those are by far the minority of apps, and it seems crazy to make a pretty massive security tradeoff for something that 99% of apps don't need to do.
One solution might be a special permission to be allowed to do that, but it seems unlikely a user could really make an informed decision.
Another solution could be to interpret rather than execute the code - you lose a lot of performance, but for people running bash scripts, that might not matter. Using WebAssembly might be a good middle ground.
It also completely eliminates general purpose computing.
>One solution might be a special permission to be allowed to do that, but it seems unlikely a user could really make an informed decision.
I think the way "Developer Mode" on Android is implemented is pretty good.
The number of people who want general purpose computing on phones is vanishingly small. And since malware is often indistinguishable from general purpose computing, it can be a reasonable product choice.
That program permits you to say "as of this moment, all the apps that comprise this device's purpose have been installed, and computing should cease being general, and should instead be limited to only those apps (including upgrades)". This isn't something I'd do for my development device, but I can see how it's a desirable policy for some people.
> I think the way "Developer Mode" on Android is implemented is pretty good.
Assuming you meant Chrome OS here, I disagree. Developer mode sucks because it forces you to forego almost all system security and it makes it trivial to compromise your data. There needs to be a middle ground, not just dev mode.
In my opinion there's a similar situation happening with SIP on Mac OS -- it's too drastic to disable, but there's in many cases not enough control to leave it enabled.
Nobody should need to enable dev mode or disable SIP just to run their favorite apps.
And I was talking about the obscurity level of accessing the developer mode, because you said was hard to achieve a good balance between "too difficult" and "too easy to be tricked into".
Like seriously, what are people even arguing here? General purpose computing was a mistake? Is that seriously an argument that anyone is making in good faith as they type into their web browser on an Internet forum?
Just wait until you find out that app stores are always going to have fundamentally imperfect moderation. Forget running unsigned/unapproved code, we should get rid of 3rd-party code entirely.
General purpose everything is insecure. Self-published books spread lies, open markets have bad products, computers get infected, and people burn and poison themselves cooking their own food in stoves. If your goal is 100% security, then you will very likely never build any platform or product that's worth using.
We have other ways to improve security beyond turning smartphones back into flip phones.
Yet oddly, I as the user who paid $550 for my device would like to do that. I understand wanting to put a warning on it, but otherwise my device can kindly screw off and do what I've told it to do, or it will be taking a one way ride out the nearest window.
The device serves me, not the other way around.
Currently that number is about 1 ($30k) on an up to date android. I believe that if I had more bitcoins on a phone, and told people about it, there's a good chance a targeted exploit would steal those keys. Even if I had them encrypted, at some point I have to type a password in to decrypt, and that would be the point they'd be stolen.
However, on an iOS device (which is more robustly locked down), I'd probably happily store 10 bitcoins. (if I had them, hah!)
On dedicated hardware (like a trezor wallet), i'd also be confident up to about 10 bitcoins (far less attack surface, but also a less competent security team than Apple can afford).
On an outdated android, it would be more like 0.1 bitcoins - there are trivial ways to root them from the web browser and any old website can do it!
Considering that for many people, access to all the private data on their phone could ruin their job, relationships, and even put them in prison, I'm sure a lot of people value the security of their phone at multiple years salary. If I have to choose between that and the ability to run an emulated game slightly faster, I'm totally choosing security!
There are also trivial ways to root ancient iOS versions with a web browser, too. In fact, I think that technique was more common among iOS devices than it ever was among Android...
Comparing a rushed Q4 market Samsung phone to an iPhone is simply comparing a brick and an orange.
There are many problems with Android, but that the price for a zero day exploit on Android has become more valuable than one for iOS as far as 2019 [0] should tell you something about how a proper Android phone would fare in the comparison. Please leave the brick where it belongs.
[0] https://www.wired.com/story/android-zero-day-more-than-ios-z...
p.s I would also just never leave bitcoin on my phone.
Or not install the OS update that will enforce this.
Or install an old version of the app, e.g. from fdroid.
---
I think it's safe to say Android is more "the device serves me" than iOS, but even now it's pretty far from actually achieving that. Maybe install a different OS that actually has that goal?
If Bob paid $COST for a phone and it got exploited because of this, Bob may throw his phone out of the nearest window.
Do you think there are more Bobs than you in the world?
Personally, I find this reliance on the GOOG OS awful, but most of it was overcome with Xposed last time I ran LineageOS. I tried Cydia last time I ran IOS and that was worse.
I've thrown several phones out of the window (metaphorically) and am waiting on my PinePhone being delivered because I believe in their goals.
It sucks that everything in life seems to come down to Coke or Pepsi choices, or Vi/Emacs.
Big corps aren't the answer. They monopolise and stifle, giving twoshit sandwiches for consumers to take a bite of.
You and I both know, despite many attempts, there is no hardware or software out there that is unexploitable. From the most locked down chromebook to Apple's walled garden, these devices can and are exploited.
The idea that if somehow we take away enough of your freedom we'll make the device safe is basically a bald faced lie. Not once in the history of computing has it worked out. Even my internet connected lightbulbs which literally have only an on and an off exposed are exploitable.
No amount of removing user freedom will make users safer. This isn't a rocket surgery level conclusion, which means companies that continue pressing down this road probably have some other reason for doing so.
While I agree with you this is not the world we live in. We live in a world with Apple and iOS.
https://en.wikipedia.org/wiki/Harvard_architecture
Perhaps most familiar to the typical HN reader via Arduinos, and contrasted with von Neumann:
https://en.wikipedia.org/wiki/Von_Neumann_architecture
And anyone who has tried to make any kind of interesting general-purpose system on a Harvard design will tell you that it's not really practical.
https://community.arm.com/developer/ip-products/processors/b...
For just running a few bash scripts, it really doesn't matter tho.
Also they are on a kind of thin ice and already almost have been kicked out: https://ish.app/blog/app-store-removal
https://github.com/microg/GmsCore/wiki/Implementation-Status
LineageOS does not support the mechanism (signature spoofing) that enables MicroG to replace Google Play Services. The developers of LineageOS consider signature spoofing to be a security risk:
https://review.lineageos.org/c/LineageOS/android_frameworks_...
It is up to users to select the OS that best meets their own privacy, security, and usability needs.
You can even buy it preinstalled on Fairphone: https://esolutions.shop/shop/e-os-fairphone-3/.
https://wiki.pine64.org/wiki/PinePhone_Software_Releases
The list contains many existing Linux desktop distros. The PostmarketOS edition of PinePhone even shipped with a USB-C docking station that you can use to easily connect a monitor, keyboard, mouse and even ethernet.
https://www.pine64.org/pinephone/
I remember KDE made Plasma Mobile no idea if that works well.
It's a lot of effort to become an everyday driver.
But if you set your standards to about 2012. Then I'm sure you can enjoy it
At least we can hope terminal + tools as separate app bundles approach takes off.
But think of all the wasted engineering hours that could have been spent doing something useful, but will instead be spent conforming to Android's draconian security policies. This would all be solved if there was a switch that allowed users to disable W^X protections for specific apps.
The web allowed us to avoid a world where everyone had to own a Windows machine, but mobile phones are now making that a reality.
[0] A privately owned replacement for cash, doesn't that just sound great...
Instructions from the Termux wiki here: https://wiki.termux.com/wiki/Installing_from_F-Droid
That said, it always kinda felt like a kludge when compared to (ideally) using a full-blown Linux distro like PostmarketOS.
[1] https://lbrito1.github.io/blog/2020/07/replacing_google_anal...
termux is not perfect because it is already a compromise!
When google scammed us and sold android devices to all the hackers here and then surreptitiously removed our access to the terminal, we said "that's fine, we can still package this as an app like so and so" and termux was born.
now they are removing access from running any code not signed by their store, even if you install termux from the appstore and compile some code yourself, you can't run it. where are we drawing the line?
99% of people cannot use postmarketOS, either because their market do not have access to devices with unlocked bootloader or because their live depend on some bank/school/work app that checks the OS.
I would believe that if it was a prime (well described, not difficult to understand, easy to find) option where the user had control.
As it is, it is the same as blocking the second level of a house because 'not allowing the residents to climb a stair makes the house safer for them'.
At some point, we have to see that feature prioritization on android serves only advertising revenue increase, and reduced support costs for google.
This one is for the later. With this feature they can remove tons of cost form app review teams they have. They can just allow every app that downloads crap to the data location and call it a day. It doesn't help the user in any way, only google profits.
I mean, you can block the kernel level execve, but perhaps user space can be hacked to do a user-level execve. Just unmap and re-map the right pieces of memory, close the right file descriptors, do the right stuff with signal handlers and whatever not. No?
Look, Cygwin is able to simulate fork and exec on Windows, both of which are completely missing.
One thing that would put a damper on things would be disallowing executable mapping at all. But you can't just do that since it breaks shared libs. A mechanism that allows shared libs to be mapped executable and then drops the map-execute privilege wouldn't be secure. It would be annoying, but possible to bypass.
The only way it would work is if the entire process setup logic shared libs were moved into the kernel, so that the very first instruction that runs in a process is in a context that can no longer map any pages executable. Or else, it's still in user space, but the dynamic loader is specially privileged, and before dispatching the very first instruction in the loaded executable, it drops that privilege. Either way, so much for trampolines, JIT and other techniques). dlopen could not work either, unless it's moved into the kernel, and allows only "blessed" plugins.
I've used GNU/Linux as my desktop OS for nearly a decade: Fedora for years, then openSUSE, then Pop!_OS for the past couple of years. These distros seem to have provided a good, current, stable out-of-the box experience (Out-of-the-Box + RPM Fusion and Packman for the former two.)
I just don't enjoy constantly fixing issues on my personal systems, in fact, after work I just want my computer to work. I get some people enjoy tinkering, I simply want my device to work AND provide me the freedom to do what I want if I feel adventurous. I don't distro-hop, and I don't like rebuilding my OS if I can help it. I'll spend a week getting everything the way I like it and expect it to last me at least a couple of years. I use Linux for everything: gaming, writing software, web browsing, you name it.
For as long as I have looked into it, GNU/Linux phones are an absolute nightmare for someone like me. I remember reading an article full of workarounds to get a dialer app to work on some project phone. I just want a phone that works, and could allow me to access root, setup my dot files, and tinker to the degree I'd like. As of now, my only solution has been LineageOS (Android fork) which has a proper terminal emulator with root access by default. As nice as this is, I'd love to support a GNU/Linux Android-alternative, as it's anyone's guess how long LineageOS or other forks will be compatible to the degree they have been in the past.
> I remember reading an article full of workarounds to get a dialer app to work on some project phone.
Currently, phone calls and sms work fine on both Librem 5 and Pinephone. The development rate is amazing. Only the good battery life is lacking yet, but it's improving every month.
I do prioritize currency over stability in many instances, but I do want a reasonable level of stability which is admittedly quite subjective. Pop!_OS or other Ubuntu-based distros seem to strike the right balance for me (Pop won me over with it's built in, togglable tiling manager, a feature I'd have to spend a week's worth of free time researching and trying to get working properly in, say Arch.) I just don't have much free time and motivation to spend getting some tiny quality of life improvement to work.
from some of the people at CDPR
Also worth to take a look at is Fairphone, which is a little more finished product than most. It has an active community around it with many ports ongoing.
Thus, for the vast (and I mean VAST) majority of consumers, Librem and the rest of the open source phones were dead on the spot even if it cost 1/3 of their current price.
It's a pipe dream up there with the "year of the Linux desktop".
This is an extremely misleading example. You pay $2k if you want your phone to be produced in the USA. How much do alternative phones produced in the USA cost?
Standard Librem 5 model costs $800, Pinephone costs $150 or $200.
And no, root account does not violate any security principles. If your app is leaking secrets due to root accounts, your app is broken.
Yes it amuses me how banking apps refuse to run on a rooted phone, but the same bank's website works on the same phone. Suggests that they've placed a little too much trust in the app. Never trust the client...
And Google technically allows it, buy a phone with unlockable bootloader.
I now invoked the ‘convert cores to the Play Store versions’ functionality, and not seeing any new separate apps installed, nor was I asked to install anything (and Retroarch doesn't have permissions for that). It seems like Termux could use the same approach.
Works great. Will use Termux till/if it breaks.
The usable version is from F-Droid. And I had to install that one just to install Termux. No need to root your phone. Simply install F-Droid app store, and install from there.
From there, it would depend on whether you have synchronization that actually monitors files on the ‘sd card’ storage.
Note that you can download the apk and sideload, without installing fdroid.
You can, for example, install termux on a device that is never online... a standalone phone.
Also see Admin Hands.
Looks like google wants to make virtual wall and gates like that of apple.
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.
As well as programming environments.
I use a couple of them to code on the go.
Those apps are affected by the same rules as Termux.
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.
And what's wrong with it? It may be implementation detail but termux increases utility of the phone. It seems you always have an axe against UNIX / FOSS ecosystem to grind. But every system has its strengths and weaknesses, Unix is just too ubiquitous for what it is worth. Look at fuchsia, while having laudable goals, has already become quite complicated (in typical Google project manner).
UNIX compatibility is also what keeps C alive, actually.
Want a CLI? The Java APIs on Android provide all the required features.
AFAIK, iSH only runs in TestFlight right?
Nope, it’s still in the AppStore[0]. So far, Apple hasn’t followed through on it’s threat.