2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-11-02 03:40:13 +00:00

Uninstaller: fixed Uninstaller failing if no overlayed apps from System Mode exist

This commit is contained in:
Christopher Roy Bratusek 2018-11-13 20:17:31 +01:00
parent 9fc4958645
commit 36a454adbc

View File

@ -166,27 +166,31 @@ config_locations="/sdcard /external_sd /data $(dirname ${ZIP}))"
config_files=".nanodroid-setup .nanodroid-apps .nanodroid-overlay" config_files=".nanodroid-setup .nanodroid-apps .nanodroid-overlay"
restore_apps () { restore_apps () {
for app in /sdcard/nanodroid_backups/app/*; do if [ -d /sdcard/nanodroid_backups/app/ ]; then
if [ -d /system/app/${app} ]; then for app in /sdcard/nanodroid_backups/app/*; do
ui_print " << removing backup: app:${app}" if [ -d /system/app/${app} ]; then
rm -rf /sdcard/nanodroid_backups/app/${app} ui_print " << removing backup: app:${app}"
else rm -rf /sdcard/nanodroid_backups/app/${app}
ui_print " << restoring: app:${app}" else
mv /sdcard/nanodroid_backups/app/${app} \ ui_print " << restoring: app:${app}"
/system/app/ || error " failed to restore ${app}" mv /sdcard/nanodroid_backups/app/${app} \
fi /system/app/ || error " failed to restore ${app}"
done fi
done
else
for app in /sdcard/nanodroid_backups/priv-app/*; do if [ -d /sdcard/nanodroid_backups/priv-app/ ]; then
if [ -d /system/priv-app/${app} ]; then for app in /sdcard/nanodroid_backups/priv-app/*; do
ui_print " << removing backup: priv-app:${app}" if [ -d /system/priv-app/${app} ]; then
rm -rf /sdcard/nanodroid_backups/priv-app/${app} ui_print " << removing backup: priv-app:${app}"
else rm -rf /sdcard/nanodroid_backups/priv-app/${app}
ui_print " << restoring: priv-app:${app}" else
mv /sdcard/nanodroid_backups/priv-app/${app} \ ui_print " << restoring: priv-app:${app}"
/system/priv-app/ || error " failed to restore ${app}" mv /sdcard/nanodroid_backups/priv-app/${app} \
fi /system/priv-app/ || error " failed to restore ${app}"
done fi
done
fi
} }
system_mode_uninstall () { system_mode_uninstall () {