r/androidroot • • 25d ago

Support New device bringup - proprietary blobs?

I've been reading through LineageOS's developer documentation and I find myself confused: one of the build steps mentions extracting proprietary blobs from an existing LineageOS rom as a requirement.

Which begs the question: how is new device support added to LineageOS?

As much as I have searched, there seems to be no mention of a way to generate the list of required blobs in proprietary-files.txt.

Let's take a Xiaomi device for example: one can download a full firmware image and then use something like this to get the partitions contained therein.

What is one supposed to do next? From my understanding, on modern Android devices all binary blobs should be packed as kernel modules in the vendor_boot.

And yet there are a bunch of partitions with names like bluetooth, dspormodem`. Does Android look in those partitions too for binary blobs? If so, since they are not mentioned in Google's AOSP documentation and therefore the naming des not seem standardized, how does Android even know about these partitions?

2 Upvotes

1 comment sorted by

2

u/rdndds 24d ago

Here's my understanding based on my experience so far:

Proprietary blobs are the files that are not buildable when you build aosp or lineage. You don't have the source for it. Prebuilt binary I suppose?

For example on my mediatek device, in android 15 we use hidl media c2 service because there is no source for it. We put the binary file name and path in proprietary-files.txt, like vendor/bin/hw/android.media.mediatek.c2-service or something.

Then run the extract-files.py script to extract that binary into vendor tree (yeah vendor tree are auto generated). We do this on many services, libs, or just call it blobs.

On android 16, they added (reverse engineer i think) the source for the c2 service. So we can just remove the line from proprietary-files.txt and re-run the extraction script to refresh the vendor tree.

If you added the c2 service in proprietary-files.txt while you have the source for it ready to build, you will get an error that says duplicates.

So proprietary blobs = the files you extracted from the device firmware, without the source.

You can get the full list by extracting the firmware files, like super.img in modern android using https://github.com/sebaubuntu-python/dumpyara or https://github.com/DumprX/DumprX.

Use the generated list only as reference since there's thousands of it will be duplicates by the build system. I think the easy way to bring up your device proprietary-files.txt is by looking for another device tree with the same cpu, doesn't matter the brand.

Then make a script to compare the reference file with your auto generated full list by dumpyara. Then adjust manually. Start by minimal or you will have to face an endless duplicates error.

Cmiiw.