Building AOSP Extended - Moto G5S Plus Questions & Answers

I'm trying to build AOSP Extended for Sanders but I'm facing problem during compiling stuff. I used:
Device repo: https://github.com/AospExtended-Devices/android_device_motorola_sanders
Kernel source: https://github.com/Jorg3Lucas/android_kernel_motorola_msm8953
Vendor repo: https://github.com/AospExtended-Devices/android_vendor_motorola_sanders
Problem:
Code:
[ 36% 29755/82171] build /home/qkiz/android/out/target/product/sanders/obj/ETC/sepolicy.recovery_intermediates/sepolicy
FAILED: /home/qkiz/android/out/target/product/sanders/obj/ETC/sepolicy.recovery_intermediates/sepolicy
/bin/bash -c "(ASAN_OPTIONS=detect_leaks=0 /home/qkiz/android/out/host/linux-x86/bin/checkpolicy -M -c 30 -o /home/qkiz/android/out/target/product/sanders/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp /home/qkiz/android/out/target/product/sanders/obj/ETC/sepolicy.recovery_intermediates/sepolicy.recovery.conf ) && (/home/qkiz/android/out/host/linux-x86/bin/sepolicy-analyze /home/qkiz/android/out/target/product/sanders/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp permissive > /home/qkiz/android/out/target/product/sanders/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains ) && (if [ \"userdebug\" = \"user\" -a -s /home/qkiz/android/out/target/product/sanders/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains ]; then echo \"==========\" 1>&2; echo \"ERROR: permissive domains not allowed in user builds\" 1>&2; echo \"List of invalid domains:\" 1>&2; cat /home/qkiz/android/out/target/product/sanders/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains 1>&2; exit 1; fi ) && (mv /home/qkiz/android/out/target/product/sanders/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp /home/qkiz/android/out/target/product/sanders/obj/ETC/sepolicy.recovery_intermediates/sepolicy )"
device/motorola/sanders/sepolicy/vendor/file.te:36:ERROR 'Duplicate declaration of type' at token ';' on line 78529:
# sysfs
type sysfs_adsp, fs_type, sysfs_type;
checkpolicy: error(s) encountered while parsing configuration
36% 29757/82171] build /home/qkiz/android/out/target/product/sanders/obj/ETC/sepolicy_neverallows_intermediates/plat_pub_policy.cil /home/qkiz/android/out/host/linux-x86/bin/checkpolicy: loading policy configuration from /home/qkiz/android/out/target/product/sanders/obj/ETC/sepolicy_neverallows_intermediates/plat_pub_policy.conf /home/qkiz/android/out/host/linux-x86/bin/checkpolicy: policy configuration loaded /home/qkiz/android/out/host/linux-x86/bin/checkpolicy: writing CIL to /home/qkiz/android/out/target/product/sanders/obj/ETC/sepolicy_neverallows_intermediates/plat_pub_policy.cil.tmp [ 36% 29758/82171] //frameworks/base/libs/services:libservices clang++ aidl/frameworks/base/core/java/com/android/internal/os/IDropBoxManagerService.cpp [ 36% 29759/82171] //frameworks/base/libs/services:libservices clang++ src/os/StatsLogEventWrapper.cpp [ 36% 29760/82171] //frameworks/base/libs/services:libservices clang++ src/os/StatsDimensionsValue.cpp [ 36% 29761/82171] //frameworks/base/libs/services:libservices clang++ src/os/DropBoxManager.cpp [ 36% 29762/82171] //frameworks/native/services/utils:libserviceutils clang++ PriorityDumper.cpp ninja: build stopped: subcommand failed. build/make/core/main.mk:21: recipe for target 'run_soong_ui' failed [0;31m#### failed to build some targets (44:39 (mm:ss)) ####[00m
Anyone facing similar problem. Or maybe I used wrong repos to build image.

I fixed three errors and successfully build AOSP Extended with April security patch.
Sent from my Motorola Moto G (5S) Plus using XDA Labs

QkiZMR said:
I fixed three errors and successfully build AOSP Extended with April security patch.
Sent from my Motorola Moto G (5S) Plus using XDA Labs
Click to expand...
Click to collapse
How did you fixed it?
What did you do?

I commented out mentioned in error lines in policy file.

Related

Build script for 'Nightlies'

