yashsingh1/xdaforums huggingface dataset:
[Galaxy Tab S2 General] retiredtab:
@thisisludachris, I have been building roms for about 18 months now and can share that ccache is typically less than 10G per rom.

You can check by doing

ccache -s

Here is output from my machine building one rom.

$ ccache -s
Summary:
Hits: 758742 / 837008 (90.65 %)
Direct: 693243 / 845272 (82.01 %)
Preprocessed: 65499 / 143805 (45.55 %)
Misses: 78266
Direct: 152029
Preprocessed: 78306
Uncacheable: 293976
Primary storage:
Hits: 1499615 / 1682320 (89.14 %)
Misses: 182705
Cache size (GB): 7.89 / 20.00 (39.45 %)

Also, it is possible to build a rom with less than 16GB DRAM if you apply these patches below. Obviously, the more the better, but I have use the patches below to build when I had less than 16GB DRAM.

https://xdaforums.com/t/guide-how-to-build-android-11-with-low-ram.4298483/
[Galaxy Tab S2 General] thisisludachris:
Thanks for the info :)
[Galaxy Tab S2 General] paradroid28:
Sorry but for me this step fails. The repo command doesn't seem to find the files from team infusion:

team-infusion-developers/android_device_samsung_team-infusion-developers:

remote: Repository not found.

fatal: Repository »https://github.com/team-infusion-developers/android_device_samsung_team-infusion-developers/« nicht gefunden

error: Cannot fetch team-infusion-developers/android_device_samsung_team-infusion-developers from https://github.com/team-infusion-developers/android_device_samsung_team-infusion-developers

Does the procedure still work for you?

:confused: Paradroid
[Galaxy Tab S2 General] retiredtab:
It looks like whomever put up the manifest screwed up with cut and paste. It should probably be

<project name="team-infusion-developers/android_device_samsung_msm8976-common" path="device/samsung/msm8976-common" remote="github" revision="lineage-17.1" />

otherwise all the common code won't get compiled and integrated into the rom.
[Galaxy Tab S2 General] thisisludachris:
Yes @retiredtab is correct, there is an incorrect entry in the manifest file from team-infusion-developers. Please update the correct line as pointed out. Thanks.
[Galaxy Tab S2 General] thisisludachris:
@paradroid28 I just went over to my build folder and pulled out my manifest file as per below if you want to copy & paste them:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github" revision="lineage-17.1" />
<project name="LineageOS/android_hardware_sony_timekeep" path="hardware/sony/timekeep" remote="github" revision="lineage-17.1" />
<project name="team-infusion-developers/android_device_samsung_gts28vewifi" path="device/samsung/gts28vewifi" remote="github" revision="lineage-17.1" />
<project name="team-infusion-developers/android_device_samsung_msm8976-common" path="device/samsung/msm8976-common" remote="github" revision="lineage-17.1" />
<project name="team-infusion-developers/android_kernel_samsung_msm8976" path="kernel/samsung/msm8976" remote="github" revision="lineage-17.1" />
<project name="team-infusion-developers/proprietary_vendor_samsung_msm8976" path="vendor/samsung" remote="github" revision="lineage-17.1" />
</manifest>
[Galaxy Tab S2 General] paradroid28:
​

@thisisludachris

@retiredtab

Thank you for your efforts. I compared your manifest against the one I downloaded -> they are identical. So I probably have made a different error. ATM i don't know where to look, but i admit, i do not speak "git" fluently. Last time i built an Android ROM successfully was probably 2016-ish ;), therefore i was very happy about your notes thisisludachris.

If you have another idea where i can have messed up, please let me know.
[Galaxy Tab S2 General] retiredtab:
If you followed post #1 exactly, namely

mkdir -p ~/android/lineage
# save manifest to
~/android/lineage/.repo/local_manifests/gts28vewifi.xml

check to make sure ~/android/lineage/.repo/local_manifests/gts28vewifi.xml is the correct file.

