[Miscellaneous Android Development] bidaian:
Building LineageOS 13

Is there information on how to do that?

Thanks Aditya. In case it helps somebody else, I created the file marshmallow_mtk.xml in local_manifests with this content (it adds everything from the repository you mentioned, removing the same projects from Lineage OS 13)

<?xml version="1.0" encoding="UTF-8"?>
<manifest>

<remove-project path="frameworks/av" name="LineageOS/android_frameworks_av" groups="pdk" />
<project revision="cm-13.0" path="frameworks/av" name="MarshmallowMTK/android_frameworks_av" groups="pdk" />

<remove-project path="system/core" name="LineageOS/android_system_core" groups="pdk" />
<project revision="cm-13.0" path="system/core" name="MarshmallowMTK/android_system_core" groups="pdk" />

<remove-project path="system/netd" name="LineageOS/android_system_netd" groups="pdk" />
<project revision="cm-13.0" path="system/netd" name="MarshmallowMTK/android_system_netd" groups="pdk" />

<remove-project path="packages/apps/FMRadio" name="LineageOS/android_packages_apps_FMRadio" groups="pdk-fs" />
<project revision="cm-13.0" path="packages/apps/FMRadio" name="MarshmallowMTK/android_packages_apps_FMRadio" groups="pdk-fs" />

<remove-project path="frameworks/base" name="LineageOS/android_frameworks_base" groups="pdk-cw-fs,pdk-fs" />
<project revision="cm-13.0" path="frameworks/base" name="MarshmallowMTK/android_frameworks_base" groups="pdk-cw-fs,pdk-fs" />

<remove-project path="hardware/libhardware" name="LineageOS/android_hardware_libhardware" groups="pdk" />
<project revision="cm-13.0" path="hardware/libhardware" name="MarshmallowMTK/android_hardware_libhardware" groups="pdk" />

<remove-project path="system/bt" name="LineageOS/android_system_bt" groups="pdk" />
<project revision="cm-13.0" path="system/bt" name="MarshmallowMTK/android_system_bt" groups="pdk" />

<remove-project path="frameworks/opt/telephony" name="LineageOS/android_frameworks_opt_telephony" groups="pdk" />
<project revision="cm-13.0" path="frameworks/opt/telephony" name="MarshmallowMTK/android_frameworks_opt_telephony" groups="pdk" />

<remove-project path="external/wpa_supplicant_8" name="LineageOS/android_external_wpa_supplicant_8" groups="pdk" />
<project revision="cm-13.0" path="external/wpa_supplicant_8" name="MarshmallowMTK/android_external_wpa_supplicant_8" groups="pdk" />

<remove-project path="system/vold" name="LineageOS/android_system_vold" groups="pdk" />
<project revision="cm-13.0" path="system/vold" name="MarshmallowMTK/android_system_vold" groups="pdk" />

<remove-project path="packages/apps/Snap" name="LineageOS/android_packages_apps_Snap" />
<project revision="cm-13.0" path="packages/apps/Snap" name="MarshmallowMTK/android_packages_apps_Snap" />

<remove-project path="frameworks/native" name="LineageOS/android_frameworks_native" groups="pdk" />
<project revision="cm-13.0" path="frameworks/native" name="MarshmallowMTK/android_frameworks_native" groups="pdk" />

<remove-project path="external/sepolicy" name="LineageOS/android_external_sepolicy" groups="pdk" />
<project revision="cm-13.0" path="external/sepolicy" name="MarshmallowMTK/android_external_sepolicy" groups="pdk" />
</manifest>

But it doesn't work yet. There's something I don't get. If I use the repository with a certain revision, shouldn't everything compile? After your fix I ran into errors that are solved by external patches (like this and, if I only knew (do you?) how to change minSDK, by this.

Shouldn't LineageOS, such as it was at a release version/tag/commit simply build? Every dependency seems to be versioned ...