Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b90684eb authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Do not ship addon.d/50-lineage.sh anymore

Indeed, freeRASP SDK was considering /e/OS as rooted
because of the existing /system/addon.d directory.

Reverse engineering through strace hilighted this:

faccessat(AT_FDCWD, "/system/addon.d/", F_OK) = 0
parent af9ca29d
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -40,11 +40,7 @@ endif
# Backup Tool
PRODUCT_COPY_FILES += \
    vendor/lineage/prebuilt/common/bin/backuptool.sh:install/bin/backuptool.sh \
    vendor/lineage/prebuilt/common/bin/backuptool.functions:install/bin/backuptool.functions \
    vendor/lineage/prebuilt/common/bin/50-lineage.sh:$(TARGET_COPY_OUT_SYSTEM)/addon.d/50-lineage.sh

PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \
    system/addon.d/50-lineage.sh
    vendor/lineage/prebuilt/common/bin/backuptool.functions:install/bin/backuptool.functions 

ifneq ($(strip $(AB_OTA_PARTITIONS) $(AB_OTA_POSTINSTALL_CONFIG)),)
PRODUCT_COPY_FILES += \

prebuilt/common/bin/50-lineage.sh

deleted100755 → 0
+0 −43
Original line number Diff line number Diff line
#!/sbin/sh
#
# ADDOND_VERSION=2
#
# /system/addon.d/50-lineage.sh
# During a LineageOS upgrade, this script backs up /system/etc/hosts,
# /system is formatted and reinstalled, then the file is restored.
#

. /tmp/backuptool.functions

list_files() {
cat <<EOF
etc/hosts
EOF
}

case "$1" in
  backup)
    list_files | while read FILE DUMMY; do
      backup_file $S/"$FILE"
    done
  ;;
  restore)
    list_files | while read FILE REPLACEMENT; do
      R=""
      [ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
      [ -f "$C/$S/$FILE" ] && restore_file $S/"$FILE" "$R"
    done
  ;;
  pre-backup)
    # Stub
  ;;
  post-backup)
    # Stub
  ;;
  pre-restore)
    # Stub
  ;;
  post-restore)
    # Stub
  ;;
esac