diff --git a/Application/Dopamine/Jailbreak/DOJailbreaker.m b/Application/Dopamine/Jailbreak/DOJailbreaker.m index 1a54e1e16..db5c8e614 100644 --- a/Application/Dopamine/Jailbreak/DOJailbreaker.m +++ b/Application/Dopamine/Jailbreak/DOJailbreaker.m @@ -53,8 +53,9 @@ typedef NS_ENUM(NSInteger, JBErrorCode) { JBErrorCodeFailedPlatformize = -9, JBErrorCodeFailedBasebinTrustcache = -10, JBErrorCodeFailedLaunchdInjection = -11, - JBErrorCodeFailedInitFakeLib = -12, - JBErrorCodeFailedDuplicateApps = -13, + JBErrorCodeFailedInitProtection = -12, + JBErrorCodeFailedInitFakeLib = -13, + JBErrorCodeFailedDuplicateApps = -14, }; @implementation DOJailbreaker @@ -365,6 +366,15 @@ - (NSError *)injectLaunchdHook return nil; } +- (NSError *)applyProtection +{ + int r = exec_cmd(JBRootPath("/basebin/jbctl"), "internal", "protection_init", NULL); + if (r != 0) { + return [NSError errorWithDomain:JBErrorDomain code:JBErrorCodeFailedInitProtection userInfo:@{NSLocalizedDescriptionKey : [NSString stringWithFormat:@"Failed initializing protection with error: %d", r]}]; + } + return nil; +} + - (NSError *)createFakeLib { int r = exec_cmd(JBRootPath("/basebin/jbctl"), "internal", "fakelib_init", NULL); @@ -526,6 +536,13 @@ - (void)runWithError:(NSError **)errOut didRemoveJailbreak:(BOOL*)didRemove show *errOut = [self injectLaunchdHook]; if (*errOut) return; + // Now that we can, protect important system files by bind mounting on top of them + // This will be always be done during the userspace reboot + // We also do it now though in case there is a failure between the now step and the userspace reboot + [[DOUIManager sharedInstance] sendLog:DOLocalizedString(@"Initializing Protection") debug:NO]; + *errOut = [self applyProtection]; + if (*errOut) return; + [[DOUIManager sharedInstance] sendLog:DOLocalizedString(@"Applying Bind Mount") debug:NO]; *errOut = [self createFakeLib]; if (*errOut) return; diff --git a/Application/Dopamine/ar.lproj/Localizable.strings b/Application/Dopamine/ar.lproj/Localizable.strings index 5aa5484b9..62123a768 100644 --- a/Application/Dopamine/ar.lproj/Localizable.strings +++ b/Application/Dopamine/ar.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "تحسين بيئة الجيلبريك"; +/*Initializing Protection*/ "Loading BaseBin TrustCache" = "تحميل BaseBin TrustCache"; "Applying Bind Mount" = "تطبيق Bind Mount"; "Removing Jailbreak" = "إزالة الجيلبريك"; diff --git a/Application/Dopamine/da.lproj/Localizable.strings b/Application/Dopamine/da.lproj/Localizable.strings index e88549c37..f23737fb6 100644 --- a/Application/Dopamine/da.lproj/Localizable.strings +++ b/Application/Dopamine/da.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Initialiserer miljø"; +/*Initializing Protection*/ /*Loading BaseBin TrustCache*/ /*Applying Bind Mount*/ /*Removing Jailbreak*/ diff --git a/Application/Dopamine/de.lproj/Localizable.strings b/Application/Dopamine/de.lproj/Localizable.strings index 0ba7e4f2a..f1a480cee 100644 --- a/Application/Dopamine/de.lproj/Localizable.strings +++ b/Application/Dopamine/de.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Initialisiere Umgebung"; +"Initializing Protection" = "Initialisiere Schutz"; "Loading BaseBin TrustCache" = "Lade BaseBin TrustCache"; "Applying Bind Mount" = "Wende Bind Mount an"; "Removing Jailbreak" = "Entferne Jailbreak"; diff --git a/Application/Dopamine/el.lproj/Localizable.strings b/Application/Dopamine/el.lproj/Localizable.strings index f3bc0205e..6c9027a90 100644 --- a/Application/Dopamine/el.lproj/Localizable.strings +++ b/Application/Dopamine/el.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Αρχικοποίηση Περιβάλλοντος"; +/*Initializing Protection*/ /*Loading BaseBin TrustCache*/ /*Applying Bind Mount*/ /*Removing Jailbreak*/ diff --git a/Application/Dopamine/en.lproj/Localizable.strings b/Application/Dopamine/en.lproj/Localizable.strings index 7dca939a0..94995ec10 100644 --- a/Application/Dopamine/en.lproj/Localizable.strings +++ b/Application/Dopamine/en.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Initializing Jailbreak Environment"; +"Initializing Protection" = "Initializing Protection"; "Loading BaseBin TrustCache" = "Loading BaseBin TrustCache"; "Applying Bind Mount" = "Applying Bind Mount"; "Removing Jailbreak" = "Removing Jailbreak"; diff --git a/Application/Dopamine/es.lproj/Localizable.strings b/Application/Dopamine/es.lproj/Localizable.strings index 93deb2621..e07e32cc2 100644 --- a/Application/Dopamine/es.lproj/Localizable.strings +++ b/Application/Dopamine/es.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Inicializando entorno de Jailbreak"; +/*Initializing Protection*/ "Loading BaseBin TrustCache" = "Cargando BaseBin TrustCache"; "Applying Bind Mount" = "Aplicando montaje por vínculo"; "Removing Jailbreak" = "Eliminando Jailbreak"; diff --git a/Application/Dopamine/fil.lproj/Localizable.strings b/Application/Dopamine/fil.lproj/Localizable.strings index c1ac38f67..26dfc4b0a 100644 --- a/Application/Dopamine/fil.lproj/Localizable.strings +++ b/Application/Dopamine/fil.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Sinisimulan ang Jailbreak Environment"; +/*Initializing Protection*/ "Loading BaseBin TrustCache" = "Nilo-load ang BaseBin TrustCache"; "Applying Bind Mount" = "Paglalapat ng Bind Mount"; "Removing Jailbreak" = "Tinatatanggal ang Jailbreak"; diff --git a/Application/Dopamine/fr.lproj/Localizable.strings b/Application/Dopamine/fr.lproj/Localizable.strings index e00578c8a..e453ea96b 100644 --- a/Application/Dopamine/fr.lproj/Localizable.strings +++ b/Application/Dopamine/fr.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Initialisation de l'environnement"; +/*Initializing Protection*/ "Loading BaseBin TrustCache" = "Chargement des signatures"; "Applying Bind Mount" = "Montage du disque virtuel"; "Removing Jailbreak" = "Suppression du jailbreak"; diff --git a/Application/Dopamine/it.lproj/Localizable.strings b/Application/Dopamine/it.lproj/Localizable.strings index 9e99e78cc..a09b4bb03 100644 --- a/Application/Dopamine/it.lproj/Localizable.strings +++ b/Application/Dopamine/it.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Inizializzando l'ambiente"; +/*Initializing Protection*/ /*Loading BaseBin TrustCache*/ /*Applying Bind Mount*/ /*Removing Jailbreak*/ diff --git a/Application/Dopamine/ja.lproj/Localizable.strings b/Application/Dopamine/ja.lproj/Localizable.strings index 740a4fe34..16ee174a6 100644 --- a/Application/Dopamine/ja.lproj/Localizable.strings +++ b/Application/Dopamine/ja.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Initializing Jailbreak Environment"; +/*Initializing Protection*/ "Loading BaseBin TrustCache" = "Loading BaseBin TrustCache"; "Applying Bind Mount" = "Applying Bind Mount"; "Removing Jailbreak" = "Removing Jailbreak"; diff --git a/Application/Dopamine/kk.lproj/Localizable.strings b/Application/Dopamine/kk.lproj/Localizable.strings index 6efbd5c8b..b5a9acb0f 100644 --- a/Application/Dopamine/kk.lproj/Localizable.strings +++ b/Application/Dopamine/kk.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Ортаны инициализациялау"; +/*Initializing Protection*/ /*Loading BaseBin TrustCache*/ /*Applying Bind Mount*/ /*Removing Jailbreak*/ diff --git a/Application/Dopamine/ko.lproj/Localizable.strings b/Application/Dopamine/ko.lproj/Localizable.strings index 58c964b44..3a23f9388 100644 --- a/Application/Dopamine/ko.lproj/Localizable.strings +++ b/Application/Dopamine/ko.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "환경 초기화 중"; +/*Initializing Protection*/ "Loading BaseBin TrustCache" = "배이스 바이너리 신뢰 캐시 불러오기"; "Applying Bind Mount" = "바인드 마운트 적용"; "Removing Jailbreak" = "탈옥 제거"; diff --git a/Application/Dopamine/nl.lproj/Localizable.strings b/Application/Dopamine/nl.lproj/Localizable.strings index 5817b6d77..62e178b08 100644 --- a/Application/Dopamine/nl.lproj/Localizable.strings +++ b/Application/Dopamine/nl.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Omgeving aan het initialiseren"; +/*Initializing Protection*/ /*Loading BaseBin TrustCache*/ /*Applying Bind Mount*/ /*Removing Jailbreak*/ diff --git a/Application/Dopamine/pl.lproj/Localizable.strings b/Application/Dopamine/pl.lproj/Localizable.strings index 13ae0825b..bbace8c4d 100644 --- a/Application/Dopamine/pl.lproj/Localizable.strings +++ b/Application/Dopamine/pl.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Inicjowanie Środowiska"; +/*Initializing Protection*/ /*Loading BaseBin TrustCache*/ /*Applying Bind Mount*/ /*Removing Jailbreak*/ diff --git a/Application/Dopamine/pt-BR.lproj/Localizable.strings b/Application/Dopamine/pt-BR.lproj/Localizable.strings index dbe444528..a75ae191c 100644 --- a/Application/Dopamine/pt-BR.lproj/Localizable.strings +++ b/Application/Dopamine/pt-BR.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Iniciando o Ambiente do Jailbreak"; +/*Initializing Protection*/ /*Loading BaseBin TrustCache*/ /*Applying Bind Mount*/ /*Removing Jailbreak*/ diff --git a/Application/Dopamine/ru.lproj/Localizable.strings b/Application/Dopamine/ru.lproj/Localizable.strings index 42e5f68b3..8a855d0fb 100644 --- a/Application/Dopamine/ru.lproj/Localizable.strings +++ b/Application/Dopamine/ru.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Инициализация переменной среды"; +/*Initializing Protection*/ "Loading BaseBin TrustCache" = "Загружаем BaseBin TrustCache"; /*Applying Bind Mount*/ "Removing Jailbreak" = "Удаляем джейлбрейк"; diff --git a/Application/Dopamine/sv.lproj/Localizable.strings b/Application/Dopamine/sv.lproj/Localizable.strings index 52f42225e..2da6080b5 100644 --- a/Application/Dopamine/sv.lproj/Localizable.strings +++ b/Application/Dopamine/sv.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Initiera miljö"; +/*Initializing Protection*/ /*Loading BaseBin TrustCache*/ /*Applying Bind Mount*/ /*Removing Jailbreak*/ diff --git a/Application/Dopamine/th.lproj/Localizable.strings b/Application/Dopamine/th.lproj/Localizable.strings index f56c49067..836734db8 100644 --- a/Application/Dopamine/th.lproj/Localizable.strings +++ b/Application/Dopamine/th.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Initializing Jailbreak Environment"; +/*Initializing Protection*/ "Loading BaseBin TrustCache" = "Loading BaseBin TrustCache"; "Applying Bind Mount" = "Applying Bind Mount"; "Removing Jailbreak" = "Removing Jailbreak"; diff --git a/Application/Dopamine/tr.lproj/Localizable.strings b/Application/Dopamine/tr.lproj/Localizable.strings index 00f9aad0d..f0ba55c4c 100644 --- a/Application/Dopamine/tr.lproj/Localizable.strings +++ b/Application/Dopamine/tr.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Ortam Başlatılıyor"; +/*Initializing Protection*/ /*Loading BaseBin TrustCache*/ /*Applying Bind Mount*/ /*Removing Jailbreak*/ diff --git a/Application/Dopamine/uk.lproj/Localizable.strings b/Application/Dopamine/uk.lproj/Localizable.strings index f124abd66..1754536a2 100644 --- a/Application/Dopamine/uk.lproj/Localizable.strings +++ b/Application/Dopamine/uk.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Ініціалізація середовища"; +/*Initializing Protection*/ /*Loading BaseBin TrustCache*/ /*Applying Bind Mount*/ /*Removing Jailbreak*/ diff --git a/Application/Dopamine/ur.lproj/Localizable.strings b/Application/Dopamine/ur.lproj/Localizable.strings index 320fac075..fe4279bba 100644 --- a/Application/Dopamine/ur.lproj/Localizable.strings +++ b/Application/Dopamine/ur.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Initializing Environment"; +/*Initializing Protection*/ /*Loading BaseBin TrustCache*/ /*Applying Bind Mount*/ /*Removing Jailbreak*/ diff --git a/Application/Dopamine/vi.lproj/Localizable.strings b/Application/Dopamine/vi.lproj/Localizable.strings index ae06ba3c2..030750e5b 100644 --- a/Application/Dopamine/vi.lproj/Localizable.strings +++ b/Application/Dopamine/vi.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "Khởi tạo môi trường Jailbreak"; +/*Initializing Protection*/ "Loading BaseBin TrustCache" = "Đang tải TrustCache BaseBin"; "Applying Bind Mount" = "Đang gắn Bind Mount"; "Removing Jailbreak" = "Đang gỡ bỏ Jailbreak"; diff --git a/Application/Dopamine/zh-CN.lproj/Localizable.strings b/Application/Dopamine/zh-CN.lproj/Localizable.strings index 0fc0f7294..2f1d2e892 100644 --- a/Application/Dopamine/zh-CN.lproj/Localizable.strings +++ b/Application/Dopamine/zh-CN.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "初始化环境"; +/*Initializing Protection*/ "Loading BaseBin TrustCache" = "将基础套件加载至信任缓存(TrustCache)"; "Applying Bind Mount" = "应用绑定挂载"; "Removing Jailbreak" = "移除越狱"; diff --git a/Application/Dopamine/zh-HK.lproj/Localizable.strings b/Application/Dopamine/zh-HK.lproj/Localizable.strings index 336b5d1e8..b6394fc3b 100644 --- a/Application/Dopamine/zh-HK.lproj/Localizable.strings +++ b/Application/Dopamine/zh-HK.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "初始化環境"; +/*Initializing Protection*/ /*Loading BaseBin TrustCache*/ /*Applying Bind Mount*/ /*Removing Jailbreak*/ diff --git a/Application/Dopamine/zh-Hans.lproj/Localizable.strings b/Application/Dopamine/zh-Hans.lproj/Localizable.strings index 0fc0f7294..2f1d2e892 100644 --- a/Application/Dopamine/zh-Hans.lproj/Localizable.strings +++ b/Application/Dopamine/zh-Hans.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "初始化环境"; +/*Initializing Protection*/ "Loading BaseBin TrustCache" = "将基础套件加载至信任缓存(TrustCache)"; "Applying Bind Mount" = "应用绑定挂载"; "Removing Jailbreak" = "移除越狱"; diff --git a/Application/Dopamine/zh-TW.lproj/Localizable.strings b/Application/Dopamine/zh-TW.lproj/Localizable.strings index 0448cf5f9..6d4aafc21 100644 --- a/Application/Dopamine/zh-TW.lproj/Localizable.strings +++ b/Application/Dopamine/zh-TW.lproj/Localizable.strings @@ -91,6 +91,7 @@ // Logs "Initializing Environment" = "正在初始化環境"; +/*Initializing Protection*/ "Loading BaseBin TrustCache" = "正在載入 BaseBin TrustCache"; "Applying Bind Mount" = "正在套用 Bind Mount"; "Removing Jailbreak" = "正在移除越獄";