Fastboot Guide
This method is risky and requires patched vbmeta ( Android 12+).
Pre-requisites
Gathering the required stock files
For following this guide, you need to have the following files:
boot.img
dtbo.img
vbmeta.img
vendor_boot.img
vendor_dlkm.img
Stock ROM zip already contains these files. If you are using a custom ROM, you need to extract these files from the ROM zip. You can use payload-dumper-go to extract the files from the ROM zip.
On Azure release artifacts, you will already find device specific zips containing the required files and the boot image. You can use them directly in the next steps.
Patching vbmeta
Since Android 12+, Google has introduced a new security feature called AVB 2.0. This feature prevents you from flashing unsigned images. To bypass this, you need to patch the vbmeta image.
Patching using Android Flash Tool (Web) [ Flashes Stock ROM]
- Head over to Android Flash Tool and select your device.
- Enable Developer Options and USB Debugging on your device.
- Connect your device to your PC.
- Select stable image you want to flash.
- Tick ‘Patch vbmeta’ and ‘Enable OEM Unlocking’ options.
- Tick ‘Wipe User Data’ since wiping data is compulsory.
- Tick ‘Flash on both slots’ to flash on both slots.
- Click on ‘Install’ and wait for the process to complete.
Your device will boot to system after the process is complete.
Patching on custom ROM
Most custom ROMs comes with payload.bin
. You can use payload-dumper-go to decompile the payload.bin
. After decompiling, you will find a entry named vbmeta.img
, which needs to be reflashed in bootloader with certain flags.
Flash the ROM using recovery. This is per your ROM instructions.
Do not boot to system. Instead, boot to bootloader.
Flash the
vbmeta.img
using the following command:fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img
Wipe data using the following command:
fastboot -w
Reboot to system using the following command:
fastboot reboot
Applying a system update with patched vbmeta
If you want to apply a system update (applies to both stock and custom ROMs), you need to flash the vbmeta.img
with certain flags again, extracted from the new ROM zip. Follow the steps below:
Extract the new ROM zip. You will find
vbmeta.img
in the extracted folder. If it is a custom ROM with payload, folow above steps to extract it.Flash the ROM as per instructions, but do not boot to system. Instead, boot to bootloader(if you are in bootloader, fine).
Flash the
vbmeta.img
using the following command:fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img
No need to wipe data. Reboot to system using the following command:
fastboot reboot
You are done. Follow the next steps to reflash kernel again since updating your system will overwrite the kernel.
> Flashing Azure Kernel via fastboot and fastbootd
If you have followed the above steps, you are ready to flash Azure Kernel on your device.
Downloading the kernel
Visit the Github releases page and download the latest release. Images are already provided in device-specific zips and boot image. You can use them directly in the next steps.
The name of the images resembles to the following format:
azure-<codename>-<datetime>.zip (device-specific zip containing all images excluding boot.img)
boot_<codename>.img (boot image)
Extract the contents of the zip. You will find the following files:
1. dtbo.img
2. vendor_boot.img
3. vendor_dlkm.img
Download the device specific boot image from the release page. The name of the boot image resembles to the following format:
boot_<codename>.img
Flashing the kernel
Boot the device into fastboot mode. You can do this by holding the power button and volume down button together for 5 seconds or by using the following command:
adb reboot bootloader
Follow these steps to flash the kernel:
Flash the boot image using the following command:
fastboot flash boot boot.img
Flash the dtbo image using the following command:
fastboot flash dtbo dtbo.img
Flash the vendor_boot image using the following command:
fastboot flash vendor_boot vendor_boot.img
Flash the vendor_dlkm image using the following command: You need to flash vendor_dlkm in the fastbootd, which is a new mode introduced in Android 11. To boot in fastbootd, use the following command:
fastboot reboot fastboot
After booting in fastbootd, flash the vendor_dlkm image using the following command:
fastboot flash vendor_dlkm vendor_dlkm.img
Reboot to system using the following command:
fastboot reboot
You are done. Enjoy Azure Kernel on your device.
Disclaimer
Flashing kernel with this method will not preserve your Magisk installation. You need to install Magisk again after flashing the kernel. Since Azure kernel supports KernelSU, you can use it to root your device.