[Android Software Development] uawg:
Building all microg apps from source

First of all a big great thanks to all you guys working on this fantastic piece of software.

I really do enjoy using lineageOS for microG and the convenient docker image. :good:

But since I do want to separate the build process from the signing process I use my own Docker image to build lineageOS for microG.

The reason why I want this separation is because I use password protected keys and I don't want to store these passwords anywhere in plain text for the build process

but rather automate the build and sign 'manually'.

So instead of brunch I simply run: "breakfast osprey && mka target-files-package dist". This works all great and fine.

But I also want to build the microG and FDroid apps from source. To achieve this I simply add all the required repositories.

The lineageOS ROM build as well as the gradle builds for the apps succeed. Yet if i bring it all together i run into a problem.

The GmsCore build 'fails' with the following message:

BUILD SUCCESSFUL in 3m 29s
343 actionable tasks: 1 executed, 342 up-to-date
[ 66% 2/3] target Prebuilt: GmsCore (/...PPS/GmsCore_intermediates/package.apk)
FAILED: /bin/bash -c "(/srv/src/out/host/linux-x86/bin/acp -fp packages/apps/GmsCore/play-services-core/build/outputs/apk/play-services-core-release-unsigned.apk /srv/src/out/target/product/osprey/obj/APPS/GmsCore_intermediates/package.apk ) && (if (zipinfo /srv/src/out/target/product/osprey/obj/APPS/GmsCore_intermediates/package.apk 'lib/*.so' 2>/dev/null | grep -v ' stor ' >/dev/null) ; then rm -rf /srv/src/out/target/product/osprey/obj/APPS/GmsCore_intermediates/uncompressedlibs && mkdir /srv/src/out/target/product/osprey/obj/APPS/GmsCore_intermediates/uncompressedlibs; unzip /srv/src/out/target/product/osprey/obj/APPS/GmsCore_intermediates/package.apk 'lib/*.so' -d /srv/src/out/target/product/osprey/obj/APPS/GmsCore_intermediates/uncompressedlibs && zip -d /srv/src/out/target/product/osprey/obj/APPS/GmsCore_intermediates/package.apk 'lib/*.so' && ( cd /srv/src/out/target/product/osprey/obj/APPS/GmsCore_intermediates/uncompressedlibs && find lib -type f | sort | zip -D -X -0 ../package.apk -@ ) && rm -rf /srv/src/out/target/product/osprey/obj/APPS/GmsCore_intermediates/uncompressedlibs; fi ) && (mv /srv/src/out/target/product/osprey/obj/APPS/GmsCore_intermediates/package.apk /srv/src/out/target/product/osprey/obj/APPS/GmsCore_intermediates/package.apk.unsigned ) && (java -Djava.library.path=/srv/src/out/host/linux-x86/lib64 -jar /srv/src/out/host/linux-x86/framework/signapk.jar --min-sdk-version \$((/srv/src/out/host/linux-x86/bin/aapt dump badging /srv/src/out/target/product/osprey/obj/APPS/GmsCore_intermediates/package.apk.unsigned 2>&1 | grep '^sdkVersion' || echo \"sdkVersion:'0'\") | cut -d\"'\" -f2 | sed -e s/^.*[^0-9].*\$/25/) build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 /srv/src/out/target/product/osprey/obj/APPS/GmsCore_intermediates/package.apk.unsigned /srv/src/out/target/product/osprey/obj/APPS/GmsCore_intermediates/package.apk.signed ) && (mv /srv/src/out/target/product/osprey/obj/APPS/GmsCore_intermediates/package.apk.signed /srv/src/out/target/product/osprey/obj/APPS/GmsCore_intermediates/package.apk )"
acp: file 'packages/apps/GmsCore/play-services-core/build/outputs/apk/play-services-core-release-unsigned.apk' does not exist
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed

The reason for the failure is, that the play-services-core-release-unsigned.apk is placed in ..../outputs/apk/release insead of outputs/apk/.

I'm rather new to the android build process and was hoping that maybe one of you guys could give me a hint how to achieve this kind of build (e.g. fix the issue above ;) ).