From 14e73ecbec636eb72ce82a0d7dc078e23610351c Mon Sep 17 00:00:00 2001 From: Chris Renshaw Date: Tue, 27 Feb 2018 00:47:57 -0400 Subject: [PATCH] AK2: fix cpio extraction with busybox 1.28+ "cpio: skipping unsafe symlink to '/system/vendor' in archive, set EXTRACT_UNSAFE_SYMLINKS=1 to extract", introduced by https://git.busybox.net/busybox/commit/?id=bc9bbeb2b81001e8731cd2ae501c8fccc8d87cc7 Thanks @nathanchance for the quick heads up --- tools/ak2-core.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ak2-core.sh b/tools/ak2-core.sh index 48fee83..2d34cdd 100755 --- a/tools/ak2-core.sh +++ b/tools/ak2-core.sh @@ -102,7 +102,7 @@ unpack_ramdisk() { mkdir -p $ramdisk; chmod 755 $ramdisk; cd $ramdisk; - $unpackcmd -dc $split_img/boot.img-ramdisk.cpio.$compext | cpio -i -d; + $unpackcmd -dc $split_img/boot.img-ramdisk.cpio.$compext | EXTRACT_UNSAFE_SYMLINKS=1 cpio -i -d; if [ $? != 0 -o -z "$(ls $ramdisk)" ]; then ui_print " "; ui_print "Unpacking ramdisk failed. Aborting..."; exit 1; fi;