From d072fca386756e008f5947fd9a86a1f0dbe730cf Mon Sep 17 00:00:00 2001 From: Syuugo Date: Sun, 2 Oct 2022 20:31:42 +0900 Subject: [PATCH] Fix Improved method of adding features (#162) Co-authored-by: Howard Wu <40033067+Howard20181@users.noreply.github.com> --- .../android.software.device_admin.xml | 19 ------------------- scripts/build.sh | 7 ++++--- .../android.software.device_admin.xml | 19 ------------------- 3 files changed, 4 insertions(+), 41 deletions(-) delete mode 100644 arm64/system/system/etc/permissions/android.software.device_admin.xml delete mode 100644 x64/system/system/etc/permissions/android.software.device_admin.xml diff --git a/arm64/system/system/etc/permissions/android.software.device_admin.xml b/arm64/system/system/etc/permissions/android.software.device_admin.xml deleted file mode 100644 index 7d14dc6..0000000 --- a/arm64/system/system/etc/permissions/android.software.device_admin.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - diff --git a/scripts/build.sh b/scripts/build.sh index 90aa0d7..84a6180 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -472,6 +472,10 @@ if [ "$REMOVE_AMAZON" ]; then echo -e "done\n" fi +echo "Add device administration features" +$SUDO sed -i -e '/cts/a \ \ \ \ ' -e '/print/i \ \ \ \ ' "$MOUNT_DIR"/vendor/etc/permissions/windows.permissions.xml +echo -e "done\n" + if [ "$ROOT_SOL" = 'magisk' ] || [ "$ROOT_SOL" = '' ]; then echo "Integrate Magisk" $SUDO mkdir "$MOUNT_DIR"/sbin @@ -582,9 +586,6 @@ find ../"$ARCH"/system/system/priv-app/ -maxdepth 1 -mindepth 1 -printf '%P\n' | find ../"$ARCH"/system/system/priv-app/ -maxdepth 1 -mindepth 1 -printf '%P\n' | xargs -I placeholder $SUDO find "$MOUNT_DIR"/system/priv-app/placeholder -type f -exec chmod 0644 {} \; find ../"$ARCH"/system/system/priv-app/ -maxdepth 1 -mindepth 1 -printf '%P\n' | xargs -I placeholder $SUDO find "$MOUNT_DIR"/system/priv-app/placeholder -exec chown root:root {} \; find ../"$ARCH"/system/system/priv-app/ -maxdepth 1 -mindepth 1 -printf '%P\n' | xargs -I placeholder $SUDO find "$MOUNT_DIR"/system/priv-app/placeholder -exec setfattr -n security.selinux -v "u:object_r:system_file:s0" {} \; || abort -find ../"$ARCH"/system/system/etc/permissions/ -maxdepth 1 -mindepth 1 -printf '%P\n' | xargs -I placeholder $SUDO find "$MOUNT_DIR"/system/etc/permissions/placeholder -type f -exec chmod 0644 {} \; -find ../"$ARCH"/system/system/etc/permissions/ -maxdepth 1 -mindepth 1 -printf '%P\n' | xargs -I placeholder $SUDO find "$MOUNT_DIR"/system/etc/permissions/placeholder -exec chown root:root {} \; -find ../"$ARCH"/system/system/etc/permissions/ -maxdepth 1 -mindepth 1 -printf '%P\n' | xargs -I placeholder $SUDO find "$MOUNT_DIR"/system/etc/permissions/placeholder -type f -exec setfattr -n security.selinux -v "u:object_r:system_file:s0" {} \; || abort echo -e "Add extra packages done\n" if [ "$GAPPS_BRAND" != 'none' ]; then diff --git a/x64/system/system/etc/permissions/android.software.device_admin.xml b/x64/system/system/etc/permissions/android.software.device_admin.xml deleted file mode 100644 index 7d14dc6..0000000 --- a/x64/system/system/etc/permissions/android.software.device_admin.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - -