[Android] lennon86:
Cannot get Fagyi's LOS16 on HTC10 to make it thru lunch!

Big shout of thanks to Fagyi for continuing to support HTC10, and all providing feedback to him.

I am newbie trying learn to build an unofficial rom for HTC10...first post so be gentle ;)

Specifically, trying to build LOS16 for HTC10 using Fagyi's source trees from first page of this thread:

https://xdaforums.com/htc-10/development/rom-lineageos-16-1-unofficial-builds-pme-t3851614

But I am stuck at 'lunch' which fails with error: "Device pme not found." (detail below)

I'm guessing the fix is simple, but despite searching and googling for 2days I've been unable to figure out the fix.

Would some kind soul care to weigh in and suggest where I might look to solve this?

Here's how I proceeded:

[1] SETUP REPO AND ENVIRONMENT:

#Debian Linux "Stretch" , fully updated with all necessary android dev packages:

$ uname -a
4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u1 (2019-09-20) x86_64 GNU/Linux

$ curl [url]http://commondatastorage.googleapis.com/git-repo-downloads/repo[/url] > ~/bin/repo
$ curl [url]https://storage.googleapis.com/git-repo-downloads/repo[/url] > ~/bin/repo
$ chmod a+x ~/bin/repo
$ mkdir -p /pub/android/lineage
$ cd /pub/android/lineage

[2] INIT REPO AND GRAB LINEAGE-16 SOURCES

$ repo init -u git://github.com/LineageOS/android.git -b lineage-16.0
$ repo sync

[3] GET FAGYI's SOURCE TREES from here:

https://xdaforums.com/htc-10/development/rom-lineageos-16-1-unofficial-builds-pme-t3851614

and setup local_manifest.xml like so:

///////// .repo/local_manifests/local_manifest.xml ////////////

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- HTC 10 - aka pme -->
<project path="device/htc/pme" name="Fagyi/android_device_htc_pme" remote="github" revision="lineage-16.0" />
<project path="kernel/htc/msm8996" name="Fagyi/android_kernel_htc_msm8996" remote="github" revision="lineage-16.0" />
<project path="vendor/htc" name="Fagyi/proprietary_vendor_htc" remote="github" revision="lineage-16.0" />
</manifest>

Sync again including Fagyi's repos:

$ repo sync --force-sync

[4] BUILD

$ . build/envsetup.sh
$ lunch lineage_pme-userdebug

/////// lunch FAILS w/ ERROR//////////

/pub/android/lineage$ lunch lineage_pme-userdebug
fork/exec /tmp/go-build432919724/b001/exe/microfactory: permission denied
Device pme not found. Attempting to retrieve device repository from LineageOS Github ([url]http://github.com/LineageOS[/url]).
Found repository: android_device_htc_pme
Default revision: lineage-16.0
Checking branch info
Default revision lineage-16.0 not found in android_device_htc_pme. Bailing.
Branches found:
cm-13.0
cm-14.1
Use the ROOMSERVICE_BRANCHES environment variable to specify a list of fallback branches.
fork/exec /tmp/go-build619979590/b001/exe/microfactory: permission denied
fork/exec /tmp/go-build914074140/b001/exe/microfactory: permission denied

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

What I dont understand is that lunch is not seeing Fagyi's device/htc/pme =lineage_pme spec?

Here is content of /pub/android/lineage/device/htc/pme/lineage_pme.mk

////// device/htc/pme/lineage_pme.mk ////////

////// device/htc/pme/lineage_pme.mk ////////

# Copyright (C) 2016 The CyanogenMod 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 pme device

$(call inherit-product, device/htc/pme/device.mk)

$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)

$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)

$(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_m.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 := pme

PRODUCT_NAME := lineage_pme

PRODUCT_BRAND := HTC

PRODUCT_MODEL := HTC 10

PRODUCT_MANUFACTURER := HTC

PRODUCT_RELEASE_NAME := pme

$(call inherit-product-if-exists, vendor/htc/pme/pme-vendor.mk)

# Device Fingerprint

BUILD_FINGERPRINT := htc/pmeuhl_00401/htc_pmeuhl:8.0.0/OPR1.170623.027/1012001.2:user/release-keys

\\\\\\ device/htc/pme/lineage_pme.mk \\\\\\\\

////// VENDOR SETUPS: /////////////////

$cat /pub/android/lineage/device/htc/pme/vendorsetup.sh

add_lunch_combo lineage_pme-userdebug

/////////////

$cat vendor/lineage/vendorsetup.sh

for combo in $(curl -s https://raw.githubusercontent.com/LineageOS/hudson/master/lineage-build-targets | sed -e 's/#.*$//' | grep lineage-16.0 | awk '{printf "lineage_%s-%s\n", $1, $2}')

do

add_lunch_combo $combo

done

add_lunch_combo lineage_arm-userdebug

add_lunch_combo lineage_arm64-userdebug

add_lunch_combo lineage_x86-userdebug

add_lunch_combo lineage_x86_64-userdebug

device/htc/pme/vendorsetup.sh //////////

$cat device/htc/pme/vendorsetup.sh

add_lunch_combo lineage_pme-userdebug

/// BOARDCONFIG device/htc/pme/BoardConfig.mk :///

$ grep -E "pme|htc|lineage" device/htc/pme/BoardConfig.mk

BOARD_VENDOR := htc

DEVICE_PATH := device/htc/pme

TARGET_OTA_ASSERT_DEVICE := pme,pmeuhl,pmewhl,pmewl,pmeul,htc_pmeuhl,htc_pmewhl,htc_pmewl,htc_pmeul

TARGET_KERNEL_SOURCE := kernel/htc/msm8996

TARGET_KERNEL_CONFIG := pme_defconfig

TARGET_INIT_VENDOR_LIB := libinit_pme

TARGET_RECOVERY_DEVICE_MODULES := libinit_pme

device/htc/pme/libshims

-include vendor/htc/pme/BoardConfigVendor.mk

Really grateful for any tips or help!!