Android 8 AOSP在Prebuild .APK文件上提出问题



我正在使用使用/将使用android8的嵌入式系统。迄今为止,开发已经发生在Android 7.1.1上 - 参考委员会的供应商仅支持这两个。

在Android 7.1.1中,我们将.APK文件从存储库复制到运行系统,如:

PRODUCT_COPY_FILES += foo.apk:root/foo.apk

(或类似。(这完全被Android 8。

因此,从少数Google命中获得了我有关AOSP的信息,而不是有关Android手机的信息,我们正在尝试此操作(在外部/foo/android.mk中(:

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := foo 
LOCAL_SRC_FILES := foo.apk 
LOCAL_MODULE_CLASS := APPS
LOCAL_CERTIFICATE := PRESIGNED
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
include $(BUILD_PREBUILT)

...构建中没有任何文物的痕迹!

所以,三个问题:

  1. 我做对吗?
  2. 如何打开$(info foo(消息?它们默认情况下在我们的7.1.1环境中,但在8中不在。
  3. 我们的指南是由Karim Yaghmour嵌入的Android 。还有更多最新指南吗?

谢谢!

编辑:为了回答下面的问题,我将尝试添加完整的" make foo"输出。请注意,这主要是样板,从参考板制造商修改的发行版总是吐出来:

including device/asus/fugu/vendorsetup.sh
including device/fsl/imx6/vendorsetup.sh
including device/fsl/imx7/vendorsetup.sh
including device/fsl/imx8/vendorsetup.sh
including device/generic/car/car-arm64/vendorsetup.sh
including device/generic/car/car-armv7-a-neon/vendorsetup.sh
including device/generic/car/car-x86/vendorsetup.sh
including device/generic/car/car-x86_64/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-mips64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/google/dragon/vendorsetup.sh
including device/google/marlin/vendorsetup.sh
including device/google/muskie/vendorsetup.sh
including device/google/taimen/vendorsetup.sh
including device/huawei/angler/vendorsetup.sh
including device/lge/bullhead/vendorsetup.sh
including device/linaro/hikey/vendorsetup.sh
including sdk/bash_completion/adb.bash
Setup lunch pioneer_hw1-eng
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.0.0
TARGET_PRODUCT=pioneer_hw1
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPD1
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a9
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-50-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=1.0.0-rfp-rc4
OUT_DIR=out
AUX_OS_VARIANT_LIST=
============================================
Building with -j16 ...
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.0.0
TARGET_PRODUCT=pioneer_hw1
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a9
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-50-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=1.0.0-rfp-rc4
OUT_DIR=out
============================================
[2/2] bootstrap out/soong/.minibootstrap/build.ninja.in
[1/2] out/soong/.bootstrap/bin/minibp out/soong/.minibootstrap/build.ninja.in
ninja: no work to do.
[2/3] glob device/*/*/Android.bp
ninja: no work to do.
device/fsl/imx6/pioneer_hw1.mk was modified, regenerating...
cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.mk:23: warning: FindEmulator: find: `cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/src': No such file or directory
cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/Android.mk:23: warning: FindEmulator: find: `cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/src': No such file or directory
./system/sepolicy/Android.mk:107: warning: BOARD_SEPOLICY_VERS not specified, assuming current platform version
No private recovery resources for TARGET_DEVICE pioneer_hw1
platform_testing/build/tasks/tests/instrumentation_metric_test_list.mk: warning: continuous_instrumentation_metric_tests: Unknown installed file for module perf-setup.sh 
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module RecyclerViewTests 
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module SettingsFunctionalTests 
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module LauncherFunctionalTests 
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module EmergencyInfoTests 
platform_testing/build/tasks/tests/native_metric_test_list.mk: warning: continuous_native_metric_tests: Unknown installed file for module perf-setup.sh 
test/vts/tools/build/tasks/vts_package.mk:222: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:222: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:222: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
./test/vts/utils/python/archive/Android.mk:28: warning: overriding commands for target `default'
./test/vts/runners/host/tcp_server/Android.mk:19: warning: ignoring old commands for target `default'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/pioneer_hw1/root/init.rc'
build/core/base_rules.mk:378: warning: ignoring old commands for target `out/target/product/pioneer_hw1/root/init.rc'
[ 66% 2/3] glob device/*/*/Android.bp
ninja: error: '.apk', needed by 'device_controller_all_targets', missing and no known rule to make it
16:34:13 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
#### make failed to build some targets (39 seconds) ####

edit2:编辑2:在控制器名称之后放置一个空间后,我得到了明显不同的结果,但仍然没有构建:

including device/asus/fugu/vendorsetup.sh
including device/fsl/imx6/vendorsetup.sh
including device/fsl/imx7/vendorsetup.sh
including device/fsl/imx8/vendorsetup.sh
including device/generic/car/car-arm64/vendorsetup.sh
including device/generic/car/car-armv7-a-neon/vendorsetup.sh
including device/generic/car/car-x86/vendorsetup.sh
including device/generic/car/car-x86_64/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-mips64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/google/dragon/vendorsetup.sh
including device/google/marlin/vendorsetup.sh
including device/google/muskie/vendorsetup.sh
including device/google/taimen/vendorsetup.sh
including device/huawei/angler/vendorsetup.sh
including device/lge/bullhead/vendorsetup.sh
including device/linaro/hikey/vendorsetup.sh
including sdk/bash_completion/adb.bash
Setup lunch pioneer_hw1-eng
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.0.0
TARGET_PRODUCT=pioneer_hw1
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPD1
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a9
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-50-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=1.0.0-rfp-rc4
OUT_DIR=out
AUX_OS_VARIANT_LIST=
============================================
Building with -j16 ...
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.0.0
TARGET_PRODUCT=pioneer_hw1
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a9
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-50-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=1.0.0-rfp-rc4
OUT_DIR=out
============================================
[2/2] bootstrap out/soong/.minibootstrap/build.ninja.in
[2/2] bootstrap out/soong/.minibootstrap/build.ninja.in
ninja: no work to do.
[3/4] glob external/*/Android.bp
ninja: no work to do.
device/fsl/imx6/pioneer_hw1.mk was modified, regenerating...
cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.mk:23: warning: FindEmulator: find: `cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/src': No such file or directory
cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/Android.mk:23: warning: FindEmulator: find: `cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/src': No such file or directory
./system/sepolicy/Android.mk:107: warning: BOARD_SEPOLICY_VERS not specified, assuming current platform version
No private recovery resources for TARGET_DEVICE pioneer_hw1
platform_testing/build/tasks/tests/instrumentation_metric_test_list.mk: warning: continuous_instrumentation_metric_tests: Unknown installed file for module perf-setup.sh 
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module RecyclerViewTests 
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module SettingsFunctionalTests 
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module LauncherFunctionalTests 
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module EmergencyInfoTests 
platform_testing/build/tasks/tests/native_metric_test_list.mk: warning: continuous_native_metric_tests: Unknown installed file for module perf-setup.sh 
test/vts/tools/build/tasks/vts_package.mk:222: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:222: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:222: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
./test/vts/utils/python/archive/Android.mk:28: warning: overriding commands for target `default'
./test/vts/runners/host/tcp_server/Android.mk:19: warning: ignoring old commands for target `default'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/pioneer_hw1/root/init.rc'
build/core/base_rules.mk:378: warning: ignoring old commands for target `out/target/product/pioneer_hw1/root/init.rc'
[ 75% 3/4] glob external/*/Android.bp
ninja: error: '/controller.apk', needed by 'out/target/product/pioneer_hw1/obj/APPS/controller_intermediates/controller.apk', missing and no known rule to make it
15:43:19 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
#### make failed to build some targets (39 seconds) ####

请小心你有错别字 $(COMMON_ANDROID_PACKAGE_SUFFIIX)应为$(COMMON_ANDROID_PACKAGE_SUFFIX)

还确保您在外部/foo/android.mk

的每一行的末端没有额外的空白空间

确保您的模块 foo device.mk文件的一部分(例如设备/moto/shamu/device.mk(。

PRODUCT_PACKAGES += 
    foo

这将在您的system/app文件夹中生成APK。下面的标志将将您的应用程序带到system/priv-app文件夹。

LOCAL_PRIVILEGED_MODULE := true

您也可以将APK路径移至供应商分区(vendor/app(。

LOCAL_MODULE_PATH   := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR)/app

将您的模块附加到设备Makefile中的PRODUCT_PACKAGES,例如:

PRODUCT_PACKAGES += 
    foo

相关内容

  • 没有找到相关文章

最新更新