yashsingh1/xdaforums huggingface dataset:
[Android] HassanMirza01:
someone explain how i can get static/standalone binaries of some function like fs_config ? i have edited Android.bp of fs_config and added -static flag for cc but seems like its not at all read by build system, any help?
[Android] bluess57:
Tried issuing "mm" command in the directory?

Why do you want a static library?
[Android] HassanMirza01:
i used make fs_config only, it compile fine but dynamic binary.

i need static one so i can use it in my path, cant keep aosp synced always
[Android] DiamondJohn:
I am trying to build Bliss A13 for a Pixel 4a. Where the build is failing is in getting the source code.

I have used the following to initialise (as well as downloading repo etc)

mkdir -p ~/android/bliss;
cd ~/android/bliss;
git config --global user.email "XXXXXX@gmail.com";
git config --global user.name "XXXXX";

repo init -u https://github.com/BlissRoms/platform_manifest.git -b typhoon-qpr2 --git-lfs;
repo sync -c --force-sync --no-tags --no-clone-bundle -j10 --optimized-fetch --prune;

Which are the instructions from Bliss.

However, the download of source fails to actually download the source. It thinks it does, but when I check a file, it has not downloaded it.

For example, the manifest file to get the prebuilt chromium-webview is defined as

<remote name="aosp"
fetch="https://android.googlesource.com/"
review="https://android-review.googlesource.com/" />

<default revision="refs/tags/android-13.0.0_r43"
remote="aosp"
sync-j="4" />

<project path="external/chromium-webview" name="platform/external/chromium-webview" groups="pdk" clone-depth="1" />

If I manually down load the files, it is about 90MB and is an APK. But, when I run repo sync, the file in the directory is only 134 Bytes and contains the following

version https://git-lfs.github.com/spec/v1
oid sha256:ffdb556511a2e8704a02bdde46b528635187efa9498169c87dc8e2b04c8f905c
size 217787235

But the actual file can be seen at https://android.googlesource.com/pl...tags/android-13.0.0_r43/prebuilt/arm64.tar.gz

What am I doing wrong? Its driving me crazy
[Android] NepoRood:
Have you tried NOT following what Bliss says and just sync? lol

Seriously though, some those flags I've never used or heard of, such as:

--git-lfs and --optimized-fetch

I'd just do:

repo init -u https://github.com/BlissRoms/platform_manifest.git -b typhoon-qpr2 bliss

Then sync it:

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

That's about all I got, it's been a while since I've tried to sync a manifest that I didn't put together myself, best of luck DJ
[Android] DiamondJohn:
EDIT: it now has successfully built, using a new "Pixel GApps" option in Bliss, as well as the git-lfs

I have tried a number of different sync options, and basically all get the same borked webview.apk.

And its not just this one file. As part of my build I run a diff (as I used to make a LOT of changes locally on previous builds for other devices), and here are the results.

Spoiler content hidden.

So the number of files not matching the source is pretty high.

EDIT: And this is the point it fails at in a build.

Spoiler content hidden.

Its not a pretty easy to target fix. Yes, the error is 11,000 characters long!
[Android] ipdev:
@DiamondJohn

Did you install and initiate git-lfs ?

If the repo is using it, you need to initiate git-lfs at least one.

Once active, it will be active across all repos until you remove or change you git id.

Cheers. :cowboy:

About Git Large File Storage - GitHub Docs

GitHub limits the size of files allowed in repositories. To track files beyond this limit, you can use Git Large File Storage.

docs.github.com

Edit:

PS.

You do not need to configure what file (extentions) it looks for.
[Android] DiamondJohn:
EDIT: it now has successfully built, using a new "Pixel GApps" option in Bliss, as well as the git-lfs

The example file if LFS is not used, is basically what I am getting!

However, the repo init already uses --git-lfs as a parameter.

repo init -u https://github.com/BlissRoms/platform_manifest.git -b typhoon-qpr2 --git-lfs

And to add further confusion, I installed a package sudo apt-get install git-lfs which was not installed and im now running the init/sync again. The URL you linked is a little vague on the install onto linux or windows; I couldn't work it out.

hopefully the install of git-lfs will work 🤞

EDIT: IT DID!(y)
[Android] ipdev:
It has been a few years since I initially installed it but, I remember getting confused.

If I remember correctly, the part that confused me was activating it.

You have to run git lfs install after installing git-lfs to activate it.

[ip@lost github]$ git lfs install
Git LFS initialized.
[ip@lost github]$

