yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] AT_21:
Please try to resolve my isssue

alex@Vulcan:~/Project_Sakura/q$ lunch lineage_sakura-userdebug

17:15:52 Build sandboxing disabled due to nsjail error. This may become fatal in the future.

17:15:52 Please let us know why nsjail doesn't work in your environment at:

17:15:52

17:15:52

build/make/core/product_config.mk:228: error: device/xiaomi/sakura/lineage_sakura.mk does not exist

17:15:52 dumpvars failed with: exit status 1

Device sakura not found. Attempting to retrieve device repository from Sakura-Devices Github [

Repository for sakura not found in the Sakura-Devices Github repository list.

If this is in error, you may need to manually add it to your .repo/local_manifests/default.xml

17:15:59 Build sandboxing disabled due to nsjail error. This may become fatal in the future.

17:15:59 Please let us know why nsjail doesn't work in your environment at:

17:15:59

17:15:59

build/make/core/product_config.mk:228: error: device/xiaomi/sakura/lineage_sakura.mk does not exist

17:15:59 dumpvars failed with: exit status 1

17:16:04 Build sandboxing disabled due to nsjail error. This may become fatal in the future.

17:16:04 Please let us know why nsjail doesn't work in your environment at:

17:16:04

17:16:04

build/make/core/product_config.mk:228: error: device/xiaomi/sakura/lineage_sakura.mk does not exist

17:16:04 dumpvars failed with: exit status 1

** Don't have a product spec for: 'lineage_sakura'

** Do you have the right repo manifest?

I m getting this error while building
[Android Software/Hacking General [Developers Only]] Uldiniad:
is this in wsl 2.0? the setup seems odd. I do not recognize the device nor the source that it seems to be attempting to fetch. If you check soong and other logs in out/ dir you will probably find more details in there about what's happening.
[Android Software/Hacking General [Developers Only]] AT_21:
Sorry

Yah I just noticed that I was using WSL 1.0 though I am using the latest build of Windows I'll try once again and let you know if any errors(btw what's soong). Thanks for help !
[Android Software/Hacking General [Developers Only]] AT_21:
Restart Jack server

How can I restart Jack servers in wsl 2 as I am getting ran out of memory issues though I have the specified memory looks like the Ubuntu app is not using full RAM capacity.
[Android Software/Hacking General [Developers Only]] Uldiniad:
vmmem is the process that you care about in wsl 2. concerning restarting jack servers check documentation, you'll find it on Google. I would not recommend compiling on less than 32GB of RAM
[Android Software/Hacking General [Developers Only]] Hinfty:
That seems like an overabundance of caution.

I've been absolutely fine compiling LOS 17.1 on an old 8Gb laptop in less than 2h.

Try cherry picking this commit to help with the metalava process:

https://review.lineageos.org/c/LineageOS/android_build_soong/+/262959
[Android Software/Hacking General [Developers Only]] Uldiniad:
it is the recommended specs by Google. it's been years compiling on anything less than 16 has cause out of memory issues
[Android Software/Hacking General [Developers Only]] Axaroid:
Same error for me if you fixed it then tell me the solution, it might be causing due to default microsoft linux kernel
[Android Software/Hacking General [Developers Only]] masemoel:
Ensure that you are on WSL 2 running Ubuntu 20.04
[Android Software/Hacking General [Developers Only]] :
Due to the limitations of WSL, the build will take a lot of time, but it successfully built the Custom ROM for my device.
[Android Software/Hacking General [Developers Only]] kunalshah912:
FAILED: /home/kunalshah/aex/out/soong/build.ninja

cd "$(dirname "/home/kunalshah/aex/out/soong/.bootstrap/bin/soong_build")" && BUILDER="$PWD/$(basename "/home/kunalshah/aex/out/soong/.bootstrap/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --out "/home/kunalshah/aex/out/soong" -n "/home/kunalshah/aex/out" -d "/home/kunalshah/aex/out/soong/build.ninja.d" -t -l /home/kunalshah/aex/out/.module_paths/Android.bp.list -globFile /home/kunalshah/aex/out/soong/.bootstrap/build-globs.ninja -o /home/kunalshah/aex/out/soong/build.ninja --available_env /home/kunalshah/aex/out/soong/soong.environment.available --used_env /home/kunalshah/aex/out/soong/soong.environment.used Android.bp

Killed

03:18:33 soong bootstrap failed with: exit status 1

ninja: build stopped: subcommand failed

Using wsl2 with ubuntu 20.04 still its crashing.. any help?
[Android Software/Hacking General [Developers Only]] tjldn:
Hello @Uldiniad

