From 9346c4e2ad4556cee9033c9eb10c5df4a28b4446 Mon Sep 17 00:00:00 2001 From: Bowgo Tsai Date: Thu, 3 Jun 2021 17:54:31 +0800 Subject: [PATCH] android-info.txt: do not output 'board=' if no board_name If no board name, output nothing to the android-info.txt. Currently the output of 'board=' might trigger some parsing error on some clients. Bug: 189990989 Test: make out/target/product/generic_arm64/android-info.txt Change-Id: Ia9aab6c092c07349aa57f0e73f8c69b6e05874c1 --- target/board/Android.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/board/Android.mk b/target/board/Android.mk index 4dd6b17e33..142270ee58 100644 --- a/target/board/Android.mk +++ b/target/board/Android.mk @@ -24,8 +24,10 @@ $(INSTALLED_ANDROID_INFO_TXT_TARGET): $(board_info_txt) build/make/tools/check_r $(call pretty,"Generated: ($@)") ifdef board_info_txt $(hide) grep -v '#' $< > $@ -else +else ifdef TARGET_BOOTLOADER_BOARD_NAME $(hide) echo "board=$(TARGET_BOOTLOADER_BOARD_NAME)" > $@ +else + $(hide) echo "" > $@ endif # Copy compatibility metadata to the device.