[Walkthrough] device.xml for local_manifests

Structure

Plan: add projects to this base.

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project path="manifest" name="tools/manifest" />
  <project path="platform-manifest" name="platform/manifest" />
</manifest>

Fundamentally the manifest links sources with destinations in the build environment.

Location

The device.xml will go in this location: /.repo/local_manifests/device.xml. This is very similar to roomservice.xml.

Device tree and Sources

Look up a device tree for a3xelte. Your chosen components must be available in the branch you intend to build. Let’s try https://github.com/LineageOS/android_device_samsung_a3xelte/tree/lineage-18.1 (Notice the use of lineage-18.1 branch selected, you can always check for other branches.)

Method

This is a device supported by LineageOS an /e/ so this is a relatively simple manifest.

Take the url and break it apart to fit the required format:

Image

a) the url: https://github.com/LineageOS/android_device_samsung_a3xelte
b) remote=“github”
c) name=“LineageOS/android_device_samsung_a3xelte”
d) path is destination, where it is going to fit in the android build environment. No leading or trailing slash.
path=“device/samsung/a3xelte”
e) <project path="device/samsung/a3xelte" remote="github" name="LineageOS/android_device_samsung_a3xelte" />

Clue 2. From https://github.com/LineageOS/android_device_samsung_a3xelte look on the page for lineage.dependencies

Links to the url: https://github.com/LineageOS/android_device_samsung_universal7580-common

a) url: https://github.com/LineageOS/android_device_samsung_universal7580-common
b) remote=“github”
c) name=“LineageOS/android_device_samsung_universal7580-common”
d) path=“device/samsung/universal7580-common”
e) <project path="device/samsung/universal7580-common" remote="github" name="LineageOS/android_device_samsung_universal7580-common" />

Clue 3. From https://github.com/LineageOS/android_device_samsung_universal7580-common look for lineage.dependencies – links to this

Expressed

[
    {
        "repository": "android_hardware_samsung",
        "target_path": "hardware/samsung"
    },
    {
        "repository": "android_hardware_samsung_nfc",
        "target_path": "hardware/samsung/nfc"
    },
    {
        "repository": "android_hardware_samsung_slsi_exynos",
        "target_path": "hardware/samsung_slsi/exynos"
    },
    {
        "repository": "android_hardware_samsung_slsi_exynos5",
        "target_path": "hardware/samsung_slsi/exynos5"
    },
    {
        "repository": "android_hardware_samsung_slsi_exynos7580",
        "target_path": "hardware/samsung_slsi/exynos7580"
    },
    {
        "repository": "android_hardware_samsung_slsi_openmax",
        "target_path": "hardware/samsung_slsi/openmax"
    },
    {
        "repository": "android_kernel_samsung_universal7580",
        "target_path": "kernel/samsung/universal7580"
    }
]

a) https://github.com/LineageOS/android_hardware_samsung
b) remote=“github”
c) name=“LineageOS/android_hardware_samsung”
d) path=“hardware/samsung”
e) <project path="hardware/samsung" remote="github" name="LineageOS/android_hardware_samsung" />

a) https://github.com/LineageOS/android_hardware_samsung_nfc
b) remote=“github”
c) name="LineageOS/android_hardware_samsung_nfc
d)“target_path”: path=“hardware/samsung/nfc”
e) <project path="hardware/samsung/nfc" remote="github" name="LineageOS/android_hardware_samsung_nfc" />

Work through the remainder of the sources.

Find proprietary / vendor

Try https://github.com/TheMuppets/ and / or https://gitlab.com/the-muppets

Here is one at Android R: https://github.com/TheMuppets/manifests/blob/lineage-18.1/muppets.xml a little extravagant, it brings in all the Samsungs in their catalogue, but with the addition of depth="1" we restrict the download to “essential” – please look it up to understand !

