Exact source code of a specific LineageOS build image

495 Views Asked by At

How to download the exact source code of a specific LineageOS Android build?

For example this one:

https://download.lineageos.org/FP3

sha256 039a65b5365acd4d570fab1c034f450f32f04ca6f5371602adc6a9736bffe015
lineage-19.1-20221031-nightly-FP3-signed.zip

Goal: being able to manually inspect the (Open Source) source code and verify that no arbitrary code has been manipulated in this specific build.

Preamble

When I download an app like Termux from F-Droid I can:

  1. verify the PGP signature (verifying package authority and integrity)
  2. inspect the build log (checking for controversial passages from unusual libraries)
  3. download the original source tarball and inspect the source code (most important for me)

How to do the last verification step on a specific LineageOS build?

Notes

At the moment it seems to me that I have to take the date from the download page (e.g. 20221114) and manually guess the exact commit hash from the official repository. This seems to me an unscientific way to proceed.

Thank you for the clarification about how to download the exact source code of whatever specific official LineageOS build.

1

There are 1 best solutions below

2
On

Short answer, you can't.

Long answer: you could, but in this way you won't ever get the same precise package. And (imho) you'll waste a ton of time and resources, too.

LineageOS has tons of repos, it's not just one repo. You could still sync the entire source from their manifest and checkout everything at a specific date, in your case at the test build's date. After that, you could build an unofficial build by yourself, using the LineageOS building guide. Though, it won't match precisely the official build because, among other factors, you're missing the signing key used to sign the official builds, which is private (as it should be). This is what differentiates an official build from an unofficial one.

Regarding the checkout part, you can check here regarding the latest commits added in that specific build.

Good luck!