Android framework添加自定义的Product项目,lunch目标项目

文章目录

  • Android framework添加自定义的Product项目
    • 1.什么是Product?
    • 2.定义自己的Product玩一玩

Android framework添加自定义的Product项目

1.什么是Product?

源码目录下输入lunch命令之后,简单理解下面这些列表就是product。用于把系统编译成不同的镜像文件,

在这里插入图片描述

比如我们一般选择这个lunch的product

在这里插入图片描述

这个文件夹就是我们编译源码的时候lunch的很多菜单选项

在这里插入图片描述

2.定义自己的Product玩一玩

在devices目录下,搞几个文件夹

在这里插入图片描述

BoardConfig.mk

# Copyright (C) 2018 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.
## x86_64 emulator specific definitions
TARGET_CPU_ABI := x86_64
TARGET_ARCH := x86_64
TARGET_ARCH_VARIANT := x86_64TARGET_2ND_CPU_ABI := x86
TARGET_2ND_ARCH := x86
TARGET_2ND_ARCH_VARIANT := x86_64TARGET_PRELINK_MODULE := false
include build/make/target/board/BoardConfigGsiCommon.mk
include build/make/target/board/BoardConfigEmuCommon.mkBOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800BOARD_SEPOLICY_DIRS += device/generic/goldfish/sepolicy/x86# Wifi.
BOARD_WLAN_DEVICE           := emulator
BOARD_HOSTAPD_DRIVER        := NL80211
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB   := lib_driver_cmd_simulated
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_simulated
WPA_SUPPLICANT_VERSION      := VER_0_8_X
WIFI_DRIVER_FW_PATH_PARAM   := "/dev/null"
WIFI_DRIVER_FW_PATH_STA     := "/dev/null"
WIFI_DRIVER_FW_PATH_AP      := "/dev/null"

test1.mk

#
# Copyright 2013 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.
#PRODUCT_USE_DYNAMIC_PARTITIONS := true# The system image of aosp_x86_64-userdebug is a GSI for the devices with:
# - x86 64 bits user space
# - 64 bits binder interface
# - system-as-root
# - VNDK enforcement
# - compatible property override enabled# This is a build configuration for a full-featured build of the
# Open-Source part of the tree. It's geared toward a US-centric
# build quite specifically for the emulator, and might not be
# entirely appropriate to inherit from for on-device configurations.# GSI for system/product
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_common.mk)# Emulator for vendor
$(call inherit-product-if-exists, device/generic/goldfish/x86_64-vendor.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulator_vendor.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86_64/device.mk)# Enable mainline checking for excat this product name
#ifeq (aosp_x86_64,$(TARGET_PRODUCT))
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
#endifPRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \root/init.zygote32_64.rc \root/init.zygote64_32.rc \# Copy different zygote settings for vendor.img to select by setting property
# ro.zygote=zygote64_32 or ro.zygote=zygote32_64:
#   1. 64-bit primary, 32-bit secondary OR
#   2. 32-bit primary, 64-bit secondary
# init.zygote64_32.rc is in the core_64_bit.mk below
PRODUCT_COPY_FILES += \system/core/rootdir/init.zygote32_64.rc:root/init.zygote32_64.rc
PRODUCT_PACKAGES += helloworld \FirstSystemApp# PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST +=\
#     /system/bin/helloworld
PRODUCT_NAME := test1
PRODUCT_DEVICE := generic_x86_64
PRODUCT_BRAND := Android
PRODUCT_MODEL := AOSP on x86_64

AndroidProducts.mk

PRODUCT_MAKEFILES :=\$(LOCAL_DIR)/test1.mkCOMMON_LUNCH_CHOICES :=\test1-eng\test1-userdebug\test1-user

测试一下

在这里插入图片描述

这样子就是成功了,lunch试一下

没毛病

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/171300.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

飞天使-template模版相关知识

