opengapps/aosp_build

Unable to open /..../package.apk.unaligned as zip archive

Closed this issue · 4 comments

Unable to open '/root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk' for verification Unable to open '/root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk.unaligned' as zip archive
Anyone can help

` 105631/109680] target Prebuilt: AndroidPlatformServices (/root/arrow/out/target/pro FAILED: /root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk
/bin/bash -c "(rm -f /root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk ) && (cp "vendor/opengapps/sources/arm64/app/com.google.android.gms.policy_sidecar_o/23/nodpi/20440.apk" "/root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk" ) && (if (zipinfo /root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk 'lib/.so' 2>/dev/null | grep -v ' stor ' >/dev/null) ; then /root/arrow/out/soong/host/linux-x86/bin/zip2zip -i /root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk -o /root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk.tmp -0 'lib/**/.so' && mv -f /root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk.tmp /root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk ; fi ) && (if ! /root/arrow/out/host/linux-x86/bin/zipalign -c 4 /root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk >/dev/null ; then mv /root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk /root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk.unaligned; /root/arrow/out/host/linux-x86/bin/zipalign -f -p 4 /root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk.unaligned /root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk.aligned; mv /root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk.aligned /root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk; fi )"
Unable to open '/root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk' for verification
Unable to open '/root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk.unaligned' as zip archive
mv: bad '/root/arrow/out/target/product/payton/obj/APPS/AndroidPlatformServices_intermediates/package.apk.aligned': No such file or directory
[ 96% 105632/109680] target Prebuilt: CalculatorGoogle (/root/arrow/out/target/product/pa FAILED: /root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk
/bin/bash -c "(rm -f /root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk ) && (cp "vendor/opengapps/sources/all/app/com.google.android.calculator/23/nodpi/78000303.apk" "/root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk" ) && (if (zipinfo /root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk 'lib/.so' 2>/dev/null | grep -v ' stor ' >/dev/null) ; then /root/arrow/out/soong/host/linux-x86/bin/zip2zip -i /root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk -o /root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk.tmp -0 'lib/**/.so' && mv -f /root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk.tmp /root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk ; fi ) && (if ! /root/arrow/out/host/linux-x86/bin/zipalign -c 4 /root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk >/dev/null ; then mv /root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk /root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk.unaligned; /root/arrow/out/host/linux-x86/bin/zipalign -f -p 4 /root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk.unaligned /root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk.aligned; mv /root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk.aligned /root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk; fi )"
Unable to open '/root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk' for verification
Unable to open '/root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk.unaligned' as zip archive
mv: bad '/root/arrow/out/target/product/payton/obj/APPS/CalculatorGoogle_intermediates/package.apk.aligned': No such file or directory
[ 96% 105634/109680] target Prebuilt: CalendarGooglePrebuilt (/root/arrow/out/target/prod FAILED: /root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk
/bin/bash -c "(rm -f /root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk ) && (cp "vendor/opengapps/sources/all/app/com.google.android.calendar/21/nodpi/2016432390.apk" "/root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk" ) && (if (zipinfo /root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk 'lib/.so' 2>/dev/null | grep -v ' stor ' >/dev/null) ; then /root/arrow/out/soong/host/linux-x86/bin/zip2zip -i /root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk -o /root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk.tmp -0 'lib/**/.so' && mv -f /root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk.tmp /root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk ; fi ) && (if ! /root/arrow/out/host/linux-x86/bin/zipalign -c 4 /root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk >/dev/null ; then mv /root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk /root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk.unaligned; /root/arrow/out/host/linux-x86/bin/zipalign -f -p 4 /root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk.unaligned /root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk.aligned; mv /root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk.aligned /root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk; fi )"
Unable to open '/root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk' for verification
Unable to open '/root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediates/package.apk.unaligned' as zip archive
mv: bad '/root/arrow/out/target/product/payton/obj/APPS/CalendarGooglePrebuilt_intermediatFAILED: [W][2020-01-03T16:29:21+0000][17929] void cmdline::logParams(nsjconf_t *)():250 Process will be UID/EUID=0 in the global user namespace, and will have user root-level access to files
[W][2020-01-03T16:29:21+0000][17929] void cmdline::logParams(nsjconf_t *)():260 Process will be GID/EGID=0 in the global user namespace, and will have group root-level access to files
17:28:38 ninja failed with: exit status 1

failed to build some targets (01:00:28 (hh:mm:ss)) #### root@instance-1:~/arrow# brunch arrow_payton-userdebug`

I have the same issue unable to open the file. Has anyone an idea to solve it?

Does this issue ticket help you?
#229

I rebuild my whole repository and the failure didn't occur anymore. So I can confirm the published solution. Thanks for your Help!