There should only be one .xml file in that directory otherwise the build system will try and parse it.

Another thing you can do is

cd ~/android/lineage/.repo
grep -iRl "android_device_samsung_team-infusion-developers"

to see where that statement is hiding from you.
[Galaxy Tab S2 General] thisisludachris:
Perhaps start with which step from above that you are stuck on. Also, if you want to post a screenshot of your error, perhaps I can try to help troubleshoot. Bear in mind though I have limited knowledge in codes and compiling but will try nonetheless.
[Galaxy Tab S2 General] thisisludachris:
For those on Windows OS, you can install Ubuntu via WSL2 with the following command run in PowerShell:

wsl.exe --install

More info here if you require more details on running Ubuntu in Windows.

I'd be interested to see how you go with compiling on Ubuntu via WSL2 in Windows OS :D
[Galaxy Tab S2 General] paradroid28:
The step that fails is 'repo sync'. I Now deleted line 6 in the local manifest (which is generating the error because a certain repository is not found by my computer) and the sync command finished successfully :).

Now i will try building it and see, if i am missing something vital.

Maybe you have a very smart computer which finds more repos than mine;).
[Galaxy Tab S2 General] thisisludachris:
Good work @paradroid28, hope it went well.
[Galaxy Tab S2 General] paradroid28:
@thisisludachris

@retiredtab

Well, i have to thank you again and to apologize, because at first i misread post #5. There lies the solution. So every file of the local manifests from team infusion is faulty atm and refers to a repo that does not exist.

With the corrected manifest i was able to successfully build a ROM for my gts28velte. It remains to be tested on the device.

You might update post #1 to give people following it, a hint, that there is a problem with the manifest and how it can be fixed.

(y):D Paradroid
[Galaxy Tab S2 General] retiredtab:
@thisisludachris, @paradroid28, the next step for the 2 of you is to actually fix some the problems. I started just like you guys compiling what was given, but after a while, I learned how to fix the bugs and then take the next step and actually make the next Android version. I don't write code, but I copy working code from other repos (giving credit to original authors of course).

If you want guidance on how to do this, let me know.
[Galaxy Tab S2 General] Java the Hut:
yes please!

just bought a new POCO m4 pro 5g

never done that before but what the hell, might as well 😁

any bit of guidance would be very much appreciated ☺️
[Galaxy Tab S2 General] ArcSmurf:
that would be nice - would be good to try and get 18.1 on my Galaxy Tab TM-813 (gts210vewifi)

been a long time since built android, but would be fun to try and get back into it
[Galaxy Tab S2 General] T2100-0:
On curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo, it gets stuck on this:

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

100 45277 100 45277 0 0 278k 0 --:--:-- --:--:-- --:--:-- 279k

When I enter the link, (https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo) in a browser, it comes out with an error:

<Error>

<Code>AccessDenied</Code>

<Message>Access denied.</Message>

<Details>

Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object.

</Details>

</Error>
[Galaxy Tab S2 General] Skorpion96:
Ok few questions, what if your device is unofficial? what about the manifest? Also the guide differs if i want to build lineage 19.1?
[Galaxy Tab S2 General] retiredtab:
It's the same steps whether it's official or unofficial.

That's something you need to build or use an existing one. If you're new to building, I suggest building a rom that is offiical for a device you have. That way, you will see the entire process start to end.

No. It's basically the same.
[Galaxy Tab S2 General] retiredtab:
It's not stuck, it's already downloaded because the file is so small (45277 bytes). You can check via

$ ls -al ~/bin/repo
-rwxrwxr-x 1 l l 45277 Jun 14 14:53 /home/l/bin/repo

That's expected because you can't do that in a browser.
[Galaxy Tab S2 General] t3chg33k:
Assuming there is no official or unofficial release available for a device, is there any guide on the process of creating the manifest and using the correct blobs to experiment with the build process?
[Galaxy Tab S2 General] retiredtab:
I suggest looking for a github repo that has the same SoC/CPU chipset then for clues for the manifest.xml. Getting the correct vendor blobs is just running the script like from

