How to add third party prebuild app as a default system app?

1,074 views
Skip to first unread message

V T Vishwanath

unread,
Sep 18, 2023, 10:16:41 PM9/18/23
to Android Building
I am built AOSP 13 r74 branch. Target is sdk_phone_x86_64 which is compatible for the emulator. I am trying to add MSEdge.apk as prebuild system privileged app.

I have added this to /packages/apps/MSEdge/MSEdge.apk and Also edit packages/apps/MSEdge/Android.bp to below
android_app_import {
name: "MSEdge",
owner: "Microsoft",
apk: "MSEdge.apk",
presigned: true,
prefer: true,
certificate: "platform", // Either presigned or certificate has to set true
dex_preopt: {
enabled: false,
},
privileged: true,
product_specific: true, // Either product_specific or system_ext_specific has to be true
overrides: ["ExtShared"]
system_ext_specific: true,
}


Also included the app in build/make/target/product/handheld_product.mk
PRODUCT_PACKAGES += MSEdge

Still when I build the target and run the emulator I dont see these apps.

Suggest me the next step to bring the app in the emulator.

Андрейка

unread,
Sep 29, 2023, 4:36:32 PM9/29/23
to Android Building
Check logs. It may be the case when your apk signing is broken.

There may be different issues, but if you will find problem with apk signature in logs, I can suggest 2 options:
1.
You have presigned=true, but you indicate that you provide certificate. That looks strange for me.
Set presigned=false

2. 
AOSP wants presigned apps to have uncompressed *.so and *.dex (if not, it will uncompress it, and break signing for presigned apk), so build apk with
packagingOptions {
    jniLibs.useLegacyPackaging = false
    dex.useLegacyPackaging = false
}

вторник, 19 сентября 2023 г. в 05:16:41 UTC+3, V T Vishwanath:
Reply all
Reply to author
Forward
0 new messages