I am wondering if this post is still updated.

I am stuck with repo sync; I finished sync but took almost 100 GB; is that the right size?

​
[Android Software/Hacking General [Developers Only]] Uldiniad:
Did you make any changes to the source? I build Android on WSL2 on Windows 11 daily for work, so it's a local issue
[Android Software/Hacking General [Developers Only]] namhoang235:
error: Cannot fetch platform/prebuilts/asuite from https://android.googlesource.com/platform/prebuilts/asuite

sir i got this for all source come from android.google ...

i use this command

repo sync -c -j13 --force-sync --no-clone-bundle --no-tags

and this (solution by google)

repo sync -j1

but it does not help
[Android Software/Hacking General [Developers Only]] Ironsmith9:
Can you re-post the original WSL1 instructions? Some people don't have the ability to use WSL2.

Specifically, how to get around the ijar issue.
[Android Software/Hacking General [Developers Only]] Uldiniad:
https://review.lineageos.org/q/ijar
[Android Software/Hacking General [Developers Only]] kotovasia:
i use this command

repo sync -c -j$(nproc --all) --force-sync --no-clone-bundle --no-tags

, and I get such messages for each file

Aborting
external/rust/cxx/: leaving master; does not track upstream
error: external/rust/cxx/: platform/external/rust/cxx checkout 08df062f6cd1828db20a719efeaae88c31da5319
error: Cannot checkout platform/external/rust/cxx
Checking out: 100% (1144/1144), done in 7.435s

tried using these commands

repo forall -c "git config core.fileMode false"
repo forall -c "git config core.autocrlf true"
repo forall -c "git reset --hard HEAD"
[Android Software/Hacking General [Developers Only]] :
[MENTION=7350242]Uldiniad[/MENTION]

I followed your tutorial as it says in the publication and it worked, now I am synchronizing repo de lineageos 14.1
[Android Software/Hacking General [Developers Only]] wlsxg:
linux-x86/bison/bison: Syntax error: "(" u

I'm trying to compile android8.1 on ubuntu16.04, but I get the error "prebuilts/misc/linux-x86/bison/bison: Syntax error: "(" unexpected".

ubuntu16.04 is based on 'ubuntu on windows'.

Help me,please

log: No need to regenerate ninja file [ 0% 1/364] //system/tools/hidl:libhidl-gen-ast yacc hidl-gen_y.yy [linux] FAILED: out/soong/.intermediates/system/tools/hidl/libhidl-gen-ast/linux_x86_64_shared/gen/yacc/system/tools/hidl/hidl-gen_y.cpp out/soong/.intermediates/system/tools/hidl/libhidl-gen-ast/linux_x86_64_shared/gen/yacc/system/tools/hidl/hidl-gen_y.h BISON_PKGDATADIR=external/bison/data prebuilts/misc/linux-x86/bison/bison -d --defines=out/soong/.intermediates/system/tools/hidl/libhidl-gen-ast/linux_x86_64_shared/gen/yacc/system/tools/hidl/hidl-gen_y.h -o out/soong/.intermediates/system/tools/hidl/libhidl-gen-ast/linux_x86_64_shared/gen/yacc/system/tools/hidl/hidl-gen_y.cpp system/tools/hidl/hidl-gen_y.yy prebuilts/misc/linux-x86/bison/bison: 1: prebuilts/misc/linux-x86/bison/bison: Syntax error: "(" unexpected [ 1% 6/364] //external/boringssl:libcrypto clang src/crypto/cipher_extra/e_aesgcmsiv.c [linux] ninja: build stopped: subcommand failed. 09:44:20 ninja failed with: exit status 1
[Android Software/Hacking General [Developers Only]] Uldiniad:
can you try repo sync again and run a new build? same for you [MENTION=4584035]Mcenzie[/MENTION].

I've recompiled bison and uploaded it to GitHub (/prebuilts/misc folder again). Otherwise, please look at the new note in the OP and let me know if that helps
[Android Software/Hacking General [Developers Only]] LordInfernvs:
Applying change number 208102...
--> Subject: "Adapt ijar for WSL"
--> Project path: build/make
--> Change number: 208102 (Patch Set 208102)
['git fetch github', u'refs/changes/02/208102/3']
From https://github.com/LineageOS/android_build
* branch refs/changes/02/208102/3 -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
tools/ijar/zip.cc
Please, commit your changes or stash them before you can merge.
Aborting
ERROR: git command failed

