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 target_magisk_moduleto cross-compile tools for Android; setNDK_PATHto the NDK directory) - MinGW-w64
Note: You do not need to provide an abl.img to build the distributable toolkits or Magisk module.
-
make target_toolkit_linuxBuilds the Linux PC toolkit withextractfvandpatch_abl. The zip is written totargets/toolkit_linux/build/toolkit_linux.zip. -
make target_toolkit_windowsBuilds the Windows PC toolkit and cross-compiles the patching utilities into.exeprograms using MinGW-w64. The zip is written totargets/toolkit_windows/build/toolkit_windows.zip. -
make target_magisk_moduleCross-compiles the patcher tools for Android using your NDK and packages the Magisk module. The zip is written totargets/magisk_module/build/module_android.zip. -
make tools_vbmetafixer_linux/make tools_vbmetafixer_windowsBuilds the optional VBMeta fixer toolkit.
You can build the Linux and Windows PC toolkits in the provided Docker image:
bash docker_build.sh
bash run_docker.sh
make clean
make target_toolkit_linux
make target_toolkit_windowsTo build the Magisk module in Docker, install Android NDK on the host and pass it through NDK_PATH:
NDK_PATH=/path/to/android-ndk bash run_docker.sh
make target_magisk_moduleFor 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 target_toolkit_linux or target_toolkit_windows zip files:
- Extract the toolkit zip on your PC.
- Place your device's stock ABL image inside the
images/(orimages\) directory of the toolkit asabl.imgorabl.elf. - Linux: Run
bash build.sh. Windows: Runbuild.bat. - The scripts will extract and patch the ABL payload, outputting
ABL.efi,ABL_original.efi, andpatch_log.txt. (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.efi from the package to boot or flash via fastboot commands (e.g., fastboot flash efisp ABL.efi).
Generic EFI builds are not part of the current Makefile targets. Use a device-specific patched ABL.efi instead.
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.efi: For developers to analyze in IDA, used for error reporting. DO NOT flash.patch_log.txt: Patch log generated by the toolkit.