[GUIDE] How to build Android on Windows

Search This thread

rob_sd

New member
May 23, 2019
1
0
Hi

Can I use these instructions to build Lineage 16.0 for my Samsung Galaxy Note Pro 12.2 / SM-P900 / v1awifi device?

I think the device codename is "v1awifi"... does that device specific code exist?


For the vendor name do I just use "samsung"?

<project name="TheMuppets/proprietary_vendor_your device brand" path="vendor/your device brand" remote="github" />
 

Uldiniad

Senior Member
Mar 17, 2016
346
269
Hi

Can I use these instructions to build Lineage 16.0 for my Samsung Galaxy Note Pro 12.2 / SM-P900 / v1awifi device?

I think the device codename is "v1awifi"... does that device specific code exist?


For the vendor name do I just use "samsung"?

<project name="TheMuppets/proprietary_vendor_your device brand" path="vendor/your device brand" remote="github" />

if you check https://github.com/LineageOS you'll find if they have a v1awifi tree (might be outdated and not sure it has the 16.0 branch). concerning vendor, yes.
 

scottysau

Senior Member
Jan 27, 2015
110
47
Perth
Has anybody experimented with Docker rather than WSL, using th community build. It uses Windows 10 Hyper V technology, you can have multiple instances with multiple images (limited by SSD space).

I might give it a go, but I couldn't get the build to finish successfully in WSL so my skills might not be there yet.

At least with Docker the "resetting" will be easier.
 
  • Like
Reactions: EurekaMedes

Uldiniad

Senior Member
Mar 17, 2016
346
269
Has anybody experimented with Docker rather than WSL, using th community build. It uses Windows 10 Hyper V technology, you can have multiple instances with multiple images (limited by SSD space).

I might give it a go, but I couldn't get the build to finish successfully in WSL so my skills might not be there yet.

At least with Docker the "resetting" will be easier.

I haven't tried with docker. Docker on windows has been annoying to me given the use of hyper-v. what do you mean by docker resetting?
 

scottysau

Senior Member
Jan 27, 2015
110
47
Perth
I haven't tried with docker. Docker on windows has been annoying to me given the use of hyper-v. what do you mean by docker resetting?


WSL is problematical if you need to reset your environment. Docker is much easier and by saving the image incrementally you can multiple containers with different configurations or stages.

Docker is meant to be testing WSL2 support as I write this so hopefully we will see some performance improvements.
 

DedeDocil

Senior Member
Feb 2, 2013
179
64
Bekasi
EDIT: i picked this commit but no luck

Hi, i got error here, any advice @Uldiniad ?
Code:
FAILED: /mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.odex
/bin/bash -c "(rm -f /mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.odex ) && (mkdir -p /mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/ ) && (stored_class_loader_context_libs= && class_loader_context_arg=--class-loader-context=\\& && class_loader_context=\\& && stored_class_loader_context_arg=\"\" && uses_library_names=\"\" && optional_uses_library_names=\"\" &&  ANDROID_LOG_TAGS=\"*:e\" /mnt/z/build/statix/out/host/linux-x86/bin/dex2oatd  --runtime-arg -Xms64m --runtime-arg -Xmx512m \${class_loader_context_arg} \${stored_class_loader_context_arg} --boot-image=/mnt/z/build/statix/out/target/product/whyred/dex_bootjars/system/framework/boot.art --dex-file=/mnt/z/build/statix/out/target/common/obj/JAVA_LIBRARIES/services_intermediates/javalib.jar --dex-location=/system/framework/services.jar --oat-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.odex --android-root=/mnt/z/build/statix/out/target/product/whyred/system --instruction-set=arm64 --instruction-set-variant=generic --instruction-set-features=default --runtime-arg -Xnorelocate --compile-pic --no-generate-debug-info --generate-build-id --abort-on-hard-verifier-error --force-determinism --no-inline-from=core-oj.jar  --compiler-filter=speed --generate-mini-debug-info --compilation-reason=prebuilt --app-image-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.art --image-format=lz4 --profile-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates//profile.prof )"
dex2oatd F art/dex2oat/dex2oat.cc] dex2oat did not finish after 2850 seconds
Zygote loaded classes=10593 post zygote classes=5339
Intern table: 74256 strong; 0 weak
JNI: CheckJNI is off; globals=49 (plus 22 weak)
Libraries:  (0)
Heap: 92% free, 4MB/64MB; dex2oatd F 08-26 00:47:31 13495 13511 thread_list.cc:771] Timed out waiting for threads to suspend, waited for 50.000s
Runtime aborting...
Dumping all threads without appropriate locks held: thread list lock mutator lock
All threads:
DALVIK THREADS (5):
"Watchdog thread attached for dumping" prio=5 tid=5 Runnable (still starting up)
  | group="" sCount=0 dsCount=0 flags=0 obj=(nil) self=0x7fcb58000b60
  | sysTid=13511 nice=1 cgrp=default sched=3/0 handle=0x7fcb75a70700
  | state=R schedstat=( 31250000 0 1 ) utm=1 stm=1 core=0 HZ=100
  | stack=0x7fcb75271000-0x7fcb75273000 stackSize=8MB
  | held mutexes= "abort lock" "mutator lock"(shared held)
  native: (no native stack frames for thread 13511)
  (no managed stack frames)

