From f2ca042915e5739a071f66da5845d336c90d3888 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sat, 23 Jan 2021 16:09:30 -0800 Subject: [PATCH] Fix script for handling .apex files --- scripts/util_functions.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/util_functions.sh b/scripts/util_functions.sh index f51109371..05a676003 100644 --- a/scripts/util_functions.sh +++ b/scripts/util_functions.sh @@ -313,9 +313,10 @@ mount_apex() { if [ -f $APEX ]; then # APEX APKs, extract and loop mount unzip -qo $APEX apex_payload.img -d /apex - DEST=/apex/$(unzip -qp $APEX apex_manifest.pb | strings | head -n 1) - [ -z $DEST ] && DEST=/apex/$(unzip -qp $APEX apex_manifest.json | sed -n $PATTERN) + DEST=$(unzip -qp $APEX apex_manifest.pb | strings | head -n 1) + [ -z $DEST ] && DEST=$(unzip -qp $APEX apex_manifest.json | sed -n $PATTERN) [ -z $DEST ] && continue + DEST=/apex/$DEST mkdir -p $DEST loop_setup /apex/apex_payload.img if [ ! -z $LOOPDEV ]; then