Put them all together
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project path="device/samsung/a3xelte" remote="github" name="LineageOS/android_device_samsung_a3xelte" />
  <project path="device/samsung/universal7580-common" remote="github" name="LineageOS/android_device_samsung_universal7580-common" />
  <project path="hardware/samsung" remote="github" name="LineageOS/android_hardware_samsung" />
  <project path="hardware/samsung/nfc" remote="github" name="LineageOS/android_hardware_samsung_nfc" />
  <project path="hardware/samsung_slsi/exynos" remote="github" name="LineageOS/android_hardware_samsung_slsi_exynos" />
  <project path="hardware/samsung_slsi/exynos5" remote="github" name="LineageOS/android_hardware_samsung_slsi_exynos5" />
  <project path="hardware/samsung_slsi/exynos7580" remote="github" name="LineageOS/android_hardware_samsung_slsi_exynos7580" />
  <project path="hardware/samsung_slsi/openmax" remote="github" name="LineageOS/android_hardware_samsung_slsi_openmax" />
  <project path="kernel/samsung/universal7580" remote="github" name="LineageOS/android_kernel_samsung_universal7580" />
  <project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" depth="1" />
</manifest>

This is very much an entry level example – not yet covered

the use of remote and fetch
	<!-- Remote -->
  <remote fetch="https://github.com/K9100ii" name="K9100ii" />

A very much fuller guide on the device tree itself from XDA [GUIDE] How to make a device-tree for your phone

5 Likes

@aibd Thank you!

Wouldn’t this in itself be a good thing, to put this on github/gitlab?

In a way inspired by @piero I just built my first ROM ever, using /e docker.

Just like testing ROMs, to help development, I feel we should also use the same build-tools the dev-team is using. Plus, having a git repo with sort of stable device-manifests, would be a great starting point.

With cloning manifests, or using some dev-manifests, we could then slowly venture of into development, using /e docker as the common base build environment.

I never thought I could build /e on first try, especially on such old hardware:

/e/ has a few in stock https://gitlab.e.foundation/e/os/local_manifests/-/tree/v1-r?ref_type=heads.

Supported devices (LineageOS or /e/OS) when built produce roomservice.xml saving these to some location might be useful, as done once before Place for manifest.xml samples.

But it is really for an unsupported device this technique will be useful.

Someone might try to “work the example” proposed https://gitlab.e.foundation/e/os/docker-lineage-cicd/-/tree/master#build-for-a6000-not-officially-supported-custom-keys-restricted-signature-spoofing-with-integrated-microg-and-fdroid as that example is difficult to follow if one had not practiced the method.

Thanks to @smu44 in the post below. Only understanding the creation of the a6000.xml

is of use to /e/OS learners !
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project name="dev-harsh1998/android_device_lenovo_a6000" path="device/lenovo/a6000" remote="github" />
  <project name="dev-harsh1998/android_device_lenovo_msm8916-common" path="device/lenovo/msm8916-common" remote="github" />
  <project name="dev-harsh1998/kernel_lenovo_msm8916" path="kernel/lenovo/a6000" remote="github" />
  <project name="dev-harsh1998/proprietary-vendor_lenovo" path="vendor/lenovo" remote="github" />
  <project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" />
</manifest>

The example carries on with LineageOS method.

3 Likes

I agree, LOS or /e/OS supported shouldn’t need anything but proprietary blobs (TheMuppets).

Please be aware that this is LOS guide, and maybe outdated for /e/OS :wink:

After building now a couple of unofficial builds (I must be crazy :rofl: ) I must admit that I do not pay much attention to the manifest.xml file. If its available than it is of course great to see and compile the sources needed. Unfortunately a lot of developers do not share the manifest file. And using repo and breakfast works most of the times to guide which sources are still missing. Breakfast does not guide in any case but while brunch command one can see on the errors which sources are still missing.

2 Likes

I couldn’t agree more … :sweat:

This topic was automatically closed after 90 days. New replies are no longer allowed.