Git-lfs

From JCRDoc
Revision as of 08:35, 1 April 2023 by 85.216.60.94 (talk) (→‎git-lfs: new section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

git-lfs

General Details

Device: Moto Z

Codename: griffin

Rom: crDroid

Android Version: 11

Security Patch: February 2023

Error

FAILED: out/target/product/griffin/obj/APPS/webview_intermediates/package.apk
/bin/bash -c "(rm -f out/target/product/griffin/obj/APPS/webview_intermediates/package.apk ) && (cp \"external/chromium-webview/prebuilt/arm64/webview.apk\" \"out/target/product/griffin/obj/APPS/webview_intermediates/package.apk\" ) && (if (zipinfo out/target/product/griffin/obj/APPS/webview_intermediates/package.apk 'lib/*.so' 2>/dev/null | grep -v ' stor ' >/dev/null) ; then out/soong/host/linux-x86/bin/zip2zip -i out/target/product/griffin/obj/APPS/webview_intermediates/package.apk -o out/target/product/griffin/obj/APPS/webview_intermediates/package.apk.tmp -0 'lib/**/*.so'  -x 'lib/**/*.so' -X lib/arm64-v8a/libwebviewchromium.so -X lib/armeabi-v7a/libwebviewchromium.so && mv -f out/target/product/griffin/obj/APPS/webview_intermediates/package.apk.tmp out/target/product/griffin/obj/APPS/webview_intermediates/package.apk ; fi ) && (if (zipinfo out/target/product/griffin/obj/APPS/webview_intermediates/package.apk '*.dex' 2>/dev/null | grep -v ' stor ' >/dev/null) ; then out/soong/host/linux-x86/bin/zip2zip -i out/target/product/griffin/obj/APPS/webview_intermediates/package.apk -o out/target/product/griffin/obj/APPS/webview_intermediates/package.apk.tmp -0 \"classes*.dex\" && mv -f out/target/product/griffin/obj/APPS/webview_intermediates/package.apk.tmp out/target/product/griffin/obj/APPS/webview_intermediates/package.apk ; fi ) && (mkdir -p out/target/product/griffin/appcompat && rm -f out/target/product/griffin/appcompat/webview.log && echo -n \"Package name: \" >> out/target/product/griffin/appcompat/webview.log && out/soong/host/linux-x86/bin/aapt2 dump resources out/target/product/griffin/obj/APPS/webview_intermediates/package.apk | awk -F ' |=' '/^Package/{print \$3}' >> out/target/product/griffin/appcompat/webview.log && echo \"Module name in Android tree: webview\" >> out/target/product/griffin/appcompat/webview.log && echo \"Local path in Android tree: external/chromium-webview\" >> out/target/product/griffin/appcompat/webview.log && echo \"Install path on lineage_griffin-user: out/target/product/griffin/system/product/app/webview/webview.apk\" >> out/target/product/griffin/appcompat/webview.log && echo >> out/target/product/griffin/appcompat/webview.log ) && (echo \"appcompat.sh output:\" >> out/target/product/griffin/appcompat/webview.log && PACKAGING=out/target/common/obj/PACKAGING ANDROID_LOG_TAGS=\"*:e\" out/host/linux-x86/bin/appcompat.sh --dex-file=out/target/product/griffin/obj/APPS/webview_intermediates/package.apk --api-flags=out/soong/hiddenapi/hiddenapi-flags.csv 2>&1 >> out/target/product/griffin/appcompat/webview.log ) && (mv out/target/product/griffin/obj/APPS/webview_intermediates/package.apk out/target/product/griffin/obj/APPS/webview_intermediates/package.apk.unsigned ) && (prebuilts/jdk/jdk11/linux-x86/bin/java -XX:OnError=\"cat hs_err_pid%p.log\" -XX:CICompilerCount=6 -XX:+UseDynamicNumberOfGCThreads -Djava.library.path=\$(dirname out/soong/host/linux-x86/lib64/libconscrypt_openjdk_jni.so) -jar out/soong/host/linux-x86/framework/signapk.jar  build/make/target/product/security/testkey.x509.pem build/make/target/product/security/testkey.pk8  out/target/product/griffin/obj/APPS/webview_intermediates/package.apk.unsigned out/target/product/griffin/obj/APPS/webview_intermediates/package.apk.signed ) && (mv out/target/product/griffin/obj/APPS/webview_intermediates/package.apk.signed out/target/product/griffin/obj/APPS/webview_intermediates/package.apk )"
out/target/product/griffin/obj/APPS/webview_intermediates/package.apk: error: failed opening zip: Invalid file.
veridex E 03-25 18:31:30 910470 910470 veridex.cc:170] Expected valid zip or dex file

Solution

Make sure to install git-lfs

sudo apt install git-lfs

on ubuntu/debian based distros

Rerun init with --git-lfs

Run:

grep -l 'merge=lfs' $( find $PWD -name .gitattributes ) /dev/null | while IFS= read -r line; do
   dir=$(dirname $line)
   echo $dir
   ( cd $dir ; git lfs pull )
done

once in the root dir of your rom

Resync and build.