https://github.com/ShivamKumarJha/android_tools

The above can also generate your basic device tree as well.
[Galaxy Tab S2 General] doxts:
Does anyone know how to solve this error? thx for help. I've executed brunch command (brunch full_maguro-userdebug)
[Galaxy Tab S2 General] retiredtab:
It looks like your build is failing because it can't find python.

sudo ln -s /usr/bin/python3 /usr/bin/python
[Galaxy Tab S2 General] retiredtab:
The above is workaround/hack that is used usually for building TWRP, not full ROMs. Your best bet is to build a proper roomservice.xml file so that all the correct repos are downloaded.

From a search of "github kminilte", it led me to

https://github.com/cm-3470/android_device_samsung_kminilte

where the readme tells you how to download the roomservice.xml or manifest.xml files so that it builds properly.

In addition, by having a proper manifest.xml any changes made to the source code are automatically synced when you do a repo sync. With you doing a manual git clone, those repos will never be updated if the source changes unless you manually check.
[Galaxy Tab S2 General] Zentriks:
Ok little update. I decided to build LineageOS for another device I own. The A5 206, codename a5xelte. Till now the build runs through smoothly, still have to wait. Issues that arose I was able to solve.

@retiredtab I thank you very much for your guidance even though I wasn't able to build LineageOs for the S5 Mini yet. I will put that on hold for now and try to gain more knowledge so that I can resume it again :D
[Galaxy Tab S2 General] T2100-0:
lineage@ubuntu:~$ chmod a+x ~/bin/repo

lineage@ubuntu:~$ git config --global user.email "my@email.com"

> git config --global user.name "T2100"

> cd ~/android/lineage

> repo init -u https://github.com/LineageOS/android.git -b lineage-16.0

> repo sync

>

it does nothing
[Galaxy Tab S2 General] CrackyBOI272:
Hello can you help me?

It is my first time making a custom rom

Ive flashed many roms in the past for my galaxy a5 and s4

but ive never gotten one for my galaxy a6

I have a doubt in the local manifest section

Do i have to get a local manifest for my own device or use the same one above

i want to create a rom based on lineage os 19

Would be very helpful if you reply
[Galaxy Tab S2 General] pixrobot8:
Um hello, quick question, im stuck at step

4.. terminal says that build/envsetup.sh is not a file or directory..

Can somebody tell me where i have to cd to or do because in step 1 the installer told me that it could not find a package 2 times but i ignored it the second time..

Can anyone help?
[Galaxy Tab S2 General] Zanci19:
Is there any chance to get it working on a7y18lte? Samsung Galaxy A7 2018 device was never supported by LineageOS, and I'm really trying to port it.
[Galaxy Tab S2 General] Sage:
going to try this thank you!
[Galaxy Tab S2 General] thisisludachris:
If all the steps you went through up to that point produced no errors, then your issue here is the command is just "brunch maguro". However, I think you may have selected an incorrect build as it 'should' be something like "lineageos_maguro-userdebug".
[Galaxy Tab S2 General] thisisludachris:
To compile a custom ROM, it's very important that the manufacturer 'open' their kernel source so that it could be ported. This is why one just can't build Lineage for any devices out there. The first place to start is search on github.com to see if your device is ported by any devs out there.
[Galaxy Tab S2 General] thisisludachris:
Your "repo init" and "repo sync" did not completed correctly, that's why it couldn't find the path to build/envsetup.sh
[Galaxy Tab S2 General] thisisludachris:
Please see my post above about the manufacturer opening their kernel source then do a search on github.com to look for a manifest file.
[Galaxy Tab S2 General] Zanci19:
I have the kernel source, but no manifest file. I searched the whole internet for it, but with no luck. Is there any chance I could make one myself?
[Galaxy Tab S2 General] thisisludachris:
There is no kernel source for a7y18lte that was ported to Lineage. What you found won't work when you compile it with Lineage. What you need to look for is the right version of kernel source that is ported to the version of Lineage you're compiling, for example below...
[Galaxy Tab S2 General] :
Sooo I sync with the wrong repo, how do I remove that specific tree, and replace it with the new one?
[Galaxy Tab S2 General] gvsa123:
Hi! I'm trying to understand the build process as well. But, I'm struggling to understand where the customization for the particular device happens. I wonder if someone can go over what the commands do?

