From 55071e36c79ce20928663e0ebaee1335897fd2af Mon Sep 17 00:00:00 2001 From: Alessandro Astone Date: Sat, 26 Dec 2020 23:03:09 +0100 Subject: [PATCH] Addon.d V3 For seamless /product,/system_ext backup and restore This reverts commit 416faab8e9460fcf2a91a6a7d716c148e45ccb87. --- addond_head | 2 +- addond_tail | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/addond_head b/addond_head index 11b364e..f764836 100644 --- a/addond_head +++ b/addond_head @@ -1,6 +1,6 @@ #!/sbin/sh # -# ADDOND_VERSION=2 +# ADDOND_VERSION=3 # # /system/addon.d/30-gapps.sh # diff --git a/addond_tail b/addond_tail index 1820d3a..d2b0040 100644 --- a/addond_tail +++ b/addond_tail @@ -24,16 +24,11 @@ case "$1" in # Stub ;; post-restore) - if [ -d "/postinstall" ]; then - P="/postinstall/system" - else - P="/system" - fi - for i in $(list_files); do - chown root:root "$P/$i" - chmod 644 "$P/$i" - chmod 755 "$(dirname "$P/$i")" + f=$(get_output_path "$S/$i") + chown root:root $f + chmod 644 $f + chmod 755 $(dirname $f) done ;; esac