From 07ce9d604fa01db64eba7b695d5ac1438a7107d1 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sun, 8 Apr 2018 19:59:37 +0200 Subject: [PATCH] uninstaller: restore font in system mode when changed using NanoDroid-Font --- .../META-INF/com/google/android/update-binary | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/uninstaller/META-INF/com/google/android/update-binary b/uninstaller/META-INF/com/google/android/update-binary index eb5aa04..24ef38b 100644 --- a/uninstaller/META-INF/com/google/android/update-binary +++ b/uninstaller/META-INF/com/google/android/update-binary @@ -167,6 +167,18 @@ system_mode_uninstall () { ui_print " << using: ${1}" system_list=${1} + if test -h /system/fonts/Roboto-Regular.ttf; then + CUSTOM_FONT="$(basename $(readlink /system/fonts/Roboto-Regular.ttf) .ttf)" + ui_print " << Detected NanoDroid-Font (${CUSTOM_FONT})" + ui_print " < Restoring original Font" + + if [ -f /system/xbin/nanodroid-font ]; then + /system/xbin/nanodroid-font -r + elif [ -f /system/bin/nanodroid-font ]; then + /system/bin/nanodroid-font -r + fi + fi + # services.jar needs special treament if grep -q /system/framework/services.jar ${system_list}; then if [ -f /sdcard/nanodroid_backups/services.jar ]; then