添加的apk文件AOSP [英] Add .apk files in aosp

查看:803
本文介绍了添加的apk文件AOSP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些第三方的apk文件添加到AOSP。谁能告诉在哪个文件夹我应该把这些APK文件,这样当我建立code和图像它安装在仿真器中创建。

I need to add some 3rd party apk files to the aosp. Can anyone tell in which folder i should keep these apk files so that when I build the code and image is created it is installed in the emulator.

其如系统应用程序保存在程序包/应用程序文件夹,以便需要知道哪里第三方的apk文件保存。

Its like the system apps are kept in Packages/app folder so need to know where does third party .apk files are kept.

推荐答案

添加第三方的APK的版本是绝对有可能的。

Adding third party APKs to the build is definitely possible.

另外的APK和应用程序与源$ C ​​$ C去同一个地方;在封装/应用文件夹。

Also APKs and APPs with source code go to the same place; the package/app folder.

添加新的APK到build

在AOSP根添加的文件夹:

In the AOSP root add the folder:

< AOSP根> /封装/应用/< yourappfolder>

然后在这个文件夹中添加:

Then inside this folder add:

  • Android.mk
  • < yourapp.apk>
  • empty Android.mk
  • < yourapp.apk >

Android的make文件应该有关于你的apk,添加到您的 Android.mk

The android make file should have the reference to your apk, add this to your Android.mk:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_MODULE := < your app folder name >

LOCAL_CERTIFICATE := < desired key >

LOCAL_SRC_FILES := < app apk filename >

LOCAL_MODULE_CLASS := APPS

LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)

include $(BUILD_PREBUILT)

在创建的条目 commons.mk (通常在建立/目标/产品)为您的apk添加行(检查,所有的人都是)

Create an entry in the commons.mk (usually in build/target/product) for your apk add the line (check where all the others are)

PRODUCT_PACKAGES += < what you have defined in LOCAL_MODULE, it should be your app folder name >

编译AOSP和你有一个全新的应用程序安装到系统中。

Compile the AOSP and you have a brand new app installed on the system.

这篇关于添加的apk文件AOSP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