I'm looking at specific instructions for my device (Samsung S7 SM-G930F). I'm guessing it'll be similar to others.

I get the setting up of the build environment including setting up the directory structure, installing repo, configuring git, etc. But, is it the manifest that tells the build tools and scripts how to configure the LOS source code? Or what does it do exactly? Also, there's a section for downloading device specific configuration and kernel. So in my case, there's a specific kernel that was built? Finally, there's an extraction of proprietary blobs, which I'm guessing are firmware files.

I still don't get where adapting to the device happens. Let's just say, LOS 25 is out, and there's no support for my device. What would need to happen to make it work with this example device?
[Galaxy Tab S2 General] thefanum:
You code the missing parts. Using existing (if you're lucky) supported devices with similar hardware chipsets, or from scratch.

If you can code and are looking for a place to start, go look at the commits from devices with that same hardware, that have already been ported to the LOS version you want to target.
[Galaxy Tab S2 General] LR7875:
deleted
[Galaxy Tab S2 General] gvsa123:
Thanks for info. I'll see if I can get a test phone to out building from source myself. Saw a couple of videos online - the one's I saw had more to do with updating version numbers, maybe setting a boolean value here and there, and really just researching solutions to your error messages as you go. It takes a long time though if you're addressing issues one by one since you have to start from the beginning. Is there a set of build tools that let you simulate the build before actually building on the hardware? Also, would it be common to have to chase different libraries and modules to make things work? Or do you just rely on the last known stable build and build off that?

Either way, I'm excitied to get into this. Thanks again!
[Galaxy Tab S2 General] System23:
Know ya somebody that can collect/publicate a AIO Collection of the local_manifest*.xml for Devices or a generic_manifest for Android 13?
[Galaxy Tab S2 General] Khalyl22:
can someone at least try building one for Oppo A5s (CPH1909)
[Galaxy Tab S2 General] zenfone selfie:
wrote to a wrong thread sorry...
[Galaxy Tab S2 General] zer0_Clover:
My device is dead. There are no official roms and there is no AOSP. All my device has is modded stock roms and buggy gsi's. Where should i even start?
[Galaxy Tab S2 General] System23:
your Start is that ya Tell me what is ya Phone Model,Name,ROM,Status and than i would look First what we can do!!! surely it give Devices there was Dead after Flash, but in your Szenario i would look First, before i give Up the Device!!! A Question before is it a China Device?
[Galaxy Tab S2 General] zer0_Clover:
J3 2017
[Galaxy Tab S2 General] thefanum:
That's not a model number. We need the actual model number
[Galaxy Tab S2 General] zer0_Clover:
j3y17lte / J330F / Samsung Galaxy J3 2017 / Samsung Galaxy J3 Pro
[Galaxy Tab S2 General] thefanum:
Here's a hypothetically functional device tree for LineageOS 15:

GitHub - RunningMango/android_device_7570-common_lineage: Working Exynos 7570 device tree for LineageOS 15.1

Working Exynos 7570 device tree for LineageOS 15.1 - RunningMango/android_device_7570-common_lineage

github.com

And 15.1:

GitHub - RunningMango/android_device_7570-common_lineage: Working Exynos 7570 device tree for LineageOS 15.1

Working Exynos 7570 device tree for LineageOS 15.1 - RunningMango/android_device_7570-common_lineage

github.com

And here's a GSI that some people claim is functional:

https://xdaforums.com/t/treble-vendor-a64-aosp-project-kebab-2-0-v2-2-1-g570x-7570.4091429/page-4
[Galaxy Tab S2 General] zer0_Clover:
the phone cant run anything below pie because of the non downgradable bootloader and that gsi has no camera or sound i tried it already
[Galaxy Tab S2 General] thefanum:
Then you're out of luck
[Galaxy Tab S2 General] IndigoHD:
I found this thread via google. I ordered a redmi k60 pro and so fqr there are no custom firmwares for that device.

I have my heart set on running LineageOS on it.

I am NOT a software developer. Am i deluding myself in thinking i could build LineageOS myself?

How likely am i to brick my device through my own stupidity?
[Galaxy Tab S2 General] Apostalus:
Sooo....on step 4 when I lunch, all it shows is the following:

root@apostalus-:~/android/lineage/build# lunch

[W][2023-08-14T05:03:59-0700][1786817] void cmdline::logParams(nsjconf_t *)():250 Process will be UID/EUID=0 in the global user namespace, and will have user root-level access to files

[W][2023-08-14T05:03:59-0700][1786817] void cmdline::logParams(nsjconf_t *)():260 Process will be GID/EGID=0 in the global user namespace, and will have group root-level access to files

[E][2023-08-14T05:03:59-0700][1] bool mnt::initNsInternal(nsjconf_t *)():415 chdir('/root/android/lineage'): Permission denied

[F][2023-08-14T05:03:59-0700][1] bool subproc::runChild(nsjconf_t *, int, int, int)():433 Launching child process failed

[W][2023-08-14T05:03:59-0700][1786817] bool subproc::runChild(nsjconf_t *, int, int, int)():461 Received error message from the child process before it has been executed

[E][2023-08-14T05:03:59-0700][1786817] int nsjail::standaloneMode(nsjconf_t *)():146 Couldn't launch the child process

05:03:59 dumpvars failed with: exit status 255

You're building on Linux

Lunch menu... pick a combo:

Which would you like? [aosp_arm-eng]
[Galaxy Tab S2 General] thefanum:
Looks like a permission issue
[Galaxy Tab S2 General] thefanum:
No
[Galaxy Tab S2 General] droidkeyboardfan12:
I cannot install the lib32ncurses5-dev lib32readline-dev lib32z1-dev and libncurses5 libncurses5-dev dependencies on debian 11. Does anyone know the correct / current versions of these dependencies?
[Galaxy Tab S2 General] thefanum:
Try searching in synaptic. Or just use Ubuntu 22.04. That's what I used, successfully. I did have to search for some dependencies and install them manually via synaptic, but I don't remember what they were. They were slightly differently named, but did exist in the Ubuntu repos. So it's likely they're in debian repos also. So that's where I would start.
[Galaxy Tab S2 General] Basomg:
Hello.

My main phone broke, and i'm left with a J1 from 2016 (sm-120h or j1x3g).

I've been looking into compiling a rom for it for security reasons, since it's still stuck on Lollipop (5.1.1), and the security patch is from May 2018.

I did find a kernel source here, but i was struggling with the manifest.xml, because i can't find all the items it needs in there, and was wondering if that's because of this phone's oddball chipset (It uses a Spreadtrum SC9830) instead of the preferable Qualcomm chips.

On top of all of that, i learned that Lineage 15.1 is no longer supported, so there doesn't seem to be a security benefit from this.

On my case, it's pretty much impossible to get a supported version working, right?

I'm super new to all of this, all i've ever done was flash compiled, and working roms, into devices i've owned.
[Galaxy Tab S2 General] thefanum:
Do you have any Linux command line skills?
[Galaxy Tab S2 General] Basomg:
Very basic, but i can figure things out by using the "--help" command, or, well, googling.

Do you have any pointers?
[Galaxy Tab S2 General] thefanum:
Unfortunately no, this is probably outside of your skill set. But if you want to try and build the most recent release from source, and let me know if/when you get stuck (with the specific error), I can try and help. That's the first step.
[Galaxy Tab S2 General] Basomg:
So I tried using this with resources i've found (device, and vendor).

But it immediately failed because i was missing a file.

Does it only work for Android 10?

Here's what happened:

Ubuntu:~/android/lineage$ git clone https://github.com/LegacyOS/android_device_samsung_j1x3g device/samsung/j1x3g
Cloning into 'device/samsung/j1x3g'...
remote: Enumerating objects: 87, done.
remote: Total 87 (delta 0), reused 0 (delta 0), pack-reused 87
Receiving objects: 100% (87/87), 4.76 MiB | 26.08 MiB/s, done.
Resolving deltas: 100% (36/36), done.

Ubuntu:~/android/lineage$ git clone https://github.com/IKGapirov/android_kernel_samsung_j1x3g -b lineage-15.1 kernel/samsung/j1x3g
Cloning into 'kernel/samsung/j1x3g'...
remote: Enumerating objects: 47531, done.
remote: Total 47531 (delta 0), reused 0 (delta 0), pack-reused 47531
Receiving objects: 100% (47531/47531), 132.44 MiB | 33.68 MiB/s, done.
Resolving deltas: 100% (3901/3901), done.
Updating files: 100% (44967/44967), done.

Ubuntu:~/android/lineage$ git clone https://github.com/J120H-dev/android_vendor_samsung_j1x3g vendor/samsung/j1x3g
Cloning into 'vendor/samsung/j1x3g'...
remote: Enumerating objects: 211, done.
remote: Counting objects: 100% (34/34), done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 211 (delta 9), reused 26 (delta 5), pack-reused 177
Receiving objects: 100% (211/211), 12.06 MiB | 14.84 MiB/s, done.
Resolving deltas: 100% (62/62), done.

Ubuntu:~/android/lineage$ build/envsetup.sh
bash: build/envsetup.sh: No such file or directory

Ubuntu:~/android/lineage$ source build/envsetup.sh
bash: build/envsetup.sh: No such file or directory

Ubuntu:~/android/lineage$ ls
device kernel vendor

Ubuntu:~/android/lineage$ cd ..

Ubuntu:~/android$ source build/envsetup.sh
bash: build/envsetup.sh: No such file or directory

Ubuntu:~/android$ ls
lineage

Ubuntu:~/android$ ls -a

. .. lineage
[Galaxy Tab S2 General] thefanum:
Try this instead

./build/envsetup.sh
[Galaxy Tab S2 General] Basomg:
No change

Ubuntu:~/android/lineage$ ./build/envsetup.sh
bash: ./build/envsetup.sh: No such file or directory

I think it isn't there at all lol

Ubuntu:~/android/lineage$ ls -a
. .. device kernel .repo vendor

I found this, which seems to be the file i was missing (?), saved at ~/android/lineage/build and named envsetup.sh, to run as suggested.

And got this result instead:

Ubuntu:~/android/lineage$ ./build/envsetup.sh
Couldn't locate the top of the tree. Always source build/envsetup.sh from the root of the tree.
./build/envsetup.sh: line 46: return: can only `return' from a function or sourced script
./build/envsetup.sh: line 48: /build/make/shell_utils.sh: No such file or directory
./build/envsetup.sh: line 310: gettop: command not found
Couldn't locate the top of the tree. Try setting TOP.
./build/envsetup.sh: line 1753: gettop: command not found
including device/samsung/j1x3g/vendorsetup.sh
./build/envsetup.sh: line 1770: /device/samsung/j1x3g/vendorsetup.sh: No such file or directory
./build/envsetup.sh: line 408: gettop: command not found
Warning: completion file /packages/modules/adb/adb.bash not found
Warning: completion file /system/core/fastboot/fastboot.bash not found
Warning: completion file /tools/asuite/asuite.sh not found
Warning: completion file /prebuilts/bazel/common/bazel-complete.bash not found

This makes it sound like the github repositories i'd found are missing some things.

This is probably too much for me.