Hi guys,
just shameless ripped from the jenkins build script from the wiki and adapted it to our build environment, for 1 device:
build.sh
Code:
#!/bin/bash
export USE_CCACHE=1
################# Your device here:
DEVICE=n7100
################################
cd ~/android/omni
. build/envsetup.sh
repo sync -j4
rm -rf out/target
brunch $DEVICE
make it executeable:
Code:
chmod +x build.sh
Pretty simple, but works for my private nightlies - and maybe as a cron job.
TODO / IDEAS:
Checking if build did work (exit codes? checking for if zip exists?)
Moving the flashable ZIP to a safe (public?) place
purging old builds (tmpwatch?)
check for changes before building
notify on finished builds (notify my android?)
check for changes before building
notify on finished builds (notify my android?)
cb5264 said:
Hi guys,
just shameless ripped from the jenkins build script from the wiki and adapted it to our build environment, for 1 device:
build.sh
Code:
#!/bin/bash
export USE_CCACHE=1
Click to expand...
Click to collapse
This is incomplete. It could be good enough for Jerkins™, but for your desktop rig it should be
Code:
export USE_CCACHE=1
prebuilts/misc/linux-x86/ccache/ccache -M 50G <---- whatever you can spare, I use 50Gbs
cb5264 said:
repo sync -j4
Click to expand...
Click to collapse
Also unnecessary, because the default is -j4.
Code:
repo sync
would suffice.
Keep in mind that we don't have nightlies ready yet as none of the devices are ready yet (nightly builds for us are meant to be stable) but we will have some ready soon
Sent from my SM-N900T using XDA Premium 4 mobile app
Regarding ccache, why should we need to set up the ccache size every compile?
It's a set once value...
Gesendet von meinem GT-N7100 mit Tapatalk
You dont need to. You might add a 'ccache -s' afterwards though - to see how useful ccache was for the build.
If you build OmniROM (when its ready), for yourself, you will want to cherry-pick changes from the Gerrit review, or add changes of your own, to make your build different from that on Jenkins. So it might be better not to have 'repo sync' in your script -- that will wipe out all your changes.
HippyTed said:
You dont need to. You might add a 'ccache -s' afterwards though - to see how useful ccache was for the build.
If you build OmniROM (when its ready), for yourself, you will want to cherry-pick changes from the Gerrit review, or add changes of your own, to make your build different from that on Jenkins. So it might be better not to have 'repo sync' in your script -- that will wipe out all your changes.
Click to expand...
Click to collapse
regarding ccache, as far as I know data that needs to be computed more than once but doesn't change is put into a cache so it will be generated once and then read from the cache, in that case if I delete the cache every time i lose the advantage of a cache...
regarding cherry picks, I would put the cherry picks after the repo sync command to have the best of both worlds (updated core and cherry picks)
regards
Steven
NemesisRE said:
regarding ccache, as far as I know data that needs to be computed more than once but doesn't change is put into a cache so it will be generated once and then read from the cache, in that case if I delete the cache every time i lose the advantage of a cache...
Click to expand...
Click to collapse
Check man pages for ccache - '-C' clears it, '-z' zeroes stats, '-s' shows stats.
regarding cherry picks, I would put the cherry picks after the repo sync command to have the best of both worlds (updated core and cherry picks)
Click to expand...
Click to collapse
Ok.
HippyTed said:
Check man pages for ccache - '-C' clears it, '-z' zeroes stats, '-s' shows stats.
Ok.
Click to expand...
Click to collapse
this doesn't disprove my assertion...
NemesisRE said:
this doesn't disprove my assertion...
Click to expand...
Click to collapse
True. Maybe I misunderstood your reason for making the assertion.
HippyTed said:
True. Maybe I misunderstood your reason for making the assertion.
Click to expand...
Click to collapse
I think so ^^ the reason was to say that rebuilding the cache on every run would be dumb
cb5264 said:
Hi guys,
just shameless ripped from the jenkins build script from the wiki and adapted it to our build environment, for 1 device:
build.sh
Code:
rm -rf out/target
brunch $DEVICE
Click to expand...
Click to collapse
for personal use I don't remove the /out folder but maybe once every few weeks. You're essentially doing a make clobber but leaving your out/host folder so that's good but, even so, it isn't necessary to flush out the target folder every time unless your compiling is pooping out. I suppose it depends whether you're making it a cron job in which case I'd do what you're doing.
---------- Post added at 12:16 AM ---------- Previous post was at 12:14 AM ----------
... what I do think would be nice is to set up a delta update mechanism like cyandelta so we could update on mobile data without killing our data plans.
cd omni
rm -rf out
repo sync -j 16
time brunch n7100
that's what I use
Seems I have the most Advances
Code:
#!/bin/bash
cd ~/
clear
export USE_CCACHE=1
export CCACHE_DIR=~/.ccache
prebuilts/misc/linux-x86/ccache/ccache -M 50G
DATE=$(date -u +%Y%m%d)
OMNIBUILDTODEL=`expr $DATE - 5`
DEVICE=$*
. build/envsetup.sh
rm -f out/target/product/$DEVICE/obj/KERNEL_OBJ/.version
rm -f out/target/product/$DEVICE/system/build.prop
rm -f out/target/product/$DEVICE/system/app/*.odex
rm -f out/target/product/$DEVICE/omni*.zip
rm -f out/target/product/$DEVICE/omni*.zip.md5sum
rm -f out/target/product/$DEVICE/system/framework/*.odex
brunch omni_$DEVICE-userdebug -j12
sftp {-p PORT#} {USER-NAME}@xxx.xxx.xxx.xxx << EOF
cd /var/www/mithun46/hammerhead/omni/
put out/target/product/$DEVICE/omni-4.4-$DATE-$DEVICE-HOMEMADE.zip
put out/target/product/$DEVICE/omni-4.4-$DATE-$DEVICE-HOMEMADE.zip.md5sum
rm omni-4.4-$OMNIBUILDTODEL-$DEVICE-HOMEMADE.zip
rm omni-4.4-$OMNIBUILDTODEL-$DEVICE-HOMEMADE.zip.md5sum
EOF
This:
Uses 50 gigs of ccache
Uploads to my personal server [zip+md5]
Deletes 5 days old builds and their md5sum
This is not clean builds [i clean manually] [is kinda clean though]
Is in the smallest form possible
mithun46 said:
#!/bin/{SHELL}
...
sftp {-p PORT#} {USER-NAME}@xxx.xxx.xxx.xxx
cd /var/www/{what/should/possibly/be/an/obscured/path/to}/omni/
Click to expand...
Click to collapse
You also just provided me with:
1) Verification of an operable {SHELL} compatible shell.
2) Your server's IP.
3) A good indicator that your server accepts SSH AND SFTP connections at the port {PORT#}.
4) Verification that your SSH server accepts "{USER-NAME}" logins.
5) Pretty solid evidence of, and possibly even an otherwise inaccessible path on, a web server
Please edit your post. Ive already made my post as vague as possible without failing to make my point, i hope.
Also, please consider SSH's known_hosts or at the least shell aliases/functions so you don't have to hardcode IP addresses and user-names in random shell scripts.
-Mike
* While it's possible that... EDIT: *REDACTED* no problem, Mithun. I said it for myself as much as I did you; nobody likes a botnet. Well, maybe very few like a botnet.
mithun46 said:
Code:
...
sftp {-p PORT#} {USER-NAME}@xxx.xxx.xxx.xxx << EOF
cd /var/www/mithun46/hammerhead/omni/
put out/target/product/$DEVICE/omni-4.4-$DATE-$DEVICE-HOMEMADE.zip
put out/target/product/$DEVICE/omni-4.4-$DATE-$DEVICE-HOMEMADE.zip.md5sum
rm omni-4.4-$OMNIBUILDTODEL-$DEVICE-HOMEMADE.zip
rm omni-4.4-$OMNIBUILDTODEL-$DEVICE-HOMEMADE.zip.md5sum
EOF
[/LIST]
Click to expand...
Click to collapse
That part got a disturbing 'issue' imho - it doesn't check for a build being successful. I'd work that out with an if-clause checking if the file exists...
cb5264 said:
That part got a disturbing 'issue' imho - it doesn't check for a build being successful. I'd work that out with an if-clause checking if the file exists...
Click to expand...
Click to collapse
If no file exists it shows errors while trying to upload the file in sftp
This is my try, it´s not perfect and for the most people too much... but it`s mine ^^
https://gist.github.com/NemesisRE/7518954
EDIT: Will update the gist until i think it is all ok, but the code here will stay as it is
Code:
#!/bin/bash
##################################################
#
# vim: ai ts=4 sw=4 noet sts=4 ft=sh
#
# Copyright 2013, Steven Koeberich ([email protected])
#
# Title: dinner.sh
# Author: Steven "NemesisRE" Koeberich
# Date: 20131117
# Version: 1.1
# Description: Builds Roms automatically
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License at (http://www.gnu.org/licenses/) for
# more details.
#set -e #do not enable otherwise brunch will fail
#set -x
#For compatibility set Language to en_US.UTF8 and timezone to UTC
export LANGUAGE="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export LANG="en_US.UTF-8"
export TZ="/usr/share/zoneinfo/UTC"
#Make us of CCACHE
export USE_CCACHE=1
# Define global variables
REPO_DIR="${HOME}/android/omni"
MAIL_BIN=$(which mail)
LOG_DIR="${HOME}/logs"
SHOW_VERBOSE="> /dev/null 2>&1"
CONVERT_TO_HTML="| ansi2html" # install package kbtin to use this feature
#Set initial exitcodes
SYNC_REPO_EXIT_CODE="0"
GET_BREAKFAST_VARIABLES_EXIT_CODE="0"
BRUNCH_DEVICE_EXIT_CODE="0"
MOVE_BUILD_EXIT_CODE="0"
RUN_COMMAND_EXIT_CODE="0"
CLEAN_OLD_BUILDS_EXIT_CODE="0"
SEND_MAIL_EXIT_CODE="0"
# This variables can be overwritten by command line parameters
MAIL='' # set this if you want always an email
ADMIN_MAIL='' # set this if you want always an email (with logs)
TARGET_DIR='' # set this if you want always move your build to the given directorie
CLEANUP_OLDER_THEN="" # set this if you want always automatic cleanup
DOWNLOAD_LINK='' # set this if you want always a download link
RUN_COMMAND='' # set this if you want always run a command after a build was successful
BUILD_FOR_DEVICE="" # set this if you want always build for the given device/s
#Source envsetup
. ${REPO_DIR}/build/envsetup.sh > /dev/null 2>&1
######################
#
# function _usage
#
#
function _usage() {
echo $"Usage: ${0} [-n \"[email protected]\"] [-t \'/var/www/awsome-download-dir\'] [-r \'scp \$\{OUTPUT_FILE\} example.com:\' ][-l \"http://example.com/download/omnirom\"] [-c 7] [-v] [-- i9300 mako ]"
cat<<EOF
Options:
-n Send notification to given Mail-Adress
-t Move files into given Directorie
-r Run command on successful build
-l If you choose a target dir you may want put
a download link into the mail message
-c Cleanup builds older then N days
-v Verbose Output
-h See this Message
EOF
}
function _e_notice () {
echo -e "NOTICE: ${1}"
}
function _e_warning () {
echo -e "WARNING:Something went wrong ${1} (${2})"
}
function _e_error () {
echo -e "ERROR: ${1}"
}
function _check_prerequisites () {
if [ ! -x $(which ansi2html) ]; then
CONVERT_TO_HTML=""
fi
if [ ${TARGET_DIR} ]; then
TARGET_DIR=$(echo "${TARGET_DIR}"|sed 's/\/$//g')
fi
if [ ${LOG_DIR} ]; then
LOG_DIR=$(echo "${LOG_DIR}"|sed 's/\/$//g')
fi
if [ -z ${BUILD_FOR_DEVICE} ]; then
echo "ERROR: No Device given! Stopping..."
_usage
exit 1
fi
if [ ! -d ${LOG_DIR} ]; then
mkdir -p ${LOG_DIR}
fi
}
function _sync_repo () {
_e_notice "Running repo sync..."
eval "repo sync ${SHOW_VERBOSE}"
SYNC_REPO_EXIT_CODE=$?
if [ ${SYNC_REPO_EXIT_CODE} != 0 ]; then
_e_warning "while doing repo sync" "${SYNC_REPO_EXIT_CODE}"
fi
}
function _get_breakfast_variables () {
for VARIABLE in `breakfast ${DEVICE} | sed -e 's/^=.*//' -e 's/[ ^I]*$//' -e '/^$/ d'`; do
eval ${VARIABLE}
done
GET_BREAKFAST_VARIABLES_EXIT_CODE=$?
if [ ${GET_BREAKFAST_VARIABLES_EXIT_CODE} != 0 ]; then
_e_warning "while getting breakfast variables" "${GET_BREAKFAST_VARIABLES_EXIT_CODE}"
fi
}
function _brunch_device () {
_e_notice "Running brunch for ${DEVICE} with version ${PLATFORM_VERSION} ..."
eval "brunch ${DEVICE} 2>&1 | tee ${LOG_DIR}/brunch_${DEVICE}.log ${SHOW_VERBOSE}"
BRUNCH_DEVICE_EXIT_CODE=$?
BRUNCH_RUN_TIME=$(tail ${LOG_DIR}/brunch_${DEVICE}.log | grep "real" | awk '{print $2}')
if [ ${BRUNCH_DEVICE_EXIT_CODE} != 0 ]; then
_e_warning "while brunch the ${DEVICE}, see logfile for more information" "${BRUNCH_DEVICE_EXIT_CODE}"
fi
}
function _move_build () {
_e_notice "Moving files to target directory..."
mv ${OUTPUT_FILE}* ${TARGET_DIR}/
MOVE_BUILD_EXIT_CODE=$?
if [ ${MOVE_BUILD_EXIT_CODE} != 0 ]; then
_e_warning "while moving the build" "${MOVE_BUILD_EXIT_CODE}"
fi
}
function _run_command () {
_e_notice "Run command..."
eval ${RUN_COMMAND}
RUN_COMMAND_EXIT_CODE=$?
if [ ${RUN_COMMAND_EXIT_CODE} != 0 ]; then
_e_warning "while running your command" "${RUN_COMMAND_EXIT_CODE}"
fi
}
function _clean_old_builds () {
_e_notice "Running cleanup of old builds..."
if [ ${TARGET_DIR} ]; then
CLEANED_FILES=$(find ${TARGET_DIR}/ -name "omni-${PLATFORM_VERSION}-*-${DEVICE}-HOMEMADE.zip*" -type f -mtime +${CLEANUP_OLDER_THEN}d -delete)
else
CLEANED_FILES=$(find `dirname ${OUTPUT_FILE}` -name "omni-${PLATFORM_VERSION}-*-${DEVICE}-HOMEMADE.zip*" -type f -mtime +${CLEANUP_OLDER_THEN}d -delete)
fi
CLEAN_OLD_BUILDS_EXIT_CODE=$?
if [ ! ${CLEANED_FILES} ]; then
CLEANED_FILES="Nothing to clean up."
fi
_e_notice "${CLEANED_FILES}"
if [ ${CLEAN_OLD_BUILDS_EXIT_CODE} != 0 ]; then
_e_warning "while cleaning builds" "${CLEAN_OLD_BUILDS_EXIT_CODE}"
fi
}
function _send_mail () {
_e_notice "Sending status mail..."
MAIL_MESSAGE="Build Status:\n\n"
ADMIN_MAIL_MESSAGE=""
if ${BUILD_SUCCESSFUL}; then
MAIL_MESSAGE+="Build for ${DEVICE} was successfull finished after ${BRUNCH_RUN_TIME}\n"
if [ ${DOWNLOAD_LINK} ]; then
MAIL_MESSAGE+="You can download your Build at ${DOWNLOAD_LINK}\n\n"
fi
if [ ${CLEANED_FILES} ]; then
ADMIN_MAIL_MESSAGE+="Removed the following files:\n"
ADMIN_MAIL_MESSAGE+=${CLEANED_FILES}
fi
else
MAIL_MESSAGE+="Build was not successfull ran ${BRUNCH_RUN_TIME}.\n\n"
ADMIN_MAIL_MESSAGE+="Logfile:"
ADMIN_MAIL_MESSAGE+=$(cat ${HOME}/brunch_${DEVICE}.log ${CONVERT_TO_HTML})
fi
if [ ${MAIL} ]; then
echo -e "${MAIL_MESSAGE}" | ${MAIL_BIN} -s "Finished dinner." "${MAIL}"
fi
if [ ${ADMIN_MAIL} ]; then
echo -e "${MAIL_MESSAGE}${ADMIN_MAIL_MESSAGE}" | ${MAIL_BIN} -s "Finished dinner." "${ADMIN_MAIL}"
fi
SEND_MAIL_EXIT_CODE=$?
if [ ${SEND_MAIL_EXIT_CODE} != 0 ]; then
_e_warning "while sending E-Mail" "${SEND_MAIL_EXIT_CODE}"
fi
}
function _check_build () {
OUT_FILE_SECONDS_SINCE_CREATION=$(/bin/date -d "now - $( /usr/bin/stat -c "%Y" ${OUTPUT_FILE} ) seconds" +%s)
if [ -f ${OUTPUT_FILE} ] && [ "${OUT_FILE_SECONDS_SINCE_CREATION}" -lt "120" ] ; then
BUILD_SUCCESSFUL=true
else
BUILD_SUCCESSFUL=false
fi
}
######################
#
# function _main
#
#
function _main() {
_check_prerequisites
cd ${REPO_DIR}
_sync_repo
for DEVICE in ${BUILD_FOR_DEVICE}; do
_get_breakfast_variables
_brunch_device
OUTPUT_FILE="${OUT_DIR}/target/product/${DEVICE}/omni-${PLATFORM_VERSION}-$(date +%Y%m%d)-${DEVICE}-HOMEMADE.zip"
_check_build
if ${BUILD_SUCCESSFUL} && [ ${TARGET_DIR} ]; then
eval TARGET_DIR=${TARGET_DIR}
_move_build
fi
if ${BUILD_SUCCESSFUL} && [ ${CLEANUP_OLDER_THEN} ]; then
_clean_old_builds
fi
if [ ${MAIL} ] || [ ${ADMIN_MAIL} ]; then
eval MAIL=${MAIL}
eval ADMIN_MAIL=${ADMIN_MAIL}
_send_mail
fi
done
OVERALL_EXIT_CODE=$((${SYNC_REPO_EXIT_CODE}+${GET_BREAKFAST_VARIABLES_EXIT_CODE}+${BRUNCH_DEVICE_EXIT_CODE}+${MOVE_BUILD_EXIT_CODE}+${CLEAN_OLD_BUILDS_EXIT_CODE}+${SEND_MAIL_EXIT_CODE}))
if ! ${BUILD_SUCCESSFUL} && [ ${OVERALL_EXIT_CODE} -gt 0 ]; then
_e_warning "buildcheck failed and Overall exit code is higher then 0 will exit with 1" "${OVERALL_EXIT_CODE}"
exit 1
elif ${BUILD_SUCCESSFUL} && [ ${OVERALL_EXIT_CODE} -gt 0 ]; then
_e_warning "buildcheck was successful but Overall exit code is higher then 0 will exit with 1" "${OVERALL_EXIT_CODE}"
exit 1
else
_e_notice "All jobs finished successfully."
fi
}
## Parameter handling
while getopts ":n:t:l:c:vh" opt; do
case ${opt} in
"n")
MAIL='${OPTARG}'
;;
"t")
TARGET_DIR='${OPTARG}'
;;
"r")
RUN_COMMAND='${OPTARG}'
;;
"l")
DOWNLOAD_LINK='${OPTARG}'
;;
"c")
CLEANUP_OLDER_THEN="${OPTARG}"
;;
"v")
SHOW_VERBOSE=""
;;
"h")
_usage
exit 0
;;
\?)
echo "Invalid option: -${OPTARG}"
_usage
exit 1
;;
:)
echo "Option -${OPTARG} requires an argument."
_usage
exit 1
;;
esac
done
shift $((${OPTIND}-1))
if [ ${@} ]; then
BUILD_FOR_DEVICE=${@}
fi
_main
exit 0
Cheers
Steven
No more gist
The script is now called Dinner, more information at http://forum.xda-developers.com/showthread.php?t=2690995

[Q] boot.img