"Compiler driver thread pool worker thread 2" prio=5 tid=3 Native (still starting up)
  | group="" sCount=2 dsCount=0 flags=1 obj=(nil) self=0x7fcb60000b20
  | sysTid=14018 nice=1 cgrp=default sched=3/0 handle=0x7fcb701cd700
  | state=S schedstat=( 54906250000 0 1 ) utm=5406 stm=84 core=0 HZ=100
  | stack=0x7fcb700cd000-0x7fcb700cf000 stackSize=1028KB
  | held mutexes=
  kernel: (couldn't read /proc/self/task/14018/stack)
  native: #00 pc 000000000011b839  /lib/x86_64-linux-gnu/libc-2.27.so (syscall+25)
  native:   syscall
  native:    ??:?
  (no managed stack frames)

dex2oatd E 08-26 00:47:37 13495 13511 thread-inl.h:155] holding "abort lock" at point where thread suspension is expected
dex2oatd E 08-26 00:47:37 13495 13511 mutex.cc:280] Holding "abort lock" (level AbortLock) while performing wait on "GC barrier lock" (level ThreadSuspendCountLock)
dex2oatd E 08-26 00:47:57 13495 13511 thread_list.cc:238] Unexpected time out during dump checkpoint.
Aborting thread:
dex2oatd E 08-26 00:47:57 13495 13511 mutex-inl.h:125] Lock level violation: holding "mutator lock" (level MutatorLock - 65) while locking "mutator lock" (level MutatorLock - 65)
dex2oatd E 08-26 00:47:57 13495 13511 thread-inl.h:155] holding "abort lock" at point where thread suspension is expected
"Watchdog thread attached for dumping" prio=5 tid=5 WaitingForGetObjectsAllocated (still starting up)
  | group="" sCount=0 dsCount=0 flags=0 obj=(nil) self=0x7fcb58000b60
  | sysTid=13511 nice=1 cgrp=default sched=3/0 handle=0x7fcb75a70700
  | state=R schedstat=( 1656250000 0 1 ) utm=1 stm=164 core=0 HZ=100
  | stack=0x7fcb75271000-0x7fcb75273000 stackSize=8MB
  | held mutexes= "abort lock"
  native: (no native stack frames for thread 13511)
  (no managed stack frames)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Fatal signal 6 (SIGABRT), code -6 (SI_TKILL)
OS: Linux 4.4.0-18362-Microsoft (x86_64)
Cmdline: /mnt/z/build/statix/out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx512m --class-loader-context=& --boot-image=/mnt/z/build/statix/out/target/product/whyred/dex_bootjars/system/framework/boot.art --dex-file=/mnt/z/build/statix/out/target/common/obj/JAVA_LIBRARIES/services_intermediates/javalib.jar --dex-location=/system/framework/services.jar --oat-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.odex --android-root=/mnt/z/build/statix/out/target/product/whyred/system --instruction-set=arm64 --instruction-set-variant=generic --instruction-set-features=default --runtime-arg -Xnorelocate --compile-pic --no-generate-debug-info --generate-build-id --abort-on-hard-verifier-error --force-determinism --no-inline-from=core-oj.jar --compiler-filter=speed --generate-mini-debug-info --compilation-reason=prebuilt --app-image-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.art --image-format=lz4 --profile-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates//profile.prof
Thread: 13511 "Watchdog thread"
Registers:
    rax: 0x0000000000000000    rbx: 0x00000000000034b7    rcx: 0x00007fcb75a70700    rdx: 0x0000000000000006
    rdi: 0x00000000000034b7    rsi: 0x00000000000034c7    rbp: 0x00007fcb75a6fb30    rsp: 0x00007fcb75a6fae8
    r8 : 0x00007fffe9c033b1    r9 : 0x00007fffe9c033b1    r10: 0x00007fcb75a70700    r11: 0x00007fcb75a70700
    r12: 0x00007fcb580098e0    r13: 0x00007fcb75a6fc08    r14: 0x00007fffe9c032d0    r15: 0x00007fcb75a6fc00
    rip: 0x00007fcb75f3b839    eflags: 0x00000246 [ PF ZF IF ]
     cs: 0x00000033     gs: 0x0000002b     fs: 0x00000053

