[Android Software Development] morfikov:
I'm building TWRP recovery for a new device, and I have some questions. :)

The SoC is MT6755. I have two different phones with this SoC. Each of them had an Android update from 6.0 to 7.0.

1. Under this link, there are two branches 6.0 and 7.1 -- which one should I use in this case?

2. I wanted to use 7.1 but I have some problems with it. I get the following errors:

$ lunch omni_tp903a-userdebug
build/core/config.mk:655: COMMON_GLOBAL_C(PP)FLAGS changed
build/core/config.mk:659: *** bailing.... Stop.
WARNING: Trying to fetch a device that's already there
Traceback (most recent call last):
File "build/tools/roomservice.py", line 353, in <module>
fetch_device(device)
File "build/tools/roomservice.py", line 321, in fetch_device
git_data = search_gerrit_for_device(device)
File "build/tools/roomservice.py", line 81, in search_gerrit_for_device
device_data = check_repo_exists(git_data, device)
File "build/tools/roomservice.py", line 58, in check_repo_exists
"exiting roomservice".format(device=device))
Exception: tp903a not found,exiting roomservice
build/core/config.mk:655: COMMON_GLOBAL_C(PP)FLAGS changed
build/core/config.mk:659: *** bailing.... Stop.

** Don't have a product spec for: 'omni_tp903a'
** Do you have the right repo manifest?

Should I change something in the configuration so it would build using the 7.1 branch?

3. I noticed that my previous configurations also don't work after updating the source (6.0 branch) via repo sync --current-branch . I get the following (it doesn't really matter which config I use):

$ make -j2 recoveryimage
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0.1
TARGET_PRODUCT=omni_tp802a
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.12.0-2-amd64-x86_64-with-debian-buster-sid
HOST_BUILD_TYPE=release
BUILD_ID=MOB31K
OUT_DIR=/media/Kabi/Android/omni-twrp-6.0/out
============================================
including ./bionic/Android.mk ...
including ./bootable/recovery/Android.mk ...
including ./build/libs/host/Android.mk ...
including ./build/target/board/Android.mk ...
including ./build/target/product/security/Android.mk ...
including ./build/tools/Android.mk ...
including ./device/generic/goldfish/audio/Android.mk ...
including ./device/generic/goldfish/camera/Android.mk ...
including ./device/generic/goldfish/fingerprint/Android.mk ...
including ./device/generic/goldfish/gps/Android.mk ...
including ./device/generic/goldfish/lights/Android.mk ...
including ./device/generic/goldfish/opengl/Android.mk ...
including ./device/generic/goldfish/power/Android.mk ...
including ./device/generic/goldfish/qemu-props/Android.mk ...
including ./device/generic/goldfish/qemud/Android.mk ...
including ./device/generic/goldfish/sensors/Android.mk ...
including ./device/generic/goldfish/vibrator/Android.mk ...
including ./device/qcom/common/Android.mk ...
including ./device/qcom/qcom-sepolicy/Android.mk ...
including ./device/tp-link/tp701a/Android.mk ...
including ./device/tp-link/tp702a/Android.mk ...
including ./device/tp-link/tp801a/Android.mk ...
including ./device/tp-link/tp802a/Android.mk ...
including ./device/tp-link/tp902a/Android.mk ...
including ./device/tp-link/tp903a/Android.mk ...
including ./external/bison/Android.mk ...
including ./external/boringssl/Android.mk ...
including ./external/bouncycastle/Android.mk ...
including ./external/busybox/Android.mk ...
including ./external/bzip2/Android.mk ...
including ./external/clang/Android.mk ...
including ./external/compiler-rt/Android.mk ...
including ./external/e2fsprogs/Android.mk ...
including ./external/elfutils/Android.mk ...
including ./external/exfat/Android.mk ...
including ./external/f2fs-tools/Android.mk ...
including ./external/freetype/Android.mk ...
including ./external/fuse/Android.mk ...
including ./external/gptfdisk/Android.mk ...
including ./external/icu/Android.mk ...
including ./external/jemalloc/Android.mk ...
including ./external/jpeg/Android.mk ...
including ./external/libcxx/Android.mk ...
including ./external/libcxxabi/Android.mk ...
including ./external/libdrm/Android.mk ...
including ./external/libnl/Android.mk ...
including ./external/libpng/Android.mk ...
including ./external/libselinux/Android.mk ...
including ./external/libunwind/Android.mk ...
including ./external/llvm/Android.mk ...
including ./external/ltrace/Android.mk ...
including ./external/lz4/Android.mk ...
including ./external/lzma/C/Android.mk ...
including ./external/lzma/Java/Tukaani/Android.mk ...
including ./external/lzma/xz-embedded/Android.mk ...
including ./external/mksh/Android.mk ...
including ./external/ntfs-3g/Android.mk ...
including ./external/pcre/Android.mk ...
including ./external/safe-iop/Android.mk ...
including ./external/selinux/Android.mk ...
including ./external/sepolicy/Android.mk ...
including ./external/squashfs-tools/Android.mk ...
including ./external/toybox/Android.mk ...
including ./external/zlib/Android.mk ...
including ./frameworks/native-caf/cmds/atrace/Android.mk ...
including ./frameworks/native-caf/cmds/bugreport/Android.mk ...
including ./frameworks/native-caf/cmds/dumpstate/Android.mk ...
including ./frameworks/native-caf/cmds/dumpsys/Android.mk ...
including ./frameworks/native-caf/cmds/flatland/Android.mk ...
including ./frameworks/native-caf/cmds/installd/Android.mk ...
including ./frameworks/native-caf/cmds/ip-up-vpn/Android.mk ...
including ./frameworks/native-caf/cmds/rawbu/Android.mk ...
including ./frameworks/native-caf/cmds/service/Android.mk ...
including ./frameworks/native-caf/cmds/servicemanager/Android.mk ...
including ./frameworks/native-caf/libs/binder/Android.mk ...
including ./frameworks/native-caf/libs/diskusage/Android.mk ...
including ./frameworks/native-caf/libs/gui/Android.mk ...
including ./frameworks/native-caf/libs/input/Android.mk ...
including ./frameworks/native-caf/libs/ui/Android.mk ...
including ./frameworks/native-caf/opengl/libagl/Android.mk ...
including ./frameworks/native-caf/opengl/libs/Android.mk ...
including ./frameworks/native-caf/opengl/tests/Android.mk ...
including ./frameworks/native-caf/services/batteryservice/Android.mk ...
including ./frameworks/native-caf/services/inputflinger/Android.mk ...
including ./frameworks/native-caf/services/powermanager/Android.mk ...
including ./frameworks/native-caf/services/sensorservice/Android.mk ...
including ./frameworks/native-caf/services/surfaceflinger/Android.mk ...
including ./frameworks/native/Android.mk ...
build/core/base_rules.mk:157: *** frameworks/native/cmds/dumpstate: MODULE.TARGET.STATIC_LIBRARIES.libdumpstate.default already defined by frameworks/native-caf/cmds/dumpstate. Stop.

#### make failed to build some targets (12 seconds) ####

Any ideas how to fix this?

---------- Post added at 03:17 PM ---------- Previous post was at 02:51 PM ----------

I think I found a solution to the point 3.

I the manifest I can see this:

<project path="frameworks/native" name="android_frameworks_native" remote="omnirom" revision="android-6.0" groups="pdk" />
<project path="frameworks/native-caf" name="android_frameworks_native-caf" remote="omnirom" revision="android-6.0" groups="pdk" />

The project android_frameworks_native seems to be maintained/newer, so I commented out the second project. Should both of them be enabled?