0

I'm trying to add some prebuilt apps to my AOSP built, using this blueprint:

android_app_import {
    name: "App",
    apk: "App.apk",
    presigned: true,
    dex_preopt: {
        enabled: false,
    },
    privileged: true,
    product_specific: true,
}

...

Two of them work fine, but others don't — the APK are being changed during the build.

Their md5 differ and it looks like the signature is stripped out, because if I pull the APK from the device and try to install it with adb install, it says that INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /data/app/vmdl476333160.tmp/base.apk: META-INF/APP.SF indicates /data/app/vmdl476333160.tmp/base.apk is signed using APK Signature Scheme v2, but no such signature was found. Signature stripped?

UPD. Found out that someone faced exactly the same issue.

UPD 2. The same, but in this case the solutions don't use soong, and I need soong.

How to fix it?

artem
  • 16,382
  • 34
  • 113
  • 189

1 Answers1

1

Try to add "preprocessed: true"

android_app_import {
  name: "App",
  apk: "App.apk",
  presigned: true,
  dex_preopt: {
    enabled: false,
  },
  privileged: true,
  product_specific: true,
  preprocessed: true,
}
Yong
  • 1,529
  • 12
  • 21
  • There's no such property unfortunately: `Android.bp:85:14: unrecognized property "preprocessed"` – artem Apr 28 '23 at 11:20