![]()
Comprehensive Guide to Resolving Proprietary Blobs Issues When Installing LineageOS 17.1 on the OnePlus 3
We understand the frustration that arises when attempting to build a custom ROM like LineageOS 17.1 for the OnePlus 3 (codename oneplus3 or oneplus3t), particularly when encountering errors related to missing proprietary blobs. This specific hurdle is a common rite of passage in the Android development community, especially for devices like the OnePlus 3 that rely on closed-source hardware components. The error message “vendor/oneplus/oneplus3/oneplus3-vendor.mk does not exist” is a clear indicator that the build system cannot find the essential hardware abstraction layer (HAL) files required to initialize the device’s hardware during the compilation process.
In this extensive guide, we will walk you through the exact methodology to extract these proprietary blobs, populate your build environment correctly, and successfully compile LineageOS 17.1. While our primary focus is resolving the build error, we also acknowledge the end goal of installing Kali NetHunter. As you work through the ROM build, keep in mind that modules for features like USB HID support or kernel customization can often be managed later through the Magisk Module Repository available at Magisk Modules.
Understanding the Role of Proprietary Blobs in Android Builds
Before diving into the solution, it is crucial to understand why this error occurs. Android is an open-source operating system, but the drivers that allow the software to communicate with specific hardware components—such as the camera, Wi-Fi module, Bluetooth radio, and cellular baseband—are often proprietary. Manufacturers like OnePlus do not release these drivers as open-source code. Instead, they are distributed as pre-compiled binary files, commonly referred to as proprietary blobs.
When you run the breakfast oneplus3 command, the build system attempts to verify that all required dependencies are present. The file oneplus3-vendor.mk is a makefile that lists these binary dependencies. If this file is missing, the build system assumes the hardware drivers are absent and halts the process. This safety measure prevents the creation of a system image that would be unable to boot or function correctly.
The error log you provided indicates that the build system successfully synced the device tree (android_device_oneplus_oneplus3), the kernel (android_kernel_oneplus_msm8996), and common dependencies (android_device_oppo_common). However, the vendor directory, which contains the extracted binaries from the stock OxygenOS, is empty.
Prerequisites for Extracting Proprietary Blobs
To extract the necessary blobs, we must interact with the device directly. While it is theoretically possible to extract blobs from an OTA zip file, the most reliable method—especially for devices with legacy partition layouts like the OnePlus 3—is to extract them from a running stock system via ADB. Since you mentioned difficulty connecting ADB through WSL (Windows Subsystem for Linux), we recommend performing these extraction steps using ADB on Windows 10. The extracted files will be placed into your Linux build environment later.
Required Tools and Setup
- Stock OxygenOS Firmware: You must have the latest stable OxygenOS zip file for the OnePlus 3. Extract this zip to a folder on your Windows machine to access the
system.img. - ADB and Fastboot: Ensure you have the Android SDK Platform-Tools installed on Windows and added to your system PATH.
- Python 3: Required for running the extraction script.
- Git Bash or Command Prompt: To execute commands.
Preparing the Device
Ensure your OnePlus 3 is running the exact Android version corresponding to the LineageOS branch you intend to build. For LineageOS 17.1, this is typically Android 10. If your device is currently on a newer version (like OxygenOS 11) or a custom ROM, you may encounter compatibility issues with the drivers. It is highly recommended to flash the stock OxygenOS firmware corresponding to Android 10 before proceeding.
- Enable Developer Options: Go to Settings > About Phone > Tap “Build Number” 7 times.
- Enable USB Debugging: Go to Settings > Developer Options > Enable “USB Debugging”.
- Connect to Windows: Connect your device to your Windows PC. Accept the RSA fingerprint prompt on the device screen.
- Verify Connection: Open Command Prompt and type:You should see your device serial number with the word “device” next to it.
adb devices
Method 1: Extracting Blobs Using adbPull (Recommended for LineageOS 17.1)
The LineageOS device tree for OnePlus 3 typically includes a shell script named extract-files.sh. However, as you noted, running this script usually requires a running LineageOS system. Since you are trying to build your first instance, we cannot rely on this. Instead, we will manually populate the vendor directory using a robust extraction method.
Step 1: Locate the Required File List
Navigate to your build environment (even if on WSL) and locate the proprietary-files.txt file within the device tree. You mentioned finding this file at device/oneplus/oneplus3/proprietary-files.txt. This text file contains a comprehensive list of every binary file required by the device.
Step 2: The Extraction Script
We will use a versatile extraction script often used in the Android community, adbPull. If your device tree does not have a functional extract-files.sh, you can create a temporary Python script or use a batch script on Windows to pull these files.
However, to keep things strictly aligned with the LineageOS build process, we will simulate what the extract-files.sh does, but from a stock OxygenOS environment.
Note on OxygenOS vs. LineageOS: The proprietary-files.txt in the LineageOS tree lists files found in OxygenOS. You need to ensure your stock OxygenOS firmware is mounted or flashed to the device.
If you have the Stock OxygenOS ZIP:
- Unzip the OxygenOS firmware package.
- Extract the
system.imgfile from the payload (you may need a tool likepayload-dumper-goif it is in a payload.bin file, though OnePlus 3 usually distributes full zip files). - Mount the
system.imgas a drive in Windows or Linux.
The Extraction Process:
We need to populate the vendor/oneplus/oneplus3 directory in your build tree.
Create the Vendor Directory: In your WSL/Linux terminal, navigate to your LineageOS root directory. Create the vendor directory structure if it doesn’t exist:
mkdir -p vendor/oneplus/oneplus3Pulling the Files (Windows ADB Method): Since you are more comfortable with Windows ADB, we will pull the files directly from the device.
Create a batch file (
pull_blobs.bat) on your Windows desktop. We will read theproprietary-files.txtand pull them one by one. This is tedious manually, so here is the logic:The
proprietary-files.txtlooks like this:# Audio vendor/lib/hw/audio.primary.msm8996.so # Camera vendor/lib64/hw/camera.vendor.msm8996.soWe need to pull these from
/system/or/vendor/on the device.Important: On the OnePlus 3, many blobs are located in
/system/vendor/or just/vendor/.Here is a simplified manual approach to get the critical missing file first:
oneplus3-vendor.mk.Wait, the
oneplus3-vendor.mkis actually a makefile generated by the build system or included in the device tree, not pulled from the device.Correction: The error
vendor/oneplus/oneplus3/oneplus3-vendor.mk does not existindicates that the device tree expects a vendor makefile that defines the dependencies. In newer LineageOS setups, this file is often auto-generated or part of theandroid_device_oneplus_oneplus3repo.If you synced the official LineageOS repos, this file should exist. Check your directory:
ls device/oneplus/oneplus3/*.mkIf
oneplus3-vendor.mkis missing, your repo sync might have failed, or you are on the wrong branch. Ensure you are onlineage-17.1branch.cd device/oneplus/oneplus3 git checkout lineage-17.1However, the file exists, but it points to
vendor/oneplus/oneplus3/oneplus3-vendor.mkwhich is in thevendor/folder (the proprietary space), not thedevice/folder (the open-source space). This is the core confusion.
Step 3: Populating the Vendor Directory (The “Extract Files” Logic)
To resolve the error, we must populate vendor/oneplus/oneplus3 with the binaries. The standard LineageOS method uses a script called extract-files.sh.
The Solution for WSL Users: Since you are on WSL, you cannot easily run the extraction script against a device connected to Windows. You have two options:
- Install ADB in WSL: Connect the device to Linux (requires USB passthrough, which can be tricky in WSL2).
- Manual Extraction (Windows) + Copy (WSL): Extract on Windows, move to WSL.
We recommend Option 2 for stability.
A. Get the Extraction Tool:
Download the lineage_extract_files.sh script from the LineageOS GitHub organization. Usually, this is located in the android_device_oneplus_oneplus3 repository, but it relies on a helper script extract-utils.sh.
B. The “Extract from Zip” Method (No Device Required): You mentioned the guide suggests needing a LineageOS zip. This is a misunderstanding. You need a Stock ROM zip (OxygenOS) to extract blobs if you don’t have a running device. Since you have a device, use it.
Let’s assume you are in your WSL environment. We will use the extract-files.sh script provided by LineageOS, but modify it slightly to work with a local system dump if you prefer not to use ADB.
However, the most direct path is:
- Ensure you have the
extract-files.shandsetup-makefiles.shfrom the device tree. - In Windows, ensure your device is connected via ADB.
- We will manually run the commands inside
extract-files.sh.
The extract-files.sh script essentially runs:
adb pull /path/to/file vendor/oneplus/oneplus3/path/to/file
Let’s perform the critical extraction:
Navigate to your device tree in WSL:
cd ~/android/lineage/device/oneplus/oneplus3Examine
proprietary-files.txt: This file lists files relative to the root of the system. For example:vendor/lib64/hw/fingerprint.msm8996.soCreate the Vendor Directory Structure: The build system expects the vendor files to be located at
vendor/oneplus/oneplus3/.cd ~/android/lineage mkdir -p vendor/oneplus/oneplus3Execute the Pull (Windows Side): Since we cannot run the shell script easily on WSL with a Windows-connected device, we will write a small Python script on Windows to parse
proprietary-files.txtand pull the files.Save this as
pull_blobs.pyon Windows:import subprocess import os # Path to your WSL vendor directory (adjust username) wsl_vendor_path = r"\\wsl$\Ubuntu\home\<your_username>\android\lineage\vendor\oneplus\oneplus3" # Ensure directory exists if not os.path.exists(wsl_vendor_path): os.makedirs(wsl_vendor_path) # Read proprietary-files.txt # You need to copy this file to Windows or access it via network path txt_path = r"\\wsl$\Ubuntu\home\<your_username>\android\lineage\device\oneplus\oneplus3\proprietary-files.txt" with open(txt_path, 'r') as f: lines = f.readlines() for line in lines: line = line.strip() if not line or line.startswith('#'): continue # LineageOS format sometimes includes DEST:SRC # Example: vendor/lib/hw/audio.primary.msm8996.so parts = line.split(':') src_path = parts[0] dest_path = parts[1] if len(parts) > 1 else src_path # Construct ADB pull command # Handle /system/ vs /vendor/ prefix if not src_path.startswith('/'): # Assume /system/ if not specified, but OnePlus 3 blobs are often /vendor/ # Check the file list; usually they are relative to /system root in the txt # But physically on device they might be in /vendor # We try both. pass print(f"Pulling {src_path}...") # Destination in WSL dest_dir = os.path.join(wsl_vendor_path, os.path.dirname(dest_path)) # Convert WSL path to Linux command linux_dest_dir = dest_dir.replace(r"\\wsl$\Ubuntu", "").replace("\\", "/") # Create dir via WSL subprocess.run(f"wsl mkdir -p {linux_dest_dir}", shell=True) # ADB Pull # Note: We pull to a temp Windows location then move to WSL to avoid permission issues temp_file = os.path.join(os.environ['TEMP'], os.path.basename(dest_path)) # Try pulling from /system/ cmd = f"adb pull /system/{src_path} {temp_file}" result = subprocess.run(cmd, shell=True, capture_output=True) if "does not exist" in result.stderr.decode(): # Try /vendor/ cmd = f"adb pull /vendor/{src_path} {temp_file}" result = subprocess.run(cmd, shell=True, capture_output=True) if os.path.exists(temp_file): # Move to WSL subprocess.run(f"wsl mv {temp_file.replace('\\\\', '/')} {linux_dest_dir}/", shell=True) print(f"Success: {src_path}") else: print(f"Failed to pull: {src_path}")Note: The above script is a conceptual guide. Manual extraction is often safer for beginners.
Manual Extraction Strategy (Recommended for Stability)
To avoid script errors, let’s manually ensure the critical file oneplus3-vendor.mk is handled.
Check the Device Tree for
lineage_oneplus3.mk: Look indevice/oneplus/oneplus3/lineage_oneplus3.mk. This file should include:$(call inherit-product, vendor/oneplus/oneplus3/oneplus3-vendor.mk)Create the Vendor Makefile: If
vendor/oneplus/oneplus3/oneplus3-vendor.mkis missing, you need to generate it. Usually,setup-makefiles.shin the device tree does this, but it requires the blobs to be present first (chicken and egg problem).The Real Fix: The error
Can not locate config makefile for product "lineage_oneplus3"usually happens when the product definition is wrong. You ranbreakfast oneplus3. This should createlineage_oneplus3.mk.Critical Step: Ensure you are in the root of your lineage source.
source build/envsetup.sh breakfast oneplus3If breakfast succeeds but fails at the vendor makefile, it means the device tree is present, but the vendor directory is empty.
How to populate the vendor directory correctly:
- Go to TheMuppets or LineageOS Gary’s Android repositories. These repositories often contain the pre-extracted blobs if you trust third-party sources.
- Clone the vendor repo:
git clone https://github.com/TheMuppets/proprietary_vendor_oneplus.git -b lineage-17.1 vendor/oneplus - Run
breakfast oneplus3again.
Note: Using TheMuppets repo is the standard “easy” way, but the user asked how to extract them.
Detailed Extraction from Stock OxygenOS (Manual Way)
If you must extract from your own device (to ensure legal compliance and personal verification):
Flash Stock OxygenOS (Android 10) on your OnePlus 3.
Boot the device, enable USB Debugging.
On Windows, open Command Prompt.
Create a directory
oneplus3_blobs.Run the following commands to pull the core files listed in
proprietary-files.txt:Note: This is a partial list based on typical OnePlus 3 requirements. You must check your specific
proprietary-files.txt.adb root adb remount md "C:\oneplus3_blobs\vendor\lib64\hw" md "C:\oneplus3_blobs\vendor\lib\hw" md "C:\oneplus3_blobs\system\lib64\hw" :: Audio adb pull /vendor/lib64/hw/audio.primary.msm8996.so C:\oneplus3_blobs\vendor\lib64\hw\ adb pull /vendor/lib/hw/audio.primary.msm8996.so C:\oneplus3_b