Backtrace:
        #00 pc 000000000011b839  /lib/x86_64-linux-gnu/libc-2.27.so (syscall+25)
          syscall
           ??:?

Fault message:
/bin/bash: line 1: 13495 Aborted                 (core dumped) ANDROID_LOG_TAGS="*:e" /mnt/z/build/statix/out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx512m ${class_loader_context_arg} ${stored_class_loader_context_arg} --boot-image=/mnt/z/build/statix/out/target/product/whyred/dex_bootjars/system/framework/boot.art --dex-file=/mnt/z/build/statix/out/target/common/obj/JAVA_LIBRARIES/services_intermediates/javalib.jar --dex-location=/system/framework/services.jar --oat-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.odex --android-root=/mnt/z/build/statix/out/target/product/whyred/system --instruction-set=arm64 --instruction-set-variant=generic --instruction-set-features=default --runtime-arg -Xnorelocate --compile-pic --no-generate-debug-info --generate-build-id --abort-on-hard-verifier-error --force-determinism --no-inline-from=core-oj.jar --compiler-filter=speed --generate-mini-debug-info --compilation-reason=prebuilt --app-image-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.art --image-format=lz4 --profile-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates//profile.prof
 
Last edited:

Uldiniad

Senior Member
Mar 17, 2016
346
269
EDIT: i picked this commit but no luck

Hi, i got error here, any advice @Uldiniad ?
Code:
FAILED: /mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.odex
/bin/bash -c "(rm -f /mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.odex ) && (mkdir -p /mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/ ) && (stored_class_loader_context_libs= && class_loader_context_arg=--class-loader-context=\\& && class_loader_context=\\& && stored_class_loader_context_arg=\"\" && uses_library_names=\"\" && optional_uses_library_names=\"\" &&  ANDROID_LOG_TAGS=\"*:e\" /mnt/z/build/statix/out/host/linux-x86/bin/dex2oatd  --runtime-arg -Xms64m --runtime-arg -Xmx512m \${class_loader_context_arg} \${stored_class_loader_context_arg} --boot-image=/mnt/z/build/statix/out/target/product/whyred/dex_bootjars/system/framework/boot.art --dex-file=/mnt/z/build/statix/out/target/common/obj/JAVA_LIBRARIES/services_intermediates/javalib.jar --dex-location=/system/framework/services.jar --oat-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.odex --android-root=/mnt/z/build/statix/out/target/product/whyred/system --instruction-set=arm64 --instruction-set-variant=generic --instruction-set-features=default --runtime-arg -Xnorelocate --compile-pic --no-generate-debug-info --generate-build-id --abort-on-hard-verifier-error --force-determinism --no-inline-from=core-oj.jar  --compiler-filter=speed --generate-mini-debug-info --compilation-reason=prebuilt --app-image-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.art --image-format=lz4 --profile-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates//profile.prof )"
dex2oatd F art/dex2oat/dex2oat.cc] dex2oat did not finish after 2850 seconds
Zygote loaded classes=10593 post zygote classes=5339
Intern table: 74256 strong; 0 weak
JNI: CheckJNI is off; globals=49 (plus 22 weak)
Libraries:  (0)
Heap: 92% free, 4MB/64MB; dex2oatd F 08-26 00:47:31 13495 13511 thread_list.cc:771] Timed out waiting for threads to suspend, waited for 50.000s
Runtime aborting...
Dumping all threads without appropriate locks held: thread list lock mutator lock
All threads:
DALVIK THREADS (5):
"Watchdog thread attached for dumping" prio=5 tid=5 Runnable (still starting up)
  | group="" sCount=0 dsCount=0 flags=0 obj=(nil) self=0x7fcb58000b60
  | sysTid=13511 nice=1 cgrp=default sched=3/0 handle=0x7fcb75a70700
  | state=R schedstat=( 31250000 0 1 ) utm=1 stm=1 core=0 HZ=100
  | stack=0x7fcb75271000-0x7fcb75273000 stackSize=8MB
  | held mutexes= "abort lock" "mutator lock"(shared held)
  native: (no native stack frames for thread 13511)
  (no managed stack frames)

"Compiler driver thread pool worker thread 2" prio=5 tid=3 Native (still starting up)
  | group="" sCount=2 dsCount=0 flags=1 obj=(nil) self=0x7fcb60000b20
  | sysTid=14018 nice=1 cgrp=default sched=3/0 handle=0x7fcb701cd700
  | state=S schedstat=( 54906250000 0 1 ) utm=5406 stm=84 core=0 HZ=100
  | stack=0x7fcb700cd000-0x7fcb700cf000 stackSize=1028KB
  | held mutexes=
  kernel: (couldn't read /proc/self/task/14018/stack)
  native: #00 pc 000000000011b839  /lib/x86_64-linux-gnu/libc-2.27.so (syscall+25)
  native:   syscall
  native:    ??:?
  (no managed stack frames)

dex2oatd E 08-26 00:47:37 13495 13511 thread-inl.h:155] holding "abort lock" at point where thread suspension is expected
dex2oatd E 08-26 00:47:37 13495 13511 mutex.cc:280] Holding "abort lock" (level AbortLock) while performing wait on "GC barrier lock" (level ThreadSuspendCountLock)
dex2oatd E 08-26 00:47:57 13495 13511 thread_list.cc:238] Unexpected time out during dump checkpoint.
Aborting thread:
dex2oatd E 08-26 00:47:57 13495 13511 mutex-inl.h:125] Lock level violation: holding "mutator lock" (level MutatorLock - 65) while locking "mutator lock" (level MutatorLock - 65)
dex2oatd E 08-26 00:47:57 13495 13511 thread-inl.h:155] holding "abort lock" at point where thread suspension is expected
"Watchdog thread attached for dumping" prio=5 tid=5 WaitingForGetObjectsAllocated (still starting up)
  | group="" sCount=0 dsCount=0 flags=0 obj=(nil) self=0x7fcb58000b60
  | sysTid=13511 nice=1 cgrp=default sched=3/0 handle=0x7fcb75a70700
  | state=R schedstat=( 1656250000 0 1 ) utm=1 stm=164 core=0 HZ=100
  | stack=0x7fcb75271000-0x7fcb75273000 stackSize=8MB
  | held mutexes= "abort lock"
  native: (no native stack frames for thread 13511)
  (no managed stack frames)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Fatal signal 6 (SIGABRT), code -6 (SI_TKILL)
OS: Linux 4.4.0-18362-Microsoft (x86_64)
Cmdline: /mnt/z/build/statix/out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx512m --class-loader-context=& --boot-image=/mnt/z/build/statix/out/target/product/whyred/dex_bootjars/system/framework/boot.art --dex-file=/mnt/z/build/statix/out/target/common/obj/JAVA_LIBRARIES/services_intermediates/javalib.jar --dex-location=/system/framework/services.jar --oat-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.odex --android-root=/mnt/z/build/statix/out/target/product/whyred/system --instruction-set=arm64 --instruction-set-variant=generic --instruction-set-features=default --runtime-arg -Xnorelocate --compile-pic --no-generate-debug-info --generate-build-id --abort-on-hard-verifier-error --force-determinism --no-inline-from=core-oj.jar --compiler-filter=speed --generate-mini-debug-info --compilation-reason=prebuilt --app-image-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.art --image-format=lz4 --profile-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates//profile.prof
Thread: 13511 "Watchdog thread"
Registers:
    rax: 0x0000000000000000    rbx: 0x00000000000034b7    rcx: 0x00007fcb75a70700    rdx: 0x0000000000000006
    rdi: 0x00000000000034b7    rsi: 0x00000000000034c7    rbp: 0x00007fcb75a6fb30    rsp: 0x00007fcb75a6fae8
    r8 : 0x00007fffe9c033b1    r9 : 0x00007fffe9c033b1    r10: 0x00007fcb75a70700    r11: 0x00007fcb75a70700
    r12: 0x00007fcb580098e0    r13: 0x00007fcb75a6fc08    r14: 0x00007fffe9c032d0    r15: 0x00007fcb75a6fc00
    rip: 0x00007fcb75f3b839    eflags: 0x00000246 [ PF ZF IF ]
     cs: 0x00000033     gs: 0x0000002b     fs: 0x00000053

Backtrace:
        #00 pc 000000000011b839  /lib/x86_64-linux-gnu/libc-2.27.so (syscall+25)
          syscall
           ??:?