how to assemble and disassemble boot.img on this phone?
Stock jb 4.1 uses kernel.bin.md5, cm uses boot.img
I tried many times but never managed (there's a script somewhere in this section but didn't work either for me)
Why do you want to unpack it?
Sent from Italy using Tapatalk
Toni5830 said:
Stock jb 4.1 uses kernel.bin.md5, cm uses boot.img
I tried many times but never managed (there's a script somewhere in this section but didn't work either for me)
Why do you want to unpack it?
Sent from Italy using Tapatalk
Click to expand...
Click to collapse
I want to insert a file init.rc service service
Code:
shelld /system/xbin/shelld
class main
I fear you need to compile kernel from sources..(I can compile stock kernel but don't know how to compile cm one )
Sent from Italy using Tapatalk
Toni5830 said:
I fear you need to compile kernel from sources..(I can compile stock kernel but don't know how to compile cm one )
Sent from Italy using Tapatalk
Click to expand...
Click to collapse
no I do not need to be collected from source
lolo696 said:
no I do not need to be collected from source
Click to expand...
Click to collapse
It depends how it is compiled. I think Frapeti told that some later versions will have possibiliti to be decompiled. I am not into kernels, not sure how and does this version now can be decompiled. And boot.img is only on CM - on stock we have kernel.bin.md5.
Actually kernel.bin.md5 is the zImage renamed with an md5 checksum. There is boot.img in stock too. Boot.img usually contains the zImage and the ramdisk. But in our device the ramdisk is packed in the zImage, this makes the boot.img un-unpackable. So kernel.bin.md5 (the zImage) can be renamed to boot.img because it's the same. I hope you understood this. I tried to explain in the simplest way
and you can follow any responses to add service init.rc ?
Sent from my GT-I9070 using xda app-developers app
Look at post #5, there's an attached file to unpack kernel, but never worked for me..some say it works
http://forum.xda-developers.com/showthread.php?t=2115337
Sent from Italy using Tapatalk
But in our device the ramdisk is packed in the zImage, this makes the boot.img un-unpackable.
Click to expand...
Click to collapse
Read this from KINGbabasula post.
I'm quite sure I can read -.-
Quoting Cocafe:
#!/bin/bash
# This is an update version of the script found at
# http://forum.xda-developers.com/wiki/index.php?title=Extract_initramfs_from_zImage
#
# The problem with that script is that the gzip magic number occasionally occur
# naturally, meaning that some non-compressed files get uncompressed.
DEBUG=
TEMP_DIR=/tmp
KERNEL_FILE=kernel
KERNEL_GZIP_FILE=kernel.gz
INITRAMFS_FILE=initramfs.cpio
INITRAMFS_DIR=initramfs_root
# DO NOT MODIFY BELOW THIS LINE
[ -z $1 ] && exit 1 || zImage=$1
[ ! -e $1 ] && exit 1
#GET CURRENT DIR
CURRENT_DIR=`pwd`
function pre_clean()
{
[ -z $DEBUG ] || echo "-D- Function: pre_clean()"
[ -e $INITRAMFS_FILE ] && ( [ -z $DEBUG ] || echo "-D- Deleting $INITRAMFS_FILE"; rm -f $INITRAMFS_FILE )
[ -e $INITRAMFS_DIR ] && ( [ -z $DEBUG ] || echo "-D- Deleting $INITRAMFS_DIR"; rm -rf $INITRAMFS_DIR )
[ -z $DEBUG ] || echo
}
function ungzip_kernel()
{
#========================================================
# find start of gziped kernel object in the zImage file:
#========================================================
[ -z $DEBUG ] || echo "-D- Function: ungzip_kernel()"
pos=`grep -P -a -b -m 1 --only-matching '\x1F\x8B\x08' $zImage | cut -f 1 -d :`
echo "-I- Extracting gzip'd kernel image from file: $zImage (start = $pos)"
if [ ! -z $pos ]; then
dd if=$zImage of=$TEMP_DIR/$KERNEL_GZIP_FILE bs=1 skip=$pos 2>/dev/null >/dev/null
gunzip -qf $TEMP_DIR/$KERNEL_GZIP_FILE
else
echo "-E- Compressed kernel image not found"; exit 1
fi
[ -z $DEBUG ] || echo
}
function search_cpio()
{
#========================================================
# Determine cpio compression type:
#========================================================
[ -z $DEBUG ] || echo "-D- Function: search_cpio()"
for x in gzip bzip lzma none; do
case $x in
bzip)
csig='\x{31}\x{41}\x{59}\x{26}\x{53}\x{59}'
ucmd='bunzip2 -q'
fext='.bz2'
;;
gzip)
csig='\x1F\x8B\x08'
ucmd='gunzip -q'
fext='.gz'
;;
lzma)
csig='\x{5D}\x{00}\x..\x{FF}\x{FF}\x{FF}\x{FF}\x{FF}\x{FF}'
ucmd='unlzma -q'
fext='.lzma'
;;
none)
csig='070701'
ucmd=
fext=
;;
esac
#========================================================================
# Search for compressed cpio archive
#========================================================================
search=`grep -P -a -b -m 1 --only-matching $csig $TEMP_DIR/$KERNEL_FILE | cut -f 1 -d : | head -1`
pos=${search:-0}
if [ ${pos} -gt 0 ]; then
if [ ${pos} -le ${cpio_compressed_start:-0} ] || [ -z $cpio_compressed_start ];then
cpio_compressed_start=$pos
compression_name=$x
compression_signature=$csig
uncompress_cmd=$ucmd
file_ext=$fext
[ -z $DEBUG ] || echo "-D- Checking for compression type: $compression_name | signature: $compression_signature | in file: $TEMP_DIR/$KERNEL_FILE | offset = $pos"
fi
fi
done
[ $compression_name = "bzip" ] && cpio_compressed_start=$((cpio_compressed_start - 4))
echo "-I- CPIO compression type detected = $compression_name | offset = $cpio_compressed_start"
[ -z $DEBUG ] || echo
}
function extract_cpio()
{
[ -z $DEBUG ] || echo "-D- Function: extract_cpio()"
if [ ! $compression_name = "none" ]; then
echo "-I- Extracting $compression_name'd compressed CPIO image from kernel image (offset = $cpio_compressed_start)"
[ -z $DEBUG ] || echo "-D- dd if=$TEMP_DIR/$KERNEL_FILE of=$TEMP_DIR/$INITRAMFS_FILE$file_ext bs=1 skip=$cpio_compressed_start; $uncompress_cmd $TEMP_DIR/$INITRAMFS_FILE$file_ext"
dd if=$TEMP_DIR/$KERNEL_FILE of=$TEMP_DIR/$INITRAMFS_FILE$file_ext bs=1 skip=$cpio_compressed_start 2>/dev/null >/dev/null
$uncompress_cmd -q $TEMP_DIR/$INITRAMFS_FILE$file_ext
else
echo "-I- Extracting non-compressed CPIO image from kernel image (offset = $cpio_compressed_start)"
[ -z $DEBUG ] || echo "-D- dd if=$TEMP_DIR/$KERNEL_FILE of=$TEMP_DIR/${INITRAMFS_FILE}${file_ext} bs=1 skip=$cpio_compressed_start 2>/dev/null >/dev/null"
dd if=$TEMP_DIR/$KERNEL_FILE of=$TEMP_DIR/${INITRAMFS_FILE}${file_ext} bs=1 skip=$cpio_compressed_start 2>/dev/null >/dev/null
fi
[ -z $DEBUG ] || echo
}
function uncompress_cpio()
{
#==========================================================================
# find start and end of the "cpio" initramfs image inside the kernel object:
# ASCII cpio header starts with '070701'
# The end of the cpio archive is marked with an empty file named TRAILER!!!
#==========================================================================
[ -z $DEBUG ] || echo "-D- Function: uncompress_cpio()"
if [ ! $compress_type = "none" ]; then
start=`grep -a -b -m 1 --only-matching '070701' $TEMP_DIR/$INITRAMFS_FILE | head -1 | cut -f 1 -d :`
end=`grep -a -b -m 1 --only-matching 'TRAILER!!!' $TEMP_DIR/$INITRAMFS_FILE | head -1 | cut -f 1 -d :`
if [ ! -z $start ] || [ ! -z $end ]; then
#11 bytes = length of TRAILER!!! zero terminated string, fixes premature end of file warning in CPIO
end=$((end + 14))
[ -z $DEBUG ] || echo "-D- Kernel start = $start"
[ -z $DEBUG ] || echo "-D- Kernel end = $end"
count=$((end - start))
if (($count < 0)); then
echo "-E- Couldn't match start/end of the initramfs image."
exit 1
fi
echo "-I- Extracting initramfs image from file: $inputfile (start = $start, end = $end)"
dd if=$TEMP_DIR/$INITRAMFS_FILE of=$CURRENT_DIR/$INITRAMFS_FILE bs=1 skip=$start count=$count 2>/dev/null >/dev/null
INITRAMFS_FILE=$CURRENT_DIR/$INITRAMFS_FILE
else
echo "-E- No CPIO image found in $inputfile."
fi
else
echo "-I- CPIO already uncompressed."
fi
[ -z $DEBUG ] || echo
}
function expand_cpio_archive()
{
[ -z $DEBUG ] || echo "-D- Function: expand_cpio_archive()"
echo "-I- Expanding CPIO archive: $INITRAMFS_FILE to $INITRAMFS_DIR."
if [ -e $TEMP_DIR/$INITRAMFS_FILE ]; then
mkdir $INITRAMFS_DIR
cd $INITRAMFS_DIR
cpio --quiet -i --make-directories --preserve-modification-time --no-absolute-filenames -F $TEMP_DIR/$INITRAMFS_FILE 2>/dev/null
fi
[ -z $DEBUG ] || echo
}
function clean_up()
{
[ -z $DEBUG ] || echo "-D- Deleting $TEMP_DIR/$KERNEL_FILE"; rm -f $TEMP_DIR/$KERNEL_FILE
[ -z $DEBUG ] || echo "-D- Deleting $TEMP_DIR/$INITRAMFS_FILE"; rm -f $TEMP_DIR/$INITRAMFS_FILE
[ -z $DEBUG ] || echo "-D- Deleting $TEMP_DIR/$INITRAMFS_FILE$file_ext"; rm -f $TEMP_DIR/$INITRAMFS_FILE$file_ext
}
reset
pre_clean
ungzip_kernel
search_cpio
extract_cpio
uncompress_cpio
expand_cpio_archive
clean_up
Click to expand...
Click to collapse
Save this QUOTE as a file name unpack_initramfs.sh
Use:
./unpack_initramfs.sh kernel.bin.md5
Click to expand...
Click to collapse
-I- Extracting gzip'd kernel image from file: kernel.bin.md5 (start = 18528)
-I- CPIO compression type detected = none | offset = 219120
-I- Extracting non-compressed CPIO image from kernel image (offset = 219120)
-I- CPIO already uncompressed.
-I- Expanding CPIO archive: initramfs.cpio to initramfs_root.
Click to expand...
Click to collapse
Then you should have stock ramdisk
Click to expand...
Click to collapse
Worked for Cocafe but never worked for me:/ maybe because Cocore-e's compression is now set to lzo
Last 2 things then I'll leave:
1) Frapeti said next cm kernel will be possible to unpack (check dual boot thread)
2) I don't know how to repack it
Sent from Italy using Tapatalk
Toni5830 said:
I'm quite sure I can read -.-
Quoting Cocafe:
Worked for Cocafe but never worked for me:/ maybe because Cocore-e's compression is now set to lzo
Last 2 things then I'll leave:
1) Frapeti said next cm kernel will be possible to unpack (check dual boot thread)
2) I don't know how to repack it
Sent from Italy using Tapatalk
Click to expand...
Click to collapse
I never saw before that script
Here you can find how to unpack and repack a "normal" boot.img with tools for cygwin too https://github.com/KINGbabasula/boot.img-tools

LineageOS 15.0 Self-Builder's thread

