diff --git a/Android.mk b/Android.mk
index b51637ba..6880ed2c 100644
--- a/Android.mk
+++ b/Android.mk
@@ -156,7 +156,6 @@ ifeq ($(TW_OEM_BUILD),true)
LOCAL_CFLAGS += -DTW_OEM_BUILD
BOARD_HAS_NO_REAL_SDCARD := true
TW_USE_TOOLBOX := true
- TW_EXCLUDE_SUPERSU := true
TW_EXCLUDE_MTP := true
endif
@@ -430,18 +429,6 @@ ifeq ($(TW_INCLUDE_DUMLOCK), true)
htcdumlock htcdumlocksys flash_imagesys dump_imagesys libbmlutils.so \
libflashutils.so libmmcutils.so libmtdutils.so HTCDumlock.apk
endif
-ifneq ($(TW_EXCLUDE_SUPERSU), true)
- LOCAL_ADDITIONAL_DEPENDENCIES += \
- install-recovery.sh 99SuperSUDaemon Superuser.apk
- ifeq ($(TARGET_ARCH), arm)
- LOCAL_ADDITIONAL_DEPENDENCIES += \
- chattr.pie libsupol.so suarm supolicy
- endif
- ifeq ($(TARGET_ARCH), arm64)
- LOCAL_ADDITIONAL_DEPENDENCIES += \
- libsupol.soarm64 suarm64 supolicyarm64
- endif
-endif
ifeq ($(TW_INCLUDE_FB2PNG), true)
LOCAL_ADDITIONAL_DEPENDENCIES += fb2png
endif
diff --git a/gui/action.cpp b/gui/action.cpp
index 3d497ca5..fb05d77b 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -1607,8 +1607,7 @@ int GUIAction::installsu(std::string arg __unused)
if (simulate) {
simulate_progress_bar();
} else {
- if (!TWFunc::Install_SuperSU())
- op_status = 1;
+ LOGERR("Installing SuperSU was deprecated from TWRP.\n");
}
operation_end(op_status);
diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml
index f460e6fe..5bbfe902 100644
--- a/gui/theme/common/landscape.xml
+++ b/gui/theme/common/landscape.xml
@@ -2737,7 +2737,7 @@
@@ -4726,51 +4726,6 @@
-
-
-
-
-
- {@reboot_hdr=Reboot}
-
-
-
-
- {@su_hdr=SuperSU Check}
-
-
-
-
- {@su_note1=Your device does not appear to be rooted.}
-
-
-
-
- {@su_note2=Install SuperSU now?}
-
-
-
-
- {@su_note3=This will root your device.}
-
-
-
-
-
- {@swipe_su_to_install=Swipe to Install}
-
- tw_action=installsu
- tw_action_text1={@su_installing=Installing SuperSU}
- tw_action_text2=
- singleaction_page
-
-
-
-
diff --git a/gui/theme/common/languages/cz.xml b/gui/theme/common/languages/cz.xml
index 47956221..4ba5c2cf 100644
--- a/gui/theme/common/languages/cz.xml
+++ b/gui/theme/common/languages/cz.xml
@@ -441,14 +441,7 @@
Použití: adb sideload název.zip
ADB Sideload dokončený
Restart
- Kontrola SuperSU
- Vaše zařízení se netváří jako rootnuté.
- Instalovat SuperSU nyní?
- Toto rootne vaše zařízení.
- Neinstalovat
- Potáhnutím nainstalovat
- Instalovat
- Instalace SuperSU
+ Neinstalovat
Vyberte úložiště
OK
Kernel nemá podporu pro čtení obsahu SELinux.
diff --git a/gui/theme/common/languages/de.xml b/gui/theme/common/languages/de.xml
index e629ec37..6ff80145 100644
--- a/gui/theme/common/languages/de.xml
+++ b/gui/theme/common/languages/de.xml
@@ -475,14 +475,7 @@
Korrigiere Kontexte...
Korrektur der Kontexte abgeschlossen
Neustart
- SuperSU-Check
- Anscheinend besteht kein Root-Zugriff auf das Gerät.
- SuperSU jetzt installieren?
- Dies wird Root-Zugriff auf dem Gerät einrichten.
- Nicht installieren
- Installation starten
- Installieren
- Installiere SuperSU
+ Nicht installieren
Speicher auswählen
OK
diff --git a/gui/theme/common/languages/el.xml b/gui/theme/common/languages/el.xml
index 271b0872..ffb960f5 100644
--- a/gui/theme/common/languages/el.xml
+++ b/gui/theme/common/languages/el.xml
@@ -464,14 +464,7 @@
Διόρθωση δικαιωμάτων...
Η Διόρθωση δικαιωμάτων ολοκληρώθηκε
Επανεκκίνηση
- Έλεγχος SuperSU
- Η συσκευή σας δεν φαίνεται να έχει root.
- Εγκατάσταση SuperSU τώρα;
- Αυτό κάνει root στην συσκευή σας.
- Μην εγκαταστήσετε
- Σύρετε για εγκατάσταση
- Εγκατάσταση
- Εγκατάσταση SuperSU
+ Μην εγκαταστήσετε
Επιλέξτε Αποθ. χώρο
OΚ
Το Kernel δεν υποστηρίζει την ανάγνωση περιεχομένων SELinux.
diff --git a/gui/theme/common/languages/en.xml b/gui/theme/common/languages/en.xml
index 3677bb46..afba59a0 100644
--- a/gui/theme/common/languages/en.xml
+++ b/gui/theme/common/languages/en.xml
@@ -477,14 +477,7 @@
Fixing Contexts...
Fix Contexts Complete
Reboot
- SuperSU Check
- Your device does not appear to be rooted.
- Install SuperSU now?
- This will root your device.
- Do Not Install
- Swipe to Install
- Install
- Installing SuperSU
+ Do Not Install
Select Storage
OK
diff --git a/gui/theme/common/languages/es.xml b/gui/theme/common/languages/es.xml
index ffb3a8dc..1f200618 100644
--- a/gui/theme/common/languages/es.xml
+++ b/gui/theme/common/languages/es.xml
@@ -453,14 +453,7 @@
Fijando Contextos...
Fijar Contextos Completado
Reiniciar
- Comprobar SuperSU
- Parece que tú dispositivo no esta rooteado.
- Instalar SuperSU ahora?
- Esto rooteara su dispositivo.
- No instalar
- Desliza para instalar
- Instalar
- Instalado SuperSU
+ No instalar
Seleccionar Almacenamiento
OK
Kernel no tiene soporte para la lectura de los contextos de SELinux.
diff --git a/gui/theme/common/languages/fr.xml b/gui/theme/common/languages/fr.xml
index 80e781a6..61516a8d 100644
--- a/gui/theme/common/languages/fr.xml
+++ b/gui/theme/common/languages/fr.xml
@@ -450,14 +450,7 @@
Réparation des permissions...
Réparation des permissions complétée
Redémarrer
- Vérification SuperSU
- Votre appareil ne semble pas être rooté.
- Installer SuperSU maintenant?
- Ceci va rooter votre appareil.
- Ne pas installer
- Glisser pour installer
- Installer
- Installation de SuperSU
+ Ne pas installer
Sélection du stockage
OK
Le noyau ne supporte pas la lecture des contextes SELinux.
diff --git a/gui/theme/common/languages/hu.xml b/gui/theme/common/languages/hu.xml
index da60bbbd..6141cdee 100644
--- a/gui/theme/common/languages/hu.xml
+++ b/gui/theme/common/languages/hu.xml
@@ -475,14 +475,7 @@
Kontextus javítása...
Kontextus javítása kész
Újraindítás
- SuperSU ellenőrzés
- A készüléke nem tűnik rootoltnak.
- SuperSU telepítése most?
- Ez rootolni fogja a készülékét.
- Ne telepítse
- Csúsztasson a telepítéshez
- Telepítés
- SuperSU telepítése
+ Ne telepítse
Válasszon tárolót
OK
diff --git a/gui/theme/common/languages/it.xml b/gui/theme/common/languages/it.xml
index 71f7636b..5d21eac7 100644
--- a/gui/theme/common/languages/it.xml
+++ b/gui/theme/common/languages/it.xml
@@ -475,14 +475,7 @@
Ripristino dei contesti in corso...
Ripristino dei contesti completato
Riavvio
- Verifica SuperSU
- Il tuo dispositivo non sembra disporre di accesso root.
- Installare SuperSU ora?
- Ciò ti garantirà privilegi di root.
- Non installare
- Scorri per installare
- Installa
- Installazione di SuperSU in corso...
+ Non installare
Scegli archivio
OK
diff --git a/gui/theme/common/languages/nl.xml b/gui/theme/common/languages/nl.xml
index e716a91a..f5ec9bb5 100644
--- a/gui/theme/common/languages/nl.xml
+++ b/gui/theme/common/languages/nl.xml
@@ -462,14 +462,7 @@
Repareren van Contexts...
Het repareren van Contexts is gereed
Herstart
- SuperSU Controle
- Uw apparaat lijkt niet geroot te zijn.
- Installeer SuperSU nu?
- Dit zal uw apparaat rooten.
- Installeer niet
- Veeg om te installeren
- Installeren
- Installeren van SuperSU
+ Installeer niet
Selecteer opslag
OK
diff --git a/gui/theme/common/languages/pl.xml b/gui/theme/common/languages/pl.xml
index 77a6aa84..a67de069 100644
--- a/gui/theme/common/languages/pl.xml
+++ b/gui/theme/common/languages/pl.xml
@@ -462,14 +462,7 @@
Naprawianie uprawnień...
Naprawianie uprawnień zakończone
Restart
- Sprawdzanie SuperSU
- Twoje urządzenie nie jest zrootowane.
- Zainstalować SuperSU teraz?
- To zrootuje twoje urządzenie.
- Nie instaluj
- Przesuń, aby zainstalować
- Instaluj
- Instalowanie SuperSU
+ Nie instaluj
Wybierz pamięć
OK
diff --git a/gui/theme/common/languages/pt_BR.xml b/gui/theme/common/languages/pt_BR.xml
index fa7fa099..88deb0c2 100644
--- a/gui/theme/common/languages/pt_BR.xml
+++ b/gui/theme/common/languages/pt_BR.xml
@@ -441,14 +441,7 @@
Uso: adb sideload filename.zip
ADB Sideload completa
Reiniciar
- Seleção de Super Usuário
- Seu dispositivo não aparece para ser enraizado.
- Instalar Super Usuário agora?
- Isto enraizará seu dispositivo.
- Não instale
- Deslize para instalar
- Instalar
- Instalação Super Usuário
+ Não instale
Selecionar armazenamento
OK
Kernel não tem suporte para leitura de contextos do SELinux.
diff --git a/gui/theme/common/languages/pt_PT.xml b/gui/theme/common/languages/pt_PT.xml
index 1244f9b7..6b5bc6c1 100644
--- a/gui/theme/common/languages/pt_PT.xml
+++ b/gui/theme/common/languages/pt_PT.xml
@@ -477,14 +477,7 @@
A corrigir contextos...
Correção de contextos concluída
Reiniciar
- Permissão ROOT
- O seu dispositivo parece não ter ROOT
- Pretende instalar o binário su?
- O mesmo permitirá dar ROOT ao dispositivo.
- Não instalar
- Deslize para dar ROOT
- Dar ROOT
- A instalar SuperSU
+ Não instalar
Selecionar armazenamento
OK
diff --git a/gui/theme/common/languages/ru.xml b/gui/theme/common/languages/ru.xml
index 76eff884..ba4d9301 100644
--- a/gui/theme/common/languages/ru.xml
+++ b/gui/theme/common/languages/ru.xml
@@ -472,14 +472,7 @@
Исправление контекста...
Исправление контекста завершено
Перезагрузка
- Проверика SuperSU
- В вашем устройстве отсутствует рут-доступ.
- Установить SuperSU сейчас?
- Рут-доступ будет активирован.
- Не устанавливать
- Свайп для установки
- Установка
- Установка SuperSU
+ Не устанавливать
Выберите накопитель
OK
diff --git a/gui/theme/common/languages/sk.xml b/gui/theme/common/languages/sk.xml
index e216e740..b8e2fc52 100644
--- a/gui/theme/common/languages/sk.xml
+++ b/gui/theme/common/languages/sk.xml
@@ -441,14 +441,7 @@
Použitie: adb sideload názov.zip
ADB Sideload dokončený
Reštart
- Kontrola SuperSU
- Vaše zariadenie nemá ROOT.
- Chcete nainštalovať SuperSU?
- Toto povolí ROOT práva na vašom zariadení.
- Neinštalovať
- Potiahnite pre inštaláciu ROOT
- Inštalovať
- Inštalácia SuperSU
+ Neinštalovať
Vyberte úložisko
OK
Kernel nemá podporu pre čítanie obsahu SELinux.
diff --git a/gui/theme/common/languages/sl.xml b/gui/theme/common/languages/sl.xml
index e94dd215..5b0853e9 100644
--- a/gui/theme/common/languages/sl.xml
+++ b/gui/theme/common/languages/sl.xml
@@ -441,14 +441,7 @@
Uporaba: adb sideload filename.zip
Stransko nalaganje ADB končano
Pon. zaženi
- Preveri SuperSU
- Videti je, da vaša naprava nima skrbniškega dostopa.
- Namesti SuperSU zdaj?
- To bo omogočilo skrbniški dostop na napravi.
- Ne namesti
- Povlecite za namestitev
- Namesti
- Nameščanje SuperSU-ja
+ Ne namesti
Izberite pomnilniško napravo
V redu
Jedro nima podpore za branje vsebin SELinux.
diff --git a/gui/theme/common/languages/tr.xml b/gui/theme/common/languages/tr.xml
index f585adf0..4c10fdf4 100644
--- a/gui/theme/common/languages/tr.xml
+++ b/gui/theme/common/languages/tr.xml
@@ -477,14 +477,7 @@
Bağlamlar Düzeltiliyor...
Bağlamları Düzeltme Tamamlandı
Yeniden Başlat
- SuperSU Denetimi
- Cihazınız rootlanmamış görünüyor.
- SuperSU şimdi yüklensin mi?
- Bu işlem cihazınızı rootlayacaktır.
- Yükleme
- Yüklemek için Kaydır
- Yükle
- SuperSU Yükleniyor
+ Yükleme
Depolama Seç
Tamam
diff --git a/gui/theme/common/languages/uk.xml b/gui/theme/common/languages/uk.xml
index 2a0112e4..a3ea7ddd 100644
--- a/gui/theme/common/languages/uk.xml
+++ b/gui/theme/common/languages/uk.xml
@@ -456,14 +456,7 @@
Виправлення контексту...
Виправлення контексту завершено
Перезавантаження
- Перевірити SuperSU
- Пристрій не має рут.
- Встановити SuperSU зараз?
- Пристрій буде рутовано.
- Не встановлювати
- Встановити
- Встановлення
- Встановлення SuperSU
+ Не встановлювати
Вибір сховища
diff --git a/gui/theme/common/portrait.xml b/gui/theme/common/portrait.xml
index 0d1d6d8a..11769227 100644
--- a/gui/theme/common/portrait.xml
+++ b/gui/theme/common/portrait.xml
@@ -2932,7 +2932,7 @@
@@ -4708,51 +4708,6 @@
-
-
-
-
-
- {@reboot_hdr=Reboot}
-
-
-
-
- {@su_hdr=SuperSU Check}
-
-
-
-
- {@su_note1=Your device does not appear to be rooted.}
-
-
-
-
- {@su_note2=Install SuperSU now?}
-
-
-
-
- {@su_note3=This will root your device.}
-
-
-
-
-
- {@swipe_su_to_install=Swipe to Install}
-
- tw_action=installsu
- tw_action_text1={@su_installing=Installing SuperSU}
- tw_action_text2=
- singleaction_page
-
-
-
-
diff --git a/gui/theme/common/watch.xml b/gui/theme/common/watch.xml
index 152818e7..019045ac 100644
--- a/gui/theme/common/watch.xml
+++ b/gui/theme/common/watch.xml
@@ -3389,7 +3389,7 @@
@@ -5403,48 +5403,6 @@
-
-
-
-
-
-
-
- {@reboot_hdr=Reboot} > {@su_hdr=SuperSU Check}
-
-
-
-
- {@su_note1=Your device does not appear to be rooted.}
-
-
-
-
- {@su_note2=Install SuperSU now?}
-
-
-
-
- {@su_note3=This will root your device.}
-
-
-
-
-
- {@swipe_su_install= Install}
-
- tw_action=installsu
- tw_action_text1={@su_installing=Installing SuperSU}
- tw_action_text2=
- singleaction_page
-
-
-
-
diff --git a/gui/theme/extra-languages/languages/ja.xml b/gui/theme/extra-languages/languages/ja.xml
index 58fe3aa1..37d3e7c7 100644
--- a/gui/theme/extra-languages/languages/ja.xml
+++ b/gui/theme/extra-languages/languages/ja.xml
@@ -457,14 +457,7 @@
コンテキストの修正中...
コンテキストを修正しました
再起動
- SuperSU チェック
- 機器がroot化されていないようです。
- SuperSU をインストールしますか?
- 機器をroot化します。
- インストールしない
- スワイプでインストール
- インストール
- SuperSU のインストール中
+ インストールしない
ストレージの選択
OK
diff --git a/gui/theme/extra-languages/languages/zh_CN.xml b/gui/theme/extra-languages/languages/zh_CN.xml
index 33de9163..5c214a56 100644
--- a/gui/theme/extra-languages/languages/zh_CN.xml
+++ b/gui/theme/extra-languages/languages/zh_CN.xml
@@ -476,14 +476,7 @@
正在修复 Context…
修复 Context 完成
重启选项
- SuperSU 检测
- 系统目前没有 Root。
- 是否现在安装 SuperSU?
- 这将会 Root 您的设备。
- 不,以后再说
- 滑动按钮确认安装
- 安装
- 正在安装 SuperSU
+ 不,以后再说
选择存储位置
确定
diff --git a/gui/theme/extra-languages/languages/zh_TW.xml b/gui/theme/extra-languages/languages/zh_TW.xml
index 2bb49029..75c717ac 100644
--- a/gui/theme/extra-languages/languages/zh_TW.xml
+++ b/gui/theme/extra-languages/languages/zh_TW.xml
@@ -476,14 +476,7 @@
正在修復 Context…
修復 Context 完成
重啟選項
- SuperSU 檢測
- 系統目前沒有 Root。
- 是否現在安裝 SuperSU?
- 這將會 Root 您的設備。
- 不,以後再說
- 滑動按鈕確認安裝
- 安裝
- 正在安裝 SuperSU
+ 不,以後再說
選擇存儲位置
確定
diff --git a/prebuilt/99SuperSUDaemon b/prebuilt/99SuperSUDaemon
deleted file mode 100644
index de738c17..00000000
--- a/prebuilt/99SuperSUDaemon
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/system/bin/sh
-/system/xbin/daemonsu --auto-daemon &
diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk
index b54dda28..6e9bcfed 100644
--- a/prebuilt/Android.mk
+++ b/prebuilt/Android.mk
@@ -449,114 +449,6 @@ ifeq ($(TW_INCLUDE_DUMLOCK), true)
include $(BUILD_PREBUILT)
endif
-ifneq ($(TW_EXCLUDE_SUPERSU), true)
- ifeq ($(TARGET_ARCH), arm)
- #chattr.pie
- include $(CLEAR_VARS)
- LOCAL_MODULE := chattr.pie
- LOCAL_MODULE_TAGS := eng
- LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
- LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
- LOCAL_SRC_FILES := $(LOCAL_MODULE)
- include $(BUILD_PREBUILT)
-
- #libsupol.so
- include $(CLEAR_VARS)
- LOCAL_MODULE := libsupol.so
- LOCAL_MODULE_TAGS := eng
- LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
- LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
- LOCAL_SRC_FILES := $(LOCAL_MODULE)
- include $(BUILD_PREBUILT)
-
- #su binary
- include $(CLEAR_VARS)
- LOCAL_MODULE := suarm
- LOCAL_MODULE_STEM := su
- LOCAL_MODULE_TAGS := eng
- LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
- LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
- LOCAL_SRC_FILES := $(LOCAL_MODULE)
- include $(BUILD_PREBUILT)
-
- #supolicy
- include $(CLEAR_VARS)
- LOCAL_MODULE := supolicy
- LOCAL_MODULE_TAGS := eng
- LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
- LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
- LOCAL_SRC_FILES := $(LOCAL_MODULE)
- include $(BUILD_PREBUILT)
- endif
- ifeq ($(TARGET_ARCH), arm64)
- #libsupol.so
- include $(CLEAR_VARS)
- LOCAL_MODULE := libsupol.soarm64
- LOCAL_MODULE_STEM := libsupol.so
- LOCAL_MODULE_TAGS := eng
- LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
- LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
- LOCAL_SRC_FILES := $(LOCAL_MODULE)
- include $(BUILD_PREBUILT)
-
- #su binary
- include $(CLEAR_VARS)
- LOCAL_MODULE := suarm64
- LOCAL_MODULE_STEM := su
- LOCAL_MODULE_TAGS := eng
- LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
- LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
- LOCAL_SRC_FILES := $(LOCAL_MODULE)
- include $(BUILD_PREBUILT)
-
- #supolicy
- include $(CLEAR_VARS)
- LOCAL_MODULE := supolicyarm64
- LOCAL_MODULE_STEM := supolicy
- LOCAL_MODULE_TAGS := eng
- LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
- LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
- LOCAL_SRC_FILES := $(LOCAL_MODULE)
- include $(BUILD_PREBUILT)
- endif
-
- #install-recovery.sh
- include $(CLEAR_VARS)
- LOCAL_MODULE := install-recovery.sh
- LOCAL_MODULE_TAGS := eng
- LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
- LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
- LOCAL_SRC_FILES := $(LOCAL_MODULE)
- include $(BUILD_PREBUILT)
-
- #install-supersu.sh
- include $(CLEAR_VARS)
- LOCAL_MODULE := install-supersu.sh
- LOCAL_MODULE_TAGS := eng
- LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
- LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
- LOCAL_SRC_FILES := $(LOCAL_MODULE)
- include $(BUILD_PREBUILT)
-
- #99SuperSUDaemon
- include $(CLEAR_VARS)
- LOCAL_MODULE := 99SuperSUDaemon
- LOCAL_MODULE_TAGS := eng
- LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
- LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
- LOCAL_SRC_FILES := $(LOCAL_MODULE)
- include $(BUILD_PREBUILT)
-
- #SuperSU special installer APK
- include $(CLEAR_VARS)
- LOCAL_MODULE := Superuser.apk
- LOCAL_MODULE_TAGS := eng
- LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
- LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
- LOCAL_SRC_FILES := $(LOCAL_MODULE)
- include $(BUILD_PREBUILT)
-endif
-
#TWRP App "placeholder"
include $(CLEAR_VARS)
LOCAL_MODULE := me.twrp.twrpapp.apk
diff --git a/prebuilt/Superuser.apk b/prebuilt/Superuser.apk
deleted file mode 100644
index 99eb7d2a..00000000
Binary files a/prebuilt/Superuser.apk and /dev/null differ
diff --git a/prebuilt/chattr b/prebuilt/chattr
deleted file mode 100755
index 12ccf861..00000000
Binary files a/prebuilt/chattr and /dev/null differ
diff --git a/prebuilt/chattr.pie b/prebuilt/chattr.pie
deleted file mode 100644
index 47397283..00000000
Binary files a/prebuilt/chattr.pie and /dev/null differ
diff --git a/prebuilt/install-recovery.sh b/prebuilt/install-recovery.sh
deleted file mode 100644
index f62cf0b9..00000000
--- a/prebuilt/install-recovery.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/system/bin/sh
-
-# If you're implementing this in a custom kernel/firmware,
-# I suggest you use a different script name, and add a service
-# to launch it from init.rc
-
-# Launches SuperSU in daemon mode only on Android 4.3+.
-# Nothing will happen on 4.2.x or older, unless SELinux+Enforcing.
-# If you want to force loading the daemon, use "--daemon" instead
-
-/system/xbin/daemonsu --auto-daemon &
-
-# Some apps like to run stuff from this script as well, that will
-# obviously break root - in your code, just search this file
-# for "install-recovery-2.sh", and if present, write there instead.
-
-/system/etc/install-recovery-2.sh
diff --git a/prebuilt/install-supersu.sh b/prebuilt/install-supersu.sh
deleted file mode 100755
index 2bca4c3c..00000000
--- a/prebuilt/install-supersu.sh
+++ /dev/null
@@ -1,405 +0,0 @@
-#!/sbin/sh
-#
-# SuperSU installer ZIP
-# Copyright (c) 2012-2014 - Chainfire
-#
-# To install SuperSU properly, aside from cleaning old versions and
-# other superuser-type apps from the system, the following files need to
-# be installed:
-#
-# API source target chmod chcon required
-#
-# 7-19 common/Superuser.apk /system/app/Superuser.apk 0644 u:object_r:system_file:s0 gui
-# 20+ common/Superuser.apk /system/app/SuperSU/SuperSU.apk 0644 u:object_r:system_file:s0 gui
-#
-# 17+ common/install-recovery.sh /system/etc/install-recovery.sh 0755 *1 required
-# 17+ /system/bin/install-recovery.sh (symlink to /system/etc/...) required
-# *1: same as /system/bin/toolbox: u:object_r:system_file:s0 if API < 20, u:object_r:toolbox_exec:s0 if API >= 20
-#
-# 7+ ARCH/su /system/xbin/su *2 u:object_r:system_file:s0 required
-# 7+ /system/bin/.ext/.su *2 u:object_r:system_file:s0 gui
-# 17+ /system/xbin/daemonsu 0755 u:object_r:system_file:s0 required
-# 17+ /system/xbin/sugote 0755 u:object_r:zygote_exec:s0 required
-# *2: 06755 if API < 18, 0755 if API >= 18
-#
-# 19+ ARCH/supolicy /system/xbin/supolicy 0755 u:object_r:system_file:s0 required
-# 19+ ARCH/libsupol.so /system/lib(64)/libsupol.so 0644 u:object_r:system_file:s0 required
-#
-# 17+ /system/bin/sh or mksh *3 /system/xbin/sugote-mksh 0755 u:object_r:system_file:s0 required
-# *3: which one (or both) are available depends on API
-#
-# 21+ /system/bin/app_process32 *4 /system/bin/app_process32_original 0755 u:object_r:zygote_exec:s0 required
-# 21+ /system/bin/app_process64 *4 /system/bin/app_process64_original 0755 u:object_r:zygote_exec:s0 required
-# 21+ /system/bin/app_processXX *4 /system/bin/app_process_init 0755 u:object_r:system_file:s0 required
-# 21+ /system/bin/app_process (symlink to /system/xbin/daemonsu) required
-# 21+ *4 /system/bin/app_process32 (symlink to /system/xbin/daemonsu) required
-# 21+ *4 /system/bin/app_process64 (symlink to /system/xbin/daemonsu) required
-# *4: Only do this for the relevant bits. On a 64 bits system, leave the 32 bits files alone, or dynamic linker errors
-# will prevent the system from fully working in subtle ways. The bits of the su binary must also match!
-#
-# 17+ common/99SuperSUDaemon *5 /system/etc/init.d/99SuperSUDaemon 0755 u:object_r:system_file:s0 optional
-# *5: only place this file if /system/etc/init.d is present
-#
-# 17+ 'echo 1 >' or 'touch' *6 /system/etc/.installed_su_daemon 0644 u:object_r:system_file:s0 optional
-# *6: the file just needs to exist or some recoveries will nag you. Even with it there, it may still happen.
-#
-# It may seem some files are installed multiple times needlessly, but
-# it only seems that way. Installing files differently or symlinking
-# instead of copying (unless specified) will lead to issues eventually.
-#
-# The following su binary versions are included in the full package. Each
-# should be installed only if the system has the same or newer API level
-# as listed. The script may fall back to a different binary on older API
-# levels. supolicy are all ndk/pie/19+ for 32 bit, ndk/pie/20+ for 64 bit.
-#
-# binary ARCH/path build type API
-#
-# arm-v5te arm aosp static 7+
-# x86 x86 aosp static 7+
-#
-# arm-v7a armv7 ndk pie 17+
-# mips mips ndk pie 17+
-#
-# arm64-v8a arm64 ndk pie 20+
-# mips64 mips64 ndk pie 20+
-# x86_64 x64 ndk pie 20+
-#
-# Note that if SELinux is set to enforcing, the daemonsu binary expects
-# to be run at startup (usually from install-recovery.sh, 99SuperSUDaemon,
-# or app_process) from u:r:init:s0 or u:r:kernel:s0 contexts. Depending
-# on the current policies, it can also deal with u:r:init_shell:s0 and
-# u:r:toolbox:s0 contexts. Any other context will lead to issues eventually.
-#
-# After installation, run '/system/xbin/su --install', which may need to
-# perform some additional installation steps. Ideally, at one point,
-# a lot of this script will be moved there.
-#
-# The included chattr(.pie) binaries are used to remove ext2's immutable
-# flag on some files. This flag is no longer set by SuperSU's OTA
-# survival since API level 18, so there is no need for the 64 bit versions.
-# Note that chattr does not need to be installed to the system, it's just
-# used by this script, and not supported by the busybox used in older
-# recoveries.
-#
-# Non-static binaries are supported to be PIE (Position Independent
-# Executable) from API level 16, and required from API level 20 (which will
-# refuse to execute non-static non-PIE).
-#
-# The script performs serveral actions in various ways, sometimes
-# multiple times, due to different recoveries and firmwares behaving
-# differently, and it thus being required for the correct result.
-
-OUTFD=$2
-ZIP=$3
-
-SYSTEMLIB=/system/lib
-
-ui_print() {
- echo -n -e "echo $1\n" > /proc/self/fd/$OUTFD
- echo -n -e "echo\n" > /proc/self/fd/$OUTFD
-}
-
-ch_con() {
- LD_LIBRARY_PATH=$SYSTEMLIB /system/toolbox chcon -h u:object_r:system_file:s0 $1
- LD_LIBRARY_PATH=$SYSTEMLIB /system/bin/toolbox chcon -h u:object_r:system_file:s0 $1
- chcon -h u:object_r:system_file:s0 $1
- LD_LIBRARY_PATH=$SYSTEMLIB /system/toolbox chcon u:object_r:system_file:s0 $1
- LD_LIBRARY_PATH=$SYSTEMLIB /system/bin/toolbox chcon u:object_r:system_file:s0 $1
- chcon u:object_r:system_file:s0 $1
-}
-
-ch_con_ext() {
- LD_LIBRARY_PATH=$SYSTEMLIB /system/toolbox chcon $2 $1
- LD_LIBRARY_PATH=$SYSTEMLIB /system/bin/toolbox chcon $2 $1
- chcon $2 $1
-}
-
-ln_con() {
- LD_LIBRARY_PATH=$SYSTEMLIB /system/toolbox ln -s $1 $2
- LD_LIBRARY_PATH=$SYSTEMLIB /system/bin/toolbox ln -s $1 $2
- ln -s $1 $2
- ch_con $2
-}
-
-set_perm() {
- chown $1.$2 $4
- chown $1:$2 $4
- chmod $3 $4
- ch_con $4
- ch_con_ext $4 $5
-}
-
-cp_perm() {
- rm $5
- cat $4 > $5
- set_perm $1 $2 $3 $5 $6
-}
-
-echo "*********************"
-echo "SuperSU installer ZIP"
-echo "*********************"
-
-echo "- Mounting /system, /data and rootfs"
-mount /system
-mount /data
-mount -o rw,remount /system
-mount -o rw,remount /system /system
-mount -o rw,remount /
-mount -o rw,remount / /
-
-cat /system/bin/toolbox > /system/toolbox
-chmod 0755 /system/toolbox
-ch_con /system/toolbox
-
-API=$(cat /system/build.prop | grep "ro.build.version.sdk=" | dd bs=1 skip=21 count=2)
-ABI=$(cat /system/build.prop /default.prop | grep -m 1 "ro.product.cpu.abi=" | dd bs=1 skip=19 count=3)
-ABILONG=$(cat /system/build.prop /default.prop | grep -m 1 "ro.product.cpu.abi=" | dd bs=1 skip=19)
-ABI2=$(cat /system/build.prop /default.prop | grep -m 1 "ro.product.cpu.abi2=" | dd bs=1 skip=20 count=3)
-SUMOD=06755
-SUGOTE=false
-SUPOLICY=false
-INSTALL_RECOVERY_CONTEXT=u:object_r:system_file:s0
-MKSH=/system/bin/mksh
-PIE=
-ARCH=arm
-APKFOLDER=false
-APKNAME=/system/app/Superuser.apk
-APPPROCESS=false
-APPPROCESS64=false
-if [ "$ABI" = "x86" ]; then ARCH=x86; fi;
-if [ "$ABI2" = "x86" ]; then ARCH=x86; fi;
-if [ "$API" -eq "$API" ]; then
- if [ "$API" -ge "17" ]; then
- SUGOTE=true
- PIE=.pie
- if [ "$ABILONG" = "armeabi-v7a" ]; then ARCH=armv7; fi;
- if [ "$ABI" = "mip" ]; then ARCH=mips; fi;
- if [ "$ABILONG" = "mips" ]; then ARCH=mips; fi;
- fi
- if [ "$API" -ge "18" ]; then
- SUMOD=0755
- fi
- if [ "$API" -ge "20" ]; then
- if [ "$ABILONG" = "arm64-v8a" ]; then ARCH=arm64; SYSTEMLIB=/system/lib64; APPPROCESS64=true; fi;
- if [ "$ABILONG" = "mips64" ]; then ARCH=mips64; SYSTEMLIB=/system/lib64; APPPROCESS64=true; fi;
- if [ "$ABILONG" = "x86_64" ]; then ARCH=x64; SYSTEMLIB=/system/lib64; APPPROCESS64=true; fi;
- APKFOLDER=true
- APKNAME=/system/app/SuperSU/SuperSU.apk
- fi
- if [ "$API" -ge "19" ]; then
- SUPOLICY=true
- if [ "$(LD_LIBRARY_PATH=$SYSTEMLIB /system/toolbox ls -lZ /system/bin/toolbox | grep toolbox_exec > /dev/null; echo $?)" -eq "0" ]; then
- INSTALL_RECOVERY_CONTEXT=u:object_r:toolbox_exec:s0
- fi
- fi
- if [ "$API" -ge "21" ]; then
- APPPROCESS=true
- fi
-fi
-if [ ! -f $MKSH ]; then
- MKSH=/system/bin/sh
-fi
-
-#echo "DBG [$API] [$ABI] [$ABI2] [$ABILONG] [$ARCH] [$MKSH]"
-
-# Don't extract in TWRP
-#echo "- Extracting files"
-#cd /tmp
-#mkdir supersu
-#cd supersu
-#unzip -o "$ZIP"
-
-BIN=/supersu
-COM=/supersu
-
-echo "- Disabling OTA survival"
-chmod 0755 /supersu/chattr$PIE
-LD_LIBRARY_PATH=$SYSTEMLIB $BIN/chattr$PIE -i /system/bin/su
-LD_LIBRARY_PATH=$SYSTEMLIB $BIN/chattr$PIE -i /system/xbin/su
-LD_LIBRARY_PATH=$SYSTEMLIB $BIN/chattr$PIE -i /system/bin/.ext/.su
-LD_LIBRARY_PATH=$SYSTEMLIB $BIN/chattr$PIE -i /system/xbin/daemonsu
-LD_LIBRARY_PATH=$SYSTEMLIB $BIN/chattr$PIE -i /system/xbin/sugote
-LD_LIBRARY_PATH=$SYSTEMLIB $BIN/chattr$PIE -i /system/xbin/sugote_mksh
-LD_LIBRARY_PATH=$SYSTEMLIB $BIN/chattr$PIE -i /system/xbin/supolicy
-LD_LIBRARY_PATH=$SYSTEMLIB $BIN/chattr$PIE -i /system/lib/libsupol.so
-LD_LIBRARY_PATH=$SYSTEMLIB $BIN/chattr$PIE -i /system/lib64/libsupol.so
-LD_LIBRARY_PATH=$SYSTEMLIB $BIN/chattr$PIE -i /system/etc/install-recovery.sh
-LD_LIBRARY_PATH=$SYSTEMLIB $BIN/chattr$PIE -i /system/bin/install-recovery.sh
-
-echo "- Removing old files"
-
-if [ -f "/system/bin/install-recovery.sh" ]; then
- if [ ! -f "/system/bin/install-recovery_original.sh" ]; then
- mv /system/bin/install-recovery.sh /system/bin/install-recovery_original.sh
- ch_con /system/bin/install-recovery_original.sh
- fi
-fi
-if [ -f "/system/etc/install-recovery.sh" ]; then
- if [ ! -f "/system/etc/install-recovery_original.sh" ]; then
- mv /system/etc/install-recovery.sh /system/etc/install-recovery_original.sh
- ch_con /system/etc/install-recovery_original.sh
- fi
-fi
-
-rm -f /system/bin/su
-rm -f /system/xbin/su
-rm -f /system/xbin/daemonsu
-rm -f /system/xbin/sugote
-rm -f /system/xbin/sugote-mksh
-rm -f /system/xbin/supolicy
-rm -f /system/lib/libsupol.so
-rm -f /system/lib64/libsupol.so
-rm -f /system/bin/.ext/.su
-rm -f /system/bin/install-recovery.sh
-rm -f /system/etc/install-recovery.sh
-rm -f /system/etc/init.d/99SuperSUDaemon
-rm -f /system/etc/.installed_su_daemon
-
-rm -f /system/app/Superuser.apk
-rm -f /system/app/Superuser.odex
-rm -rf /system/app/Superuser
-rm -f /system/app/SuperUser.apk
-rm -f /system/app/SuperUser.odex
-rm -rf /system/app/SuperUser
-rm -f /system/app/superuser.apk
-rm -f /system/app/superuser.odex
-rm -rf /system/app/superuser
-rm -f /system/app/Supersu.apk
-rm -f /system/app/Supersu.odex
-rm -rf /system/app/Supersu
-rm -f /system/app/SuperSU.apk
-rm -f /system/app/SuperSU.odex
-rm -rf /system/app/SuperSU
-rm -f /system/app/supersu.apk
-rm -f /system/app/supersu.odex
-rm -rf /system/app/supersu
-rm -f /system/app/VenomSuperUser.apk
-rm -f /system/app/VenomSuperUser.odex
-rm -rf /system/app/VenomSuperUser
-rm -f /data/dalvik-cache/*com.noshufou.android.su*
-rm -f /data/dalvik-cache/*/*com.noshufou.android.su*
-rm -f /data/dalvik-cache/*com.koushikdutta.superuser*
-rm -f /data/dalvik-cache/*/*com.koushikdutta.superuser*
-rm -f /data/dalvik-cache/*com.mgyun.shua.su*
-rm -f /data/dalvik-cache/*/*com.mgyun.shua.su*
-rm -f /data/dalvik-cache/*com.m0narx.su*
-rm -f /data/dalvik-cache/*/*com.m0narx.su*
-rm -f /data/dalvik-cache/*Superuser.apk*
-rm -f /data/dalvik-cache/*/*Superuser.apk*
-rm -f /data/dalvik-cache/*SuperUser.apk*
-rm -f /data/dalvik-cache/*/*SuperUser.apk*
-rm -f /data/dalvik-cache/*superuser.apk*
-rm -f /data/dalvik-cache/*/*superuser.apk*
-rm -f /data/dalvik-cache/*VenomSuperUser.apk*
-rm -f /data/dalvik-cache/*/*VenomSuperUser.apk*
-rm -f /data/dalvik-cache/*eu.chainfire.supersu*
-rm -f /data/dalvik-cache/*/*eu.chainfire.supersu*
-rm -f /data/dalvik-cache/*Supersu.apk*
-rm -f /data/dalvik-cache/*/*Supersu.apk*
-rm -f /data/dalvik-cache/*SuperSU.apk*
-rm -f /data/dalvik-cache/*/*SuperSU.apk*
-rm -f /data/dalvik-cache/*supersu.apk*
-rm -f /data/dalvik-cache/*/*supersu.apk*
-rm -f /data/dalvik-cache/*.oat
-rm -f /data/app/com.noshufou.android.su*
-rm -f /data/app/com.koushikdutta.superuser*
-rm -f /data/app/com.mgyun.shua.su*
-rm -f /data/app/com.m0narx.su*
-rm -f /data/app/eu.chainfire.supersu-*
-rm -f /data/app/eu.chainfire.supersu.apk
-
-echo "- Creating space"
-if ($APKFOLDER); then
- cp /system/app/Maps/Maps.apk /Maps.apk
- cp /system/app/GMS_Maps/GMS_Maps.apk /GMS_Maps.apk
- cp /system/app/YouTube/YouTube.apk /YouTube.apk
- rm /system/app/Maps/Maps.apk
- rm /system/app/GMS_Maps/GMS_Maps.apk
- rm /system/app/YouTube/YouTube.apk
-else
- cp /system/app/Maps.apk /Maps.apk
- cp /system/app/GMS_Maps.apk /GMS_Maps.apk
- cp /system/app/YouTube.apk /YouTube.apk
- rm /system/app/Maps.apk
- rm /system/app/GMS_Maps.apk
- rm /system/app/YouTube.apk
-fi
-
-echo "- Placing files"
-
-mkdir /system/bin/.ext
-set_perm 0 0 0777 /system/bin/.ext
-cp_perm 0 0 $SUMOD $BIN/su /system/bin/.ext/.su
-cp_perm 0 0 $SUMOD $BIN/su /system/xbin/su
-cp_perm 0 0 0755 $BIN/su /system/xbin/daemonsu
-if ($SUGOTE); then
- cp_perm 0 0 0755 $BIN/su /system/xbin/sugote u:object_r:zygote_exec:s0
- cp_perm 0 0 0755 $MKSH /system/xbin/sugote-mksh
-fi
-if ($SUPOLICY); then
- cp_perm 0 0 0755 $BIN/supolicy /system/xbin/supolicy
- cp_perm 0 0 0644 $BIN/libsupol.so $SYSTEMLIB/libsupol.so
-fi
-if ($APKFOLDER); then
- mkdir /system/app/SuperSU
- set_perm 0 0 0755 /system/app/SuperSU
-fi
-cp_perm 0 0 0644 $COM/Superuser.apk $APKNAME
-cp_perm 0 0 0755 $COM/install-recovery.sh /system/etc/install-recovery.sh
-ln_con /system/etc/install-recovery.sh /system/bin/install-recovery.sh
-if ($APPPROCESS); then
- rm /system/bin/app_process
- ln_con /system/xbin/daemonsu /system/bin/app_process
- if ($APPPROCESS64); then
- if [ ! -f "/system/bin/app_process64_original" ]; then
- mv /system/bin/app_process64 /system/bin/app_process64_original
- else
- rm /system/bin/app_process64
- fi
- ln_con /system/xbin/daemonsu /system/bin/app_process64
- if [ ! -f "/system/bin/app_process_init" ]; then
- cp_perm 0 2000 0755 /system/bin/app_process64_original /system/bin/app_process_init
- fi
- else
- if [ ! -f "/system/bin/app_process32_original" ]; then
- mv /system/bin/app_process32 /system/bin/app_process32_original
- else
- rm /system/bin/app_process32
- fi
- ln_con /system/xbin/daemonsu /system/bin/app_process32
- if [ ! -f "/system/bin/app_process_init" ]; then
- cp_perm 0 2000 0755 /system/bin/app_process32_original /system/bin/app_process_init
- fi
- fi
-fi
-cp_perm 0 0 0744 $COM/99SuperSUDaemon /system/etc/init.d/99SuperSUDaemon
-echo 1 > /system/etc/.installed_su_daemon
-set_perm 0 0 0644 /system/etc/.installed_su_daemon
-
-echo "- Restoring files"
-if ($APKFOLDER); then
- cp_perm 0 0 0644 /Maps.apk /system/app/Maps/Maps.apk
- cp_perm 0 0 0644 /GMS_Maps.apk /system/app/GMS_Maps/GMS_Maps.apk
- cp_perm 0 0 0644 /YouTube.apk /system/app/YouTube/YouTube.apk
- rm /Maps.apk
- rm /GMS_Maps.apk
- rm /YouTube.apk
-else
- cp_perm 0 0 0644 /Maps.apk /system/app/Maps.apk
- cp_perm 0 0 0644 /GMS_Maps.apk /system/app/GMS_Maps.apk
- cp_perm 0 0 0644 /YouTube.apk /system/app/YouTube.apk
- rm /Maps.apk
- rm /GMS_Maps.apk
- rm /YouTube.apk
-fi
-
-echo "- Post-installation script"
-rm /system/toolbox
-LD_LIBRARY_PATH=$SYSTEMLIB /system/xbin/su --install
-
-echo "- Unmounting /system and /data"
-umount /system
-umount /data
-
-echo "- Done !"
-exit 0
diff --git a/prebuilt/libsupol.so b/prebuilt/libsupol.so
deleted file mode 100644
index 8a81a155..00000000
Binary files a/prebuilt/libsupol.so and /dev/null differ
diff --git a/prebuilt/libsupol.soarm64 b/prebuilt/libsupol.soarm64
deleted file mode 100644
index 50308069..00000000
Binary files a/prebuilt/libsupol.soarm64 and /dev/null differ
diff --git a/prebuilt/suarm b/prebuilt/suarm
deleted file mode 100644
index 38679b4a..00000000
Binary files a/prebuilt/suarm and /dev/null differ
diff --git a/prebuilt/suarm64 b/prebuilt/suarm64
deleted file mode 100644
index a2b4dc8b..00000000
Binary files a/prebuilt/suarm64 and /dev/null differ
diff --git a/prebuilt/supolicy b/prebuilt/supolicy
deleted file mode 100644
index 55db212a..00000000
Binary files a/prebuilt/supolicy and /dev/null differ
diff --git a/prebuilt/supolicyarm64 b/prebuilt/supolicyarm64
deleted file mode 100644
index ea8ac203..00000000
Binary files a/prebuilt/supolicyarm64 and /dev/null differ
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index 11e745b3..c9aef200 100644
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -771,14 +771,6 @@ int TWFunc::write_to_file(const string& fn, const string& line) {
return -1;
}
-bool TWFunc::Install_SuperSU(void) {
- if (!PartitionManager.Mount_By_Path("/system", true))
- return false;
-
- check_and_run_script("/supersu/install-supersu.sh", "SuperSU");
- return true;
-}
-
bool TWFunc::Try_Decrypting_Backup(string Restore_Path, string Password) {
DIR* d;
diff --git a/twrp-functions.hpp b/twrp-functions.hpp
index a1f67f23..0efbdc94 100644
--- a/twrp-functions.hpp
+++ b/twrp-functions.hpp
@@ -83,7 +83,6 @@ public:
static int read_file(string fn, string& results); //read from file
static int read_file(string fn, uint64_t& results); //read from file
static int write_to_file(const string& fn, const string& line); //write to file
- static bool Install_SuperSU(void); // Installs su binary and apk and sets proper permissions
static bool Try_Decrypting_Backup(string Restore_Path, string Password); // true for success, false for failed to decrypt
static string System_Property_Get(string Prop_Name); // Returns value of Prop_Name from reading /system/build.prop
static string Get_Current_Date(void); // Returns the current date in ccyy-m-dd--hh-nn-ss format
diff --git a/twrp.cpp b/twrp.cpp
index c46d6555..c6b9fda7 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -366,24 +366,6 @@ int main(int argc, char **argv) {
#ifndef TW_OEM_BUILD
// Disable flashing of stock recovery
TWFunc::Disable_Stock_Recovery_Replace();
- // Check for su to see if the device is rooted or not
- if (DataManager::GetIntValue("tw_mount_system_ro") == 0 && PartitionManager.Mount_By_Path("/system", false)) {
- // read /system/build.prop to get sdk version and do not offer to root if running M or higher (sdk version 23 == M)
- string sdkverstr = TWFunc::System_Property_Get("ro.build.version.sdk");
- int sdkver = 23;
- if (!sdkverstr.empty()) {
- sdkver = atoi(sdkverstr.c_str());
- }
- if (TWFunc::Path_Exists("/supersu/su") && TWFunc::Path_Exists("/system/bin") && !TWFunc::Path_Exists("/system/bin/su") && !TWFunc::Path_Exists("/system/xbin/su") && !TWFunc::Path_Exists("/system/bin/.ext/.su") && sdkver < 23) {
- // Device doesn't have su installed
- DataManager::SetValue("tw_busy", 1);
- if (gui_startPage("installsu", 1, 1) != 0) {
- LOGERR("Failed to start SuperSU install page.\n");
- }
- }
- sync();
- PartitionManager.UnMount_By_Path("/system", false);
- }
#endif
// Reboot