Which part of Android directories contains so-called proprietary blobs?


Question

When building AOSP (Android Open Source Project) or LineageOS, there is a tool named breakfast. It downloads proprietary blobs and integrates them to the source tree.



I have read this article, does it mean all of the blobs are under /system/vendor/ directory?



Do those binary files also exist in Android filesystem? And where are they?


Answer

Yes, binary blobs are part of Android filesystem. Android can't boot without them as they are kind of hardware drivers for the device. Most of those are found under /vendor/lib(64), some also under /system, /etc and /bin. Before Android Treble, /vendor wasn't necessarily a partition but a symlink to /system/vendor directory. Starting with Oreo, /vendor is a partition, containing all content related to OEM and SoC vendor. Most of the blobs are executable files or libraries, run as independent services on boot. See this sample proprietary-files list.



In addition to that, the first partition (usually labeled modem) on eMMC contains Radio/RIL related firmware. Another partition dsp contains Qualcomm's Digital Signal Processor related binaries. They aren't built with ROM but are part of Android filesystem tree, mounted at (/vendor)/firmware and (/vendor)/dsp. Their execution is isolated from the rest of the device.



Many partition related to bootloaders are in themselves complete binaries, such as aboot, sbl, rpm, tz, cmnlib, devcfg, keymaster, lksecapp on Qualcomm devices. Those aren't mountable filesystem, but directly executed by bootloaders during boot process. All of them are proprietary binary blobs; the closed-source part of Android devices.



PS:
Android (a superset of AOSP) isn't a generic OS which can be installed on any hardware like we do on PCs. Support for the hardware is locked down to proprietary binaries (HALs) by the OEM and/or silicon vendors. So the binary blobs are critical, and the open-source AOSP (including modified Linux kernel source provided by Google) is of no use without hardware drivers. And the manufacturers rarely document the working of their hardware so that developers like Replicant can implement an open source driver. There is very small set of hardware components on Android devices that you can expect to be handled directly by making syscalls to kernel as is the case on PCs. The only notable addition by SoC vendors / OEMs to generic kernel source already modified by Google (1, 2) is the handling of non-discoverable devices (defining device nodes). Rest of the hardware related stuffed is handled in userspace through binary blobs.



Further reading:




Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes