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

Commit 34a59147 authored by Amit's avatar Amit
Browse files

Merge remote-tracking branch 'origin/lineage-16.0' into v1-pie

parents ee2310be c4e288c4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -89,6 +89,10 @@ PRODUCT_COPY_FILES += \
    vendor/lineage/config/permissions/privapp-permissions-lineage.xml:system/etc/permissions/privapp-permissions-lineage.xml \
    vendor/lineage/config/permissions/privapp-permissions-cm-legacy.xml:system/etc/permissions/privapp-permissions-cm-legacy.xml

# Enforce privapp-permissions whitelist
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
    ro.control_privapp_permissions=enforce

# Hidden API whitelist
PRODUCT_COPY_FILES += \
    vendor/lineage/config/permissions/lineage-hiddenapi-package-whitelist.xml:system/etc/permissions/lineage-hiddenapi-package-whitelist.xml
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 The LineageOS Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<permissions>
    <feature name="vendor.lineage.biometrics.fingerprint.inscreen" />
</permissions>
+9 −21
Original line number Diff line number Diff line
@@ -9,40 +9,28 @@ export V=16.0
export backuptool_ab=true

copy_file() {
  # toybox's cp doesn't do directories correctly for whatever reason
  mkdir -p `dirname $2`
  old=`umask`
  umask 0322
  mkdir -m755 -p `dirname $2`
  umask "$old"

  cp -dp "$1" "$2"
  # symlinks don't have a context
  if [ ! -L "$1" ]; then
    # it is assumed that every label starts with 'u:object_r' and has no white-spaces
    local context=`ls -Z "$1" | grep -o 'u:object_r:[^ ]*' | head -1`
    chcon "$context" "$2"
  fi
  cp -dp --preserve=a "$1" "$2"
}

backup_file() {
  if [ -e "$1" -o -L "$1" ]; then
    local FILE=`basename "$1"`
    local DIR=`dirname "$1"`
    # dont backup any apps that have odex files, they are useless
    if ( echo "$FILE" | grep -q "\.apk$" ) && [ -e `echo "$1" | sed -e 's/\.apk$/\.odex/'` ]; then
    if ( echo "$1" | grep -q "\.apk$" ) && [ -e `echo "$1" | sed -e 's/\.apk$/\.odex/'` ]; then
      echo "Skipping odexed apk $1";
    else
      mkdir -p "$C/$DIR"
      copy_file "$1" "$C/$DIR/$FILE"
      copy_file "$1" "$C/$1"
    fi
  fi
}

restore_file() {
  local FILE=`basename "$1"`
  local DIR=`dirname "$1"`
  if [ -e "$C/$DIR/$FILE" -o -L "$C/$DIR/$FILE" ]; then
    if [ ! -d "/postinstall/$DIR" ]; then
      mkdir -p "/postinstall/$DIR";
    fi
    copy_file "$C/$DIR/$FILE" "/postinstall/$1";
  if [ -e "$C/$1" -o -L "$C/$1" ]; then
    copy_file "$C/$1" "/postinstall/$1";
    if [ -n "$2" ]; then
      echo "Deleting obsolete file $2"
      rm "$2";