1

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.

Valerio Bozz
  • 1,176
  • 16
  • 32

1 Answers1

0

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!

Giovix92
  • 1
  • 3
  • Interesting. I don't know why LineageOS don't even mention part of the git hash in use, for example directly in the zip filename so for example "lineage-19.1-20221114-ab36806fe7d8d-nightly-FP3-signed.zip" - or, mentioning the git hash of that zip from another txt file somewhere. In short, I think in the future it will be easy to do it, but not now. And I don't know how to propose that, so this will not change soon. – Valerio Bozz Feb 01 '23 at 07:20
  • 1
    Because, as I said in the answer, there are just too many repos to track, beginning from Google ones and ending with LineageOS's proprietary ones. The filename would be kilometers long, if not more. – Giovix92 Feb 02 '23 at 08:24