Fault message:
/bin/bash: line 1: 13495 Aborted                 (core dumped) ANDROID_LOG_TAGS="*:e" /mnt/z/build/statix/out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx512m ${class_loader_context_arg} ${stored_class_loader_context_arg} --boot-image=/mnt/z/build/statix/out/target/product/whyred/dex_bootjars/system/framework/boot.art --dex-file=/mnt/z/build/statix/out/target/common/obj/JAVA_LIBRARIES/services_intermediates/javalib.jar --dex-location=/system/framework/services.jar --oat-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.odex --android-root=/mnt/z/build/statix/out/target/product/whyred/system --instruction-set=arm64 --instruction-set-variant=generic --instruction-set-features=default --runtime-arg -Xnorelocate --compile-pic --no-generate-debug-info --generate-build-id --abort-on-hard-verifier-error --force-determinism --no-inline-from=core-oj.jar --compiler-filter=speed --generate-mini-debug-info --compilation-reason=prebuilt --app-image-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.art --image-format=lz4 --profile-file=/mnt/z/build/statix/out/target/product/whyred/obj/JAVA_LIBRARIES/services_intermediates//profile.prof

what version are you building? you should not pick that commit since it is already merged
 

stvn1337

Senior Member
Jan 24, 2010
427
455
Chatsworth
I need some help, I followed the instructions to the T, however I receive this error:

MSI:~/android/lineage$ brunch enchilada
22:39:45 Build sandboxing disabled due to nsjail error. This may become fatal in the future.
22:39:45 Please let us know why nsjail doesn't work in your environment at:
22:39:45 https://groups.google.com/forum/#!forum/android-building
22:39:45 https://issuetracker.google.com/issues/new?component=381517
Looking for dependencies in device/oneplus/enchilada
Looking for dependencies in device/oneplus/sdm845-common
Looking for dependencies in kernel/oneplus/sdm845
kernel/oneplus/sdm845 has no additional dependencies.
Looking for dependencies in packages/resources/devicesettings
packages/resources/devicesettings has no additional dependencies.
22:39:52 Build sandboxing disabled due to nsjail error. This may become fatal in the future.
22:39:52 Please let us know why nsjail doesn't work in your environment at:
22:39:52 https://groups.google.com/forum/#!forum/android-building
22:39:52 https://issuetracker.google.com/issues/new?component=381517

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
LINEAGE_VERSION=17.0-20190919-UNOFFICIAL-enchilada
TARGET_PRODUCT=lineage_enchilada
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-18356-Microsoft-x86_64-Ubuntu-18.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QP1A.190711.020
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES= device/oneplus/sdm845-common hardware/qcom/audio-caf/sdm845 hardware/qcom/display-caf/sdm845 hardware/qcom/media-caf/sdm845
============================================
22:40:40 Build sandboxing disabled due to nsjail error. This may become fatal in the future.
22:40:40 Please let us know why nsjail doesn't work in your environment at:
22:40:40 https://groups.google.com/forum/#!forum/android-building
22:40:40 https://issuetracker.google.com/issues/new?component=381517
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
LINEAGE_VERSION=17.0-20190919-UNOFFICIAL-enchilada
TARGET_PRODUCT=lineage_enchilada
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-18356-Microsoft-x86_64-Ubuntu-18.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QP1A.190711.020
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES= device/oneplus/sdm845-common hardware/qcom/audio-caf/sdm845 hardware/qcom/display-caf/sdm845 hardware/qcom/media-caf/sdm845
============================================
FAILED: ninja: ./build/blueprint/bootstrap/build.ninja:11: loading 'out/soong/.minibootstrap/build-globs.ninja': Exec format error
subninja ${myGlobs}
^ near here
22:40:42 soong minibootstrap failed with: exit status 1

#### failed to build some targets (48 seconds) ####


Any advice or ideas?
 

ArcherTanu

Senior Member
Jan 5, 2015
138
108
Kolkata
I need some help, I followed the instructions to the T, however I receive this error:

