mirror of
https://gitlab.com/Nanolx/NanoDroid
synced 2024-11-02 03:40:13 +00:00
nanodroid-overlay: support overlaying apps from /system/reserve
This commit is contained in:
parent
35e70ed347
commit
1c419d63b9
@ -77,6 +77,7 @@ overrides_add () {
|
||||
for app in ${@}; do
|
||||
[ -d /system/app/${app} ] && overrides_add_intern app ${app}
|
||||
[ -d /system/priv-app/${app} ] && overrides_add_intern priv-app ${app}
|
||||
[ -d /system/reserve/${app} ] && overrides_add_intern reserve ${app}
|
||||
done
|
||||
}
|
||||
|
||||
@ -105,9 +106,11 @@ overrides_remove () {
|
||||
if [[ ${NO_MAGISK} -eq 0 ]]; then
|
||||
[ -f ${OVERLAY_PATH}/system/app/${app}/.replace ] && overrides_remove_intern app ${app}
|
||||
[ -f ${OVERLAY_PATH}/system/priv-app/${app}/.replace ] && overrides_remove_intern priv-app ${app}
|
||||
[ -f ${OVERLAY_PATH}/system/reserve/${app}/.replace ] && overrides_remove_intern reserve ${app}
|
||||
else
|
||||
[ -d /sdcard/nanodroid_backups/app/${app} ] && overrides_remove_intern app ${app}
|
||||
[ -d /sdcard/nanodroid_backups/priv-app/${app} ] && overrides_remove_intern priv-app ${app}
|
||||
[ -d /sdcard/nanodroid_backups/reserve/${app} ] && overrides_remove_intern reserve ${app}
|
||||
fi
|
||||
done
|
||||
}
|
||||
@ -123,6 +126,11 @@ overrides_list () {
|
||||
for app in $(find "${OVERLAY_PATH}/system/priv-app" -name "*.replace"); do
|
||||
echo " * $(basename $(dirname "${app}"))"
|
||||
done
|
||||
|
||||
echo "Overrides for /system/reserve:"
|
||||
for app in $(find "${OVERLAY_PATH}/system/reserve" -name "*.replace"); do
|
||||
echo " * $(basename $(dirname "${app}"))"
|
||||
done
|
||||
else
|
||||
echo "Moved-Out apps from /system/app:"
|
||||
for app in $(find "/sdcard/nanodroid_backups/app" -mindepth 1 -maxdepth 1 -type d); do
|
||||
@ -133,6 +141,11 @@ overrides_list () {
|
||||
for app in $(find "/sdcard/nanodroid_backups/priv-app" -mindepth 1 -maxdepth 1 -type d); do
|
||||
echo " * $(basename $(dirname "${app}"))"
|
||||
done
|
||||
|
||||
echo "Moved-Out apps from /system/reserve:"
|
||||
for app in $(find "/sdcard/nanodroid_backups/reserve" -mindepth 1 -maxdepth 1 -type d); do
|
||||
echo " * $(basename $(dirname "${app}"))"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
@ -147,6 +160,11 @@ overrides_list_non () {
|
||||
for app in $(find "/system/priv-app" -mindepth 1 -maxdepth 1 -type d); do
|
||||
[[ ! -f ${OVERLAY_PATH}/${app}/.replace ]] && echo " * $(basename ${app})"
|
||||
done
|
||||
|
||||
echo "non-overriden apps from /system/reserve:"
|
||||
for app in $(find "/system/reserve" -mindepth 1 -maxdepth 1 -type d); do
|
||||
[[ ! -f ${OVERLAY_PATH}/${app}/.replace ]] && echo " * $(basename ${app})"
|
||||
done
|
||||
else
|
||||
echo "non-moved-out apps from /system/app:"
|
||||
for app in $(find "/system/app" -mindepth 1 -maxdepth 1 -type d); do
|
||||
@ -157,6 +175,11 @@ overrides_list_non () {
|
||||
for app in $(find "/system/priv-app" -mindepth 1 -maxdepth 1 -type d); do
|
||||
echo " * $(basename ${app})"
|
||||
done
|
||||
|
||||
echo "non-moved-out apps from /system/reserve:"
|
||||
for app in $(find "/system/reserve" -mindepth 1 -maxdepth 1 -type d); do
|
||||
echo " * $(basename ${app})"
|
||||
done
|
||||
fi
|
||||
|
||||
}
|
||||
@ -165,7 +188,8 @@ overrides_clear () {
|
||||
if [[ ${NO_MAGISK} -eq 0 ]]; then
|
||||
echo " removing Overlays from ${OVERLAY_PATH}"
|
||||
for app in $(find "${OVERLAY_PATH}/system/app" -name "*.replace") \
|
||||
$(find "${OVERLAY_PATH}/system/priv-app" -name "*.replace"); do
|
||||
$(find "${OVERLAY_PATH}/system/priv-app" -name "*.replace") \
|
||||
$(find "${OVERLAY_PATH}/system/reserve" -name "*.replace") ; do
|
||||
echo " removing override: $(basename $(dirname ${app}))"
|
||||
rm -rf "$(dirname "${app}")"
|
||||
done
|
||||
@ -181,7 +205,8 @@ overrides_genconfig () {
|
||||
touch ${config}
|
||||
|
||||
for app in $(find "${OVERLAY_PATH}/system/app" -name "*.replace") \
|
||||
$(find "${OVERLAY_PATH}/system/priv-app" -name "*.replace"); do
|
||||
$(find "${OVERLAY_PATH}/system/priv-app" -name "*.replace") \
|
||||
$(find "${OVERLAY_PATH}/system/reserve" -name "*.replace") ; do
|
||||
xapp=$(basename $(dirname ${app}))
|
||||
echo " adding ${xapp} to configuration"
|
||||
grep -q "^${xapp}$" "${config}" 2>/dev/null || echo "${xapp}" >> "${config}"
|
||||
|
Loading…
Reference in New Issue
Block a user