public static boolean isBootLoader(Program program) {
		try {
			Memory memory = program.getMemory();
			byte[] bytes = new byte[AndroidBootLoaderConstants.BOOTLDR_MAGIC_SIZE];
			memory.getBytes(program.getMinAddress(), bytes);
			String magic = new String(bytes).trim();
			return AndroidBootLoaderConstants.BOOTLDR_MAGIC.equals(magic);
		}
		catch (Exception e) {
			//ignore
		}
		return false;
	}
Source: https://android.googlesource.com/device/lge/mako/+/android-4.2.2_r1/releasetools.py
#
# #define BOOTLDR_MAGIC "BOOTLDR!"
# #define BOOTLDR_MAGIC_SIZE 8
#
# struct bootloader_images_header {
#         char magic[BOOTLDR_MAGIC_SIZE];
#         unsigned int num_images;
#         unsigned int start_offset;
#         unsigned int bootldr_size;
#         struct {
#                 char name[64];
#                 unsigned int size;
#         } img_info[];
# };
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/bootldr/AndroidBootLoaderConstants.java