我关注的是平台/框架/基础。它看起来像是来自Android核心的很多东西。主要是用Java语言编写的:https://github.com/GrapheneOS/platform_frameworks_base/blob/11/Android.mk
当我们查看它的Android.mk文件时,最有趣的部分是:
$(SDK_METADATA): $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/framework-doc-stubs-metadata.zip
rm -rf $(SDK_METADATA_DIR)
mkdir -p $(SDK_METADATA_DIR)
unzip -qo $< -d $(SDK_METADATA_DIR)我正在尝试理解这个repo是如何构建的,以及构建了什么。很明显,在这个makefile中没有构建任何东西,这主要是因为java代码是由ART构建的。那么,到底发生了什么?
看起来它解压了SDK_METADATA_DIR :=$= $(call intermediates-dir-for,PACKAGING,framework-doc-stubs-metadata,,COMMON)中的文件,但是之后它什么也不做了。
这个repo最终是如何构建的呢?
发布于 2021-01-08 15:15:53
在Android.bp文件中定义的目标越多。
有多个目标是从该存储库构建的,因此请查看名称以“java_library”开头的框架目标,以及framework目标上的注释,以查找您需要的内容。
// This "framework" module is NOT installed to the device. It's
// "framework-minus-apex" that gets installed to the device. Note that
// the filename is still framework.jar (via the stem property) for
// compatibility reason. The purpose of this module is to provide
// framework APIs (both public and private) for bundled apps.
// "framework-minus-apex" can't be used for the purpose because 1)
// many apps have already hardcoded the name "framework" and
// 2) it lacks API symbols from updatable modules - as it's clear from
// its suffix "-minus-apex".https://stackoverflow.com/questions/65624525
复制相似问题