How do I set the default launcher in an AOSP build?

后端 未结 4 1028
后悔当初
后悔当初 2020-12-13 16:44

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

I want Android to boot directly into the app. I\'ve excluded launcher2

4条回答
  •  天命终不由人
    2020-12-13 17:11

    Unless you do the following steps, you will be prompted for selecting which home launcher you would like to choose.

    If you would like to have your home launcher truly overwrite the others without having to delete the others from your build, follow these steps.

    Add an override for all other home launchers on your device, to your custom home launcher's Android.mk: (You may have others to override, but here's what were included in mine)

    `LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3`
    

    Add your custom home launcher application module to the list of product packages. There are multiple files that add modules to the list of product packages. They are located in...

    "/your-aosp-root/build/target/product/"

    The file I chose to edit and add my module to was "Core.mk".

    Add your module to the product packages list:

        PRODUCT_PACKAGES += \
             BasicDreams \
             Browser \
             Calendar \
             .
             .
             .
             MmsService \
             YourModuleHere
    

    Call this to clean out your out directory of any old modules/images(doesn't delete all of out directory):

    make installclean
    

    Call your build script

提交回复
热议问题