gbl_root_canoe is an EDK2-based workspace for patching the EFI applications within Qualcomm ABL (Android Bootloader) images. It leverages a GBL (Generic Bootloader Loader) vulnerability to inject custom EFIs, primarily intended for achieving a Fake Locked Bootloader state on Snapdragon 8 Gen 5 / 8 Elite (Gen 5) devices to bypass bootloader unlock detection. The patched EFI is typically flashed into the efisp partition.
This section is for developers who want to compile the toolkits from source.
You must be on a Linux host to build the project:
gcc/clang,lld,make,zip,python3liblzma-dev(for compilingextractfv)- Android NDK (Required for
make build_moduleto cross-compile tools for Android) - MinGW-w64 (
x86_64-w64-mingw32-gcc, required formake dist_loader_windowscross-compilation)
Note: You do not need to provide an abl.img to build the distributable toolkits or Magisk module. Set the DIST_NAME environment variable to name your release ZIP (e.g., DIST_NAME=my_toolkit make dist_loader).
-
make dist_loaderBuilds the EDK2 native payload (loader.elf) and compiles the patching utilities (extractfv,patch_abl,elf_inject, etc.) for Linux. Packages them into a.zipinrelease/. -
make dist_loader_windowsSimilar todist_loader, but cross-compiles the patching utilities into Windows.exeprograms using MinGW-w64. -
make build_moduleCross-compiles the patcher tools for Android using your NDK and builds the EDK2 payload. Packages them into a Magisk Module zip inrelease/. -
make distBuilds the pre-patched EFI for a specific device model. -
make build_superfbonlyBuilds onlysuperfastboot, changing the original embedded EFI startup location to return control directly to ABL (for debugging purposes, no fake-lock effect). -
make build_genericEmbeds the patch tools, aiming to be universal across multiple device models. However, high-version compatibility is poor, and it is gradually being deprecated.
This section is for end-users using the compiled outputs found in the release/ directory. For more detailed instructions, please refer to the Wiki.
The Magisk module is designed to run directly on your rooted Android device.
Requirements:
- Device must be Snapdragon 8 Gen 5 / 8 Elite (Gen 5).
- Bootloader must be unlocked.
- Kernel must NOT have Baseband Guard.
Installation & Usage: When flashing the Magisk module via a root manager (like KernelSU, Magisk, or APatch), the customized script will interact with you using the volume keys:
- Volume Up (First-time installation): The script automatically extracts the live
.ablimage, patches it, and flashes the patched file directly to/dev/block/by-name/efisp. After this finishes, you must reboot into Recovery mode and format Data. Once booted, install this module again (selecting Volume Down the second time) to complete the installation. - Volume Down (OTA retention or post-format): Used for retaining the BL version after an OTA update. Before updating OTA, use the module to automatically downgrade ABL, then reboot the system.
If you downloaded the dist_loader or dist_loader_windows zip files:
- Extract the toolkit zip on your PC.
- Place your device's stock
abl.imginside theimages/(orimages\) directory of the toolkit. - Linux: Run
bash build.sh(ormake build). Windows: Runbuild.bat. - The scripts will extract, patch, and inject the custom payload, outputting the modified file
ABL_with_superfastboot.efi. (Check the output logs; if it says "Warning: Failed to patch ABL GBL", the device is not vulnerable and ABL needs to be downgraded).
Download a specific release version that contains the phone model or codename in its filename. Use ABL_with_superfastboot.efi or ABL.efi from the package to boot or flash via fastboot commands (e.g., fastboot flash efisp ABL_with_superfastboot.efi). It is highly recommended to use the version with superfastboot to preserve fallback fastboot-flashing capabilities.
Download generic_superfastboot.efi and perform the relevant flashing steps. Due to compatibility issues and instability across different OEM device features, it might perform poorly on certain models or OS versions, and is no longer recommended.
Before rebooting for an OTA update, use the module to flash and retain the old ABL version. If you are doing a major version upgrade, it is recommended to check "Update efisp", otherwise the device might get stuck on the initial boot screen.
When OEM Unlocking is enabled and the white warning text appears on boot, you must press Volume Down to enter Superfastboot mode. Common commands include:
- Temp-boot an EFI file (without flashing):
fastboot boot xxx.efi - Lock and Unlock (BL related):
- Lock BL, triggers a data wipe:
fastboot flashing lock - Unlock BL, no data wipe:
fastboot flashing unlockorfastboot flashing unlock_critical - Note: If the TEE status is inconsistent, the device will refuse to provide the data key, rendering data inaccessible.
- Lock BL, triggers a data wipe:
- Flashing and Erasing:
fastboot flash <partition> <file.img>fastboot erase <partition>
- Rebooting:
fastboot reboot bootloader(Next normal boot enters Official Fastboot)fastboot reboot recoveryfastboot reboot
ABL.efi: The patched ABL.ABL_original: For developers to analyze in IDA, used for error reporting. DO NOT flash.ABL_with_superfastboot.efi: The patched ABL integrated with superfastboot.loader.elf: The superfastboot binary file. Unlinked to EFI format, it is meant to link with toolbox. Cannot be flashed directly.