遇到报错django.template.exceptions.TemplateSyntaxError: ‘staticfiles’ is not a registered tag library. Must ROOT_URLCONF TEMPLATES [{BACKEND: django.template.backends.django.DjangoTemplates,DIRS: [os.path.join(BASE_DIR, templates)],APP_DIRS: True,OPTI…

c++四种类型转换

首先我们要先引入上行转换和下行转换的概念 所谓上行转换,即将原来的子类指针转换成父类指针; 下行转换即将原来的父类指针转换成子类指针 由于子类对象的空间较大,所以把子类强制转换父类给父类指针赋值时,父类指针对象能读取…

ISP图像处理Pipeline

参考:1. 键盘摄影(七)——深入理解图像信号处理器 ISP2. Understanding ISP Pipeline3. ISP图像处理流程介绍4. ISP系统综述5. ISP(图像信号处理)之——图像处理概述6. ISP 框架7. ISP(图像信号处理)算法概述、工作原理、架构、处理流程8. ISP全流程简介9. ISP流程介…

1.jvm基本知识

目录 概述jvm虚拟机三问jvm是什么?java 和 jvm 的关系 为什么学jvm怎么学习为什么jvm调优?什么时候jvm调优调优调什么 结束 概述 相关文章在此总结如下: 文章地址jvm类加载系统地址双亲委派模型与打破双亲委派地址运行时数据区地址 jvm虚拟机三问 j…

Python 日志记录器logging 百科全书 之 日志回滚

Python 日志记录器logging 百科全书 之 日志回滚 前言 在之前的文章中,我们学习了关于Python日志记录的基础配置。 本文将深入探讨Python中的日志回滚机制,这是一种高效管理日志文件的方法,特别适用于长时间运行或高流量的应用。 知识点&…

NFTScan | 11.06~11.12 NFT 市场热点汇总

欢迎来到由 NFT 基础设施 NFTScan 出品的 NFT 生态热点事件每周汇总。 周期:2023.11.06~ 2023.11.12 NFT Hot News 01/ 《辛普森一家》提及 NFT 及区块链,相关 NFT 地板价涨至 0.35 ETH 11 月 6 日,据 Coindesk 报道,美国时间周…

数据分析-numpy

numpy numpy numpy简介优点下载ndarray的属性输出数据类型routines 函数ndarray对象的读写操作ndarray的级联和切分级联切分 ndarray的基本运算广播机制(Broadcast)ndarry的聚合操作数组元素的操作numpy 数学函数numpy 查找和排序 写在最后面 简介 nump…

RabbitMQ实战

文章目录 1、简介2、MQ优点缺点MQ的应用场景AMQP工作原理市面上常见的MQ 3、Linux安装RabbitMQ3.1 版本对应3.2 安装socat3.3 下载 Erlang/OTP、安装、验证 erlang方法一:1. 下载2. 将下载的Erlang服务上传到服务器上面3. 解压4. 编译erlang的依赖环境5. 安装Erlang…

[PyTorch][chapter 62][强化学习-基本概念]

前言: 目录: 强化学习概念 马尔科夫决策 Bellman 方程 格子世界例子 一 强化学习 强化学习 必须在尝试之后,才能发现哪些行为会导致奖励的最大化。 当前的行为可能不仅仅会影响即时奖赏,还有影响下一步奖赏和所有奖赏 强…

ADFS 高可用配置 + NLB配置(Windows网络负载均衡)

ADFS 高可用配置 NLB配置(Windows网络负载均衡) ADFS安装配置NLB配置节点 TEST-ADFS-01 网络负载平衡配置节点 TEST-ADFS-02 网络负载平衡修改CRM配置 ADFS实现高可用负载均衡有两种,主要是在数据库的选择方式: windows自带的内…

P36[11-1]SPI通信协议

SPI相比于IIC的优缺点: 1.SPI传输速度快(IIC高电平驱动能力较弱,因此无法高速传输) 2.使用简单 3.通信线多 SCK(SCLK,CK,CLK):串行时钟线 MOSI(DO):主机输出,从机输入 MISO(DI): 主机输入,从机输出 SS(NSS,CS):从机选择(有多少个从机,主机就要用几根SS分别与从机连接…

关于财税体制什么是扁平化?三级财政西方的龙骑兵FIBW 10道练习题第五题

目录 关于财税体制什么是扁平化? 三级财政 西方的龙骑兵 FIBW 10道练习题 第五题 关于财税体制什么是扁平化? 在财税领域,"扁平化"(Flattening)通常指的是简化税收结构,减少税种和税率的层…