Is “work profile” a AOSP feature, where is it documented?

I was not able to find much documentation regarding how the “work profile” feature (or maybe it is called android-for-work) works.

It seems the feature attempts to provide two distinct user profiles (similar to multi-user “max 4 users” feature) but with the distinction that apps can be run side-by-side without logout and login (as would be the case with multi-user)

I know that some software (i.e. shelter) is using the “work-profile” feature to create some sort of sandbox for “deplorable applications” (e.g. WhatsApp that would abuse disfunct AOSP permissions system to access all contacts, though not necessary).

This questions seeks information where to find documentation and explanation how this “work profile” features works.

How do I remove/disable Google Calendar App and go back to default (AOSP) Android Calendar App?

Nobody seems to care but I do. I try to use open source versions of Apps and other software. My girlfriend has a new phone, which is Android One (8.1) (supposedly pure Android + Google). I am trying to set it up for her. On my lineage OS phone, I am using the default calendar app not the Google. Somehow, we can’t find it on her phone and the only app seems to be the Google calendar. This is bs. It used to be that one can choose between two. Any ideas, how I can get the default calendar app installed? I can’t find it anywhere?

PS: As always, people will ask “why aren’t you using Google calendar? it syncs and does this and that…” I have my own calendar server and it does the same. If I can have more privacy with little impact on convenience, I choose privacy.

My question is different than the already existing “non-cloud” local calendar. Some open source calendar apps also provide cloud integration as a feature. I just don’t want to use Google’s proprietary app.

AOSP 9.0 build process consistently failing at 87%

I’m attempting to build a copy of AOSP 9.0 for use on my Xperia XZ Premium (G1842, Maple). I am using a copy of Debian 9.6 as a build station and have been following Sony’s official AOSP build instructions for 9.0 hosted on https://developer.sony.com

However, while the vast majority of the process goes smoothly every time, I am finding it consistently fails at the step
Copying resources from program jar [/home/administrator/android/out/target/common/obj/APPS/PackageInstaller_intermediates/classes.jar]

with the error message

[ 87% 78130/89692] Target Java: out/ta...r_intermediates/classes-full-debug.jar FAILED: out/target/common/obj/APPS/Dialer_intermediates/classes-full-debug.jar ninja: build stopped: subcommand failed. 05:44:33 ninja failed with: exit status 1

I honestly couldn’t tell you why this is happening, but I know all of the AOSP build dependencies are installed, the source tree and manifests were copied properly, and everything up to this point in the process goes flawlessly. I must have tried building AOSP eight to ten times over the last few days, and while it very occassionally gets to 99% and fails with a “Java runtime: out of memory” error, it almost always stops here instead for some reason.