Build output has become more helpful at least in latest main. In some cases
it will complain something like:
device/google/cuttlefish/guest/prebuilts/chr_x64_ChromePublic.apk:
Prebuilt, presigned apks with targetSdkVersion >= 30 (or a codename
targetSdkVersion) must set preprocessed: true in the Android.bp definition
(because they must be signed with signature v2, and the build system would
wreck that signature otherwise)
so adding preprocessed: true helped there. Then there is also other flag
skip_preprocessed_apk_checks that is commented as "Whether or not to skip
checking the preprocessed apk for proper alignment and uncompressed JNI
libs and dex files."
On Friday, September 29, 2023 at 11:36:15 PM UTC+3 Андрейка wrote:
> Ok, *preinstalled *flag didnt work... seems like *soong *does not support
> it, though *make* seems should.
>
> Anyway, I finally was able to fix this.
> It seems that AOSP wants presigned apps to have uncompressed so and dex
> (if not, it will uncompress it, and break signing for presigned apk), so
> build it with
> *packagingOptions {*
> * jniLibs.useLegacyPackaging = false*
>
> * dex.useLegacyPackaging = false}*
> That helped in my case.
>
> пятница, 15 сентября 2023 г. в 17:17:04 UTC+3, Андрейка:
>
>> Hi
>>
>> Have the same issue. Found out there is a flag named preprocessed
>> <https://cs.android.com/android/platform/superproject/main/+/main:build/soong/java/app_import.go;l=139>.
>>
>> Did you tried it?
>>
>> вторник, 6 июня 2023 г. в 21:11:40 UTC+3, Vyrine:
>>
>>> I'm having this problem since last year 2022. I still debugging up to
>>> now and I don't know what's causing it.
>>>
>>> On Thursday, May 4, 2023 at 3:54:08 AM UTC+8 TblS wrote:
>>>
>>>> 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?
>>>>
>>>> How to fix it?
>>>>
>>>
--
--
You received this message because you are subscribed to the "Android Building"
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-building/28f9c1cb-9bdd-453f-9449-5c5290e176d4n%40googlegroups.com.