Unable to build AOSP ROM - Android Q&A, Help & Troubleshooting

Hi,
as I started playing around to learn a little bit more about custom roms, sources, the building process etc. I wanted to build an AOSP ROM for myself to test, but while building I get this error everytime and I don't really know what is wrong or how to fix that.
Running the make -jN command as root doesn't help anything, neither changing the value from -j to 1
I followed the Sony AOSP build instructions guide (https://developer.sonymobile.com/op...uild-aosp-nougat-for-unlocked-xperia-devices/)
Does anyone know what is causing this and maybe how to fix this?
(I'm using Linuxmint 18.2 x64 and the device I want to build for is my Xperia X (SUZU) F5121)
Thanks
Here's whats causing the build process to stop:
[ 34% 12239/35670] build out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack
FAILED: /bin/bash -c "(mkdir -p out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack.tmpjill.res ) && (unzip -qo prebuilts/sdk/8/android.jar -d out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack.tmpjill.res ) && (find out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack.tmpjill.res -iname "*.class" -delete ) && (JACK_VERSION=3.36.CANDIDATE out/host/linux-x86/bin/jack @build/core/jack-default.args --verbose error -D jack.import.resource.policy=keep-first -D jack.import.type.policy=keep-first -D jack.android.min-api-level=1 --import prebuilts/sdk/8/android.jar --import-resource out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack.tmpjill.res --output-jack out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack ) && (rm -rf out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack.tmpjill.res )"
1 error during configuration. Try --help-properties for help.
Property 'jack.library.output.zip' (in Options): file 'out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack' can not be created (required because 'jack.library' (defined in Options) is set to true and 'jack.library.output.container' (defined in Options) is set to 'zip')
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: the rule for target „ninja_wrapper“ failed
make: *** [ninja_wrapper] Error 1

Related

AOSP Sony Project keeps failing at this step.

No private recovery resources for TARGET_DEVICE ivy
Starting build with ninja
ninja: Entering directory `.'
[ 0% 34/36264] build out/target/product/ivy/root/init.real
FAILED: /bin/bash -c "(cp out/target/product/ivy/utilities/toybox out/target/product/ivy/root/sbin/toybox_init ) && (cp out/target/product/ivy/utilities/keycheck out/target/product/ivy/root/sbin/keycheck ) && (cp out/target/product/ivy/utilities/init_sony out/target/product/ivy/root/sbin/init_sony ) && (if [ ! -L out/target/product/ivy/root/init ]; then echo "/init out/target/product/ivy/root/init isn't a symlink"; mv out/target/product/ivy/root/init out/target/product/ivy/root/init.real; ln -s sbin/init_sony out/target/product/ivy/root/init; else echo "/init out/target/product/ivy/root/init is already a symlink"; fi )"
cp: omitting directory 'out/target/product/ivy/utilities/toybox'
[ 0% 34/36264] Ensure Jack server is installed and started
Jack server already installed in "/root/.jack-server"
Server is already running
[ 0% 34/36264] target Pack Relocations: libLLVM (o..._LIBRARIES/libLLVM_intermediates/PACKED/libLLVM.so)
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
Click to expand...
Click to collapse
This is building for a Sony Xperia Z3+/Z4 D6533. The error I keep getting for builds is as above, with the toolbox, keycheck, and init_sony somehow ignored. Can someone help me get pass this error?

LineageOS 14.1 Build Error Please Help

I can't build LineageOS 14.1.
HP 15-ay012dx
Intel Core i5-6200U (2.3 GHz, Boost 2.8 GHz, Skylake)
Intel HD Graphics 520 (300 MHz, Boost 1 GHz)
DDR4 RAM 4GB, swap 4GB, Total 8GB
HGST 5400rpm 1TB HDD (Ubuntu Partition is 100GB)
Ubuntu 16.10 64-bit
This is my Computer Specification.
When i build CM13 it builds successfully, but if i build LineageOS 14.1 it fails.
This is the error log.
Please help.
[ 39% 13323/33791] Building with Jack: /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/classes.jack
FAILED: /bin/bash -c "(rm -f /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/classes.jack ) && (rm -rf /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc ) && (mkdir -p /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/ ) && (mkdir -p /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc ) && (rm -f /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list ) && (touch /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list ) && (echo -n 'frameworks/ex/common/java/com/android/common/LegacyHttpDateTime.java frameworks/ex/common/java/com/android/common/NetworkConnectivityListener.java frameworks/ex/common/java/com/android/common/OperationScheduler.java frameworks/ex/common/java/com/android/common/Rfc822InputFilter.java frameworks/ex/common/java/com/android/common/Rfc822Validator.java frameworks/ex/common/java/com/android/common/Search.java frameworks/ex/common/java/com/android/common/SharedPreferencesCompat.java frameworks/ex/common/java/com/android/common/contacts/BaseEmailAddressAdapter.java frameworks/ex/common/java/com/android/common/contacts/DataUsageStatUpdater.java frameworks/ex/common/java/com/android/common/content/ProjectionMap.java frameworks/ex/common/java/com/android/common/content/SQLiteContentProvider.java frameworks/ex/common/java/com/android/common/content/SyncStateContentProviderHelper.java frameworks/ex/common/java/com/android/common/io/MoreCloseables.java frameworks/ex/common/java/com/android/common/speech/LoggingEvents.java frameworks/ex/common/java/com/android/common/speech/Recognition.java frameworks/ex/common/java/com/android/common/userhappiness/UserHappinessSignals.java frameworks/ex/common/java/com/android/common/widget/CompositeCursorAdapter.java frameworks/ex/common/java/com/android/common/widget/GroupingListAdapter.java frameworks/ex/common/java/com/android/ex/editstyledtext/EditStyledText.java /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/src/java/com/android/common/GoogleLogTags.java ' >> /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list ) && (if [ -d "/home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/src" ]; then find /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/src -name '*.java' >> /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list; fi ) && (tr ' ' '\\n' < /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list | build/tools/normalize_path.py | sort -u > /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list-uniq ) && (if [ -s /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list-uniq ] ; then export tmpEcjArg="@/home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list-uniq"; else export tmpEcjArg=""; fi; JACK_VERSION=3.36.CANDIDATE /home/penguin97/android/system/out/host/linux-x86/bin/jack @build/core/jack-default.args --verbose error -g -D jack.java.source.version=1.7 --classpath /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack:/home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack -D jack.import.resource.policy=keep-first -D jack.import.type.policy=keep-first -D jack.android.min-api-level=8 --output-jack /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/classes.jack \$tmpEcjArg || ( rm -f /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/classes.jack ; exit 41 ) ) && (rm -f /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list ) && (mv /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list-uniq /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc.java-source-list )"
Communication error with Jack server (28). Try 'jack-diagnose'
[ 39% 13323/33791] Building with Jack: /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/with-local/classes.dex
Picked up _JAVA_OPTIONS: -Xmx4096m
Picked up _JAVA_OPTIONS: -Xmx4096m
[ 39% 13323/33791] build /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/sdk_v21_intermediates/classes.jack
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/penguin97/android/system'
#### make failed to build some targets (01:34:11 (hh:mm:ss)) ####

PPR2_181005_003 Marlin Build fails @96% ninja: build stopped: subcommand failed.

Newbie to android build. Wanted to build an image for my device (Pie) . started testing / building one for marlin (Lunch aosp_marlin-userdebug). The buid repeatedly fails at 96%. Need help. Environment has been setup on a virtual machine in hyper V environment (24GB Ram, AMD Phenom II 1100T,OS-150GB,100GB Swap,AND Build -300 GB- Complete hardware info at the end.
. bashrc modifications
export OUT_DIR_COMMON_BASE=/and/out
export PATH=$PATH:/and:/and/bin:/and/out:/and/aosp_PPR2_181005_003
export USE_CCACHE=1
export LC_ALL=C
export ANDROID_JACK_VM_ARGS="-Xmx8192m -Xms512m -Dfile.encoding=UTF-8 -XX:+TieredCompilation"
Error Messages
Warning: request a ThreadPool with 1 threads, but LLVM_ENABLE_THREADS has been turned off
[ 96% 85735/89212] target Strip (mini debug info): mdnsd (.../product/marlin/obj/EXECUTABLES/mdnsd_intermediates/mdnsd)
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-nm: /and/out/aosp_PPR2_181005_003/target/product/marlin/symbols/system/bin/mdnsd: no symbols
[ 96% 85765/89212] //frameworks/native/services/surfaceflinger:libsurfaceflinger link libsurfaceflinger.so [arm]
Warning: request a ThreadPool with 1 threads, but LLVM_ENABLE_THREADS has been turned off
[ 96% 85963/89212] Target boot image from recovery: /and/out/aosp_PPR2_181005_003/target/product/marlin/boot.img
cp: cannot stat ‘/and/out/aosp_PPR2_181005_003/target/product/marlin/root/init.recovery.*.rc’: No such file or directory
[ 96% 86223/89212] //art/runtime:libart link libart.so
Warning: request a ThreadPool with 1 threads, but LLVM_ENABLE_THREADS has been turned off
[ 96% 86374/89212] Hidden API: /and/out/aosp_PPR2_181005_0...JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar
FAILED: /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar
/bin/bash -c "(rm -f /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar ) && (cp "/and/out/aosp_PPR2_181005_003/soong/.intermediates/frameworks/base/test-base/android.test.base/android_common/dex/android.test.base.jar" "/and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar" ) && (rm -rf /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (mkdir -p /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (unzip -q /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar 'classes*.dex' -d /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (find /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi -name "classes*.dex" | sort | sed 's/^/--dex=/' | xargs /and/out/aosp_PPR2_181005_003/host/linux-x86/bin/hiddenapi --light-greylist=/and/out/aosp_PPR2_181005_003/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt --dark-greylist=/and/out/aosp_PPR2_181005_003/target/common/obj/PACKAGING/hiddenapi-dark-greylist.txt --blacklist=/and/out/aosp_PPR2_181005_003/target/common/obj/PACKAGING/hiddenapi-blacklist.txt ) && (/and/out/aosp_PPR2_181005_003/soong/host/linux-x86/bin/soong_zip -o /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar -C /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi -D /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (/and/out/aosp_PPR2_181005_003/soong/host/linux-x86/bin/merge_zips -D -zipToNotStrip /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar -stripFile "classes*.dex" /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar /and/out/aosp_PPR2_181005_003/soong/.intermediates/frameworks/base/test-base/android.test.base/android_common/dex/android.test.base.jar )"
xargs: /and/out/aosp_PPR2_181005_003/host/linux-x86/bin/hiddenapi: terminated by signal 4
[ 96% 86377/89212] //art/runtime:libart link libart.so [arm]
Warning: request a ThreadPool with 1 threads, but LLVM_ENABLE_THREADS has been turned off
[ 96% 86378/89212] //frameworks/base/libs/hwui:libhwui link libhwui.so
Warning: request a ThreadPool with 1 threads, but LLVM_ENABLE_THREADS has been turned off
[ 96% 86379/89212] //frameworks/base/libs/hwui:libhwui link libhwui.so [arm]
Warning: request a ThreadPool with 1 threads, but LLVM_ENABLE_THREADS has been turned off
ninja: build stopped: subcommand failed.
06:43:46 ninja failed with: exit status 1
#### failed to build some targets (03:06:36 (hh:mm:ss)) ###
naganddevelop said:
Newbie to android build. Wanted to build an image for my device (Pie) . started testing / building one for marlin (Lunch aosp_marlin-userdebug). The buid repeatedly fails at 96%. Need help. Environment has been setup on a virtual machine in hyper V environment (24GB Ram, AMD Phenom II 1100T,OS-150GB,100GB Swap,AND Build -300 GB- Complete hardware info at the end.
. bashrc modifications
export OUT_DIR_COMMON_BASE=/and/out
export PATH=$PATH:/and:/and/bin:/and/out:/and/aosp_PPR2_181005_003
export USE_CCACHE=1
export LC_ALL=C
export ANDROID_JACK_VM_ARGS="-Xmx8192m -Xms512m -Dfile.encoding=UTF-8 -XX:+TieredCompilation"
Error Messages
Code:
Warning: request a ThreadPool with 1 threads, but LLVM_ENABLE_THREADS has been turned off
[ 96% 85735/89212] target Strip (mini debug info): mdnsd (.../product/marlin/obj/EXECUTABLES/mdnsd_intermediates/mdnsd)
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-nm: /and/out/aosp_PPR2_181005_003/target/product/marlin/symbols/system/bin/mdnsd: no symbols
[ 96% 85765/89212] //frameworks/native/services/surfaceflinger:libsurfaceflinger link libsurfaceflinger.so [arm]
Warning: request a ThreadPool with 1 threads, but LLVM_ENABLE_THREADS has been turned off
[ 96% 85963/89212] Target boot image from recovery: /and/out/aosp_PPR2_181005_003/target/product/marlin/boot.img
cp: cannot stat ‘/and/out/aosp_PPR2_181005_003/target/product/marlin/root/init.recovery.*.rc’: No such file or directory
[ 96% 86223/89212] //art/runtime:libart link libart.so
Warning: request a ThreadPool with 1 threads, but LLVM_ENABLE_THREADS has been turned off
[ 96% 86374/89212] Hidden API: /and/out/aosp_PPR2_181005_0...JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar
FAILED: /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar
/bin/bash -c "(rm -f /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar ) && (cp "/and/out/aosp_PPR2_181005_003/soong/.intermediates/frameworks/base/test-base/android.test.base/android_common/dex/android.test.base.jar" "/and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar" ) && (rm -rf /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (mkdir -p /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (unzip -q /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar 'classes*.dex' -d /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (find /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi -name "classes*.dex" | sort | sed 's/^/--dex=/' | xargs /and/out/aosp_PPR2_181005_003/host/linux-x86/bin/hiddenapi --light-greylist=/and/out/aosp_PPR2_181005_003/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt --dark-greylist=/and/out/aosp_PPR2_181005_003/target/common/obj/PACKAGING/hiddenapi-dark-greylist.txt --blacklist=/and/out/aosp_PPR2_181005_003/target/common/obj/PACKAGING/hiddenapi-blacklist.txt ) && (/and/out/aosp_PPR2_181005_003/soong/host/linux-x86/bin/soong_zip -o /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar -C /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi -D /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (/and/out/aosp_PPR2_181005_003/soong/host/linux-x86/bin/merge_zips -D -zipToNotStrip /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar -stripFile "classes*.dex" /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar /and/out/aosp_PPR2_181005_003/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar /and/out/aosp_PPR2_181005_003/soong/.intermediates/frameworks/base/test-base/android.test.base/android_common/dex/android.test.base.jar )"
xargs: /and/out/aosp_PPR2_181005_003/host/linux-x86/bin/hiddenapi: terminated by signal 4
[ 96% 86377/89212] //art/runtime:libart link libart.so [arm]
Warning: request a ThreadPool with 1 threads, but LLVM_ENABLE_THREADS has been turned off
[ 96% 86378/89212] //frameworks/base/libs/hwui:libhwui link libhwui.so
Warning: request a ThreadPool with 1 threads, but LLVM_ENABLE_THREADS has been turned off
[ 96% 86379/89212] //frameworks/base/libs/hwui:libhwui link libhwui.so [arm]
Warning: request a ThreadPool with 1 threads, but LLVM_ENABLE_THREADS has been turned off
ninja: build stopped: subcommand failed.
06:43:46 ninja failed with: exit status 1
#### failed to build some targets (03:06:36 (hh:mm:ss)) ###
Click to expand...
Click to collapse
I have just gotten the exact same issue.
Have you resolved it?
klabit87 said:
I have just gotten the exact same issue.
Have you resolved it?
Click to expand...
Click to collapse
My assumption is that you would have used android-9.0.0_r16 branch . Based on posting from other forums , it was one of the scripts that created the problem(for certain scenarios) and was fixed in android-9.0.0_r17 and higher. I tried it out on android-9.0.0_r18 and was not able to replicate the same . Hope this works for you.

XenonHD unofficial PIE build errors.

Merging my source for XenonHD Oreo to Pie. Building is 85% complete but fails with an error about Hidden API situation? Below will be text of my terminal output about this situation.
Hidden API: /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar
FAILED: /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar
/bin/bash -c "(rm -f /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar ) && (cp "/home/rondeau79/xenon/out/soong/.intermediates/frameworks/base/test-base/android.test.base/android_common/dex/android.test.base.jar" "/home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar" ) && (rm -rf /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (mkdir -p /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (unzip -q /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar 'classes*.dex' -d /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (find /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi -name "classes*.dex" | sort | sed 's/^/--dex=/' | xargs /home/rondeau79/xenon/out/host/linux-x86/bin/hiddenapi --light-greylist=/home/rondeau79/xenon/out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt --dark-greylist=/home/rondeau79/xenon/out/target/common/obj/PACKAGING/hiddenapi-dark-greylist.txt --blacklist=/home/rondeau79/xenon/out/target/common/obj/PACKAGING/hiddenapi-blacklist.txt ) && (/home/rondeau79/xenon/out/soong/host/linux-x86/bin/soong_zip -o /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar -C /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi -D /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (/home/rondeau79/xenon/out/soong/host/linux-x86/bin/merge_zips -D -zipToNotStrip /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar -stripFile "classes*.dex" /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar /home/rondeau79/xenon/out/soong/.intermediates/frameworks/base/test-base/android.test.base/android_common/dex/android.test.base.jar )"
xargs: /home/rondeau79/xenon/out/host/linux-x86/bin/hiddenapi: terminated by signal 4
[ 1% 125/12346] Building Kernel Config
make: Entering directory '/home/rondeau79/xenon/kernel/moto/shamu'
My build environment is all up to date something seems to missing from a.) my build environment b.) the source code from Git or c.) etc.
Signal 4 (SIGILL) means that the hiddenapi binary is corrupt.
Sometimes corruption is random, so a good test is to clean build from scratch, and see if you get the same error again.
Other times corruption is from a compiler bug. Is your gcc the recommended version? - and not newer, because newer can mean new bugs.

Error Building Lineage 17.1 for Oneplus 6 - sepolicy

Hey xda I've been stuck on this problem for a while researched everywhere with no luck.
I have the kernel and device tree for my oneplus 6. I'm trying to flash Lineage 17.1 on it. I run a normal lunch and make which goes fine but then I get this sepolicy error:
Code:
[ 32% 33487/102384] build out/target/product/oneplus/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows
FAILED: out/target/product/oneplus/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows
/bin/bash -c "(ASAN_OPTIONS=detect_leaks=0 out/host/linux-x86/bin/checkpolicy -M -c 30 -o out/target/product/oneplus/obj/ETC/sepolicy_never
allows_intermediates/sepolicy_neverallows.tmp out/target/product/oneplus/obj/ETC/sepolicy_neverallows_intermediates/policy.conf ) && (out/host/linux-x8
6/bin/sepolicy-analyze out/target/product/oneplus/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows.tmp neverallow -w -f out/target/produ
ct/oneplus/obj/ETC/sepolicy_neverallows_intermediates/policy_2.conf || ( echo \"\" 1>&2; echo \"sepolicy-analyze failed. This is most likely
due to the use\" 1>&2; echo \"of an expanded attribute in a neverallow assertion. Please fix\" 1>&2; echo \"the policy.\" 1>&2;
exit 1 ) ) && (touch out/target/product/oneplus/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows.tmp ) && (mv out/target/product/one
plus/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows.tmp out/target/product/oneplus/obj/ETC/sepolicy_neverallows_intermediates/sepolicy
_neverallows )"
vendor/oneplus/sdm845-common/sepolicy/private/hal_fod_sdm845.te:2:ERROR 'attribute hal_lineage_fod_server is not declared' at token ';' on line 48698:
typeattribute hal_fod_sdm845 hal_lineage_fod_server;
#line 2
checkpolicy: error(s) encountered while parsing configuration
[ 32% 33490/102384] build out/target/product/oneplus/obj/ETC/sepolicy.recovery_intermediates/sepolicy
FAILED: out/target/product/oneplus/obj/ETC/sepolicy.recovery_intermediates/sepolicy
/bin/bash -c "(ASAN_OPTIONS=detect_leaks=0 out/host/linux-x86/bin/checkpolicy -M -c 30 -o out/target/product/oneplus/obj/ETC/sepolicy.recov
ery_intermediates/sepolicy.tmp out/target/product/oneplus/obj/ETC/sepolicy.recovery_intermediates/sepolicy.recovery.conf ) && (out/host/linux-x86/bin/s
epolicy-analyze out/target/product/oneplus/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp permissive > out/target/product/oneplus/obj/ETC/sepolic
y.recovery_intermediates/sepolicy.permissivedomains ) && (if [ \"eng\" = \"user\" -a -s out/target/product/oneplus/obj/ETC/sepolicy.recovery_intermedia
tes/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 out/target/product/oneplus/obj/ETC/sepolicy.recovery_intermediates/sepolicy
.permissivedomains 1>&2; exit 1; fi ) && (mv out/target/product/oneplus/obj/ETC/sepolicy.recovery_intermediates/sepolicy
.tmp out/target/product/oneplus/obj/ETC/sepolicy.recovery_intermediates/sepolicy )"
vendor/oneplus/sdm845-common/sepolicy/private/hal_fod_sdm845.te:2:ERROR 'attribute hal_lineage_fod_server is not declared' at token ';' on line 51970:
typeattribute hal_fod_sdm845 hal_lineage_fod_server;
#line 2
checkpolicy: error(s) encountered while parsing configuration
22:18:03 ninja failed with: exit status 1
#### failed to build some targets (02:10:23 (hh:mm:ss)) ####
The error seems to indicate that I'm missing an attribute declaration hal_lineage_fod_server in one of my files. Is this correct? Here's my hal_fod_sdm845.te file :
Code:
type hal_fod_sdm845, coredomain, domain;
hal_server_domain(hal_fod_sdm845, hal_lineage_fod)
type hal_fod_sdm845_exec, system_file_type, exec_type, file_type;
init_daemon_domain(hal_fod_sdm845)
# Allow access to the HALs
hal_client_domain(hal_fod_sdm845, hal_fingerprint)
# Allow binder communication with hal_display_default
binder_call(hal_fod_sdm845, hal_display_default)
# Allow binder communication with hal_fingerprint
binder_call(hal_fod_sdm845, hal_fingerprint)
# Allow hal_fod_sdm845 to hal_display_hwservice
allow hal_fod_sdm845 hal_display_hwservice:hwservice_manager find;
# Allow hal_fod_sdm845 to hal_fingerprint_hwservice
allow hal_fod_sdm845 hal_fingerprint_hwservice:hwservice_manager find;
# Allow hal_fod_sdm845 to read and write to sysfs_fod
allow hal_fod_sdm845 sysfs_fod:file rw_file_perms;
How do I go about solving this error?
Thanks
ps im a complete virgin when it comes to HAL and sepolicy dev on android or linux in general.
n0velti said:
Hey xda I've been stuck on this problem for a while researched everywhere with no luck.
I have the kernel and device tree for my oneplus 6. I'm trying to flash Lineage 17.1 on it. I run a normal lunch and make which goes fine but then I get this sepolicy error:
Code:
[ 32% 33487/102384] build out/target/product/oneplus/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows
FAILED: out/target/product/oneplus/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows
/bin/bash -c "(ASAN_OPTIONS=detect_leaks=0 out/host/linux-x86/bin/checkpolicy -M -c 30 -o out/target/product/oneplus/obj/ETC/sepolicy_never
allows_intermediates/sepolicy_neverallows.tmp out/target/product/oneplus/obj/ETC/sepolicy_neverallows_intermediates/policy.conf ) && (out/host/linux-x8
6/bin/sepolicy-analyze out/target/product/oneplus/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows.tmp neverallow -w -f out/target/produ
ct/oneplus/obj/ETC/sepolicy_neverallows_intermediates/policy_2.conf || ( echo \"\" 1>&2; echo \"sepolicy-analyze failed. This is most likely
due to the use\" 1>&2; echo \"of an expanded attribute in a neverallow assertion. Please fix\" 1>&2; echo \"the policy.\" 1>&2;
exit 1 ) ) && (touch out/target/product/oneplus/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows.tmp ) && (mv out/target/product/one
plus/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows.tmp out/target/product/oneplus/obj/ETC/sepolicy_neverallows_intermediates/sepolicy
_neverallows )"
vendor/oneplus/sdm845-common/sepolicy/private/hal_fod_sdm845.te:2:ERROR 'attribute hal_lineage_fod_server is not declared' at token ';' on line 48698:
typeattribute hal_fod_sdm845 hal_lineage_fod_server;
#line 2
checkpolicy: error(s) encountered while parsing configuration
[ 32% 33490/102384] build out/target/product/oneplus/obj/ETC/sepolicy.recovery_intermediates/sepolicy
FAILED: out/target/product/oneplus/obj/ETC/sepolicy.recovery_intermediates/sepolicy
/bin/bash -c "(ASAN_OPTIONS=detect_leaks=0 out/host/linux-x86/bin/checkpolicy -M -c 30 -o out/target/product/oneplus/obj/ETC/sepolicy.recov
ery_intermediates/sepolicy.tmp out/target/product/oneplus/obj/ETC/sepolicy.recovery_intermediates/sepolicy.recovery.conf ) && (out/host/linux-x86/bin/s
epolicy-analyze out/target/product/oneplus/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp permissive > out/target/product/oneplus/obj/ETC/sepolic
y.recovery_intermediates/sepolicy.permissivedomains ) && (if [ \"eng\" = \"user\" -a -s out/target/product/oneplus/obj/ETC/sepolicy.recovery_intermedia
tes/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 out/target/product/oneplus/obj/ETC/sepolicy.recovery_intermediates/sepolicy
.permissivedomains 1>&2; exit 1; fi ) && (mv out/target/product/oneplus/obj/ETC/sepolicy.recovery_intermediates/sepolicy
.tmp out/target/product/oneplus/obj/ETC/sepolicy.recovery_intermediates/sepolicy )"
vendor/oneplus/sdm845-common/sepolicy/private/hal_fod_sdm845.te:2:ERROR 'attribute hal_lineage_fod_server is not declared' at token ';' on line 51970:
typeattribute hal_fod_sdm845 hal_lineage_fod_server;
#line 2
checkpolicy: error(s) encountered while parsing configuration
22:18:03 ninja failed with: exit status 1
#### failed to build some targets (02:10:23 (hh:mm:ss)) ####
The error seems to indicate that I'm missing an attribute declaration hal_lineage_fod_server in one of my files. Is this correct? Here's my hal_fod_sdm845.te file :
Code:
type hal_fod_sdm845, coredomain, domain;
hal_server_domain(hal_fod_sdm845, hal_lineage_fod)
type hal_fod_sdm845_exec, system_file_type, exec_type, file_type;
init_daemon_domain(hal_fod_sdm845)
# Allow access to the HALs
hal_client_domain(hal_fod_sdm845, hal_fingerprint)
# Allow binder communication with hal_display_default
binder_call(hal_fod_sdm845, hal_display_default)
# Allow binder communication with hal_fingerprint
binder_call(hal_fod_sdm845, hal_fingerprint)
# Allow hal_fod_sdm845 to hal_display_hwservice
allow hal_fod_sdm845 hal_display_hwservice:hwservice_manager find;
# Allow hal_fod_sdm845 to hal_fingerprint_hwservice
allow hal_fod_sdm845 hal_fingerprint_hwservice:hwservice_manager find;
# Allow hal_fod_sdm845 to read and write to sysfs_fod
allow hal_fod_sdm845 sysfs_fod:file rw_file_perms;
How do I go about solving this error?
Thanks
ps im a complete virgin when it comes to HAL and sepolicy dev on android or linux in general.
Click to expand...
Click to collapse
Sir please help if u fixed this error

Categories

Resources