i'm getting this error, any advice?
[Android Software/Hacking General [Developers Only]] Uldiniad:
It is saying you have saved changes in the file ijar.cc which is the file that is going to be modified by the cherry pick. So if you don't care about the changes you've made, just git reset --hard. If you want to have your tree matching upstream (don't care about any local changes being overwritten, repo forall -vc "git reset --hard")
[Android Software/Hacking General [Developers Only]] Uldiniad:
I've never seen that error. Main errors so far have been dex2oat hangs and bison/libc++.so related. Sadly, only Google can help on that one and I agree it is a very strange error.

Your understanding is correct. WSL is improving but it is most definitely not a replacement for any Linux distro. If people are looking for reliability, consistency and speed then I doubt anything will ever beat a clean hard drive installation of the distro. The only reason I made this article is because I believe I'm not alone in wishing I could build Android on Windows (in my case, it is because I dislike dual-booting and virtual machines). And, so far, building lineage-15.1 on WSL has had varying degrees of success (especially between the different preview builds). Sadly I cannot skip ahead to RedStone 5 (registered too late for the previews). I'd like to be on the bleeding edge so that I can pick up on the new errors in the builds that come with the changes made on the latest available builds.

In any case, if you have more insights or if you find fixes to the errors, please share them with us. And if you go back to native linux, then I understand ;)

Personally, the instability isn't bothering me enough to guarantee a dual-boot or vm :p
[Android Software/Hacking General [Developers Only]] Uldiniad:
I found this on WSL github. I think it might be related

https://github.com/Microsoft/WSL/issues/2925
[Android Software/Hacking General [Developers Only]] SaberShip:
Thanks for your help, as I understand the CPU Microcode is incorrect in the WSL /proc/cpuinfo. To my knowledge this has been this way for awhile. The build seems to be complaining that the file just out right doesn't exist. I'll definitely keep searching around and see if I can figure out whats going on. However, with the strange inconsistent behavior I'm seeing I may never run across the /proc/cpuinfo error again.

I can't complain though as I'm on a fairly early Windows Insider build... I'll update my Windows build to a later build soon and see if it helps at all and report back here.

