diff --git a/CommonInstaller b/CommonInstaller index 0d00bca..d47fa87 100644 --- a/CommonInstaller +++ b/CommonInstaller @@ -53,9 +53,8 @@ org.microg.unifiednlp" ########################################################################################## detect_bootmode () { - ps | grep zygote | grep -v grep >/dev/null && BOOTMODE=true || BOOTMODE=false - ${BOOTMODE} || ps -A 2>/dev/null | grep zygote | grep -v grep >/dev/null && BOOTMODE=true - ${BOOTMODE} || id | grep -q 'uid=0' || BOOTMODE=true + ps | grep zygote | grep -qv grep && BOOTMODE=true || BOOTMODE=false + ${BOOTMODE} || ps -A | grep zygote | grep -qv grep && BOOTMODE=true } ui_print() { diff --git a/patcher/CommonPatcher b/patcher/CommonPatcher index 67e3a51..ce77f7a 100644 --- a/patcher/CommonPatcher +++ b/patcher/CommonPatcher @@ -151,9 +151,8 @@ detect_outfd () { } detect_bootmode () { - ps | grep zygote | grep -v grep >/dev/null && BOOTMODE=true || BOOTMODE=false - ${BOOTMODE} || ps -A 2>/dev/null | grep zygote | grep -v grep >/dev/null && BOOTMODE=true - ${BOOTMODE} || id | grep -q 'uid=0' || BOOTMODE=true + ps | grep zygote | grep -qv grep && BOOTMODE=true || BOOTMODE=false + ${BOOTMODE} || ps -A | grep zygote | grep -qv grep && BOOTMODE=true } grep_prop() { diff --git a/uninstaller/META-INF/com/google/android/update-binary b/uninstaller/META-INF/com/google/android/update-binary index b5f8f66..f1709ee 100644 --- a/uninstaller/META-INF/com/google/android/update-binary +++ b/uninstaller/META-INF/com/google/android/update-binary @@ -37,9 +37,8 @@ WhisperPush YouTube" detect_bootmode () { - ps | grep zygote | grep -v grep >/dev/null && BOOTMODE=true || BOOTMODE=false - ${BOOTMODE} || ps -A 2>/dev/null | grep zygote | grep -v grep >/dev/null && BOOTMODE=true - ${BOOTMODE} || id | grep -q 'uid=0' || BOOTMODE=true + ps | grep zygote | grep -qv grep && BOOTMODE=true || BOOTMODE=false + ${BOOTMODE} || ps -A | grep zygote | grep -qv grep && BOOTMODE=true } ui_print() {