This is the thread where people trying to build LineageOS themselves communicate. Communication up until now happend inside the "[ROM+Kernel][Unofficial][Unified]LineageOS 15.0[8.0.0]" thread. Picking the important parts in all the user-talk was hard.
So here we go, lets get this **** build.
Short summary - I try to build from LineageOS sources, taking roomservice from LineageOS and - except for blobs from muppets - not using any external repos. If you try to build from akhilnarang's sources, please note that in your post.
Anyways, I wrote this:
mad-murdock said:
If you build from vanilla laos sources, with roomservice, you must "repopick -t kryo-libc" after repo sync to get rid of those soong "arch.arm64.kryo" errors. see https://review.lineageos.org/#/q/branch:lineage-15.0+topic:kryo-libc
credits go to dianlujitao who was so kind to answer my question.
also, in device/oneplus/oneplus3/lineage.mk there is a reference to vendor/cm which you must change to vendor/lineage
then another error happen
Click to expand...
Click to collapse
And got a reply here:
joshndroid said:
Are you referring to the cmsdk/api/7.txt needed by blah/blah/checkpublicapi-cm-last-timestamp is missing and no know rule to make it.
repopicking the lineagesdk-oreo-briungup topic (although it was slated as working) doesn't seem to fix that issue. i must be missing something.
Click to expand...
Click to collapse
No josh, I don't repo-pick that. The error happening for me - which I look into once this is done - is
Code:
[ 99% 1105/1108] glob vendor/qcom/opensource/interfaces/*/Android.bp
[ 99% 1106/1108] glob vendor/qcom/opensource/interfaces/camera/device/1.0/Android.bp
[ 99% 1107/1108] glob vendor/qcom/opensource/interfaces/display/config/1.0/Android.bp
ninja: error: '/opt/develop/lineage-15.0/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.internal_intermediates/link_type', needed by '/opt/develop/lineage-15.0/out/target/common/obj/APPS/OneplusDoze_intermediates/link_type', missing and no known rule to make it
19:31:54 ninja failed with: exit status 1
make: *** [build/core/main.mk:21: run_soong_ui] Error 1
make: Leaving directory '/opt/develop/lineage-15.0'
#### make failed to build some targets (35 seconds) ####
I built a non-booting image of LOS15 a while back, I think it was when they started tagging repositories with LOS15 branch - I still can't seem to boot it myself, so I'll ignore that for a moment.
I do have several word to say about this, for one, I had followed what Google have done to the the CPU arch of Sailfish and Marlin. Making them a generic ARMv8 (for the main arch) and ARMv7 Neon for the secondary arch. Of course, I could've merged the libc changes, but they didn't exist when I started doing the early bringup hence the reason why I stuck myself with Google's way of doing things.
As for the OneplusDoze, I simply commented it out due to the fact that Lineage themselves has yet to bring up the necessary CMHW-related changes. However, this is an experience speaking from about a month ago, I have yet to see whether they have started merging new things connected to CMHW.
I still wonder why my build doesn't boot though. I have done practically everything needed for the bringup, but I'm stuck in this loop where the device would hang on the OnePlus logo before jumping to Fastboot Mode; I suppose someone can help me with this?
F4uzan said:
I still wonder why my build doesn't boot though. I have done practically everything needed for the bringup, but I'm stuck in this loop where the device would hang on the OnePlus logo before jumping to Fastboot Mode; I suppose someone can help me with this?
Click to expand...
Click to collapse
Thanks for your input. Well, it was a month ago. I would try again. Unfortunately, my time is limited, so I have little time to spend on this. Very curious though, if the ROM boots once finished. If not, we still can try the repo's akhilnarang builds from:
akhilnarang said:
Sources
Device tree - https://github.com/akhilnarang/device_oneplus_oneplus3
Vendor - https://github.com/akhilnarang/proprietary_vendor_oneplus
Common tree - https://github.com/akhilnarang/device_oppo_common
Has my Derp kernel builtin
Click to expand...
Click to collapse
My issue is, that ROM is a week behind current development, and somehow I don't want to go back to 7.1.2 - so getting this stuff compiled myself is the best way. Guess thats motivation for most who raised their voice on the 8.0 thread
So I'm getting something like this, will experiment further.
Code:
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
build/core/base_rules.mk:467: warning: overriding commands for target `/Volumes/android/los/out/host/darwin-x86/cts/android-cts/testcases/libcrash-jni.so'
build/core/base_rules.mk:467: warning: ignoring old commands for target `/Volumes/android/los/out/host/darwin-x86/cts/android-cts/testcases/libcrash-jni.so'
build/core/base_rules.mk:467: warning: overriding commands for target `/Volumes/android/los/out/target/product/oneplus3/testcases/libcrash-jni/libcrash-jni.so'
build/core/base_rules.mk:467: warning: ignoring old commands for target `/Volumes/android/los/out/target/product/oneplus3/testcases/libcrash-jni/libcrash-jni.so'
build/core/base_rules.mk:467: warning: overriding commands for target `/Volumes/android/los/out/target/product/oneplus3/testcases/hello_world_test/hello_world_test'
build/core/base_rules.mk:467: warning: ignoring old commands for target `/Volumes/android/los/out/target/product/oneplus3/testcases/hello_world_test/hello_world_test'
./test/vts/utils/python/archive/Android.mk:28: warning: overriding commands for target `default'
./test/vts/runners/host/tcp_server/Android.mk:19: warning: ignoring old commands for target `default'
./test/vts/utils/python/coverage/Android.mk:28: warning: overriding commands for target `default'
./test/vts/utils/python/archive/Android.mk:28: warning: ignoring old commands for target `default'
build/core/Makefile:34: warning: overriding commands for target `/Volumes/android/los/out/target/product/oneplus3/system/etc/libnfc-brcm.conf'
build/core/base_rules.mk:375: warning: ignoring old commands for target `/Volumes/android/los/out/target/product/oneplus3/system/etc/libnfc-brcm.conf'
build/core/Makefile:34: warning: overriding commands for target `/Volumes/android/los/out/target/product/oneplus3/system/etc/libnfc-nxp.conf'
build/core/base_rules.mk:375: warning: ignoring old commands for target `/Volumes/android/los/out/target/product/oneplus3/system/etc/libnfc-nxp.conf'
[ 96% 29/30] glob frameworks/wilhelm/include/SLES/**/*.h
ninja: error: 'cm-api-stubs-docs', needed by '/Volumes/android/los/out/target/common/obj/PACKAGING/cm_public_api.txt', missing and no known rule to make it
20:00:43 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
#### make failed to build some targets (59 seconds) ####
iMac-Micha:los magnum828$
Magnum828 said:
So I'm getting something like this, will experiment further.
Click to expand...
Click to collapse
I've tried Akhil's repos and a cherry pick from ElixiumOS which brings in a blob called libgpustats.so in vendor/oneplus
I get stuck @17% with ninja giving an error with relation to something in audio-caf.
Something to do with audio_hw.c
I ain't no coder so I can't fix it unfortunately. ?
inflames91 said:
I've tried Akhil's repos and a cherry pick from ElixiumOS which brings in a blob called libgpustats.so in vendor/oneplus
I get stuck @17% with ninja giving an error with relation to something in audio-caf.
Something to do with audio_hw.c
I ain't no coder so I can't fix it unfortunately. ?
Click to expand...
Click to collapse
How did you go past the cm-api-stubs ???
Oh man, thanks for seperating this out.
1) I repo sync'd lineage-15.0
2) breakfast oneplus3
3) cloned/checked-out akhil's 3 repo's for device/kernel/vendor replacing what I already had
3a) Dont need repo pick for kryo-libc unless you wanna change main arch in device/boardconfig back to kryo (which is really what it should be)
3b) If you use stock device tree, you may need to edit some files to point to lineage files instead of cm (look at this commit: http://tinyurl.com/y6u844ah)
~4) I might have needed to pull libgpustats from my phone or op3t or something, don't remember on that.
Pretty sure at this point it builds up to ~3-10k files before you run into failures in hardware/qcom/audio, hardware/qcom/display, and hardware/qcom/media.
5) Delete the following folders in hardware/qcom:
audio/audio-caf/display/display-caf/media/media-caf
and clone dianlujitao 3 repo's(specify branch lineage-15.0): hardware/qcom/audio, hardware/qcom/display, and hardware/qcom/media
From here I can compile up to ~35k files before i get failure generating cache.img.
I haven't had time to go back through the error but it might just be a simple "not enough space" error at which point we just need to edit boardconfig to make it think it can have a larger cache img, but im not positive thats the issue/fix. And I havent had time to do anything else from here yet either. Will update when I know more.
After reading all these self test stories I myself tried to build again.
I got this for the first time today, never saw this last time I tried to build [The line in RED]:
Code:
[email protected]:~/Android/AOSP/LineageOS15$ source build/envsetup.sh
including device/generic/car/car-arm64/vendorsetup.sh
including device/generic/car/car-armv7-a-neon/vendorsetup.sh
including device/generic/car/car-x86_64/vendorsetup.sh
including device/generic/car/car-x86/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including vendor/lineage/vendorsetup.sh
including sdk/bash_completion/adb.bash
[email protected]:~/Android/AOSP/LineageOS15$ brunch oneplus3
including vendor/lineage/vendorsetup.sh
[COLOR=Red][B]Trying dependencies-only mode on a non-existing device tree?[/B][/COLOR]
Any idea if this will cause any issue or not.
Magnum828 said:
How did you go past the cm-api-stubs ???
Click to expand...
Click to collapse
I was getting errors for libgpustats.
Solved that bit. ?
arnabJ said:
After reading all these self test stories I myself tried to build again.
I got this for the first time today, never saw this last time I tried to build [The line in RED]:
Code:
[email protected]:~/Android/AOSP/LineageOS15$ source build/envsetup.sh
including device/generic/car/car-arm64/vendorsetup.sh
including device/generic/car/car-armv7-a-neon/vendorsetup.sh
including device/generic/car/car-x86_64/vendorsetup.sh
including device/generic/car/car-x86/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including vendor/lineage/vendorsetup.sh
including sdk/bash_completion/adb.bash
[email protected]:~/Android/AOSP/LineageOS15$ brunch oneplus3
including vendor/lineage/vendorsetup.sh
[COLOR=Red][B]Trying dependencies-only mode on a non-existing device tree?[/B][/COLOR]
Any idea if this will cause any issue or not.
Click to expand...
Click to collapse
no that 'dependencies-only' notification has no real bearing on the issues that are being seen with building.
Update 1:
Bad luck. I too got stuck at making cache.img.
I got printname too large error. Probably cache.img size error as stated by @HolyAngel.
I have approximately 250GB of free HDD space left just in case it may be of some help to know.
I will now try to search for such an issue and try to fix if I get some fix related to it.
If someone knows anything regarding this and can shed some light on how to get past this it would be really appreciated.
Heres the whole error message:
Code:
14 warnings generated.
[ 55% 46381/83932] Target cache fs image: /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
FAILED: /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
/bin/bash -c "(mkdir -p /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache ) && (mkdir -p /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates && rm -rf /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"ext_mkuserimg=mkuserimg.sh\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"fs_type=ext4\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"system_size=3154116608\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"userdata_size=57436708864\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"cache_fs_type=f2fs\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"cache_size=268435456\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"extfs_sparse_flag=-s\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"squashfs_sparse_flag=-s\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"selinux_fc=/home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"skip_fsck=true\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (PATH=/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin/:\$PATH ./build/tools/releasetools/build_image.py /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/system ) && (size=\$(for i in /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img; do stat --format \"%s\" \"\$i\" | tr -d '\\n'; echo +; done; echo 0); total=\$(( \$( echo \"\$size\" ) )); printname=\$(echo -n \"/home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img\" | tr \" \" +); img_blocksize=270336; twoblocks=\$((img_blocksize * 2)); onepct=\$(((((276824064 / 100) - 1) / img_blocksize + 1) * img_blocksize)); reserve=\$((twoblocks > onepct ? twoblocks : onepct)); maxsize=\$((276824064 - reserve)); echo \"\$printname maxsize=\$maxsize blocksize=\$img_blocksize total=\$total reserve=\$reserve\"; if [ \"\$total\" -gt \"\$maxsize\" ]; then echo \"error: \$printname too large (\$total > [276824064 - \$reserve])\"; false; elif [ \"\$total\" -gt \$((maxsize - 32768)) ]; then echo \"WARNING: \$printname approaching size limit (\$total now; limit \$maxsize)\"; fi )"
error: failed to build /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img from /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache
Running: mkf2fsuserimg.sh /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img 268435456
in mkf2fsuserimg.sh PATH=/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin/:/usr/lib/jvm/java-8-openjdk-amd64/bin:/home/arnabj/Android/AOSP/LineageOS15/out/soong/host/linux-x86/bin:/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/arnabj/Android/AOSP/LineageOS15/development/scripts:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/devtools/tools:/home/arnabj/Android/AOSP/LineageOS15/external/selinux/prebuilts/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/android-emulator/linux-x86_64:/home/arnabj/bin:/home/arnabj/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
make_f2fs -l 268435456 /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
[ 55% 46386/83932] ld /home/arnabj/Android/AOSP/LineageOS15/out/soong/.intermediates/external/protobuf/aprotoc/linux_x86_64/aprotoc
ninja: build stopped: subcommand failed.
15:58:23 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
make: Leaving directory '/home/arnabj/Android/AOSP/LineageOS15'
#### make failed to build some targets (04:37:46 (hh:mm:ss)) ####
Original:
Just an update.
Hoping for the best.
I am using Akhilnarang's device sources (kernel & vendor included).
I have replaced hardware_qcom_xyz / hardware_qcom_xyz-caf with hardware_qcom_xyz from Official LineageOS repo instead of that from dianlujitao as posted by HolyAngel.
Also I have cherry picked the required commit in vendor/oneplus3 as stated by inflames91.
The build is under process.
I am already at 52% with 44333 files out of 83932.
As per HolyAngel he/she got stuck at ~35k lines.
I am currently at ~45k lines.
Which is surely better.
I am completely noob on all these things.
I am just reading through different guides and posts here to try to build.
Wish me luck and give suggestions if you think it will be useful for me.
Sent from my OnePlus3 using XDA Labs
arnabJ said:
Update 1:
Bad luck. I too got stuck at making cache.img.
I got printname too large error. Probably cache.img size error as stated by @HolyAngel.
I have approximately 250GB of free HDD space left just in case it may be of some help to know.
I will now try to search for such an issue and try to fix if I get some fix related to it.
If someone knows anything regarding this and can shed some light on how to get past this it would be really appreciated.
Heres the whole error message:
Code:
14 warnings generated.
[ 55% 46381/83932] Target cache fs image: /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
FAILED: /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
/bin/bash -c "(mkdir -p /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache ) && (mkdir -p /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates && rm -rf /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"ext_mkuserimg=mkuserimg.sh\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"fs_type=ext4\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"system_size=3154116608\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"userdata_size=57436708864\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"cache_fs_type=f2fs\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"cache_size=268435456\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"extfs_sparse_flag=-s\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"squashfs_sparse_flag=-s\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"selinux_fc=/home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"skip_fsck=true\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (PATH=/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin/:\$PATH ./build/tools/releasetools/build_image.py /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/system ) && (size=\$(for i in /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img; do stat --format \"%s\" \"\$i\" | tr -d '\\n'; echo +; done; echo 0); total=\$(( \$( echo \"\$size\" ) )); printname=\$(echo -n \"/home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img\" | tr \" \" +); img_blocksize=270336; twoblocks=\$((img_blocksize * 2)); onepct=\$(((((276824064 / 100) - 1) / img_blocksize + 1) * img_blocksize)); reserve=\$((twoblocks > onepct ? twoblocks : onepct)); maxsize=\$((276824064 - reserve)); echo \"\$printname maxsize=\$maxsize blocksize=\$img_blocksize total=\$total reserve=\$reserve\"; if [ \"\$total\" -gt \"\$maxsize\" ]; then echo \"error: \$printname too large (\$total > [276824064 - \$reserve])\"; false; elif [ \"\$total\" -gt \$((maxsize - 32768)) ]; then echo \"WARNING: \$printname approaching size limit (\$total now; limit \$maxsize)\"; fi )"
error: failed to build /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img from /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache
Running: mkf2fsuserimg.sh /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img 268435456
in mkf2fsuserimg.sh PATH=/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin/:/usr/lib/jvm/java-8-openjdk-amd64/bin:/home/arnabj/Android/AOSP/LineageOS15/out/soong/host/linux-x86/bin:/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/arnabj/Android/AOSP/LineageOS15/development/scripts:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/devtools/tools:/home/arnabj/Android/AOSP/LineageOS15/external/selinux/prebuilts/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/android-emulator/linux-x86_64:/home/arnabj/bin:/home/arnabj/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
make_f2fs -l 268435456 /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
[ 55% 46386/83932] ld /home/arnabj/Android/AOSP/LineageOS15/out/soong/.intermediates/external/protobuf/aprotoc/linux_x86_64/aprotoc
ninja: build stopped: subcommand failed.
15:58:23 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
make: Leaving directory '/home/arnabj/Android/AOSP/LineageOS15'
#### make failed to build some targets (04:37:46 (hh:mm:ss)) ####
Original:
Just an update.
Hoping for the best.
I am using Akhilnarang's device sources (kernel & vendor included).
I have replaced hardware_qcom_xyz / hardware_qcom_xyz-caf with hardware_qcom_xyz from Official LineageOS repo instead of that from dianlujitao as posted by HolyAngel.
Also I have cherry picked the required commit in vendor/oneplus3 as stated by inflames91.
The build is under process.
I am already at 52% with 44333 files out of 83932.
As per HolyAngel he/she got stuck at ~35k lines.
I am currently at ~45k lines.
Which is surely better.
I am completely noob on all these things.
I am just reading through different guides and posts here to try to build.
Wish me luck and give suggestions if you think it will be useful for me.
Sent from my OnePlus3 using XDA Labs
Click to expand...
Click to collapse
Have you tried commenting out "BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := f2fs" from device/oneplus/oneplus3/BoardConfig.mk?
This might be out of the question and implausible, and possibly would break something, but seeing that you're failing at F2FS cacheimage generation, it might be worth trying. I have never encountered such error, but then again, I hacked around the device tree a bit too much and may have accidentally "fixed" the error myself.
F4uzan said:
Update 1:
Bad luck. I too got stuck at making cache.img.
I got printname too large error. Probably cache.img size error as stated by @HolyAngel.
I have approximately 250GB of free HDD space left just in case it may be of some help to know.
I will now try to search for such an issue and try to fix if I get some fix related to it.
If someone knows anything regarding this and can shed some light on how to get past this it would be really appreciated.
Heres the whole error message:
Have you tried commenting out "BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := f2fs" from device/oneplus/oneplus3/BoardConfig.mk?
This might be out of the question and implausible, and possibly would break something, but seeing that you're failing at F2FS cacheimage generation, it might be worth trying. I have never encountered such error, but then again, I hacked around the device tree a bit too much and may have accidentally "fixed" the error myself.
Click to expand...
Click to collapse
Ok I will try that later tonight.
Also commenting it will be better or changing it to ext4?
Also should I start rebuild from where it got stuck or should I first delete the out directory and start fresh?
___________________________________________
Were you able to complete a working build?
If yes why not share your working device tree?
Sent from my OnePlus3 using XDA Labs
arnabJ said:
Ok I will try that later tonight.
Also commenting it will be better or changing it to ext4?
Also should I start rebuild from where it got stuck or should I first delete the out directory and start fresh?
___________________________________________
Were you able to complete a working build?
If yes why not share your working device tree?
Sent from my OnePlus3 using XDA Labs
Click to expand...
Click to collapse
I haven't tried changing it to EXT4 as I just pieced two and two together and came up with an amateurish solution. Commenting it out would be better, seeing that plenty of device tree doesn't seem to have that specific line anyway.
As for the out directory, I think building dirty is fine but should you encounter an issue, it'd be better if you do a make clean or something to that effect.
Device tree? My device tree has not been updated for about weeks now and most of the solutions there are either hacks or dirty workarounds. And as I have said before, my build compiles but it doesn't boot; I have tried building AOSP and Lineage (which does compiles) but sadly none of them boot. I suspect this is the cause of the device tree which I have hacked around.
F4uzan said:
I haven't tried changing it to EXT4 as I just pieced two and two together and came up with an amateurish solution. Commenting it out would be better, seeing that plenty of device tree doesn't seem to have that specific line anyway.
As for the out directory, I think building dirty is fine but should you encounter an issue, it'd be better if you do a make clean or something to that effect.
Device tree? My device tree has not been updated for about weeks now and most of the solutions there are either hacks or dirty workarounds. And as I have said before, my build compiles but it doesn't boot; I have tried building AOSP and Lineage (which does compiles) but sadly none of them boot. I suspect this is the cause of the device tree which I have hacked around.
Click to expand...
Click to collapse
Ok. I will update with new info when I have any.
Sent from my OnePlus3 using XDA Labs
I changed
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := F2FS
to
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
in boardconfig and cache builds fine now. still compiling. will update when i know more.
IT BUILDS! Got output zip, will upload here for testing.
---------- Post added at 08:31 AM ---------- Previous post was at 08:04 AM ----------
https://drive.google.com/open?id=0B7UqGxB-q5f3VVh1d3dkUjI1Rm8
that is link, haven't tried it, have authentication apps i need to backup first
HolyAngel said:
I changed
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := F2FS
to
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := EXT4
in boardconfig and cache builds fine now. still compiling. will update when i know more.
IT BUILDS! Got output zip, will upload here for testing.
---------- Post added at 08:31 AM ---------- Previous post was at 08:04 AM ----------
https://drive.google.com/open?id=0B7UqGxB-q5f3VVh1d3dkUjI1Rm8
that is link, haven't tried it, have authentication apps i need to backup first
Click to expand...
Click to collapse
I did exactly what you did and it compiled successfully.
However, it did not boot into system.
Booted to bootloader.
I used Sultan's kernel as source though.
Maybe that's why?
inflames91 said:
I did exactly what you did and it compiled successfully.
However, it did not boot into system.
Booted to bootloader.
I used Sultan's kernel as source though.
Maybe that's why?
Click to expand...
Click to collapse
could possibly be kernel, i'm using akhilnarangs but haven't tried to boot it yet
HolyAngel said:
I changed
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := F2FS
to
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := EXT4
in boardconfig and cache builds fine now. still compiling. will update when i know more.
IT BUILDS! Got output zip, will upload here for testing.
---------- Post added at 08:31 AM ---------- Previous post was at 08:04 AM ----------
https://drive.google.com/open?id=0B7UqGxB-q5f3VVh1d3dkUjI1Rm8
that is link, haven't tried it, have authentication apps i need to backup first
Click to expand...
Click to collapse
Does this boot?

