[Android Q&A, Help & Troubleshooting] s0f0s:
The next attempt was unsuccessful too...

First I got

build/core/base_rules.mk:238: error: hardware/qcom/gps/core: MODULE.TARGET.SHARED_LIBRARIES.libloc_core already defined by hardware/qcom/gps/sdm845/core.

I renamed hardware/qcom/gps/core/Android.mk and got

build/core/base_rules.mk:238: error: hardware/qcom/gps/utils: MODULE.TARGET.SHARED_LIBRARIES.libgps.utils already defined by hardware/qcom/gps/sdm845/utils.

I renamed hardware/qcom/gps/utils/Android.mk

But I think there should be more elegant way to exclude them (if this is a right decision at all)

Now I have ninja error about missing twrp.fstab

$ brunch
including device/generic/uml/vendorsetup.sh
including device/google/muskie/vendorsetup.sh
including device/google/taimen/vendorsetup.sh
including device/oneplus/oneplus5t/vendorsetup.sh
including device/oneplus/oneplus5/vendorsetup.sh
including device/sony/z2/vendorsetup.sh
including device/sony/z3c/vendorsetup.sh
including device/sony/z3/vendorsetup.sh

You're building on Linux

Lunch menu... pick a combo:
1. full-eng
2. uml-userdebug
3. aosp_walleye-userdebug
4. aosp_walleye_test-userdebug
5. aosp_taimen-userdebug
6. omni_oneplus5t-user
7. omni_oneplus5t-userdebug
8. omni_oneplus5t-eng
9. omni_oneplus5-user
10. omni_oneplus5-userdebug
11. omni_oneplus5-eng
12. omni_z2-eng
13. omni_z2-userdebug
14. omni_z3c-eng
15. omni_z3-eng

Which would you like? [aosp_arm-eng] 15
Looking for dependencies on: device/sony/shinano-common
Looking for dependencies on: device/sony/msm8974-common
WARNING: detected conflict in revisions for repository android_hardware_qcom_gps
Traceback (most recent call last):
File "vendor/omni/build/tools/roomservice.py", line 356, in <module>
fetch_dependencies(device)
File "vendor/omni/build/tools/roomservice.py", line 310, in fetch_dependencies
create_common_dependencies_manifest(dependencies)
File "vendor/omni/build/tools/roomservice.py", line 299, in create_common_dependencies_manifest
create_common_dependencies_manifest(common_deps)
File "vendor/omni/build/tools/roomservice.py", line 297, in create_common_dependencies_manifest
check_manifest_problems(common_deps)
File "vendor/omni/build/tools/roomservice.py", line 239, in check_manifest_problems
file = ES.parse('/'.join([local_manifest_dir, "roomservice.xml"]))
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
tree.parse(source, parser)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 647, in parse
source = open(source, "rb")
IOError: [Errno 2] No such file or directory: '.repo/local_manifests/roomservice.xml'

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=omni_z3
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPM1
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.13.0-21-generic-x86_64-with-Ubuntu-17.10-artful
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM3.171019.013
OUT_DIR=/home/user/Android/roms/OmniROM/8.1/out
AUX_OS_VARIANT_LIST=
============================================
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=omni_z3
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.13.0-21-generic-x86_64-with-Ubuntu-17.10-artful
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM3.171019.013
OUT_DIR=/home/user/Android/roms/OmniROM/8.1/out
============================================
[44/44] bootstrap /home/user/Android/r...ut/soong/.minibootstrap/build.ninja.in
[4/4] /home/user/Android/roms/OmniROM/...M/8.1/out/soong/.bootstrap/build.ninja
[871/872] glob vendor/*/*/*/*/*/*/Android.bp
[54/54] /home/user/Android/roms/OmniRO...roms/OmniROM/8.1/out/soong/build.ninja
/home/user/Android/roms/OmniROM/8.1/out/build-omni_z3.ninja is missing, regenerating...
[120/999] including ./device/sony/msm8974-common/Android.mk ...
device-sony-common-init: init_sony for "z3", platform "shinano", with ' -DDEV_BLOCK_FOTA_NUM="16" -DDEV_BLOCK_FOTA_MAJOR="179" -DDEV_BLOCK_FOTA_MINOR="16" -DFOTA_RAMDISK_CHECK="0" -DKEYCHECK_ENABLED="1" -DKEYCHECK_NO_DOWN="1"'
[999/999] including ./vendor/sony/shinano-common-caf/proprietary/Android.mk ...
PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/VideoRecord_48k.ogg:system/media/audio/ui/VideoRecord.ogg ignored.
PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/VideoStop_48k.ogg:system/media/audio/ui/VideoStop.ogg ignored.
PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/camera_click_48k.ogg:system/media/audio/ui/camera_click.ogg ignored.
No private recovery resources for TARGET_DEVICE z3
Using '/home/user/Android/roms/OmniROM/8.1/prebuilts/misc/linux-x86/ccache/ccache' binary on 'linux-x86'
platform_testing/build/tasks/tests/instrumentation_metric_test_list.mk: warning: continuous_instrumentation_metric_tests: Unknown installed file for module perf-setup.sh
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module RecyclerViewTests
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module SettingsFunctionalTests
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module LauncherFunctionalTests
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module EmergencyInfoTests
platform_testing/build/tasks/tests/native_metric_test_list.mk: warning: continuous_native_metric_tests: Unknown installed file for module perf-setup.sh
build/core/base_rules.mk:390: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/root/res/images/charger/battery_fail.png'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/root/res/images/charger/battery_fail.png'
build/core/base_rules.mk:390: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/root/res/images/charger/battery_scale.png'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/root/res/images/charger/battery_scale.png'
build/core/Makefile:34: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/lib/libGLESv1_CM.so'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/lib/libGLESv1_CM.so'
build/core/Makefile:34: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/lib/libGLESv2.so'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/lib/libGLESv2.so'
build/core/Makefile:34: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/lib/libGLESv3.so'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/lib/libGLESv3.so'
build/core/Makefile:34: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/vendor/lib/libta.so'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/vendor/lib/libta.so'
build/core/Makefile:34: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/vendor/lib/mediadrm/libdrmclearkeyplugin.so'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/vendor/lib/mediadrm/libdrmclearkeyplugin.so'
build/core/Makefile:34: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/vendor/etc/audio_effects.conf'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/vendor/etc/audio_effects.conf'
build/core/Makefile:34: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/etc/mkshrc'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/etc/mkshrc'
[ 99% 1273/1274] glob vendor/*/*/*/*/*/*/Android.bp
ninja: error: 'keystore.msm8974', needed by '/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/obj/ETC/twrp.fstab_intermediates/twrp.fstab', missing and no known rule to make it
14:36:38 ninja failed with: exit status 1

#### failed to build some targets (01:37 (mm:ss)) ####

real	1m37,436s
user	2m37,577s
sys	0m11,100s

And the main question is if I am on the right way at all :confused: