$ ls h618-android12.0/vendor/aw/public/prebuild/TestLauncher
Android.mk
TestLauncher_20250101.apk
# Copyright (C) 2008 The Android Open Source Project
# Copyright (C) 2012 Broadcom Corporation
#
# 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.
#
#
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_CERTIFICATE := platform
LOCAL_MODULE := TestLauncher
LOCAL_PRIVILEGED_MODULE := true
LOCAL_ENFORCE_USES_LIBRARIES := true
LOCAL_DEX_PREOPT := true
LOCAL_OPTIONAL_USES_LIBRARIES := \
androidx.window.extensions \
androidx.window.sidecar
LOCAL_OVERRIDES_PACKAGES := \
Launcher2 \
Launcher3 \
Launcher3QuickStep \
Launcher3QuickStepGo
LOCAL_SRC_FILES := TestLauncher_20250101.apk
include $(BUILD_PREBUILT)
$ adb shell am start com.android.settings/com.android.settings.Settings
# logcat | grep LauncherTest
09-14 10:36:06.662 3826 3826 W PackageManager: Privileged permission android.permission.INSTALL_PACKAGES for package com.example.myapplication (/system/priv-app/LauncherTest) not in privapp-permissions allowlist
09-14 10:36:08.437 3826 3826 W PackageManager: Privileged permission android.permission.INSTALL_PACKAGES for package com.example.myapplication (/system/priv-app/LauncherTest) not in privapp-permissions allowlist
--- a/frameworks/base/data/etc/privapp-permissions-platform.xml
+++ b/frameworks/base/data/etc/privapp-permissions-platform.xml
@@ -550,4 +550,8 @@ applications that come with the platform
<privapp-permissions package="com.android.calllogbackup">
<permission name="com.android.voicemail.permission.READ_VOICEMAIL"/>
</privapp-permissions>
+
+ <privapp-permissions package="com.example.myapplication">
+ <permission name="android.permission.INSTALL_PACKAGES"/>
+ </privapp-permissions>