MSI:~/android/lineage$ brunch enchilada
22:39:45 Build sandboxing disabled due to nsjail error. This may become fatal in the future.
22:39:45 Please let us know why nsjail doesn't work in your environment at:
22:39:45 https://groups.google.com/forum/#!forum/android-building
22:39:45 https://issuetracker.google.com/issues/new?component=381517
Looking for dependencies in device/oneplus/enchilada
Looking for dependencies in device/oneplus/sdm845-common
Looking for dependencies in kernel/oneplus/sdm845
kernel/oneplus/sdm845 has no additional dependencies.
Looking for dependencies in packages/resources/devicesettings
packages/resources/devicesettings has no additional dependencies.
22:39:52 Build sandboxing disabled due to nsjail error. This may become fatal in the future.
22:39:52 Please let us know why nsjail doesn't work in your environment at:
22:39:52 https://groups.google.com/forum/#!forum/android-building
22:39:52 https://issuetracker.google.com/issues/new?component=381517

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
LINEAGE_VERSION=17.0-20190919-UNOFFICIAL-enchilada
TARGET_PRODUCT=lineage_enchilada
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-18356-Microsoft-x86_64-Ubuntu-18.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QP1A.190711.020
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES= device/oneplus/sdm845-common hardware/qcom/audio-caf/sdm845 hardware/qcom/display-caf/sdm845 hardware/qcom/media-caf/sdm845
============================================
22:40:40 Build sandboxing disabled due to nsjail error. This may become fatal in the future.
22:40:40 Please let us know why nsjail doesn't work in your environment at:
22:40:40 https://groups.google.com/forum/#!forum/android-building
22:40:40 https://issuetracker.google.com/issues/new?component=381517
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
LINEAGE_VERSION=17.0-20190919-UNOFFICIAL-enchilada
TARGET_PRODUCT=lineage_enchilada
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-18356-Microsoft-x86_64-Ubuntu-18.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QP1A.190711.020
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES= device/oneplus/sdm845-common hardware/qcom/audio-caf/sdm845 hardware/qcom/display-caf/sdm845 hardware/qcom/media-caf/sdm845
============================================
FAILED: ninja: ./build/blueprint/bootstrap/build.ninja:11: loading 'out/soong/.minibootstrap/build-globs.ninja': Exec format error
subninja ${myGlobs}
^ near here
22:40:42 soong minibootstrap failed with: exit status 1

#### failed to build some targets (48 seconds) ####


Any advice or ideas?


U r device dependencies are missing.
And u need to android_packages_resources_devicesettings
 

Uldiniad

Senior Member
Mar 17, 2016
346
269
I need some help, I followed the instructions to the T, however I receive this error:

MSI:~/android/lineage$ brunch enchilada
22:39:45 Build sandboxing disabled due to nsjail error. This may become fatal in the future.
22:39:45 Please let us know why nsjail doesn't work in your environment at:
22:39:45 https://groups.google.com/forum/#!forum/android-building
22:39:45 https://issuetracker.google.com/issues/new?component=381517
Looking for dependencies in device/oneplus/enchilada
Looking for dependencies in device/oneplus/sdm845-common
Looking for dependencies in kernel/oneplus/sdm845
kernel/oneplus/sdm845 has no additional dependencies.
Looking for dependencies in packages/resources/devicesettings
packages/resources/devicesettings has no additional dependencies.
22:39:52 Build sandboxing disabled due to nsjail error. This may become fatal in the future.
22:39:52 Please let us know why nsjail doesn't work in your environment at:
22:39:52 https://groups.google.com/forum/#!forum/android-building
22:39:52 https://issuetracker.google.com/issues/new?component=381517

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
LINEAGE_VERSION=17.0-20190919-UNOFFICIAL-enchilada
TARGET_PRODUCT=lineage_enchilada
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-18356-Microsoft-x86_64-Ubuntu-18.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QP1A.190711.020
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES= device/oneplus/sdm845-common hardware/qcom/audio-caf/sdm845 hardware/qcom/display-caf/sdm845 hardware/qcom/media-caf/sdm845
============================================
22:40:40 Build sandboxing disabled due to nsjail error. This may become fatal in the future.
22:40:40 Please let us know why nsjail doesn't work in your environment at:
22:40:40 https://groups.google.com/forum/#!forum/android-building
22:40:40 https://issuetracker.google.com/issues/new?component=381517
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
LINEAGE_VERSION=17.0-20190919-UNOFFICIAL-enchilada
TARGET_PRODUCT=lineage_enchilada
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-18356-Microsoft-x86_64-Ubuntu-18.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QP1A.190711.020
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES= device/oneplus/sdm845-common hardware/qcom/audio-caf/sdm845 hardware/qcom/display-caf/sdm845 hardware/qcom/media-caf/sdm845
============================================
FAILED: ninja: ./build/blueprint/bootstrap/build.ninja:11: loading 'out/soong/.minibootstrap/build-globs.ninja': Exec format error
subninja ${myGlobs}
^ near here
22:40:42 soong minibootstrap failed with: exit status 1

#### failed to build some targets (48 seconds) ####


Any advice or ideas?

I don't support Android 10 and I don't think I will given that WSL2.0 should not require any patches. I recommend you install WSL2.0
 
Nov 25, 2017
30
18
I don't support Android 10 and I don't think I will given that WSL2.0 should not require any patches. I recommend you install WSL2.0

Have you succeeded in building using wsl2? I end up with clang errors. I am running the 1901.1 build.


