@Override
	public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log)
			throws CancelledException {

		AddressSpace addressSpace = program.getAddressFactory().getDefaultAddressSpace();

		Address headerAddress = program.getMinAddress();

		ByteProvider provider = MemoryByteProvider.createProgramHeaderByteProvider(program, false);
		BinaryReader reader = new BinaryReader(provider, !program.getLanguage().isBigEndian());
		try {
			AndroidBootLoaderHeader header = new AndroidBootLoaderHeader(reader);
			DataType headerDataType = header.toDataType();
			Data headerData = program.getListing().createData(headerAddress, headerDataType);
			if (headerData == null) {
				log.appendMsg("Unable to apply header data, stopping.");
				return false;
			}
			SymbolTable symbolTable = program.getSymbolTable();
			Symbol headerSymbol = symbolTable.getPrimarySymbol(headerAddress);
			if (headerSymbol == null) {
				symbolTable.createLabel(headerAddress, header.getMagic(), SourceType.ANALYSIS);
			}
			else {
				headerSymbol.setName(header.getMagic(), SourceType.ANALYSIS);
			}
			int runningOffset = header.getStartOffset();
			for (AndroidBootLoaderImageInfo imageInfo : header.getImageInfoList()) {
				Address address = addressSpace.getAddress(runningOffset);
				symbolTable.createLabel(address, imageInfo.getName(), SourceType.ANALYSIS);
				program.getBookmarkManager()
						.setBookmark(address, BookmarkType.ANALYSIS, "boot", imageInfo.getName());
				runningOffset += imageInfo.getSize();
			}
			return true;
		}
		catch (Exception e) {
			log.appendException(e);
		}
		return false;
	}
Annotates the structures contained in an Android Boot Loader image.
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/bootldr/AndroidBootLoaderAnalyzer.java