Merge "Remove ELF PRODUCT_COPY_FILES"
diff --git a/hifi/xaf/host-apf/Android.bp b/hifi/xaf/host-apf/Android.bp
new file mode 100644
index 0000000..7bd2005
--- /dev/null
+++ b/hifi/xaf/host-apf/Android.bp
@@ -0,0 +1,32 @@
+// Copyright (C) 2020 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+cc_prebuilt_binary {
+    name: "dhifimesg",
+    srcs: ["tools/dhifimesg"],
+    shared_libs: [
+        "libutils",
+        "liblog",
+        "libbinder",
+        "libc++",
+        "libdl",
+        "libc",
+        "libm",
+    ],
+    compile_multilib: "64",
+    vendor: true,
+    strip: {
+        none: true,
+    },
+}
diff --git a/hikey960/device-hikey960.mk b/hikey960/device-hikey960.mk
index 9bde93b..5a423c1 100644
--- a/hikey960/device-hikey960.mk
+++ b/hikey960/device-hikey960.mk
@@ -38,8 +38,10 @@
 
 # Copy hifi firmware
 PRODUCT_COPY_FILES += \
-	device/linaro/hikey/hifi/firmware/hifi-hikey960.img:$(TARGET_COPY_OUT_VENDOR)/firmware/hifi/hifi.img \
-	device/linaro/hikey/hifi/xaf/host-apf/tools/dhifimesg:/vendor/bin/dhifimesg
+	device/linaro/hikey/hifi/firmware/hifi-hikey960.img:$(TARGET_COPY_OUT_VENDOR)/firmware/hifi/hifi.img
+
+PRODUCT_PACKAGES += \
+	dhifimesg
 
 
 # Build HiKey960 HDMI audio HAL. Experimental only may not work. FIXME