That part confused me because both steps refer to install.

I assumed installing it was the same as the command to activate it.

Sorry, it has been a few (5?) years since I set git-lfs up and I have not run a rom build in a a few (2 or 3?) years.

I have been lazy and just updating my Linux box. I haven't had to do a clean install (thankfully) lately.

Good Luck. 👍

Cheers. :cowboy:
[Android] DiamondJohn:
EDIT: it now has successfully built, using a new "Pixel GApps" option in Bliss, as well as the git-lfs

Its still doing the sync, but the install of git-lfs seems to have enabled downloading the whole & valid APK ! I am shocked that the users on the Telegram channel for building bliss didnt spot this.

Come on! finish the synch so I can do a build!!!!!
[Android] DiamondJohn:
FYI: Just in case anyone else has similar issues, It now built successfully 🥳🎉with the git-lfs install AND using a new Bliss "Pixel GApps" option that I have not seen in their documentation. I found out about it on the Bliss build help Telegram channel.
[Android] bilbonotry:
What's the problem with pastebin?

Example : https://pastebin.com/raw/BmPfJQiE
[Android] DiamondJohn:
It wraps text :(

[2023-05-17 18:45:14] make: Leaving directory '/home/diamondjohn/android/bliss/k - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

pastebin.com
[Android] NepoRood:
For "error sharing" I use Github and push as a text file.

Change "nobody" to "somebody" or "whatever", it's in their envsetup.sh: link
[Android] DiamondJohn:
I'm trying to build RisingTechOSS, Android 13, for an Unofficial device (Pixel 4A 4G, sunfish) using the official lineage device tree.

I am getting the following error.

[2023-06-02 11:47:16] [ 99% 609/610] finishing build rules ...
[2023-06-02 11:47:16] FAILED:
[2023-06-02 11:47:16] build/make/core/artifact_path_requirements.mk:30: warning: device/google/sunfish/lineage_sunfish.mk produces files inside build/make/target/product/generic_system.mks artifact path requirement.
[2023-06-02 11:47:16] Offending entries:
[2023-06-02 11:47:16] system/app/GoogleExtShared/GoogleExtShared.apk
[2023-06-02 11:47:16] system/etc/permissions/android.hardware.biometrics.face.xml
...snip...
[2023-06-02 11:47:16] system/priv-app/GoogleExtServices/GoogleExtServices.apk
[2023-06-02 11:47:16] In file included from build/make/core/main.mk:1360:
[2023-06-02 11:47:16] build/make/core/artifact_path_requirements.mk:30: error: Build failed.
[2023-06-02 11:47:16] 11:47:16 ckati failed with: exit status 1
[2023-06-02 11:47:16]
[2023-06-02 11:47:16] [0;31m#### failed to build some targets (05:15 (mm:ss)) ####[00m

The full log is attached.

Anyone have an idea how to solve?
[Android] NepoRood:
Add offending entries to an allow list or disable mainline checking, either works. I mostly see the latter option used, here's a link to Lineage tree: Sunfish

Comment or delete the line and it'll move past that particular error
[Android] DiamondJohn:
I went out on a limb, and commented out the line based on some web searches. Thanks for confirming I may be on the correct path.(y)

#PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := strict

I did note that there were a number of device trees that did NOT have the restriction, so hopefully its OK/common to leave it out, as you have said you have seen.

I am using the LOS device tree as my build device. Kernel & device from LOS & vendor from TheMuppets.

I also had to remove the following from vendor/google/sunfix/Android.bp Maybe I removed that before I removed the restriction/check, IDK.

android_app_import {
name: "DeviceIntelligenceNetworkPrebuilt",
owner: "google",
apk: "proprietary/product/priv-app/DeviceIntelligenceNetworkPrebuilt/DeviceIntelligenceNetworkPrebuilt.apk",
presigned: true,
dex_preopt: {
enabled: false,
},
privileged: true,
product_specific: true,
}

My simple understanding is that there are multiple places / rules that are building the same component? My concern is that maybe some of them build differently.

I made the above changes, and the build completed. Now to flash the ROM and pray it boots.🤞 Luckily I have a test pilot willing to test flash the ROM for me. 😙
[Android] NepoRood:
Device trees have become so "modular", for lack of a better term, it's hard to keep up with what is where. I just happened to remember the artifact error because I had it before and I have fixed it with both techniques. Commenting the line I referenced is definitely the quickest "fix".

I'd call it a "hack" though, honestly, because the build system checks are there for a reason. If you're going to introduce new artifacts to the environment, then code it in properly to pass the checks. Note, by "you" I don't actually mean YOU, lol.

I've worked and talked with a lot of ROM developers from a LOT of different teams, most are gone these days. They all had different opinions about how to go about doing things, just like every other place.

Just do whatever you feel comfortable with, if you're satisfied with the end result of your endeavors, it really doesn't make a flying fig what anyone else thinks.

That'd be both my pennies on it
[Android] DiamondJohn:
Is anyone else building crDroid A13? I am having a space issue, in that if its built with GApps it fails the space check when building the flashable zip. I*m hoping its a simple change to build it using minimal GApps.

I am using an official Lineage Device, so it may be a LOS thing to switch to min gapps.

My device is a Pixel 4A 4G so flashing GApps after installing the ROM is not an option.
[Android] Mordechay:
Is it possible to compile aosp on ubuntu (22.04) with an arm processor?

(I use a mac with an m1 processor and because I saw that aosp does not support mac (I tried to compile and there were errors when compiling the rust library), I am trying to install ubuntu adapted for mac
[Android] DiamondJohn:
Just an FYI. I fixed the issue by using the gapps build code from another ROM (Bliss) that also fixed the same issue. It basically came down to 2 lines of code (1 addition to local manifest to get the code locally, and another line to call the different GMS make file) and one line/step in the build process (ie export WITH_GMS=true). Trying to find the same point within crDroid was not easy compared to just replacing it with a known working repository.

Although in hindsight, I may of been better to have sourced the gms code from another ROM (eg RingTechOS), with a smaller footprint/list of Google apps installed.
[Android] NepoRood:
Building for Pixel can be fun, to put it mildly, it can also be a headache at times.

One thing to keep in mind is that pretty much every ROM out there is the same, only difference these days is the way they go about implementing the same changes.

This one puts it in ROM specific vendor, another puts it in device vendor, while a 3rd puts it in one of the hardware repos and yet another creates a special repo just for it. All for the same "feature", or addition, or whatever.

I just do my own thing, that way I know exactly where everything is located, you should try it...
[Android] lordkaczuha:
hey im trying to set up my build enviroment but i cant get all the tools
sudo apt-get install git-core gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python

could i get the commands to get them? im sorry im kinda new to android porting
[Android] DiamondJohn:
Most build instructions like the above line are written months ago. Since they were written, a few of the packages have upgraded versions and have changed names. Running it as a single line puts out a heap of text making it hard to see the failing issue. I convert these lines all to individual single lines. so something like:

sudo apt-get install git-core;
sudo apt-get install gnupg;
sudo apt-get install flex;
...snip...

I then run each line individually to see if it has a problem, from memory, it may even give a suggestion for a change when it fails.

I have also found, that some are missing items that get identified when building or by a build failure.

Here is my script/log when I was initialising my current build box (a virtual box to build A13. Not sure why I flagged "bison", and you should also check against your list for things that are missing. The following has worked for me for building Bliss, crDroid and RisingOS

sudo apt-get install git-core;
sudo apt-get install gnupg;
sudo apt-get install flex;
sudo apt-get install bison; #
sudo apt-get install gperf;
sudo apt-get install build-essential;
sudo apt-get install zip;
sudo apt-get install curl;
sudo apt-get install zlib1g-dev;
sudo apt-get install gcc-multilib;
sudo apt-get install g++-multilib;
sudo apt-get install libc6-dev-i386;
sudo apt-get install lib32ncurses5-dev;
sudo apt-get install x11proto-core-dev;
sudo apt-get install libx11-dev;
sudo apt-get install lib32z-dev;
sudo apt-get install ccache;
sudo apt-get install libgl1-mesa-dev;
sudo apt-get install libxml2-utils;
sudo apt-get install xsltproc;
sudo apt-get install unzip;
sudo apt-get install squashfs-tools;
sudo apt-get install python-mako; ##$fail
sudo apt-get install libssl-dev;
sudo apt-get install ninja-build;
sudo apt-get install lunzip;
sudo apt-get install syslinux;
sudo apt-get install syslinux-utils;
sudo apt-get install gettext;
sudo apt-get install genisoimage;
sudo apt-get install bc;
sudo apt-get install xorriso;
sudo apt-get install xmlstarlet;

sudo apt-get update;
sudo apt install python-is-python3;
sudo apt-get install jq;
sudo apt-get install libncurses5;
sudo apt-get install git-lfs;
git lfs install;
[Android] ruskygaroda:
hello i have the boot.img and decompressed got the file called kernel how can i extract it? with gunzip i cant it throws me error, i need to modify some files in the kernel pack again and repack boot img
[Android] Juleast:
Hello all. I am in need of some assistance building a ROM for my device. I have the LG G7 ThinQ and I'm trying to build SparkOS Android 11.

I've setup my build environment and got stuck during building.

I get this error:

FAILED: ninja: '/mnt/other/home/juleast/spark/out/target/product/judyln/obj/SHARED_LIBRARIES/libcld80211_intermediates/libcld80211.so.toc', needed by '/mnt/other/home/juleast/spark/out/target/product/judyln/obj/SHARED_LIBRARIES/libwifi-hal_intermediates/LINKED/libwifi-hal.so', missing and no known rule to make it
00:48:32 ninja failed with: exit status 1

The error is talking about I think the dependency libcld80211 missing? Not sure. I'm lost on how I would go about resolving this. Any assistance would be appreciated thanks.

DT: https://github.com/EmanuelCN/android_device_lge_judyln
[Android] quake73:
In hardware_qcom_wlan-caf/Android.mk

comment out the first and the last line, like this:

#ifeq ($(call my-dir),$(call project-path-for,qcom-wlan))

# TODO: Find a better way to separate build configs for ADP vs non-ADP devices

ifneq ($(BOARD_IS_AUTOMOTIVE),true)

include $(call all-subdir-makefiles)

endif

#endif
[Android] Juleast:
Thank you for your reply! I'll try this tonight.
[Android] Marcyvee:
Is this tutorial still valid in 2023?
[Android] Juleast:
Hey,

So after I commented out the lines you mentioned in the make file, I got past that part but now I'm getting a new error.

FAILED: ninja: '/home/juleast/spark/out/target/common/obj/JAVA_LIBRARIES/auto_value_annotations_intermediates/exported-sdk-libs', needed by '/home/juleast/spark/out/target/common/obj/APPS/Dialer_intermediates/exported-sdk-libs', missing and no known rule to make it
20:38:54 ninja failed with: exit status 1

What can I do about this?
[Android] Juleast:
I postponed building SparkOS and am trying to build DerpFest A11 instead and I get stuck on clang not found in kernel build... and that's weird because when I was building crDroid, it compiled the kernel just fine. Here is the full log here: https://pastebin.com/61H4hhv8.

Here is my device kernel: https://github.com/EmanuelCN/android_kernel_lge_sdm845.

Any help is appreciated thanks.
[Android] naterz:
Looking for a little help building/adding wireguard support to my Pixel 4a 5G (redbull/bramble). It's already in the device's source tree, just disabled in the build system. The Google/AOSP build system does not seem to appreciate any tinkering whatsoever and will demand make mrproper until the suns comes up. I'm now attempting to build it as a kernel module which I can inject later with Magisk, and thinking it hopefully may be more feasible with the LineageOS build system. However, mma in the wireguard directory fails with:

"FAILED: ninja: unknown target 'MODULES-IN-kernel-google-redbull-drivers'

18:06:00 ninja failed with: exit status 1"

Any insight on this?
[Android] DiamondJohn:
could/would you just use the app?

Installation - WireGuard

www.wireguard.com
[Android] AltFantasy:
do we have an updated version of the guide posted in the first messages of this thread (back in 2014), for Android 12/13?
[Android] DiamondJohn:
Im getting fallowing, when building two different A13 (but both LOS based ROMS). I also find that the change log is just of list of dates, with no changes. I actually run an old changelog script before I do a build (to see what is going to be in it), and that works. I flashed a first build, and the search in settings is also broken. I did a wipe and redownloaded the souce, but still the same.

[ 99% 146906/146909] Target boot image from recovery: out/target/product/sunfish/boot.img
File "/home/diamondjohn/bin/repo", line 1292
comment_line = re.compile(rb"^ *#")
^
SyntaxError: invalid syntax

And that line IS in the repo script!

Any ideas? Why is this only happening to me (I searched the web) when everyone is mostly using the latest repo.
[Android] AltFantasy:
it is what it is, an invalid syntax. Could be a typo?
[Android] AltFantasy:
how much of the original guide in page 1 is still relevant today?
[Android] DiamondJohn:
I downgraded to the previous version, and it now works. I dont think its a typo. I believe Its a change of min python version and ubuntu defaults to an old version.

The funny thing is I am now seeing people on telegram notice their changelog is borked and asking why.