Twrp (DEV-ONLY) compiling op6t (NEW-TEST) twrp-op6t-unified-test-0.6.img

I made this thread so all those trying to compile twrp for op6t can come together.
We can share ideas. What we have and have not got to work. What will work and what won't work.
Basically a thread where all information regarding twrp can be found in one location.
###########
#Please pm me #
##########
If using open source built roms and you have issues with twrp we may need to modify source in the rom or our twrp source.
Please report to rom maker as well.
Things to include.
What source 9.0 or 8.1
Compiling errors.
Post #2
Is where the download links are kept and updated.
Post #3 is where the other variations of twrp for source built roms or ports will be available to download if needed.
New test. twrp-op6t-test-0.3.img TEST ONLY!
@Dameon87 & myself have been working on this recovery for a while. We think it will get better. There are still bugs and issues with twrp. We would like your feedback.
Thanks
I am not responsible for anything that can happen to your device.
Rebuilt and fully working mke2fs
Decryption works
Storage works.
Please test and let us know what works and what doesn't.
twrp-op6t-test-0.2.img
https://www.androidfilehost.com/?fid=11410963190603862182
Updated twrp
Added more functionality ability to flash all zips and Ota's
Backup and restore all partitions including data.
Twrp-op6t-test-0.3.img
https://www.androidfilehost.com/?fid=11410963190603871199
New test twrp-unified-0.4.img
Everything working as usual
Cleaned up source and added @mauronofrio notch theme
Twrp-0.4.img
https://www.androidfilehost.com/?fid=11410963190603875438
Twrp installer thanks to @mauronofrio
https://www.androidfilehost.com/?fid=11410963190603876589
Updated twrp to decrypt 9.0.10
Twrp-0.5.img
https://www.androidfilehost.com/?fid=11410963190603879261
Twrp installer
https://www.androidfilehost.com/?fid=11410963190603879262
New test
Fixed screenshot color when taking screen shots in recovery.
Fixed touch vibration.
Please test and report back.
Twrp-0.6.img
https://www.androidfilehost.com/?fid...63190603880512
Twrp installer
https://www.androidfilehost.com/?fid...63190603880513
Device source
https://github.com/TWINNFAMOUS/android_device_oneplus_fajita
Bootable recovery source
https://github.com/OP6T-TWRP/android_bootable_recovery
Hope you all enjoy
This is where I will keep other twrp variations if needed for all source built roms and ports for our device. When available these will only be meant for testing. Thanks
twinnfamous said:
I made this thread so all those trying to compile twrp for op6t can come together.
We can share ideas. What we have and have not got to work. What will work and what won't work.
Basically a thread where all information regarding twrp can be found in one location.
Things to include.
What source 9.0 or 8.1
Compiling errors.
Click to expand...
Click to collapse
You're from the HTC u11 life! You made that phone awesome while I had it. Good to see you here!
I'm trying to build with 8.1 source and I get errors so build doesn't finish.
Is there anyone that's building successfully with 8.1?
Me, can you explain what are you doing exactly? Which source are you using?
mauronofrio said:
Me, can you explain what are you doing exactly? Which source are you using?
Click to expand...
Click to collapse
I'm trying with full omni source on 8.1. I've used the device source from both op6 & op6t without modifying just to see if it would be and it fails. I'll post output error soon as I can.
I don't have issues building with 9.0 source after I modify device source but it won't boot to twrp just stock recovery like it's not selecting the rite slot
twinnfamous said:
I'm trying to build with 8.1 source and I get errors so build doesn't finish.
Is there anyone that's building successfully with 8.1?
Click to expand...
Click to collapse
Make sure if you're using a newer version of Ubuntu with GCC 7+ you do: export LC_ALL=C
That should get you past the initial build errors.
Dameon87 said:
Make sure if you're using a newer version of Ubuntu with GCC 7+ you do: export LC_ALL=C
That should get you past the initial build errors.
Click to expand...
Click to collapse
Thanks for the info. I upgraded to linuxmint19 Recently. Guess I didn't pay attention to the changelog.
You also need to change two lines in the build/tools/buildinfo.sh :
echo "ro.build.version.release=$PLATFORM_VERSION"
echo "ro.build.version.security_patch=$PLATFORM_SECURITY_PATCH"
to:
echo "ro.build.version.release_orig=$PLATFORM_VERSION"
echo "ro.build.version.security_patch_orig=$PLATFORM_SECURITY_PATCH"
Dameon87 said:
You also need to change two lines in the build/tools/buildinfo.sh :
echo "ro.build.version.release=$PLATFORM_VERSION"
echo "ro.build.version.security_patch=$PLATFORM_SECURITY_PATCH"
to:
echo "ro.build.version.release_orig=$PLATFORM_VERSION"
echo "ro.build.version.security_patch_orig=$PLATFORM_SECURITY_PATCH"
Click to expand...
Click to collapse
And you need to increase the PLATFORM_VERSION to 16.1.0 ( in the new pixel 3 TWRPs is used 16 ) in build/core/version_defaults.mk to override Google's anti-rollback features
Dameon87 said:
You also need to change two lines in the build/tools/buildinfo.sh :
echo "ro.build.version.release=$PLATFORM_VERSION"
echo "ro.build.version.security_patch=$PLATFORM_SECURITY_PATCH"
to:
echo "ro.build.version.release_orig=$PLATFORM_VERSION"
echo "ro.build.version.security_patch_orig=$PLATFORM_SECURITY_PATCH"
Click to expand...
Click to collapse
mauronofrio said:
And you need to increase the PLATFORM_VERSION to 16.1.0 ( in the new pixel 3 TWRPs is used 16 ) in build/core/version_defaults.mk to override Google's anti-rollback features
Click to expand...
Click to collapse
The only issue I found was my lack of awareness. Ive been fighting with the 8.1 source all because the newer os I installed. I'm testing things out.
One thing I know is if the security patch level and date doesn't match what's in the phone then decryption won't work.
So I'm starting there.
I pulled this log from the phone it's only a part of it.
I've been trying everything and this is where it fails at in recovery.
e4crypt_initialize_global_de fail
So I started looking at any logs I can find in the phone and found this. Thought it might be helpful.
All the de folder locations are in the log
Also we use keymaster 4 that shows in The log as well.
I'm still using 8.1 source with 9.0 bootable recovery.
I'm thinking of focusing on trying to get get it to work with 9.0 source.
Log.
Mount system_root for mountting system
[ 1.120382] e4crypt_initialize_global_de
[ 1.120509] Keyring created with id 744456481 in process 530
[ 1.126746] I:List of Keymaster HALs found:
[ 1.126902] I:Keymaster HAL #1: Keymaster HAL: 4 from QTI SecurityLevel: TRUSTED_ENVIRONMENT HAL: [email protected]::IKeymasterDevice/default
[ 1.141729] Using Keymaster HAL: 4 from QTI for encryption. Security level:TRUSTED_ENVIRONMENT , HAL: [email protected]::IKeymasterDevice / defaulte4crypt_init_user0
[ 1.147584] Skipping non-de-key .
[ 1.147590] Skipping non-de-key ..
[ 1.152120] I:List of Keymaster HALs found:
[ 1.152266] I:Keymaster HAL #1: Keymaster HAL: 4 from QTI SecurityLevel: TRUSTED_ENVIRONMENT HAL: [email protected]::IKeymasterDevice/default
[ 1.160865] Using Keymaster HAL: 4 from QTI for encryption. Security level:TRUSTED_ENVIRONMENT , HAL: [email protected]::IKeymasterDevice / defaultInstalled de key for user 0
[ 1.160871] e4crypt_prepare_user_storage
[ 1.166977] ensure policy /data/system_de/0
[ 1.167599] I:Found policy 8372743e0b3d7924 at /data/system_de/0 which matches expected value
[ 1.167608] ensure policy /data/misc_de/0
[ 1.168197] I:Found policy 8372743e0b3d7924 at /data/misc_de/0 which matches expected value
[ 1.168206] ensure policy /data/user_de/0
[ 1.169338] I:Found policy 8372743e0b3d7924 at /data/user_de/0 which matches expected value
[ 1.358232] I:FBE enable...
[ 1.358334] Unable to locate gatekeeper password file '/data/system/gatekeeper.pattern.key'
[ 1.358412] (4294937945 ticks)(pid:530)[bootable/recovery/oem/src/main/oem.cpp]tree_init:90:efault password, decrept...
[ 1.358454] Unable to locate gatekeeper password file '/data/system/gatekeeper.pattern.key'
[ 1.358516] Skipping non-key .
[ 1.358549] Skipping non-key ..
[ 1.364930] I:List of Keymaster HALs found:
[ 1.365014] I:Keymaster HAL #1: Keymaster HAL: 4 from QTI SecurityLevel: TRUSTED_ENVIRONMENT HAL: [email protected]::IKeymasterDevice/default
[ 1.373672] Using Keymaster HAL: 4 from QTI for encryption. Security level:TRUSTED_ENVIRONMENT , HAL: [email protected]::IKeymasterDevice / defaultSuccessfully retrieved key
[ 1.373733] Installed ce key for user 0
[ 1.373765] e4crypt_prepare_user_storage
[ 1.377707] ensure policy /data/system_ce/0
[ 1.378426] I:Found policy d0acf3009500dfb4 at /data/system_ce/0 which matches expected value
[ 1.378462] ensure policy /data/misc_ce/0
[ 1.379037] I:Found policy d0acf3009500dfb4 at /data/misc_ce/0 which matches expected value
[ 1.379069] ensure policy /data/data
[ 1.380547] I:Found policy d0acf3009500dfb4 at /data/data which matches expected value
[ 1.380597] Decrypted Successfully!
twinnfamous said:
I pulled this log from the phone it's only a part of it.
I've been trying everything and this is where it fails at in recovery.
e4crypt_initialize_global_de fail
So I started looking at any logs I can find in the phone and found this. Thought it might be helpful.
All the de folder locations are in the log
Also we use keymaster 4 that shows in The log as well.
I'm still using 8.1 source with 9.0 bootable recovery.
I'm thinking of focusing on trying to get get it to work with 9.0 source.
Log.
Mount system_root for mountting system
[ 1.120382] e4crypt_initialize_global_de
[ 1.120509] Keyring created with id 744456481 in process 530
[ 1.126746] I:List of Keymaster HALs found:
[ 1.126902] I:Keymaster HAL #1: Keymaster HAL: 4 from QTI SecurityLevel: TRUSTED_ENVIRONMENT HAL: [email protected]::IKeymasterDevice/default
[ 1.141729] Using Keymaster HAL: 4 from QTI for encryption. Security level:TRUSTED_ENVIRONMENT , HAL: [email protected]::IKeymasterDevice / defaulte4crypt_init_user0
[ 1.147584] Skipping non-de-key .
[ 1.147590] Skipping non-de-key ..
[ 1.152120] I:List of Keymaster HALs found:
[ 1.152266] I:Keymaster HAL #1: Keymaster HAL: 4 from QTI SecurityLevel: TRUSTED_ENVIRONMENT HAL: [email protected]::IKeymasterDevice/default
[ 1.160865] Using Keymaster HAL: 4 from QTI for encryption. Security level:TRUSTED_ENVIRONMENT , HAL: [email protected]::IKeymasterDevice / defaultInstalled de key for user 0
[ 1.160871] e4crypt_prepare_user_storage
[ 1.166977] ensure policy /data/system_de/0
[ 1.167599] I:Found policy 8372743e0b3d7924 at /data/system_de/0 which matches expected value
[ 1.167608] ensure policy /data/misc_de/0
[ 1.168197] I:Found policy 8372743e0b3d7924 at /data/misc_de/0 which matches expected value
[ 1.168206] ensure policy /data/user_de/0
[ 1.169338] I:Found policy 8372743e0b3d7924 at /data/user_de/0 which matches expected value
[ 1.358232] I:FBE enable...
[ 1.358334] Unable to locate gatekeeper password file '/data/system/gatekeeper.pattern.key'
[ 1.358412] (4294937945 ticks)(pid:530)[bootable/recovery/oem/src/main/oem.cpp]tree_init:90:efault password, decrept...
[ 1.358454] Unable to locate gatekeeper password file '/data/system/gatekeeper.pattern.key'
[ 1.358516] Skipping non-key .
[ 1.358549] Skipping non-key ..
[ 1.364930] I:List of Keymaster HALs found:
[ 1.365014] I:Keymaster HAL #1: Keymaster HAL: 4 from QTI SecurityLevel: TRUSTED_ENVIRONMENT HAL: [email protected]::IKeymasterDevice/default
[ 1.373672] Using Keymaster HAL: 4 from QTI for encryption. Security level:TRUSTED_ENVIRONMENT , HAL: [email protected]::IKeymasterDevice / defaultSuccessfully retrieved key
[ 1.373733] Installed ce key for user 0
[ 1.373765] e4crypt_prepare_user_storage
[ 1.377707] ensure policy /data/system_ce/0
[ 1.378426] I:Found policy d0acf3009500dfb4 at /data/system_ce/0 which matches expected value
[ 1.378462] ensure policy /data/misc_ce/0
[ 1.379037] I:Found policy d0acf3009500dfb4 at /data/misc_ce/0 which matches expected value
[ 1.379069] ensure policy /data/data
[ 1.380547] I:Found policy d0acf3009500dfb4 at /data/data which matches expected value
[ 1.380597] Decrypted Successfully!
Click to expand...
Click to collapse
Was this taken from the default/stock recovery or just a standard boot? I've been using the twrp-8.1 branch (Which uses android_bootable_recovery 9.0 branch by default now). I've tried a multitude of things, but I simply just get the e4crypt_initialize_global_de fail error as well. I think the way things are done for the Pixel 3/XL are the way to proceed, but aside the device tree we don't have much else to go on.
Dameon87 said:
Was this taken from the default/stock recovery or just a standard boot? I've been using the twrp-8.1 branch (Which uses android_bootable_recovery 9.0 branch by default now). I've tried a multitude of things, but I simply just get the e4crypt_initialize_global_de fail error as well. I think the way things are done for the Pixel 3/XL are the way to proceed, but aside the device tree we don't have much else to go on.
Click to expand...
Click to collapse
Maybe Fstab files need modifying
The recovery.fstab I pulled out of the boot.Img has a data partition labeled f2fs
And a Data partition labeled ext4
twinnfamous said:
Maybe Fstab files need modifying
The recovery.fstab I pulled out of the boot.Img has a data partition labeled f2fs
And a Data partition labeled ext4
Click to expand...
Click to collapse
Already tried that but I didn't really get anything different. There's a few issues that are happening I think.
Dmesg repeats this over and over and over:
<3>[19700123_15:34:23.729788]@4 FG: fg_psy_get_property: unsupported property 27
<14>[19700123_15:34:26.049860]@4 init: starting service 'boot-1-0'...
<11>[19700123_15:34:26.050060]@4 init: property_set("ro.boottime.boot-1-0", "798060609590") failed: property already set
<11>[19700123_15:34:26.050448]@0 init: cannot execve('/sbin/[email protected]'): No such file or directory
<14>[19700123_15:34:26.051342]@4 init: Sending signal 9 to service 'boot-1-0' (pid 762) process group...
<14>[19700123_15:34:26.051372]@4 init: Successfully killed process cgroup uid 0 pid 762 in 0ms
Then just getting this according to the recovery.log:
I:File Based Encryption is present
e4crypt_initialize_global_de returned fail
e4crypt_initialize_global_de returned fail
e4crypt_initialize_global_de returned fail
Dameon87 said:
Already tried that but I didn't really get anything different. There's a few issues that are happening I think.
Dmesg repeats this over and over and over:
<3>[19700123_15:34:23.729788]@4 FG: fg_psy_get_property: unsupported property 27
<14>[19700123_15:34:26.049860]@4 init: starting service 'boot-1-0'...
<11>[19700123_15:34:26.050060]@4 init: property_set("ro.boottime.boot-1-0", "798060609590") failed: property already set
<11>[19700123_15:34:26.050448]@0 init: cannot execve('/sbin/[email protected]'): No such file or directory
<14>[19700123_15:34:26.051342]@4 init: Sending signal 9 to service 'boot-1-0' (pid 762) process group...
<14>[19700123_15:34:26.051372]@4 init: Successfully killed process cgroup uid 0 pid 762 in 0ms
Then just getting this according to the recovery.log:
I:File Based Encryption is present
e4crypt_initialize_global_de returned fail
e4crypt_initialize_global_de returned fail
e4crypt_initialize_global_de returned fail
Click to expand...
Click to collapse
This is probably why it won't even boot twrp built with 9.0
twinnfamous said:
This is probably why it won't even boot twrp built with 9.0
Click to expand...
Click to collapse
Are you doing a minimal build env, or pulling in the entire Omni tree? There is only a twrp-8.1 branch for the minimal manifest, but that does pull in android_bootable_recovery 9.0 branch. I can get both to compile and boot fine.
Dameon87 said:
Are you doing a minimal build env, or pulling in the entire Omni tree? There is only a twrp-8.1 branch for the minimal manifest, but that does pull in android_bootable_recovery 9.0 branch. I can get both to compile and boot fine.
Click to expand...
Click to collapse
Full sources on both 8.1 and 9.0
twinnfamous said:
Full sources on both 8.1 and 9.0
Click to expand...
Click to collapse
Alright I'm doing a full sync of the omni repo and will give that a try next. I had been just using the minimal manifest.

