aboutsummaryrefslogtreecommitdiff
path: root/scripts/configs/remove_configs.sh
diff options
context:
space:
mode:
authorKacper Sagalara <mail@kasesag.me>2026-06-19 19:08:11 +0200
committerKacper Sagalara <mail@kasesag.me>2026-06-19 19:08:11 +0200
commit7821c02171d77229797e3a57edd0502e942373cc (patch)
tree2856fdb7f36144c6e539cfedacd475bf10458ce1 /scripts/configs/remove_configs.sh
parent0339c6b9e1cafffc2e37c47df4277157fc678041 (diff)
Add missing files.HEADmaster
Diffstat (limited to 'scripts/configs/remove_configs.sh')
-rwxr-xr-xscripts/configs/remove_configs.sh95
1 files changed, 95 insertions, 0 deletions
diff --git a/scripts/configs/remove_configs.sh b/scripts/configs/remove_configs.sh
new file mode 100755
index 0000000..6940b2e
--- /dev/null
+++ b/scripts/configs/remove_configs.sh
@@ -0,0 +1,95 @@
+#!/bin/bash
+
+if [ "$#" -ne 1 ]; then
+ echo "[x] Incorrect arguments!"
+ echo " Using: $0 <BASE_DIR>"
+ exit 1
+fi
+
+BASE_DIR=$1
+
+SYSTEM_DIR="${BASE_DIR}/system_a"
+PRODUCT_DIR="${BASE_DIR}/product_a"
+SYSTEM_EXT_DIR="${BASE_DIR}/system_ext_a"
+
+REMOVE_CONFIGS=(
+ "${PRODUCT_DIR}/etc/sysconfig/bugreport-whitelist-com.motorola.help.xml"
+ "${PRODUCT_DIR}/etc/sysconfig/hiddenapi-whitelist-com.motorola.gamemode.xml"
+ "${PRODUCT_DIR}/etc/sysconfig/hiddenapi-whitelist-com.motorola.help.xml"
+ "${PRODUCT_DIR}/etc/sysconfig/hiddenapi-whitelist-com.motorola.timeweatherwidget.xml"
+ "${PRODUCT_DIR}/etc/sysconfig/preinstalled-packages-platform-overlays.xml"
+ "${PRODUCT_DIR}/etc/sysconfig/shortcut-com.motorola.gamemode.xml"
+ "${PRODUCT_DIR}/etc/sysconfig/whitelist_com.dti.motorola.xml"
+ "${PRODUCT_DIR}/etc/preferred-apps/google.xml"
+ "${PRODUCT_DIR}/etc/tn_app_delay.xml"
+ "${PRODUCT_DIR}/etc/perf_config_common.xml"
+
+ "${SYSTEM_EXT_DIR}/etc/init/init.spotifyprops.rc"
+ "${SYSTEM_EXT_DIR}/etc/sysconfig/com.motorola.ccc.devicemanagement.powersave.xml"
+ "${SYSTEM_EXT_DIR}/etc/sysconfig/com.motorola.ccc.mainplm.powersave.xml"
+ "${SYSTEM_EXT_DIR}/etc/sysconfig/com.motorola.ccc.notification.powersave.xml"
+ "${SYSTEM_EXT_DIR}/etc/sysconfig/com.motorola.installer.powersave.xml"
+ "${SYSTEM_EXT_DIR}/etc/sysconfig/com.motorola.paks.powersave.xml"
+ "${SYSTEM_EXT_DIR}/etc/sysconfig/hiddenapi-allowlist-com.motorola.paks.xml"
+ "${SYSTEM_EXT_DIR}/etc/sysconfig/hiddenapi-whitelist-com.motorola.ccc.devicemanagement.xml"
+ "${SYSTEM_EXT_DIR}/etc/sysconfig/hiddenapi-whitelist-com.motorola.ccc.notification.xml"
+ "${SYSTEM_EXT_DIR}/etc/sysconfig/hiddenapi-whitelist-com.motorola.demo.xml"
+ "${SYSTEM_EXT_DIR}/etc/sysconfig/hiddenapi-whitelist-com.motorola.livewallpaper.xml"
+ # "${SYSTEM_EXT_DIR}/etc/sysconfig/hiddenapi-whitelist-com.motorola.securevault.xml"
+ "${SYSTEM_EXT_DIR}/etc/sysconfig/hiddenapi-whitelist-com.motorola.launcher3.xml"
+ "${SYSTEM_EXT_DIR}/etc/sysconfig/initial-package-stopped-states-com.motorola.securityhub.xml"
+ "${SYSTEM_EXT_DIR}/etc/sysconfig/whitelist_com.motorola.motocare.xml"
+ "${SYSTEM_EXT_DIR}/etc/nondisable/com.motorola.ccc.devicemanagement.nondisable.xml"
+ "${SYSTEM_EXT_DIR}/etc/nondisable/com.motorola.installer.xml"
+ "${SYSTEM_EXT_DIR}/etc/enable-disable-packages/enable-disable-com.motorola.installer.xml"
+
+ "${SYSTEM_DIR}/system/etc/sysconfig/facebook-hiddenapi-package-allowlist.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/hiddenapi-moto-ota-package-whitelist.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/hiddenapi-whitelist-com.motorola.brapps.xml"
+ "${SYSTEM_DIR}/system/etc/enable-disable-packages/enable-disable-com.motorola.brapps.xml"
+ "${SYSTEM_DIR}/system/etc/enable-disable-packages/enable-disable-com.motorola.enterprise.adapter.service.xml"
+
+ "${SYSTEM_DIR}/system/etc/init/facebook-appmanager.rc"
+ "${SYSTEM_DIR}/system/etc/sysconfig/afw-com.aura.oobe.motorola.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/afw-com.dti.motorola.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/afw-com.inmobi.installer.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/business-edition-disabled-apps.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/com.motorola.brapps.powersave.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/com.motorola.enterprise.adapter.service.powersave.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/hiddenapi-whitelist-cco.sitic.pp.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/hiddenapi-whitelist-com.android.providers.partnerbookmarks.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/hiddenapi-whitelist-com.motorola.android.providers.chromehomepage.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/hiddenapi-whitelist-moto.xml" # MotoOTA package
+ "${SYSTEM_DIR}/system/etc/sysconfig/initial-package-stopped-states-orange.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/meta-hiddenapi-package-allowlist.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/sysconfig-orange.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/whitelist_aura.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/whitelist_com.claroColombia.contenedor.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/whitelist_com.ironsource.appcloud.oobe.hutchison.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/whitelist_com.motorola.spaces.xml"
+ "${SYSTEM_DIR}/system/etc/sysconfig/whitelist_com.telcel.contenedor.xml"
+ "${SYSTEM_DIR}/system/etc/appmanager.conf"
+)
+
+REMOVE_DIRS=(
+ "${PRODUCT_DIR}/media-poland-play"
+ "${PRODUCT_DIR}/etc/sku_RU"
+ "${PRODUCT_DIR}/etc/sku_INDIA"
+ "${PRODUCT_DIR}/etc/sku_EEA"
+ "${PRODUCT_DIR}/etc/motorola"
+ "${PRODUCT_DIR}/etc/MotoDesktopAppConfig"
+
+ # "${SYSTEM_DIR}/system/etc/duraspeed"
+)
+
+echo "[i] Removing system configs..."
+for config in "${REMOVE_CONFIGS[@]}"; do
+ echo -e "\t[-] ${config}"
+ rm -rf "$config"
+done
+
+echo "[i] Removing system directories..."
+for config in "${REMOVE_DIRS[@]}"; do
+ echo -e "\t[-] ${config}"
+ rm -rf "$config"
+done