2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-10-31 09:20:23 +00:00

patcher: always mount /system read-write + remove old addon.d setup during install

This commit is contained in:
Christopher Roy Bratusek 2018-01-27 09:45:58 +01:00
parent 2b10f18f54
commit 3bd56f6f83

View File

@ -306,8 +306,6 @@ install_services () {
done
if [ "${install_path}" = "/" ]; then
mount -orw,remount /system || \
error " !! failed to mount /system read-write"
backup_services_jar
backup_settings_ui
fi
@ -347,6 +345,13 @@ install_addond () {
mkdir -p /data/adb/nanodroid_patcher
if [ -d /data/nanomod.patcher ]; then
ui_print " "
ui_print " Removing old NanoMod restoration setup"
rm -rf /data/nanomod.patcher
rm -f /system/addon.d/75-nanomodpatcher.sh
fi
for file in core_services.jar.dex dexpatcher.dex file.arm file.x86 \
hook_4.1-6.0_services.jar.dex hook_7.0-8.0_services.jar.dex \
ui_4.1-6.0_Settings.apk.dex ui_4.1-6.0_services.jar.dex \
@ -465,7 +470,9 @@ if [ -f /data/adb/.nanodroid-patcher ]; then
fi
if ! (is_mounted /system); then
mount -oro /system || error " !! failed to mount /system"
mount -orw /system || error " !! failed to mount /system"
else mount -orw,remount /system || \
error " !! failed to remount /system read-write"
fi
setup_patcher