--- /dev/null
+#
+# Copyright (C) 2020 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# WARNING: Everything listed here will be built on ALL platforms,
+# including x86, the emulator, and the SDK. Modules must be uniquely
+# named (liblights.tuna), and must build everywhere, or limit themselves
+# to only building on ARM if they include assembly. Individual makefiles
+# are responsible for having their own logic, for fine-grained control.
+
+LOCAL_PATH := $(call my-dir)
+
+ifeq ($(TARGET_DEVICE),troika)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
+
+endif
--- /dev/null
+#
+# Copyright (C) 2020 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+PRODUCT_MAKEFILES := \
+ $(LOCAL_DIR)/lineage_troika.mk
--- /dev/null
+#
+# Copyright (C) 2020 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# inherit from common
+-include device/motorola/exynos9610-common/BoardConfigCommon.mk
+
+DEVICE_PATH := device/motorola/troika
+
+# Assert
+TARGET_OTA_ASSERT_DEVICE := troika,one_action
+
+# Kernel
+TARGET_KERNEL_CONFIG := troika_defconfig
+
+# inherit from the proprietary version
+-include vendor/motorola/troika/BoardConfigVendor.mk
--- /dev/null
+#
+# Copyright (C) 2020 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Inherit from common
+$(call inherit-product, device/motorola/exynos9610-common/common.mk)
+
+$(call inherit-product-if-exists, vendor/motorola/troika/troika-vendor.mk)
--- /dev/null
+#!/bin/bash
+#
+# Copyright (C) 2018-2020 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -e
+
+VENDOR=motorola
+DEVICE=troika
+
+# Load extract_utils and do some sanity checks
+MY_DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
+
+LINEAGE_ROOT="${MY_DIR}"/../../..
+
+HELPER="${LINEAGE_ROOT}/vendor/lineage/build/tools/extract_utils.sh"
+if [ ! -f "${HELPER}" ]; then
+ echo "Unable to find helper script at ${HELPER}"
+ exit 1
+fi
+source "${HELPER}"
+
+SECTION=
+KANG=
+
+while [ "${#}" -gt 0 ]; do
+ case "${1}" in
+ -n | --no-cleanup )
+ CLEAN_VENDOR=false
+ ;;
+ -k | --kang )
+ KANG="--kang"
+ ;;
+ -s | --section )
+ SECTION="${2}"; shift
+ CLEAN_VENDOR=false
+ ;;
+ * )
+ SRC="${1}"
+ ;;
+ esac
+ shift
+done
+
+if [ -z "${SRC}" ]; then
+ SRC="adb"
+fi
+
+# Initialize the helper
+setup_vendor "${DEVICE}" "${VENDOR}" "${LINEAGE_ROOT}" true "${CLEAN_VENDOR}"
+
+extract "${MY_DIR}/proprietary-files.txt" "${SRC}" \
+ "${KANG}" --section "${SECTION}"
+
+"${MY_DIR}/setup-makefiles.sh"
--- /dev/null
+[
+ {
+ "repository": "android_device_motorola_exynos9610-common",
+ "target_path": "device/motorola/exynos9610-common"
+ }
+]
--- /dev/null
+#
+# Copyright (C) 2020 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Inherit from those products. Most specific first.
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
+
+# Inherit from troika device
+$(call inherit-product, device/motorola/troika/device.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
+
+# Inherit some common Lineage stuff.
+$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
+
+# Device identifier. This must come after all inclusions
+PRODUCT_DEVICE := troika
+PRODUCT_NAME := lineage_troika
+PRODUCT_BRAND := Motorola
+PRODUCT_MODEL := One Action
+PRODUCT_MANUFACTURER := Motorola
+
+PRODUCT_GMS_CLIENTID_BASE := android-motorola
+
+# Use the latest approved GMS identifiers
+PRODUCT_BUILD_PROP_OVERRIDES += \
+ PRODUCT_NAME=troika_sprout \
+ PRIVATE_BUILD_DESC="10/QSBS30.62-17-7/415cd:user/release-keys"
+
+BUILD_FINGERPRINT := motorola/troika_retail/troika_sprout:10/QSBS30.62-17-7/415cd:user/release-keys
--- /dev/null
+#!/bin/bash
+#
+# Copyright (C) 2017-2020 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -e
+
+VENDOR=motorola
+DEVICE=troika
+
+export INITIAL_COPYRIGHT_YEAR=2020
+
+# Load extract_utils and do some sanity checks
+MY_DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
+
+LINEAGE_ROOT="${MY_DIR}/../../.."
+
+HELPER="${LINEAGE_ROOT}/vendor/lineage/build/tools/extract_utils.sh"
+if [ ! -f "${HELPER}" ]; then
+ echo "Unable to find helper script at ${HELPER}"
+ exit 1
+fi
+source "${HELPER}"
+
+# Initialize the helper
+setup_vendor "${DEVICE}" "${VENDOR}" "${LINEAGE_ROOT}"
+
+# Copyright headers and guards
+write_headers "troika"
+
+# The standard blobs
+write_makefiles "${MY_DIR}/proprietary-files.txt" true
+
+# Finish
+write_footers