error: prebuilts/clang/host/linux-x86/Android.bp:17:1: unrecognized module type "llvm_prebuilt_library_static"
error: prebuilts/clang/host/linux-x86/Android.bp:24:1: unrecognized module type "llvm_prebuilt_library_static"
error: prebuilts/clang/host/linux-x86/Android.bp:32:1: unrecognized module type "libclang_rt_prebuilt_library_shared"
error: prebuilts/clang/host/linux-x86/Android.bp:42:1: unrecognized module type "libclang_rt_prebuilt_library_shared"
error: prebuilts/clang/host/linux-x86/Android.bp:52:1: unrecognized module type "libclang_rt_prebuilt_library_shared"
error: prebuilts/clang/host/linux-x86/Android.bp:62:1: unrecognized module type "libclang_rt_prebuilt_library_shared"
error: prebuilts/clang/host/linux-x86/Android.bp:72:1: unrecognized module type "libclang_rt_prebuilt_library_shared"
error: prebuilts/clang/host/linux-x86/Android.bp:82:1: unrecognized module type "libclang_rt_prebuilt_library_shared"
error: prebuilts/clang/host/linux-x86/Android.bp:92:1: unrecognized module type "libclang_rt_llndk_library"
error: prebuilts/clang/host/linux-x86/Android.bp:102:1: unrecognized module type "libclang_rt_llndk_library"
error: prebuilts/clang/host/linux-x86/Android.bp:112:1: unrecognized module type "libclang_rt_llndk_library"
error: prebuilts/clang/host/linux-x86/Android.bp:122:1: unrecognized module type "libclang_rt_llndk_library"
error: prebuilts/clang/host/linux-x86/Android.bp:132:1: unrecognized module type "libclang_rt_llndk_library"
error: prebuilts/clang/host/linux-x86/Android.bp:142:1: unrecognized module type "libclang_rt_llndk_library"
error: prebuilts/clang/host/linux-x86/Android.bp:152:1: unrecognized module type "libclang_rt_prebuilt_library_shared"
error: prebuilts/clang/host/linux-x86/Android.bp:166:1: unrecognized module type "libclang_rt_prebuilt_library_shared"
error: prebuilts/clang/host/linux-x86/Android.bp:180:1: unrecognized module type "libclang_rt_prebuilt_library_shared"
error: prebuilts/clang/host/linux-x86/Android.bp:194:1: unrecognized module type "libclang_rt_prebuilt_library_shared"
error: prebuilts/clang/host/linux-x86/Android.bp:208:1: unrecognized module type "libclang_rt_prebuilt_library_shared"
error: prebuilts/clang/host/linux-x86/Android.bp:222:1: unrecognized module type "libclang_rt_prebuilt_library_shared"
error: prebuilts/clang/host/linux-x86/Android.bp:236:1: unrecognized module type "libclang_rt_prebuilt_library_static"
error: prebuilts/clang/host/linux-x86/Android.bp:250:1: unrecognized module type "libclang_rt_prebuilt_library_static"
error: prebuilts/clang/host/linux-x86/Android.bp:264:1: unrecognized module type "libclang_rt_prebuilt_library_static"
error: prebuilts/clang/host/linux-x86/Android.bp:278:1: unrecognized module type "libclang_rt_prebuilt_library_static"
error: prebuilts/clang/host/linux-x86/Android.bp:292:1: unrecognized module type "libclang_rt_prebuilt_library_static"
error: prebuilts/clang/host/linux-x86/Android.bp:306:1: unrecognized module type "libclang_rt_prebuilt_library_static"
error: prebuilts/clang/host/linux-x86/Android.bp:320:1: unrecognized module type "libclang_rt_prebuilt_library_static"
error: prebuilts/clang/host/linux-x86/Android.bp:331:1: unrecognized module type "libclang_rt_prebuilt_library_static"
error: prebuilts/clang/host/linux-x86/Android.bp:342:1: unrecognized module type "libclang_rt_prebuilt_library_static"
error: prebuilts/clang/host/linux-x86/Android.bp:353:1: unrecognized module type "libclang_rt_prebuilt_library_static"
error: prebuilts/clang/host/linux-x86/Android.bp:364:1: unrecognized module type "libclang_rt_prebuilt_library_static"
error: prebuilts/clang/host/linux-x86/Android.bp:375:1: unrecognized module type "libclang_rt_prebuilt_library_static"
ninja: build stopped: subcommand failed.
13:57:02 soong bootstrap failed with: exit status 1
build/make/core/main.mk:21: recipe for target 'run_soong_ui' failed
 

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    Useful resources




    https://github.com/MicrosoftDocs/WSL/issues/412#issuecomment-575923176
    12
    WSL 2.0 is OUT, build all the droids!

    Hi all,

    Microsoft just released the Windows 10 May 2020 update. But the bigger news is that it comes with WSL2. The TLDR of it is that Windows now has a Linux kernel bundled with it and that's game changing. And what that means for us is out of the box / seamless linux-like functionality for all teh things (goodbye Lineage hax patches for WSL1).

    I have updated OP https://xdaforums.com/showpost.php?p=75579631&postcount=1 and the useful resources post https://xdaforums.com/showpost.php?p=75579631&postcount=2 with the latest information I have so far. Note that with wsl2 using mnt is a readily available option and the wsl installation location can easily be changed as well :) Lots more flexibility

    Lastly, wanted to say thanks to all for your patience. I started this project while I was in the middle of university. I did this "for fun" with the goal of seeing if compiling Android on Windows (via WSL) would be remotely possible and if I personally would be able to pull that off. Apparently, I did :p. Part of this work (added with other work I did with Lineage) allowed me to get the Android job I currently have and I'm grateful for it.
    I know WSL 1 was a bit of a pain to work with and that headaches and frustration came from it. The good news, is those days are over. And the future is now.

    If you have questions that are not answered already in other posts, send them through. I will be randomly checking the thread. Although given that wsl2 doesn't need anywhere near as much maintenance as wsl1 I will probably be more hands off than I used to be (e.g. update the docs for newer versions of Android or Windows, etc.).

    Take care,
    Uldiniad
    11
    Pie (wsl flavour) is out of the oven

    Hey everyone,

    TL;DR
    It is now possible to build lineage-16.0 on wsl! Just follow the updated guide from start to finish (syncing 16.0 on top of 15.1 is not recommended) and enjoy.
    DO NOT COMPLAIN ABOUT ANY ERRORS THAT ARE NOT STRICTLY DUE TO THE BUILD ENVIRONMENT (WSL). Many devices are not ready to build yet!

    Also, as always, I recommend building on the latest version of Windows. October Update was released recently: https://www.microsoft.com/en-ca/software-download/windows10

    For those still insterested in building 15.1 (ignore the repopick step): https://web.archive.org/web/2018061...ng/guide-how-to-build-lineageos-15-1-t3750175 (as mentioned in my previous announcement, do not report any errors, I will ignore them, since I do not have the means to maintain more than one branch on wsl)

    Full version:
    It has been some time since the last update. I apologise for the crickets.
    I didn't want to write a post until I was able to guarantee I could build lineage-16.0 without issues on wsl. I downloaded the sources as soon as they were released but was unable to complete a full build for my device without cherry-picking lots of patches for it and decided against it since I wanted to reduce the scope of the errors to the build environment alone. I only recently thought of building a generic image instead (which would accomplish what I wanted). Thankfully, wsl had less problems this time cause Google were cool with updating their bison and flex prebuilts (thereby now making them 64-bit) and killed off ijar (hopefully forever). So only dex2oat needed a patch this time around :D
    The wsl-compile-lineage-16.0 patches are merged (https://review.lineageos.org/#/q/st...h:lineage-16.0+topic:wsl-compile-lineage-16.0). So no additional steps required there. Otherwise, make sure to install m4 since it spat out an error about it missing.

    Thank you for your support,

    Uldiniad

    P.S. Feel free to ask any questions related to this and check my previous announcements to know my goals and standards for this side-project (https://xdaforums.com/showpost.php?p=77321912&postcount=261 for example)
    P.P.S. I am working on making an official wiki page on the LineageOS website which will be more convenient than this thread. I might consider leaving the thread open for feedback once it is open, but I might also consider having feedback reported via official means (JIRA probably).
    6
    Want a piece of Pie?

    Hey everyone, got some news to share.

    As you may have heard, the Pie is now out of the oven. Given that,
    1. At the moment building android on WSL is 100% experimental
    2. There seems to be little to no interest from Google and Microsoft to officially support wsl as an android build environment
    3. I'm working alone with limited time and knowledge of both the android build environment and the inner workings of wsl
    4. I plan on supporting the latest version of lineage available
    I am therefore starting research and work on lineage-16.0 and will be leaving lineage-15.1 as it currently stands.
    As windows updates come, wsl will change and may bring new unforeseen errors to the oreo build environment. Since I will not be maintaing that branch anymore, it may mean that the best option to keep building 15.1 is to not update to the latest build of windows if it causes errors. Given this situation I will be paying less attention to bug reports for 15.1 as time goes by and 16.x takes its place (especially since I do not have 15.1 synced anymore and will not be able to reproduce errors).

    For 16.x, it entails I will proceed to ram my head into the wsl wall until it gives up or I do.

    Hoping we'll all get a piece of the Pie,

    Uldiniad