Install Android P DP2 on OnePlus 6 Official Guide
In this article
Installing Android P DP2 (Developer Preview 2) on a OnePlus 6 is achieved by unlocking the bootloader and flashing the official factory image using Fastboot tools. This process allows you to test early Android Pie features before the stable release, though it requires a complete wipe of your device data. Before starting, ensure you have a full backup of all personal files, as the bootloader unlock process triggers a factory reset.
What You'll Need
- A OnePlus 6 in good working condition.
- A Windows, macOS, or Linux computer with the latest Android SDK Platform-Tools installed.
- The official Android P DP2 factory image zip file for the OnePlus 6.
- A high-quality USB-C cable (preferably the original cable that came with the device).
- USB Debugging and OEM Unlocking enabled in the device settings.
- Sufficient battery charge (at least 60%) to prevent the device from shutting down during the flash process.
Step-by-Step
- Enable Developer Options: Open the Settings app on your OnePlus 6. Navigate to System > About phone. Find the Build number and tap it seven times rapidly until a notification appears stating that you are now a developer. Note that menu labels may differ slightly depending on your current OxygenOS version or region.
- Enable USB Debugging and OEM Unlocking: Go back to Settings > System > Developer options. Scroll down to the Debugging section and toggle on USB debugging. Then, find the OEM unlocking toggle and switch it on. This is a critical security step; without OEM unlocking enabled, the bootloader cannot be unlocked, and the flashing process will fail.
- Prepare the Computer: Download the Android SDK Platform-Tools from the official Android developer site. Extract the zip folder to an easy-to-reach location, such as C:\platform-tools on Windows. Move the Android P DP2 factory image zip file into this same folder to simplify the command line paths.
- Connect and Authorize: Connect your OnePlus 6 to the computer via USB. Open a command prompt or terminal window inside the platform-tools folder. Type
adb devicesand press Enter. Check your phone screen for a prompt asking to allow USB debugging from this computer; check the box for "Always allow from this computer" and tap OK. - Boot into Fastboot Mode: In the terminal, enter the command
adb reboot bootloader. Your phone will restart and enter a screen with a large Android mascot and technical text, indicating it is now in Fastboot mode. - Unlock the Bootloader: While in Fastboot mode, type
fastboot oem unlock. Your phone will display a warning screen asking for confirmation. Use the volume keys to highlight "Unlock the Bootloader" and press the power button to confirm. The device will wipe all data and reboot. - Re-enable Debugging: Once the phone reboots, go through the initial setup process quickly. You must return to Settings > System > Developer options and re-enable USB debugging, as the factory reset disabled it.
- Flash the Factory Image: Reboot the device back into Fastboot mode using
adb reboot bootloader. Extract the Android P DP2 zip file if you haven't already. In the terminal, navigate to the extracted image folder and run the provided flash script. On Windows, this is typicallyflash-all.bat; on macOS or Linux, it isflash-all.sh. - Wait for Completion: The script will automatically flash the boot, system, and vendor partitions. Do not disconnect the cable or restart the computer until the terminal indicates the process is finished and the device reboots automatically.
- Final Setup: The first boot into Android P DP2 may take several minutes. Once the setup screen appears, follow the prompts to configure your device.
Common Mistakes
One of the most frequent errors is failing to enable OEM unlocking before attempting the bootloader unlock command. If this toggle is off, the fastboot oem unlock command will be rejected by the device, often resulting in a "Permission Denied" or "Command not allowed" error. Another common mistake is using a low-quality USB cable or a USB 3.0 port that is incompatible with Fastboot mode on certain motherboards. If the device is not detected in Fastboot, try switching to a USB 2.0 port or a different cable.
Users often forget that unlocking the bootloader wipes all user data. Attempting to flash the image without a backup leads to permanent loss of photos, messages, and app data. Additionally, running the flash script without being inside the correct directory in the command prompt will result in "File not found" errors, as the script cannot locate the image files it needs to push to the device.
Tips
To ensure the smoothest installation, always keep your computer's USB drivers updated. For Windows users, installing the Google USB Driver is highly recommended to avoid connection drops during the flashing process. If you are using a Mac, ensure you prefix your fastboot commands with ./ (e.g., ./fastboot oem unlock) to execute the binary from the current directory.
It is also helpful to keep a copy of your current stable OxygenOS full OTA zip file on your computer. If you decide that the Developer Preview is too unstable for daily use, having the stable image ready allows you to return to a functional state quickly. Always ensure your battery is above 60% because a power failure during the flashing of the system partition can lead to a hard brick, which is significantly harder to recover from than a soft bootloop.
Troubleshooting
If the device gets stuck in a bootloop (continuously restarting at the logo), the first step is to boot back into Fastboot mode by holding the Volume Down and Power buttons simultaneously. Once in Fastboot, try running the flash-all script again to ensure no partitions were corrupted during the first attempt. If the bootloop persists, you may need to wipe the data partition manually using the command fastboot -w before flashing again.
If the adb devices command shows "unauthorized," check your phone screen for the RSA fingerprint prompt. If the prompt does not appear, try toggling USB debugging off and on again in the Developer options, or restart the ADB server by typing adb kill-server followed by adb start-server. For those experiencing "waiting for device" errors in Fastboot, check your Device Manager (on Windows) to see if the phone is listed as an "Android Bootloader Interface." If it has a yellow exclamation mark, right-click it and manually update the driver to the Google USB Driver.
If the flash script fails with a "partition not found" error, ensure you are using the official image specifically designed for the OnePlus 6. Flashing an image meant for a different model or a different region's variant can cause critical system failures. In such cases, the only solution is to flash the official stock ROM via the OnePlus recovery tool to restore the original partition table.
Frequently Asked Questions
Will this process void my warranty?
Unlocking the bootloader and flashing developer previews typically does not void the hardware warranty on OnePlus devices, but it may affect software support. You can usually return to a factory state by relocking the bootloader and flashing the official stable ROM.
Can I use my phone for daily tasks on DP2?
Developer Previews are intended for developers and early testers. They often contain significant bugs, app crashes, and battery drain issues. It is not recommended for your primary device unless you are comfortable with potential instability.
Do I need to root my phone to install this?
No, rooting is not required to install Android P DP2. The process involves unlocking the bootloader and flashing a factory image, which is separate from installing a root manager like Magisk.
How do I go back to the official OxygenOS?
To return to the stable version, you must download the official OxygenOS full zip for your model and flash it via the stock recovery or using the Fastboot method, followed by a factory reset to ensure compatibility.
Will my apps still work on the Developer Preview?
Most apps will work, but some apps that rely on strict security checks (like certain banking apps or high-security corporate apps) may detect the unlocked bootloader and refuse to run for security reasons.