Home > front end >  Change launcher in AOSP 11
Change launcher in AOSP 11

Time:05-26

I am building AOSP 11 for emulator x86_64 and trying to change Default Launcher with third party launcher.

I am using raspberry pi's launcher downloaded from here

when I manually compile this launcher and install using adb It works, like it gives prompt to choose launcher.

but I need to add in source code.

I have found that I need to override default launcher.

So I have modified raspberry pi's launcher's Android.bp file

  • add override section

  • add system_ext_specific: true.( because this is default launcher's path.)

     android_app {
     name: "RpLauncher",
     overrides: ["Home Launcher2 Launcher3 Launcher3QuickStep"],
     platform_apis: true,
     certificate: "platform",
     privileged: true,
     system_ext_specific: true,
    
     static_libs: [
       "androidx.legacy_legacy-support-v4",
       "androidx.recyclerview_recyclerview",
       "androidx.leanback_leanback",
       "kotlinx-coroutines-core",
     ],
    
     srcs: ["src/**/*.kt"],
     resource_dirs: ["res"],
    

    }

Added package name "RpLauncher" in build/target/product/handheld_system_ext.mk where default launcher(Launcher3QuickStep) package added.

PRODUCT_PACKAGES  = \
Launcher3QuickStep \
Provision \
Settings \
StorageManager \
SystemUI \
WallpaperCropper \
RpLauncher \

After this when start the emulator only bootanimation appears and it never ends. Anyone have any idea about this ?

CodePudding user response:

Here , Problem could be Device not booting as You are adding this app as privileged app

privileged: true,

So, You should whitelist the privileged permission requested by app

Like this https://cs.android.com/android/platform/superproject/ /master:packages/apps/Launcher3/Android.bp;l=170?q=Launcher3QuickStep&ss=android/platform/superproject

  • Related