9 ms·
Google sunsets the APK format for new Android apps
- smackeyacky 5y agoGoogle warned last year they were deprecating APKs on the play store. I didn't think much of it at the time as I had a much bigger problem when they insisted everything shift to 64 bit, a painful process if you have native libraries. AAB files aren't suited to local installation like an APK though, they are more like everything google needs to build APKs themselves for installation on different devices. I think we will still build APKs for direct distribution.
- ergot_vacation 5y agoAs others have asked though, how does this effect side-loading? What does the user end up downloading: an apk, or an aab? If it's an aab, can they archive it for later, like you can with apks? APK archive sites have saved my ass on numerous occasions when the developer decided to "improve" their app, forcing me to downgrade to get it back to a preferable state. And then of course there are apps that don't have the holy blessing of our Lord and Savior Google. Is it going to become impossible to load those at all without installing some weird homebrew OS? For now APKs still work on the phones themselves, but I imagine that will be stolen from us as well at some point.
- iggldiggl 5y ago> What does the user end up downloading: an apk, or an aab? Your phone still downloads APKs from the Play Store, but it's no longer a single monolithic APK that covers all languages/screen sizes/CPU architectures [1] supported by that app. Instead you'll get a collection of APKs covering your specfic device configuration only. > If it's an aab, can they archive it for later, like you can with apks? You can archive the individual APKs, although installing them again is a bit more complicated, as you either need a third-party app like https://f-droid.org/packages/com.aefyr.sai.fdroid/ https://f-droid.org/packages/com.aefyr.sai.fdroid/, or else install them via the correct incantation on the command line. As for APK archive sites, presumably coverage of languages/screen sizes/CPU architectures with few users might get worse, as one user uploading an individual APK version will no longer be enough to automatically cover all languages/screen dimensions/etc. and instead you need to grab separate APKs for each possible language/screen size etc. Getting the APK with the correct CPU architecture (where applicable) will of course be critical, although in practice almost everybody is probably using ARM these days, so there's not much to go wrong here (although if you still have a 32-bit device then you can only run the 32-bit APK, whereas the other way round a 64-bit device can run both 32- and 64-bit native code). As for language and screen density, my guess would be that Android can fall back to whatever language and screen density APK actually has been installed (since this should be the same situation as when a monolithic APK doesn't contain the correct resources for your preferred language/screen density), so you might get a degraded experience (wrong language, either blurry or unnecessarily-high-resolution graphics), but the app at least still runs. [1] Although given the potentially large size of native libraries, separate APK versions for differing CPU architectures already aren't that uncommon.
- techrat 5y ago> As others have asked though, how does this effect side-loading? It doesn't. APKs are still the end format.
- askonomm 5y agoSo what's this mean, effectively, to other app stores on Android? I'm pretty sure most developers won't bother making APK's for third party app stores with very small user bases. And what's this mean to Microsoft who is bringing APK's to Windows? Existing APK apps sure, but can Microsoft use the new format as well or no?
- notatoad 5y agoFrom my reading of the windows 11 coverage, they're relying on APK sideloading or the Amazon app store for distribution. So no, Microsoft will likely not be able to use the new AAB format (although I'm sure there's some ongoing negotiations around this. Never say never...)
- tadfisher 5y agoAABs are built, and APKs extracted, with bundletool, part of the open-source Android SDK. There is nothing technical preventing Amazon or F-Droid from accepting AABs and providing APKs on-demand.
- sxp 5y agoIf the dev wants to release their app on another app store, they would just export the apk. Pirate app stores that share apks without the dev's permission would probably need to write their own aab to apk converter and sign the apks with a key owned by the pirate app store. So this probably isn't a big deal for regular devs, but will reduce the security of apks downloaded from pirate app stores since it would be harder to verify the code integrity of the derived apps.
- jayd16 5y agoSeems like devices still deal with apks. Apks remain a core part of development. The biggest hurdle to 3rd party app stores is the API, not making an apk.
- pjmlp 5y agohttps://android-developers.googleblog.com/2021/06/the-future-of-android-app-bundles-is.html https://android-developers.googleblog.com/2021/06/the-future... > If I use app bundles, can I still publish through multiple distribution channels/app stores? > Yes, there are multiple ways to achieve this. You can either use the same app signing key everywhere or use unique app signing keys for different channels, including a unique app signing key for Google Play. You can either build and sign artifacts for all distribution channels locally or you can download distribution APKs from Google Play for use on other channels. Distribution APKs downloaded from Google Play, either via the app bundle explorer in Play Console or via the Play Developer API, are signed with the same key used by Play App Signing.
- chrisweekly 5y ago> "The other issue is that developers will need to give Google their app signing key to export an AAB app as an APK. This gives Google quite a bit of power." I can't even.
- laweijfmvo 5y agoI'm confused; why do developers need Google to export an APK for them? Can they no longer generate APKs (locally) themselves and distribute them however they like?
- zucker42 5y agoBased on the blog post's FAQ my impression is you can still do that. My impression is it's only for apps in the play store (and the corresponding export play store AAB to APK feature) that you are required to giving your keys to Google. https://android-developers.googleblog.com/2021/06/the-future-of-android-app-bundles-is.html?m=1 https://android-developers.googleblog.com/2021/06/the-future...
- tadfisher 5y agoThat is to allow existing apps to update to AAB distribution. New apps do not get access to the signing key, only the certificate.
- meesterdude 5y agowhen i saw the headline, I knew google would use it as a pretext to do something disgusting. Everything they do has some dark pattern to it somewhere. AMP is a great example. You should never, ever give your signing key to anyone. Especially not google. you might think of google "they wouldn't" but in fact they can, they have, and they will again.
- tadfisher 5y agoNote that new apps don't provide the Play Store with the key, they just verify against the first certificate they receive.
- noisy_boy 5y agoWill we be able to do offline installation of the .aab files like we can for .apk? Sucks if the answer is no.
- userbinator 5y agoI suspect making that harder was one of the main motivations, since I highly doubt Google would actually care so much about app sizes in an ecosystem that was already insanely bloated from the beginning. (https://news.ycombinator.com/item?id=15442743 https://news.ycombinator.com/item?id=15442743) Weakening adblocking in browsers and churning the web "standards" to the advantage of its browser, the increasingly "ignore the user's request" attitude of its search engine, and dumbing-down and hiding information in its products --- it has a technical argument for every single thing it does, but don't let that convince you to think that's the real reason it did that. Google is extremely good at rationalising otherwise anti-user decisions with a technical and positive spin --- it's an ad company, after all, and persuasion/reinterpretation of the truth is what marketing is all about. Android is still comparatively open as far as mobile devices go, but with each change it makes I can see the walls are slowly rising around its garden.
- noisy_boy 5y agoI have to agree. I don't like it either but Android's flexibility still is miles ahead of iOS so it is more of a case of choosing the worse between two bad choices. E.g. I heavily use Syncthing to keep data/media across various devices in sync (mostly Linux and Android); recently we purchased an iPhone so I thought of doing the same setup for managing photos/videos etc and basically, other than some hacky options, there is no clean and seamless solution. Google's walls are rising but I can still pretty easily hop over them compared to Apple's fortress.
- sofixa 5y ago> since I highly doubt Google would actually care so much about app sizes in an ecosystem that was already insanely bloated from the beginning. (https://news.ycombinator.com/item?id=15442743 https://news.ycombinator.com/item?id=15442743) Isn't that logic backwards? Precisely because the ecosystem is bloated they're doing something about it in a place they can?
- ridaj 5y agoThe good: .aab can be optimized by the Play store for the device that is requesting them (for example stripping resources that don't apply to a particular device) The bad: it will be more difficult for non-Google app distribution storefronts to jump-start their catalog by grabbing APKs from the Play Store, because they won't be able to get one neat APK per listing via some APK downloader. (For apps that do want to get listed on those storefronts, life won't be very different.) The ugly: APK distribution is a "zero-trust" model which allows the developer and the user to not have to trust the store not to make any changes to the application. In fact that's what prevents the kinds of "good" optimizations mentioned above: Google can't reach into an APK to strip resources that are irrelevant to a particular device, because doing so would invalidate the APK's signature. By forcing apps to be deployed with keys under Google's control, this trust model is broken. The Play Store no longer guarantees through cryptography that APKs haven't been tampered with between the developer's build system and the recipient device.
- tadfisher 5y agoAt least they give you the signing certificate so you can verify the end user is using a Play Store build and not something potentially malicious. Testing release builds requires a round-trip through the Play Store, though, and apparently AOT-compiling is only triggered when the Play Store installs its blessed version of the app.
- whoknowswhat11 5y agoUsers trust Google more than they do random app devs in many / most cases
- square_usual 5y agoThis isn't about trusting the app dev at all, this is about trusting that Google didn't tamper anything. Whether or not trust a dev, you can't trust that you are getting what the dev intended. If you download a version of Signal Google silently changed to include a backdoor, it doesn't matter whether you trust Signal or not: Google will get all of your data.
- zodiakzz 5y ago> An Android App Bundle is a publishing format that includes all your app’s compiled code and resources, and defers APK generation and signing to Google Play. > Google Play uses your app bundle to generate and serve optimized APKs for each device configuration, so only the code and resources that are needed for a specific device are downloaded to run your app.[1] So a unique .apk is generated for each device configuration on demand? Goodbye to the days when a single (or a couple) .apk worked on all devices, which was easy to rehost, redistribute etc. Is the toolchain needed for compiling AAB -> APKs open source atleast? And will Google Play let end-users download the source .aab file? 1: https://developer.android.com/guide/app-bundle https://developer.android.com/guide/app-bundle
- Nullabillity 5y agoIIRC, an AAB is basically a set of APK "dimensions" (base, screen size, screen density, ISA, and so on), so you end up downloading one APK per dimension and install them as one transaction. This is also possible to do through both the CLI (adb shell) and Java APIs. However, it does indeed make sideloading more troublesome (the regular graphical installer has no idea about how to do multi-APK transactions). However, you can still distribute monolithic APKs for that purpose...
- tdeck 5y agoThis is basically correct. An app can be loaded as one APK or as a set of multiple APKs - these are sometimes called "split APKs". For a while the Play Store has supported sending apps as a base APK plus a bunch of "config split" APKs. The base APK contains things like DEX code (Java bytecode). The config split APKs are grouped by various device targeting dimensions (basically language, DPI, and architecture). As you can imagine, apps often have a different set of strings for each language, multiple versions of native libraries for different ARM / x86 ABIs, and assets for different DPIs. When you create a bundle, Play will build split APKs for each possible value in each group (e.g. a low-dpi APK, a high-dpi APK, an English-language APK, a Korean-language APK, etc...). When a device downloads the app, Play will send that device the base split APK and one config split APK from each group. So I will get the base DEX code, the arm64v8a native code APK, the XXHDPI APK, and the English strings APK. That means devices don't have to download or store potentially large amounts of app assets and native code that will never be used on that device. EDIT: Older devices (IIRC L and below) don't support this. So Play will build standalone APKs for their configuration. I am not sure how many possible standalone APKs it will build.
- Russelfuture 5y agoI had six apps on Google Playstore several years back. They were free, no adverts or in-app tricks... Google removed them, since I didnt keep creating new versions. Oh well. But the API churn has become explicit neo-monoploy strategy. Google and Apple should be broken up. Two companies control all mobile software distribution - and restrict and block independent developers using all the classic tricks of monopolists. It's just nuts. No other industry is this concentrated. There is no innovation happening here. 15% smaller size? So what. This whole exercise is to maintain and extend control. Regardless of where one sits on the political spectrum, this is just "company store" monopolist tricksterism, and the solution is to dust off the old Anti-Trust laws and break this abusive entity into three or four seperate companies. "Trust Busting" is something both the Right and the Left can agree on. Break Google up. If - as a developer - you want to distribute your code as an .APK, then you and your customers should be able to make that choice. This current economic model is not only bogus - it is actually contrary to black-letter US law.
- dontblink 5y agoGenuine question: why not distribute them yourself (e.g. on GitHub)? If more and more developers do this, it will be like pc software. We don't have to accept a storefront (on Android at least).
- PradeetPatel 5y agoIt has been established that distributing APK anywhere else (Github, etc.) other than the Play store would have a drastic impact on the exposure and discoverability of the app, which will lessen user engagement and revenue stream. Disclaimer: I'm not an app developer, but works in PR and marketing.
- grishka 5y agoEstablished by whom? Many people host their apps on Google Play just so they don't subject their users to warnings about "installing apps from unknown sources" and for convenient updating. > user engagement and revenue stream Well, if you're making an app for the sole purpose of making charts go up...
- devetec 5y agoThe walled garden's walls heighten. However, sideloading will still function with other avenues. But still, this barely adds anything, and even though it can be more optimized for devices, that's not much compared to the large ramifications.
- sschueller 5y agoJust wait, Google will probably remove that in an upcoming Android version soon.
- justshowpost 5y agoI absolutely do not believe in caring about flash space, all of the APKs from Google LLC are quite bloated. Google is likely targets users who are side-loading their apps, grabbing even more DRM power for themselves.
- yjftsjthsd-h 5y agoWait, why can't other stores use AABs?
- jayd16 5y agoPretty sure there's no technical reason they couldn't.
- Koiwai 5y ago"Sunsets", I hope English majors could stay the fuck away from tech news.
- SuperNinKenDo 5y agoGet help.
- wyattpeak 5y agoSunset is a pretty standard term for end-of-life in computing[1] and elsewhere[2]. [1] https://en.wikipedia.org/wiki/Sunset_(computing) https://en.wikipedia.org/wiki/Sunset_(computing) [2] https://en.wikipedia.org/wiki/Sunset_provision https://en.wikipedia.org/wiki/Sunset_provision
- Koiwai 5y agoThanks for the information, but I persist, having a prior example doesn't necessarily mean they're not all morons. Of course you're free to have your opinion though.
- PradeetPatel 5y ago"Sunsetting" inspires the feeling of a new beginning, and positive sentiment than "deprecating". There's a lot of power to be had in being able to influence perceptions with using the right words.
- Koiwai 5y agoSunset is not a manned thing, gives me the impressing of God complex. Besides, I don't think we need a positive feeling here, "deprecate" is perfectly fine, may be a quoted "sunset" is more appropriate here.
- unethical_ban 5y agoIt's an established term. That's a fact. It's like calling all people a moron in America who use the term "truck" instead of "lorry". You're free to insult the intelligence of everyone who doesn't share your extremist minority opinion, though.
- deleted 5y ago[deleted]
- rock_artist 5y agoI've started deploying a new app under testing (public testing) a few days ago (it's still under review). I've also made similar flow for iOS (test flight). I already had few apps on Play for years now but didn't need to update them within the past 2 years. The AppStore and Play Store feels now much similar than before: - bundles / bitcode - The AppStore get modules they can repackage on "your behalf" - review - for a year or more it takes a few days for your app to be reviewed. Even just for testing (public beta) - signed by store, that's the major difference now (which as stated required for bundles) Iiuc, that was always the case with Amazon AppStore (noted by commonsware https://news.ycombinator.com/item?id=27651983 https://news.ycombinator.com/item?id=27651983) Personally I'm more concerned when/if a private certificate won't be allowed at all (eg iDevices).
- CameronNemo 5y agoIs anyone using Aurora Store and worried about how it will affect them? For reference, Aurora anonymously retrieves APKs from the play store so you can use common apps like Zoom, Slack, et cetera.
- securitypunk 5y agoAPK is an antiquated format that originates from Java Jar over two decades ago. It's basically a zip file with some internal structure for signing a manifest of hashes. Google already had to bastardize the APK format to move the signature to ZIP metadata, but there were still tons of problems around key rotation and distribution of large APKs. This is a natural evolution of the format. It's good for the ecosystem. Whatever guarantees were supposedly provided by having developer (poorly) store their own signing keys are better handled by Google's own infrastructure.
- js4ever 5y agoI believe this is maybe the last step before a total removal of sideloading apps on Android. Sideloading is the main reason why I left iOS for Android 10 years ago. If it's off the table ... I might switch to a Linux phone... Or go back to iOS
- techrat 5y agoPeople have been crying wolf about "ZOMG! GOOGS GON REMOVE SIDELOADS" for years now. It's still present. AOSP still exists and is still updated. Pixel devices still have unlockable bootloaders. Your fear is still unfounded.
- unethical_ban 5y agoAOSP is neigh unusable in its own form without heavy modifications on a phone. Going from "all phones" to "one brand and modified" is a significant barrier to sideloading. Being concerned is valid given Google's history. It may not happen. It may happen. It may happen a long way now. But when has Google opened a service or product in a purely consumer friendly, community friendly way?
- Avamander 5y agoAfter SafetyNet, unlockable bootloaders are quite useless, you instantly lose access to a bunch of apps. It's a no-go for many.
- vinay427 5y agoWhile you lose access to some apps if you switch to many unofficial ROMs not based on stock firmware, which is problematic as it's almost always unnecessary unless a device is rooted or obviously compromised, this is far from the only use for unlockable bootloaders. Flashing updates more rapidly, region changes, bloatware removal, and other use cases are still possible with unlocked bootloaders while preserving safety certifications.
- dataflow 5y agoAny reason to believe APKs will be supported in Android in a few years?
- jayd16 5y agoBundles are essentially intermediate compilation units and apks aren't going away.
- dartharva 5y agoThis won't hinder app sideloading, right? RIGHT?
- ppf 5y agoI am so glad I got out of the whole game, and stopped using a smartphone. I'm also glad I live in a country where it is somewhat viable, although in our post-Covid world, everywhere seems to need a crappy app to get anything done.
- bhawks 5y agoVery disappointing. Normalizing sharing private keys? I expect better from Google. None of the user facing benefits of the new format apps are predicated on throwing away the trust model of the app ecosystem. It is easier to implement and optimize the publish flow sure. Google is one of the few companies with the skills and resources to do it the right way. Say it ain't so!
- ajkdhcb2 5y ago"The other issue is that developers will need to give Google their app signing key to export an AAB app as an APK. This gives Google quite a bit of power." Does iOS have the same situation? This sounds so bad that I would switch. Although iOS being closed source I suppose it is just as bad or worse
- pjmlp 5y agoYes, for quite some time. Bitcode is signed by Apple Store for watchOS and tvOS applications. Additionaly Google is now copying Application thinning that has existed for years on iOS. By the way, UWP Apps on Windows Store work in a similar way.
- Jyaif 5y agoAs an app developer that does the release build and the uploading myself, having Apple and now (finally!) Google do the app thinning themselves saves me a ton of work. I'm also way more confident it's done the right way. If you are worried about Google tampering the apps now that they sign the apps themselves, well I've got news for you: guess who owns the *OS* on which the apps run.
- westurner 5y agoI was just trying to explain this the other day. Not sure whether to be disappointed in is this a regression? No, bros, you may not just `repack it` and re-sign the package for me. That's not how it should work unless I trust their build server to sign for me; and I don't and we shouldn't. I'll just CC this here from https://westurner.github.io/hnlog/#comment-27410978 https://westurner.github.io/hnlog/#comment-27410978 : ``` > Unfortunately all packages aren't necessarily signed either; "Which package managers require packages to be cryptographically signed?" is similar to "Which DNS clients can operate DNS resolvers that require DNSSEC signatures on DNS records to validate against the distributed trust anchors?". > FWIW, `delv pkg.mirror.server.org` is how you can check DNSSEC: man systemd-resolved # nmcli man delv man dnssec-trust-anchors.d delv pkg.mirror.server.org > Sigstore is a free and open Linux Foundation service for asset signatures: https://sigstore.dev/what_is_sigstore/ https://sigstore.dev/what_is_sigstore/ > The TUF Overview explains some of the risks of asset signature systems; key compromise, there's one key for everything that we all share and can't log the revocation of in a CT (Certificate Transparency) log distributed like a DLT, https://theupdateframework.io/overview/ https://theupdateframework.io/overview/ > Certificate Transparency: https://en.wikipedia.org/wiki/Certificate_Transparency https://en.wikipedia.org/wiki/Certificate_Transparency > Yeah, there's a channel to secure there at that layer of the software supply chain as well. > "PEP 480 -- Surviving a Compromise of PyPI: End-to-end signing of packages" (2014-) https://www.python.org/dev/peps/pep-0480/ https://www.python.org/dev/peps/pep-0480/ >> Proposed is an extension to PEP 458 that adds support for end-to-end signing and the maximum security model. End-to-end signing allows both PyPI and developers to sign for the distributions that are downloaded by clients. The minimum security model proposed by PEP 458 supports continuous delivery of distributions (because they are signed by online keys), but that model does not protect distributions in the event that PyPI is compromised. In the minimum security model, attackers who have compromised the signing keys stored on PyPI Infrastructure may sign for malicious distributions. The maximum security model, described in this PEP, retains the benefits of PEP 458 (e.g., immediate availability of distributions that are uploaded to PyPI), but additionally ensures that end-users are not at risk of installing forged software if PyPI is compromised. > One W3C Linked Data way to handle https://schema.org/SoftwareApplication https://schema.org/SoftwareApplication ( https://codemeta.github.io/user-guide/ https://codemeta.github.io/user-guide/ ) cryptographic signatures of a JSON-LD manifest with per-file and whole package hashes would be with e.g. W3C ld-signatures/ld-proofs and W3C DID (Decentralized Identifiers) or x.509 certs in a CT log. ``` FWIU, the Fuschia team is building package signing on top of TUF.