On another note, my WSL install location is unchanged on my C-drive however I changed my build location to a separate SSD through the /mnt/driveletter/ directory. As most of my problems are random missing files in the build directory (that don't actually seem to be missing) I'm wondering, could using a separate drive in the /mnt directory cause some instabilities in WSL?
[Android Software/Hacking General [Developers Only]] Uldiniad:
Lol, mnt is most definitely the issue here. Check my warnings on my OP

The only option you have if you don't want WSL on the same drive as Windows is to check their GitHub for moving WSL to other drives (I think someone else posted the name of the file in question in a previous post in this thread).
[Android Software/Hacking General [Developers Only]] SaberShip:
Thanks! Silly me I should have read the entire OP (I think I managed to read every line but that one xD) I feel stupid now. :silly:

Thanks again for your help I'll try moving my WSL to the other drive later today.
[Android Software/Hacking General [Developers Only]] WinterR:
Thank you very much for the guide, I successfully built RR for my device.

Unfortunately it took over 6 hours to complete! On Ubuntu OS on the same PC it takes a little less than 2 hours. Is this normal?
[Android Software/Hacking General [Developers Only]] Uldiniad:
It is normal. When you say 6 hours you mean with a clean out directory right? Because it should take only a couple minutes both on native and WSL if you're not building from scratch.

I recommend to anyone looking for speed comparisons between WSL and native to check: https://www.phoronix.com/scan.php?page=article&item=wsl-february-2018&num=1
[Android Software/Hacking General [Developers Only]] WinterR:
Yes, with clean out directory. I have also noticed repo sync also taking a longer time. I guess it's because of slower I/O performance.
[Android Software/Hacking General [Developers Only]] Uldiniad:
I'm now on the Skip Ahead branch of the Insider builds (currently 17639) and it seems like the with_dexpreopt workaround still works. I have not yet found a fix for the dex2oat hangs though.
[Android Software/Hacking General [Developers Only]] volcano619:
What should i do in this

<project name="TheMuppets/proprietary_vendor_your_device_brand" path="vendor/your_device_brand"

remote="github" />

<remove-project name="platform/prebuilts/misc" />

<remove-project name="LineageOS/android_prebuilts_build-tools" />

<project name="Uldiniad/android_prebuilts_misc" path="prebuilts/misc" remote="github" />

<project name="Uldiniad/android_prebuilts_build-tools" path="prebuilts/build-tools" remote="github" />

to set it up for Xiaomi Mi3,device name is cancro
[Android Software/Hacking General [Developers Only]] Uldiniad:
your device brand is xiaomi as you pointed out yourself. replace it with that
[Android Software/Hacking General [Developers Only]] volcano619:
Thanks ,that helped!!
[Android Software/Hacking General [Developers Only]] fdgd1998:
EDIT: It seems I managed to solve it.

Hey guys! I am trying to build LOS 15.1 for my HTC 10 (codename pme) but during the building process I obtain the following. I have searched online for it but I can found clear info about that.

3 warnings generated.
[ 4% 4871/99436] Lex: applypatch <= bootable/recovery/edify/lexer.ll
FAILED: /media/user/Archivos/android/lineage/out/target/product/pme/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp
/bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -o/media/user/Archivos/android/lineage/out/target/product/pme/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp
bootable/recovery/edify/lexer.ll"
flex-2.5.39: loadlocale.c:130: nl_intern_locale_data: Assertion `cnt < (sizeof (nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
Aborted (core dumped)
[ 4% 4876/99436] target StaticLib: li...IES/libv8src_intermediates/libv8src.a)
ninja: build stopped: subcommand failed.
00:41:13 ninja failed with: exit status 1
#### failed to build some targets (15:10 (mm:ss)) ####

I would be really grateful if someone can help me out.
[Android Software/Hacking General [Developers Only]] Uldiniad:
sounds like a locale issue. try adding this to bashrc file

export LC_ALL=C
[Android Software/Hacking General [Developers Only]] fdgd1998:
Yes, was that. I just managed to solve it after posting.

I tried to add the line into the .bashrc file, but no result. So I ended up to running it directly in the terminal.

Thanks!
[Android Software/Hacking General [Developers Only]] Rputra367:
Help me build los 15.1 for samsung SM J100H

Hey, anyone can help me to build lineage os 15.1 for my device?? My device is Samsung J100H
[Android Software/Hacking General [Developers Only]] Uldiniad:
I don't think your device officially supports lineage-15.1. You can try following theses steps with unofficial repositories (if you find any). Otherwise, you'll have to port it to your device from scratch.
[Android Software/Hacking General [Developers Only]] Rputra367:
Thanks for the responses

I got the same device that i can port with my device, the device is samsung core prime (core33g) but i don't know how to port it

---------- Post added at 04:25 PM ---------- Previous post was at 04:19 PM ----------

I got the same device that i can port with my device, the device is samsung core prime (core33g) but i don't know how to port it
[Android Software/Hacking General [Developers Only]] Uldiniad:
this thread is about how to build the latest available version of LineageOS on windows 10. Nothing more. For porting lineage to your device, search for other threads.
[Android Software/Hacking General [Developers Only]] XolYnrac:
If i have a repo of lineageos 14.1 is posible to use that and only add the addicional for lineage 15.1. In otther words, if i have repo of lineage 14.1 is necessary download all repository of lineage 15.1 ??
[Android Software/Hacking General [Developers Only]] Uldiniad:
lineage-15.1 and 14.1 have a lot of conflicting files. They cannot coexist in the same folder without overwriting eachother. Using repo init will overwrite the default branches from where to get the sources and therefore I don't think you can have them coexist within the same folder (android/lineage as an example). to have both you'd have to make two separate folders (android/lineage/nougat/ where you repo init 14.1 and android/lineage/oreo where you repo init 15.1). Hopefully you have enough drive space for both and windows.
[Android Software/Hacking General [Developers Only]] Uldiniad:
I am deleting my forks of the prebuilts folders since I have updated the OP with instructions to use a new flag that can be set and will help to keep the binaries that cause issues on wsl up-to-date and compiled in 64-bit (the crucial part)
[Android Software/Hacking General [Developers Only]] Uldiniad:
I have updated the OP with a new workaround for dex2oat issues. The previous one was to fully disable dexpreopt but in oreo it is mandatory to have at least system server jars preoptimized (https://android.googlesource.com/platform/build/+/418258c).

Thanks to GitHub user AngryGami, we know that one of the issues is caused by multithreading so for now to have dex2oat run and complete without hanging we have to bring the build down to one thread.
[Android Software/Hacking General [Developers Only]] Uldiniad:
No more crashes :)

Hey everyone,

I have updated the OP to deal with the two most prominent issues we were running into over the last couple of months.

Bison is now dealt with by building it from source (it generates a 64-bit binary which is crucial for wsl)

Dex2oat, for some reason, works when running with its multithreading disabled.

So there you have it. You can follow the updated steps in the op to avoid previous crashes.

Hopefully, Microsoft will fix what is theirs to fix so we won't need workarounds in the future.
[Android Software/Hacking General [Developers Only]] matssa:
Hey guys did anyone check the speed difference between a VM Machine and directly trough bash? I was thinking of following this but since I need a bigger SSD, wanna be sure before (since I have a VM machine turning on a dedicated SSD...). I would directly make the change but saw by myself that /mnt/ doesn't work (filesystem issues between sensitive and insensitive...).

Thanks!
[Android Software/Hacking General [Developers Only]] bootslag:
How do I solve this:

ninja: error: '/home/rh/lineage/out/target/product/YT3850M/obj/STATIC_LIBRARIES/libinit_msm8909_intermediates/export_includes', needed by '/home/rh/lineage/out/target/product/YT3850M/obj/EXECUTABLES/init_intermediates/import_includes', missing and no known rule to make it
[Android Software/Hacking General [Developers Only]] Uldiniad:
https://www.phoronix.com/scan.php?page=article&item=wsl-february-2018&num=1

I personally find a VM a waste of resources in comparison, but you can decide for yourself.

Also keep in mind that there are unofficial solutions for moving the wsl file system to other drives if you really need to.

My 256GB SSD recommendation is for someone like me who has Windows 10 with dev tools, IDEs, communication software, office tools, etc. installed on the SSD alongside wsl with LineageOS sources and building for only one device. The required space obviously varies depending on how much you install on C:
[Android Software/Hacking General [Developers Only]] Uldiniad:
with so little information on what you did I cannot be sure of what is going wrong. are you sure this is wsl related? From what I'm seeing, I think it has to do with your device's tree and that would be an issue you'd have to bring up with your maintainer
[Android Software/Hacking General [Developers Only]] matssa:
Thanks for the info, seems like we have Docker > WSL > Virtualbox (since ROM building is kinda heavy). What are your thoughts? And yeah you lose some resources since VMWare uses 1Gb only for itself, so on 11Gb I can only use 10 in Linux. never used Docker before, need to take a look and check benchmarks between them both.

Other than that, kinda afraid of ROM building on my main SSD since that's where all my system is, and kinda afraid to make to much I/O and reduce the lifetime and lose everything at the end ^^ And in termes of resources, what kind of loss were you thinking of?
[Android Software/Hacking General [Developers Only]] Uldiniad:
I've edited my previous answer by the way, you should check it out. On resource loss, I was thinking mainly RAM. To get fast build speeds I used to use VirtualBox and dedicate 8GB of RAM which Jack server still had difficulties with compared to dual-boot native linux obviously. But I'd also include CPU (since I also dedicated half of it to VM for speed) and even I/O wasn't great. Anyways, it's mostly opinion. It's viable of course, but I dislike VM option. In my situation WSL>Native>VM because I want to use windows while I can compile lineage. Docker is heavy stuff too which is why I don't currently use it, but it is a decent option if you don't want to go wsl route.

And concerning your worry on lifespan of the SSD due to wsl it is a fair concern. I can't argue against that. It is a choice you have to make.
[Android Software/Hacking General [Developers Only]] matssa:
Ah yeah didn't see your modified feedback. You mentioned unofficial stuff to transfer WSL to another drive ? Do you have more info on that, since it seems like what I want to do lol (instead of using mnt in Linux).

Thanks anyways for your help, I'll stay with VMware until /mnt works or if I can make the unofficial stuff work :)
[Android Software/Hacking General [Developers Only]] Uldiniad:
you can check around for other resources, but here is one I found: https://github.com/Microsoft/WSL/issues/449
[Android Software/Hacking General [Developers Only]] XolYnrac:
how can i report bugs ?
[Android Software/Hacking General [Developers Only]] bootslag:
[MENTION=7350242]Uldiniad[/MENTION] I'm building a custom RR ROM for an unsupported device and while building that error popped up. My device tree is at github.com/octocatx/android_device_lenovo_YT3850M
[Android Software/Hacking General [Developers Only]] matssa:
Ok so good news I used what you linked with some other stuff and managed to put the Linux on another drive :) So it's building Bison right now, at least no freaking errors because of uppercase/lowercase sensitivity ;)

Concerning bison and ijar, i think that you need to specify that it's necessary to rebuild if you make clobber (since it will remove the hole out directoy).

Thanks a lot for your guide! :)

EDIT/// Ok managed to build :) Had little issues concerning libcc.so (couldn't read it) but now success on another HDD :)
[Android Software/Hacking General [Developers Only]] Uldiniad:
what bugs?
[Android Software/Hacking General [Developers Only]] Uldiniad:
does it build correctly under native linux?