HN user

danvittegleo

156 karma
Posts5
Comments34
View on HN

I investigated EBS snapshot as an option, but there were two problems. 1) cost as i mentioned initially - for just AOSP source tree alone you are looking at > 250GB and at a cost of $0.05 per GB you are already at > $10/month and 2) EBS snapshots lazy load from S3 which gives TERRIBLE performance which means you end up with far far slower builds. AWS released a feature "EBS Fast Snapshot Restore" to workaround this issue, but it's extremely expensive.

In order to limit costs, everything is pulled from source on each build and there is nothing cached. This strategy takes advantage of the fact that AWS doesn't charge for ingress traffic and unfortunately puts additional load on Google's servers. I've attempted a few different strategies on caching AOSP and Chromium source trees, but since you have to incur the storage costs on an ongoing basis, it's just not very economical.

With rattlesnakeos-stack, it uses spot instances and defaults to a c5.4xlarge which takes about 7-8 hours to build AOSP and Chromium (for an up to date webview) and equates to about ~$1 a build. I typically build on a c5.24xlarge instance which takes about 2.5 hours and costs about ~$2 per build. Unfortunately both AOSP and Chromium are massive projects that require a ton of computing power to build quickly. It's definitely still possible to do on less powerful machines, but it's just going to take a lot longer to do builds.

CalyxOS is an awesome project. I have worked with the lead developer a bit over the past few years and it's been such a pleasure. We share some bits of code between our projects here: https://github.com/AOSPAlliance.

If anyone is interested in building their own custom android OS in the cloud (AWS) with same ability to lock your bootloader like CalyxOS, you can checkout my project I've been maintaining for a few years now called RattlesnakeOS: https://github.com/dan-v/rattlesnakeos-stack.

And if you prefer to not build in the cloud, there is also a really great project called robotnix (https://github.com/danielfullmer/robotnix) which provides a way to build many flavors of OS (AOSP, GrapheneOS, LineageOS, etc).

Google CTF 2019 7 years ago

Running it with pypy sped it up quite a bit and got it far enough to figure out the remaining portion of the URL.

Right now if a spot instance terminates mid-build it doesn't attempt to save any progress. I do have an open item to at least alert users that this has happened though (https://github.com/dan-v/rattlesnakeos-stack/issues/41). Although if Chromium is built it will checkpoint that by saving the built artifact to S3 and would then skip the Chromium build next time. I've found it's much cheaper to do full builds on AWS each time rather than trying to store the source tree for AOSP and Chromium as they are just so large.

I actually recently added a feature to search for the cheapest spot instance price across a number of different regions. Right now for example the cheapest price for the instance type used c5.4xlarge is ~$0.15/hour in us-east-2. This equates to a full AOSP build with Chromium build included (~5.25 hours) costing $0.80 and without Chromium (~1.75 hours) costing $0.30

I made an alternative to CopperheadOS after it fell apart for those interested: https://github.com/dan-v/rattlesnakeos-stack. Rather than providing random binaries of an OS to install on your phone, I've gone the route of creating a cross platform tool, rattlesnakeos-stack, that provisions all of the AWS infrastructure needed to continuously build your own personal RattlesnakeOS, with your own signing keys, and your own OTA updates. It uses AWS Lambda to provision EC2 Spot Instances that build RattlesnakeOS and upload artifacts to S3. Resulting OS builds are configured to receive over the air updates from this environment.

Agreed that if lower level hardware is compromised it doesn't matter what you run on top of it, and RattlesnakeOS doesn't protect from that other than keeping components up to date with latest security patches. I think if you are going to buy a dumb flip phone and solder out components for privacy, you are probably better off just not having a phone at all. This project is more about having a useful smartphone experience while still focusing on privacy and security.

That's a great question. I would say it is a bit limiting, and there are definitely some bumps in the road for the average user coming from stock Android. There are a lot of great open source applications in the F-Droid app store, but it definitely doesn't cover everything you'd expect from a stock phone these days. There is an app, Yalp Store (it downloads APKs directly from Google servers), that can be used to supplement this with normal Play Store apps. Many apps in the Play Store will rely on Google services though, so you will have a wide variety of results ranging from apps running just fine, crashing on boot, or not supporting push notifications. For me, not getting push notifications in Slack was an issue as it relies on Google Cloud Messaging (GCM). Luckily the encrypted chat messengers that I use Signal/Telegram have support for their own polling mechanism and don't rely on GCM. For Slack I ended up just writing a quick tool (https://github.com/dan-v/slack-to-telegram) to forward messages to Telegram so I get immediately alerts. But it's things like that this that you will definitely run into when running without Google services.

Thanks for the response! Unfortunately, I'm personally not interested in distributing binaries of the OS for public consumption, as I think installing an OS from a unknown person on the internet is probably not the best approach for a privacy/security focused Android OS. I personally would prefer to do my own builds with my own keys so that I know what is running on my phone - hence why i created this tool. That said, it doesn't mean someone else can't spin up a public version of this setup using this tool.

This cross platform tool provisions all of the AWS infrastructure required to build your own personal privacy focused Android OS on a continuous basis with OTA updates. It currently supports Pixel phones (Pixel, Pixel XL, Pixel 2, Pixel 2XL). Highlights include:

* Verified boot (https://source.android.com/security/verifiedboot/) like stock Android (almost all ROMs disable this) and with your own signing keys

* Latest monthly security updates from Google

* OTA updates from S3

* No Google services

* Latest F-Droid as open source alternative to Google Play store

* Latest Chromium w/ adblocking and privacy patches