如何在AOSP构建中设置默认启动器? [英] How do I set the default launcher in an AOSP build?

查看:252
本文介绍了如何在AOSP构建中设置默认启动器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在修改AOSP源代码,因为我的应用程序需要在信息亭环境中运行.

I am modifying the AOSP source code because my app needs to run in a kiosk environment.

我希望Android直接启动到应用程序中.我从generic_no_telephony.mk中排除了 launcher2 ,并在其中添加了应用程序.现在,Android会一直提示我选择默认启动器.

I want Android to boot directly into the app. I've excluded launcher2 from generic_no_telephony.mk, and added the app there. Now Android prompts me all the time to choose default launcher.

弹出窗口中有两个选择:

The two choices that are available on the pop-up:

  1. 家庭样品
  2. 我的应用程序.

如何排除Android Home Sample Launcher?还是有另一种方法可以在AOSP构建中设置默认启动器?

How can I exclude the Android Home Sample Launcher? Or is there another way to set the default launcher in an AOSP build?

推荐答案

与其修改AOSP make文件(这很烦人,因为随后您需要跟踪更改),不如将LOCAL_OVERRIDES_PACKAGES行添加到您的应用程序的make文件中

Instead of modifying the AOSP make files (which is annoying because then you need to track your changes) it is easier to add a LOCAL_OVERRIDES_PACKAGES line to your app's make file.

例如:

LOCAL_OVERRIDES_PACKAGES := Launcher2 Launcher3

添加到您的Android.mk文件中将确保这些软件包不会添加到添加此软件包的任何版本中.

added to your Android.mk file will ensure that those packages are not added to any build where this package is added.

接着,您应该做一个

make installclean

,然后以始终进行构建的相同方式开始构建. make installclean对于删除先前构建遗留下来的软件包很重要.

and then start your build the same way you always make your build. The make installclean is important to remove the packages that are left behind by the previous build.

在另一个问题中,我也找到了一个很好的答案,请参见: 如何制作嵌入式Android操作系统只需一个应用?

I also just found a nice answer to how to do this in another question, see: How would I make an embedded Android OS with just one app?

这篇关于如何在AOSP构建中设置默认启动器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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