Building Spark OS with manjaro and can't properly build kernel coral/flame

I'm seeming to have a problem where it doesn't seem to build the dtbo.img. I assume it's because of a symlink problem, but I'm not sure how to solve it...
Here is the full log
Trying dependencies-only mode on a non-existing device tree?
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
SPARK_VERSION=Spark-vIgnite-flame-Unofficial-vanilla-20220228
TARGET_PRODUCT=spark_flame
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-2a
TARGET_CPU_VARIANT=cortex-a76
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a76
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.16.9-xanmod0-rog-1-x86_64-Manjaro-Linux
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=RQ3A.210905.001
OUT_DIR=/home/tech180/android/spark/out
PRODUCT_SOONG_NAMESPACES=hardware/google/av hardware/google/camera hardware/google/interfaces hardware/google/pixel device/google/coral hardware/qcom/sm8150/display hardware/qcom/sm8150/data/ipacfg-mgr hardware/qcom/sm8150/gps vendor/google/airbrush/floral vendor/google/biometrics/face vendor/google/camera vendor/google/darwinn vendor/qcom/sm8150 vendor/qcom/sm8150/proprietary/commonsys/telephony-apps/DataStatusNotification vendor/qcom/sm8150/proprietary/gps vendor/qcom/sm8150/codeaurora/location vendor/google/interfaces vendor/qcom/sensors vendor/google/tools/sensors vendor/qcom/sm7250/codeaurora/commonsys/telephony/ims/ims-ext-common vendor/qcom/sm7250/codeaurora/dataservices/rmnetctl vendor/qcom/sm7250/proprietary/commonsys/qcrilOemHook vendor/qcom/sm7250/proprietary/commonsys/telephony-apps/ims vendor/qcom/sm7250/proprietary/commonsys/telephony-apps/QtiTelephonyService vendor/qcom/sm7250/proprietary/commonsys/telephony-apps/xdivert vendor/qcom/sm7250/proprietary/qcril-data-hal vendor/qcom/sm7250/proprietary/qcril-hal vendor/qcom/sm7250/proprietary/data vendor/qcom/opensource/commonsys-intf/display vendor/google/flame packages/apps/Bluetooth frameworks/av/camera/cameraserver frameworks/av/services/camera/libcameraservice
============================================
[1mvendor/spark/config/common.mk:140: [35mwarning: [0m[1m"TARGET_BOOT_ANIMATION_RES is undefined, assuming 1080p"[0m
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
SPARK_VERSION=Spark-vIgnite-flame-Unofficial-vanilla-20220228
TARGET_PRODUCT=spark_flame
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-2a
TARGET_CPU_VARIANT=cortex-a76
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a76
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.16.9-xanmod0-rog-1-x86_64-Manjaro-Linux
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=RQ3A.210905.001
OUT_DIR=/home/tech180/android/spark/out
PRODUCT_SOONG_NAMESPACES=hardware/google/av hardware/google/camera hardware/google/interfaces hardware/google/pixel device/google/coral hardware/qcom/sm8150/display hardware/qcom/sm8150/data/ipacfg-mgr hardware/qcom/sm8150/gps vendor/google/airbrush/floral vendor/google/biometrics/face vendor/google/camera vendor/google/darwinn vendor/qcom/sm8150 vendor/qcom/sm8150/proprietary/commonsys/telephony-apps/DataStatusNotification vendor/qcom/sm8150/proprietary/gps vendor/qcom/sm8150/codeaurora/location vendor/google/interfaces vendor/qcom/sensors vendor/google/tools/sensors vendor/qcom/sm7250/codeaurora/commonsys/telephony/ims/ims-ext-common vendor/qcom/sm7250/codeaurora/dataservices/rmnetctl vendor/qcom/sm7250/proprietary/commonsys/qcrilOemHook vendor/qcom/sm7250/proprietary/commonsys/telephony-apps/ims vendor/qcom/sm7250/proprietary/commonsys/telephony-apps/QtiTelephonyService vendor/qcom/sm7250/proprietary/commonsys/telephony-apps/xdivert vendor/qcom/sm7250/proprietary/qcril-data-hal vendor/qcom/sm7250/proprietary/qcril-hal vendor/qcom/sm7250/proprietary/data vendor/qcom/opensource/commonsys-intf/display vendor/google/flame packages/apps/Bluetooth frameworks/av/camera/cameraserver frameworks/av/services/camera/libcameraservice
============================================
...
[ 3% 3908/102649] //bionic/libc:libc.llndk versioner preprocess include
warning: attempted to generate guard with empty availability: obsoleted = 21
warning: attempted to generate guard with empty availability: obsoleted = 23
[ 3% 3909/102649] //system/core/base:libbase clang++ logging.cpp
[ 3% 3910/102649] //external/libcxx:libc++_static clang++ src/condition_variable.cpp
[ 3% 3911/102649] //bionic/libc:crtbegin_dynamic1 clang arch-common/bionic/crtbegin.c [apex29]
[ 3% 3912/102649] //bionic/libc:crtbegin_so1 clang arch-common/bionic/crtbegin_so.c [apex29]
[ 3% 3913/102649] //bionic/libc:crtend_so clang arch-common/bionic/crtend_so.S [apex29]
[ 3% 3914/102649] //bionic/libc:crtbrand clang arch-common/bionic/crtbrand.S [apex29]
[ 3% 3915/102649] //bionic/libc:crtend_android clang arch-common/bionic/crtend.S [apex29]
[ 3% 3916/102649] //bionic/libc:crtbegin_dynamic link crtbegin_dynamic.o [apex29]
[ 3% 3917/102649] //external/libcxx:libc++_static clang++ src/hash.cpp
[ 3% 3918/102649] //bionic/libc:crtbegin_so link crtbegin_so.o [apex29]
[ 3% 3919/102649] //bionic/libc:libc.llndk versioner preprocess include [arm]
warning: attempted to generate guard with empty availability: obsoleted = 21
warning: attempted to generate guard with empty availability: obsoleted = 23
[ 3% 3920/102649] //external/flac/libFLAC:libFLAC clang bitmath.c [apex29]
[ 3% 3921/102649] //bionic/libc:libc.llndk versioner preprocess include [arm]
warning: attempted to generate guard with empty availability: obsoleted = 21
warning: attempted to generate guard with empty availability: obsoleted = 23
[ 3% 3922/102649] target thumb C: libtunnel_32 <= hardware/knowles/athletico/sound_trigger_hal/tunnel.c
FAILED: /home/tech180/android/spark/out/target/product/flame/obj_arm/SHARED_LIBRARIES/libtunnel_intermediates/tunnel.o
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-r383902b1/bin/clang -I hardware/knowles/athletico/sound_trigger_hal -I /home/tech180/android/spark/out/target/product/flame/obj_arm/SHARED_LIBRARIES/libtunnel_intermediates -I /home/tech180/android/spark/out/target/product/flame/gen/SHARED_LIBRARIES/libtunnel_intermediates -Isystem/core/liblog/include_vndk -Isystem/core/libcutils/include_vndk -Isystem/core/libprocessgroup/include -Isystem/core/libcutils/include -Iexternal/libcxx/include -Iexternal/libcxxabi/include -isystem /home/tech180/android/spark/out/soong/.intermediates/bionic/libc/libc.llndk/android_vendor.30_arm_armv8-a_cortex-a76_shared/gen/include -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm -Iexternal/libcxxabi/include -isystem /home/tech180/android/spark/out/target/product/flame/obj/include -c -fomit-frame-pointer -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -Werror=date-time -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -faddrsig -Werror=int-conversion -fexperimental-new-pass-manager -Wno-reserved-id-macro -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-sign-compare -Wno-defaulted-function-deleted -Wno-inconsistent-missing-override -Wno-c99-designator -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=format-security -nostdlibinc -msoft-float -march=armv8-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 -mcpu=cortex-a55 -mfpu=neon-fp-armv8 -D__ARM_FEATURE_LPAE=1 -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -std=gnu99 -mthumb -Os -Wall -Werror -DDO_NOT_CHECK_MANUAL_BINDER_INTERFACES -D__ANDROID_VNDK__ -fPIC -DANDROID_STRICT -target armv7a-linux-androideabi30 -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=fortify-source -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type-limit-compare -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-int-in-bool-context -Wno-sizeof-array-div -Wno-tautological-overlap-compare -Wno-deprecated-copy -Wno-range-loop-construct -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-string-compare -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-pessimizing-move -MD -MF /home/tech180/android/spark/out/target/product/flame/obj_arm/SHARED_LIBRARIES/libtunnel_intermediates/tunnel.d -o /home/tech180/android/spark/out/target/product/flame/obj_arm/SHARED_LIBRARIES/libtunnel_intermediates/tunnel.o hardware/knowles/athletico/sound_trigger_hal/tunnel.c"
hardware/knowles/athletico/sound_trigger_hal/tunnel.c:28:10: fatal error: 'linux/mfd/adnc/iaxxx-tunnel-intf.h' file not found
#include <linux/mfd/adnc/iaxxx-tunnel-intf.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[ 3% 3923/102649] target thumb C: adnc_strm.primary.default_32 <= hardware/knowles/athletico/sound_trigger_hal/adnc_strm.c
FAILED: /home/tech180/android/spark/out/target/product/flame/obj_arm/SHARED_LIBRARIES/adnc_strm.primary.default_intermediates/adnc_strm.o
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-r383902b1/bin/clang -I hardware/knowles/athletico/sound_trigger_hal -I /home/tech180/android/spark/out/target/product/flame/obj_arm/SHARED_LIBRARIES/adnc_strm.primary.default_intermediates -I /home/tech180/android/spark/out/target/product/flame/gen/SHARED_LIBRARIES/adnc_strm.primary.default_intermediates -Isystem/core/liblog/include_vndk -Isystem/core/libcutils/include_vndk -Isystem/core/libprocessgroup/include -Isystem/core/libcutils/include -Iexternal/tinyalsa/include -Iexternal/tinyalsa/include -Iexternal/libcxx/include -Iexternal/libcxxabi/include -isystem /home/tech180/android/spark/out/soong/.intermediates/bionic/libc/libc.llndk/android_vendor.30_arm_armv8-a_cortex-a76_shared/gen/include -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm -Iexternal/libcxxabi/include -isystem /home/tech180/android/spark/out/target/product/flame/obj/include -c -fomit-frame-pointer -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -Werror=date-time -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -faddrsig -Werror=int-conversion -fexperimental-new-pass-manager -Wno-reserved-id-macro -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-sign-compare -Wno-defaulted-function-deleted -Wno-inconsistent-missing-override -Wno-c99-designator -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=format-security -nostdlibinc -msoft-float -march=armv8-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 -mcpu=cortex-a55 -mfpu=neon-fp-armv8 -D__ARM_FEATURE_LPAE=1 -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -std=gnu99 -mthumb -Os -Wall -Werror -DDO_NOT_CHECK_MANUAL_BINDER_INTERFACES -D__ANDROID_VNDK__ -fPIC -DANDROID_STRICT -target armv7a-linux-androideabi30 -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=fortify-source -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type-limit-compare -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-int-in-bool-context -Wno-sizeof-array-div -Wno-tautological-overlap-compare -Wno-deprecated-copy -Wno-range-loop-construct -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-string-compare -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-pessimizing-move -MD -MF /home/tech180/android/spark/out/target/product/flame/obj_arm/SHARED_LIBRARIES/adnc_strm.primary.default_intermediates/adnc_strm.d -o /home/tech180/android/spark/out/target/product/flame/obj_arm/SHARED_LIBRARIES/adnc_strm.primary.default_intermediates/adnc_strm.o hardware/knowles/athletico/sound_trigger_hal/adnc_strm.c"
hardware/knowles/athletico/sound_trigger_hal/adnc_strm.c:30:10: fatal error: 'linux/mfd/adnc/iaxxx-system-identifiers.h' file not found
#include <linux/mfd/adnc/iaxxx-system-identifiers.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[ 3% 3924/102649] //system/core/base:libbase clang++ strings.cpp
[ 3% 3925/102649] //external/flac/libFLAC:libFLAC clang bitwriter.c [apex29]
[ 3% 3926/102649] //external/libcxx:libc++_static clang++ src/future.cpp
[ 3% 3927/102649] //external/flac/libFLAC:libFLAC clang bitreader.c [apex29]
[ 3% 3928/102649] target thumb C++: gralloc.default_32 <= hardware/libhardware/modules/gralloc/gralloc.cpp
[ 3% 3929/102649] //bionic/libc:libc.llndk versioner preprocess include
warning: attempted to generate guard with empty availability: obsoleted = 21
warning: attempted to generate guard with empty availability: obsoleted = 23
[ 3% 3930/102649] build /home/tech180/android/spark/out/target/product/flame/dtb.img
FAILED: /home/tech180/android/spark/out/target/product/flame/dtb.img
/bin/bash -c "(echo -e \"\\033[32m\"\"Building DTBs\"\"\\033[0m\" ) && (PATH=/home/tech180/android/spark/prebuilts/jdk/jdk11/linux-x86/bin:/home/tech180/android/spark/prebuilts/jdk/jdk11/linux-x86/bin:/home/tech180/android/spark/out/soong/host/linux-x86/bin:/home/tech180/android/spark/out/host/linux-x86/bin:/home/tech180/android/spark/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/tech180/android/spark/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/tech180/android/spark/development/scripts:/home/tech180/android/spark/prebuilts/devtools/tools:/home/tech180/android/spark/external/selinux/prebuilts/bin:/home/tech180/android/spark/prebuilts/misc/linux-x86/dtc:/home/tech180/android/spark/prebuilts/misc/linux-x86/libufdt:/home/tech180/android/spark/prebuilts/clang/host/linux-x86/llvm-binutils-stable:/home/tech180/android/spark/prebuilts/android-emulator/linux-x86_64:/home/tech180/android/spark/prebuilts/asuite/acloud/linux-x86:/home/tech180/android/spark/prebuilts/asuite/aidegen/linux-x86:/home/tech180/android/spark/prebuilts/asuite/atest/linux-x86:/home/tech180/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/home/tech180/.dotnet/tools:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin:\$PATH PATH=/home/tech180/android/spark/prebuilts/clang/host/linux-x86/clang-r383902b1/bin:\$PATH LD_LIBRARY_PATH=/home/tech180/android/spark/prebuilts/clang/host/linux-x86/clang-r383902b1/lib64:\$LD_LIBRARY_PATH PATH=//bin:\$PATH prebuilts/build-tools/linux-x86/bin/make -j16 CFLAGS_MODULE=\"-fno-pic\" DTC=/home/tech180/android/spark/prebuilts/tools-lineage/linux-x86/dtc/dtc MKDTIMG=/home/tech180/android/spark/prebuilts/misc/linux-x86/libufdt/mkdtimg -C kernel/google/coral O=/home/tech180/android/spark/out/target/product/flame/dtbs ARCH=arm64 CROSS_COMPILE=\"aarch64-linux-android-\" CROSS_COMPILE_ARM32=\"arm-linux-androideabi-\" CLANG_TRIPLE=aarch64-linux-gnu- CC=\" /home/tech180/android/spark/prebuilts/clang/host/linux-x86/clang-r383902b1/bin/clang\" KERNEL_THINLTO_CACHE_PATH=\"/home/tech180/android/spark//home/tech180/android/spark/out/target/product/flame/obj/KERNEL_THINLTO-CACHE\" floral_defconfig ) && (PATH=/home/tech180/android/spark/prebuilts/jdk/jdk11/linux-x86/bin:/home/tech180/android/spark/prebuilts/jdk/jdk11/linux-x86/bin:/home/tech180/android/spark/out/soong/host/linux-x86/bin:/home/tech180/android/spark/out/host/linux-x86/bin:/home/tech180/android/spark/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/tech180/android/spark/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/tech180/android/spark/development/scripts:/home/tech180/android/spark/prebuilts/devtools/tools:/home/tech180/android/spark/external/selinux/prebuilts/bin:/home/tech180/android/spark/prebuilts/misc/linux-x86/dtc:/home/tech180/android/spark/prebuilts/misc/linux-x86/libufdt:/home/tech180/android/spark/prebuilts/clang/host/linux-x86/llvm-binutils-stable:/home/tech180/android/spark/prebuilts/android-emulator/linux-x86_64:/home/tech180/android/spark/prebuilts/asuite/acloud/linux-x86:/home/tech180/android/spark/prebuilts/asuite/aidegen/linux-x86:/home/tech180/android/spark/prebuilts/asuite/atest/linux-x86:/home/tech180/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/home/tech180/.dotnet/tools:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin:\$PATH PATH=/home/tech180/android/spark/prebuilts/clang/host/linux-x86/clang-r383902b1/bin:\$PATH LD_LIBRARY_PATH=/home/tech180/android/spark/prebuilts/clang/host/linux-x86/clang-r383902b1/lib64:\$LD_LIBRARY_PATH PATH=//bin:\$PATH prebuilts/build-tools/linux-x86/bin/make -j16 CFLAGS_MODULE=\"-fno-pic\" DTC=/home/tech180/android/spark/prebuilts/tools-lineage/linux-x86/dtc/dtc MKDTIMG=/home/tech180/android/spark/prebuilts/misc/linux-x86/libufdt/mkdtimg -C kernel/google/coral O=/home/tech180/android/spark/out/target/product/flame/dtbs ARCH=arm64 CROSS_COMPILE=\"aarch64-linux-android-\" CROSS_COMPILE_ARM32=\"arm-linux-androideabi-\" CLANG_TRIPLE=aarch64-linux-gnu- CC=\" /home/tech180/android/spark/prebuilts/clang/host/linux-x86/clang-r383902b1/bin/clang\" KERNEL_THINLTO_CACHE_PATH=\"/home/tech180/android/spark//home/tech180/android/spark/out/target/product/flame/obj/KERNEL_THINLTO-CACHE\" dtbs ) && (cat \$(find /home/tech180/android/spark/out/target/product/flame/dtbs/arch/arm64/boot/dts/** -type f -name \"*.dtb\" | sort) > /home/tech180/android/spark/out/target/product/flame/dtb.img )"
Building DTBs
make: Entering directory '/home/tech180/android/spark/kernel/google/coral'
make[1]: Entering directory '/home/tech180/android/spark/out/target/product/flame/dtbs'
GEN ./Makefile
#
# configuration written to .config
#
make[1]: Leaving directory '/home/tech180/android/spark/out/target/product/flame/dtbs'
make: Leaving directory '/home/tech180/android/spark/kernel/google/coral'
make: Entering directory '/home/tech180/android/spark/kernel/google/coral'
make[1]: Entering directory '/home/tech180/android/spark/out/target/product/flame/dtbs'
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config/kernel.release
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
CHK scripts/mod/devicetable-offsets.h
Using /home/tech180/android/spark/kernel/google/coral as source for kernel
CHK include/generated/utsrelease.h
CHK include/generated/timeconst.h
CHK include/generated/bounds.h
CHK include/generated/asm-offsets.h
CALL /home/tech180/android/spark/kernel/google/coral/scripts/checksyscalls.sh
DTC arch/arm64/boot/dts/google/qcom-base/sm8150-v2.dtb
DTC arch/arm64/boot/dts/google/qcom-base/sm8150.dtb
/bin/sh: line 1: /home/tech180/android/spark/prebuilts/tools-lineage/linux-x86/dtc/dtc: No such file or directory
/bin/sh: line 1: /home/tech180/android/spark/prebuilts/tools-lineage/linux-x86/dtc/dtc: No such file or directory
make[3]: *** [scripts/Makefile.lib:325: arch/arm64/boot/dts/google/qcom-base/sm8150-v2.dtb] Error 127
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.lib:325: arch/arm64/boot/dts/google/qcom-base/sm8150.dtb] Error 127
make[2]: *** [/home/tech180/android/spark/kernel/google/coral/scripts/Makefile.build:678: arch/arm64/boot/dts/google] Error 2
make[1]: *** [arch/arm64/Makefile:236: dtbs] Error 2
make[1]: Leaving directory '/home/tech180/android/spark/out/target/product/flame/dtbs'
make: *** [Makefile:146: sub-make] Error 2
make: Leaving directory '/home/tech180/android/spark/kernel/google/coral'
[ 3% 3931/102649] //external/libcxx:libc++_static clang++ src/iostream.cpp
[ 3% 3932/102649] build /home/tech180/android/spark/out/target/product/flame/dtbo/arch/arm64/boot/dtbo.img
FAILED: /home/tech180/android/spark/out/target/product/flame/dtbo/arch/arm64/boot/dtbo.img
/bin/bash -c "(echo -e \"\\033[32m\"\"Building DTBO.img\"\"\\033[0m\" ) && (PATH=/home/tech180/android/spark/prebuilts/jdk/jdk11/linux-x86/bin:/home/tech180/android/spark/prebuilts/jdk/jdk11/linux-x86/bin:/home/tech180/android/spark/out/soong/host/linux-x86/bin:/home/tech180/android/spark/out/host/linux-x86/bin:/home/tech180/android/spark/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/tech180/android/spark/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/tech180/android/spark/development/scripts:/home/tech180/android/spark/prebuilts/devtools/tools:/home/tech180/android/spark/external/selinux/prebuilts/bin:/home/tech180/android/spark/prebuilts/misc/linux-x86/dtc:/home/tech180/android/spark/prebuilts/misc/linux-x86/libufdt:/home/tech180/android/spark/prebuilts/clang/host/linux-x86/llvm-binutils-stable:/home/tech180/android/spark/prebuilts/android-emulator/linux-x86_64:/home/tech180/android/spark/prebuilts/asuite/acloud/linux-x86:/home/tech180/android/spark/prebuilts/asuite/aidegen/linux-x86:/home/tech180/android/spark/prebuilts/asuite/atest/linux-x86:/home/tech180/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/home/tech180/.dotnet/tools:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin:\$PATH PATH=/home/tech180/android/spark/prebuilts/clang/host/linux-x86/clang-r383902b1/bin:\$PATH LD_LIBRARY_PATH=/home/tech180/android/spark/prebuilts/clang/host/linux-x86/clang-r383902b1/lib64:\$LD_LIBRARY_PATH PATH=//bin:\$PATH prebuilts/build-tools/linux-x86/bin/make -j16 CFLAGS_MODULE=\"-fno-pic\" DTC=/home/tech180/android/spark/prebuilts/tools-lineage/linux-x86/dtc/dtc MKDTIMG=/home/tech180/android/spark/prebuilts/misc/linux-x86/libufdt/mkdtimg -C kernel/google/coral O=/home/tech180/android/spark/out/target/product/flame/dtbo ARCH=arm64 CROSS_COMPILE=\"aarch64-linux-android-\" CROSS_COMPILE_ARM32=\"arm-linux-androideabi-\" CLANG_TRIPLE=aarch64-linux-gnu- CC=\" /home/tech180/android/spark/prebuilts/clang/host/linux-x86/clang-r383902b1/bin/clang\" KERNEL_THINLTO_CACHE_PATH=\"/home/tech180/android/spark//home/tech180/android/spark/out/target/product/flame/obj/KERNEL_THINLTO-CACHE\" floral_defconfig ) && (PATH=/home/tech180/android/spark/prebuilts/jdk/jdk11/linux-x86/bin:/home/tech180/android/spark/prebuilts/jdk/jdk11/linux-x86/bin:/home/tech180/android/spark/out/soong/host/linux-x86/bin:/home/tech180/android/spark/out/host/linux-x86/bin:/home/tech180/android/spark/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/tech180/android/spark/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/tech180/android/spark/development/scripts:/home/tech180/android/spark/prebuilts/devtools/tools:/home/tech180/android/spark/external/selinux/prebuilts/bin:/home/tech180/android/spark/prebuilts/misc/linux-x86/dtc:/home/tech180/android/spark/prebuilts/misc/linux-x86/libufdt:/home/tech180/android/spark/prebuilts/clang/host/linux-x86/llvm-binutils-stable:/home/tech180/android/spark/prebuilts/android-emulator/linux-x86_64:/home/tech180/android/spark/prebuilts/asuite/acloud/linux-x86:/home/tech180/android/spark/prebuilts/asuite/aidegen/linux-x86:/home/tech180/android/spark/prebuilts/asuite/atest/linux-x86:/home/tech180/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/home/tech180/.dotnet/tools:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin:\$PATH PATH=/home/tech180/android/spark/prebuilts/clang/host/linux-x86/clang-r383902b1/bin:\$PATH LD_LIBRARY_PATH=/home/tech180/android/spark/prebuilts/clang/host/linux-x86/clang-r383902b1/lib64:\$LD_LIBRARY_PATH PATH=//bin:\$PATH prebuilts/build-tools/linux-x86/bin/make -j16 CFLAGS_MODULE=\"-fno-pic\" DTC=/home/tech180/android/spark/prebuilts/tools-lineage/linux-x86/dtc/dtc MKDTIMG=/home/tech180/android/spark/prebuilts/misc/linux-x86/libufdt/mkdtimg -C kernel/google/coral O=/home/tech180/android/spark/out/target/product/flame/dtbo ARCH=arm64 CROSS_COMPILE=\"aarch64-linux-android-\" CROSS_COMPILE_ARM32=\"arm-linux-androideabi-\" CLANG_TRIPLE=aarch64-linux-gnu- CC=\" /home/tech180/android/spark/prebuilts/clang/host/linux-x86/clang-r383902b1/bin/clang\" KERNEL_THINLTO_CACHE_PATH=\"/home/tech180/android/spark//home/tech180/android/spark/out/target/product/flame/obj/KERNEL_THINLTO-CACHE\" dtbo.img )"
Building DTBO.img
make: Entering directory '/home/tech180/android/spark/kernel/google/coral'
make[1]: Entering directory '/home/tech180/android/spark/out/target/product/flame/dtbo'
GEN ./Makefile
#
# configuration written to .config
#
make[1]: Leaving directory '/home/tech180/android/spark/out/target/product/flame/dtbo'
make: Leaving directory '/home/tech180/android/spark/kernel/google/coral'
make: Entering directory '/home/tech180/android/spark/kernel/google/coral'
make[1]: Entering directory '/home/tech180/android/spark/out/target/product/flame/dtbo'
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config/kernel.release
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
CHK scripts/mod/devicetable-offsets.h
Using /home/tech180/android/spark/kernel/google/coral as source for kernel
CHK include/generated/utsrelease.h
CHK include/generated/timeconst.h
CHK include/generated/bounds.h
CHK include/generated/asm-offsets.h
CALL /home/tech180/android/spark/kernel/google/coral/scripts/checksyscalls.sh
DTC arch/arm64/boot/dts/google/qcom-base/sm8150-v2.dtb
DTC arch/arm64/boot/dts/google/qcom-base/sm8150.dtb
/bin/sh: line 1: /home/tech180/android/spark/prebuilts/tools-lineage/linux-x86/dtc/dtc: No such file or directory
make[3]: *** [scripts/Makefile.lib:325: arch/arm64/boot/dts/google/qcom-base/sm8150.dtb] Error 127
make[3]: *** Waiting for unfinished jobs....
/bin/sh: line 1: /home/tech180/android/spark/prebuilts/tools-lineage/linux-x86/dtc/dtc: No such file or directory
make[3]: *** [scripts/Makefile.lib:325: arch/arm64/boot/dts/google/qcom-base/sm8150-v2.dtb] Error 127
make[2]: *** [/home/tech180/android/spark/kernel/google/coral/scripts/Makefile.build:678: arch/arm64/boot/dts/google] Error 2
make[1]: *** [arch/arm64/Makefile:236: dtbs] Error 2
make[1]: Leaving directory '/home/tech180/android/spark/out/target/product/flame/dtbo'
make: *** [Makefile:146: sub-make] Error 2
make: Leaving directory '/home/tech180/android/spark/kernel/google/coral'
[ 3% 3933/102649] //external/libcxx:libc++_static clang++ src/debug.cpp
[ 3% 3934/102649] //system/memory/libmeminfo/libdmabufinfo/tools:dmabuf_dump clang++ dmabuf_dump.cpp
[ 3% 3935/102649] //external/libcxx:libc++_static clang++ src/algorithm.cpp
[ 3% 3936/102649] //external/libcxx:libc++_static clang++ src/ios.cpp
[ 3% 3937/102649] //external/libcxx:libc++_static clang++ src/locale.cpp
[ 3% 3938/102649] //external/fmtlib:fmtlib clang++ src/format.cc
[ 3% 3939/102649] //external/fmtlib:fmtlib clang++ src/format.cc [apex29]
00:40:48 ninja failed with: exit status 1
ninja: build stopped: subcommand failed.
[0;31m#### failed to build some targets (04:23 (mm:ss)) ####[00m
Any help would be greatly appreciated!
Hey did you get an answer? to this?
I am having the same error

Categories

Resources