Skip to content

Commit

Permalink
Merge branch 'opa334:2.x' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
m1337v authored Apr 17, 2024
2 parents db69e7c + 61c810d commit 3485fc0
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 32 deletions.
42 changes: 21 additions & 21 deletions Application/Dopamine/ru.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"Changelog_Unavailable_Text" = "Список изменений недоступен";

// Removed Jailbreak Alert
/*Removed_Jailbreak_Alert_Title*/
/*Removed_Jailbreak_Alert_Message*/
"Removed_Jailbreak_Alert_Title" = "Джейлбрейк удалён";
"Removed_Jailbreak_Alert_Message" = "Джейлбрейк успешно удален. Рекомендуется перезагрузить устройство.";
"Button_Close" = "Закрыть";

// Error View
Expand Down Expand Up @@ -58,20 +58,20 @@
"Section_Exploits" = "Эксплоиты";

// Settings Alerts
/*Alert_Tweak_Injection_Toggled_Title*/
"Alert_Tweak_Injection_Toggled_Title" = "Перезагрузите Userspace";
"Alert_Tweak_Injection_Toggled_Body" = "Чтобы изменения вступили в силу, нужно перезагрузить Userspace. Перезагрузить сейчас?";
/*Alert_Tweak_Injection_Toggled_Reboot_Now*/
/*Alert_Tweak_Injection_Toggled_Reboot_Later*/
"Alert_Tweak_Injection_Toggled_Reboot_Now" = "Сейчас";
"Alert_Tweak_Injection_Toggled_Reboot_Later" = "Потом";
"Alert_Remove_Jailbreak_Title" = "Удаление джейлбрейка";
"Alert_Remove_Jailbreak_Pressed_Body" = "Удаление джейлбрейка приведет к удалению всех файлов, связанных с джейлбрейком, но все обычные приложения, файлы и данные будут сохранены. Вы уверены, что хотите продолжить? Вы не сможете отменить это действие.";
/*Alert_Remove_Jailbreak_Enabled_Body*/
"Alert_Remove_Jailbreak_Pressed_Body" = "Удаление джейлбрейка приведёт к удалению всех файлов, связанных с джейлбрейком, но все обычные приложения, файлы и данные будут сохранены. Вы уверены, что хотите продолжить? Вы не сможете отменить это действие.";
"Alert_Remove_Jailbreak_Enabled_Body" = "Нажимая \"Удаление джейлбрейка\", все файлы, связанные с джейлбрейком, будут удалены до следующего джейлбрейка. Все обычные приложения, файлы и данные будут сохранены. Вы уверены, что хотите продолжить? Вы не сможете отменить это действие.";
"Button_Cancel" = "Отмена";
"Button_Continue" = "Продолжить";

// Duplicate Apps Errors
/*Duplicate_Apps_Error_Dopamine_App*/
/*Duplicate_Apps_Error_User_App*/
/*Duplicate_Apps_Error_Icon_Cache*/
"Duplicate_Apps_Error_Dopamine_App" = "Обнаружено несколько приложений с идентификатором \"%@\" внутри пути Dopamine (\"%@\"). Невозможно продолжить.";
"Duplicate_Apps_Error_User_App" = "Приложения с идентификатором %@ есть в директории Dopamine (\"%@\"), но в системе установлены раздельно. Невозможно продолжить.";
"Duplicate_Apps_Error_Icon_Cache" = "Приложение с идентификатором \"%@\" есть в каталоге приложений (\"%@\"), но также зарегистрировано в кэше иконок по пути (\"%@\"). Невозможно продолжить.";

// Settings Lists
"Theme" = "Темы";
Expand All @@ -85,18 +85,18 @@
"Credits_Button_Source_Code" = "Исходный код";

// Logs
"Initializing Environment" = "Инициализация переменной среды";
"Loading BaseBin TrustCache" = "Загружаем BaseBin TrustCache";
/*Applying Bind Mount*/
"Removing Jailbreak" = "Удаляем джейлбрейк";
"Elevating Privileges" = "Повышаем права";
"Cleaning Up Exploits" = "Очищаем Эксплоиты";
"Building Phys R/W Primitive" = "Создаем R/W примитивы";
"Rebooting Userspace" = "Перезагружаем Userspace";
"Initializing Environment" = "Инициализация среды";
"Loading BaseBin TrustCache" = "Получение кэша доверия BaseBin";
"Applying Bind Mount" = "Применение монтирования с привязкой";
"Removing Jailbreak" = "Удаление джейлбрейка";
"Elevating Privileges" = "Повышение прав";
"Cleaning Up Exploits" = "Очистка эксплоитов";
"Building Phys R/W Primitive" = "Создание R/W примитива";
"Rebooting Userspace" = "Перезагрузка Userspace";
"Patchfinding" = "Поиск патчей";
"Exploiting Kernel (%@)" = "Эксплуатируем ядро";
"Bypassing PAC (%@)" = "Обходим PAC";
"Bypassing PPL (%@)" = "Обходим PPL";
"Exploiting Kernel (%@)" = "Эксплуатация ядра (%@)";
"Bypassing PAC (%@)" = "Обход PAC (%@)";
"Bypassing PPL (%@)" = "Обход PPL (%@)";

// Package Manager selection
"Status_Title_Select_Package_Managers" = "Выберите менеджер(ы) пакетов";
Expand Down
2 changes: 1 addition & 1 deletion BaseBin/libjailbreak/src/jbclient_xpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ char *realafpath(const char *restrict path, char *restrict resolved_path)
// Running realpath on stuff in /var/jb or on rootfs causes some processes, on some devices, to crash
// If it starts with /, it's not a relative path and we can skip calling realpath on it
// We only care about resolving relative paths, so we can skip anything that doesn't look like one
// As a side effect, we also ignore loader relative paths that start with (@rpath/@executable_path/@loader_path)
// Additionally, we also ignore loader relative paths that start with (@rpath/@executable_path/@loader_path)
if (!resolved_path) {
resolved_path = malloc(PATH_MAX);
}
Expand Down
4 changes: 2 additions & 2 deletions BaseBin/libjailbreak/src/trustcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ int trustcache_file_build_from_path(const char *filePath, trustcache_file_v1 **t
return 0;
}

bool is_cdhash_in_trustcache(uint64_t tcKaddr, cdhash_t CDHash)
bool trustcache_contains_cdhash(uint64_t tcKaddr, cdhash_t CDHash)
{
uint64_t tcFileKaddr = kread64(tcKaddr + koffsetof(trustcache, fileptr));
uint32_t length = kread32(tcFileKaddr + offsetof(trustcache_file_v1, length));
Expand Down Expand Up @@ -393,7 +393,7 @@ bool is_cdhash_trustcached(cdhash_t CDHash)
{
__block bool inTrustCache = false;
_trustcache_list_enumerate(^(uint64_t tcKaddr, bool *stop) {
bool inThisTrustCache = is_cdhash_in_trustcache(tcKaddr, CDHash);
bool inThisTrustCache = trustcache_contains_cdhash(tcKaddr, CDHash);
if (inThisTrustCache) {
inTrustCache = true;
*stop = true;
Expand Down
1 change: 0 additions & 1 deletion BaseBin/libjailbreak/src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ uint64_t proc_self(void)
static uint64_t gSelfProc = 0;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
bool needsRelease = false;
gSelfProc = proc_find(getpid());
// decrement ref count again, we assume proc_self will exist for the whole lifetime of this process
proc_rele(gSelfProc);
Expand Down
5 changes: 3 additions & 2 deletions BaseBin/systemhook/src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,9 @@ kBinaryConfig configForBinary(const char* path, char *const argv[restrict])
return 0;
}

// 1. Make sure the about to be spawned binary and all of it's dependencies are trust cached
// 1. Ensure the binary about to be spawned and all of it's dependencies are trust cached
// 2. Insert "DYLD_INSERT_LIBRARIES=/usr/lib/systemhook.dylib" into all binaries spawned
// 3. Increase Jetsam limit to more sane value (Multipler defined as JETSAM_MULTIPLIER)

int spawn_hook_common(pid_t *restrict pid, const char *restrict path,
const posix_spawn_file_actions_t *restrict file_actions,
Expand All @@ -243,7 +244,7 @@ int spawn_hook_common(pid_t *restrict pid, const char *restrict path,
kBinaryConfig binaryConfig = configForBinary(path, argv);

if (!(binaryConfig & kBinaryConfigDontProcess)) {
// jailbreakd: Upload binary to trustcache if needed
// Upload binary to trustcache if needed
trust_binary(path);
}

Expand Down
5 changes: 1 addition & 4 deletions BaseBin/systemhook/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ __attribute__((constructor)) static void initializer(void)
#ifndef __arm64e__
// On arm64, writing to executable pages removes CS_VALID from the csflags of the process
// These hooks are neccessary to get the system to behave with this
// They're ugly but they're needed
// They are ugly but needed
litehook_hook_function(csops, csops_hook);
litehook_hook_function(csops_audittoken, csops_audittoken_hook);
if (__builtin_available(iOS 16.0, *)) {
Expand All @@ -502,9 +502,6 @@ __attribute__((constructor)) static void initializer(void)

#ifndef __arm64e__
// Feeable attempt at adding back CS_VALID
// If any hooks are applied after this, it is lost again
// Temporary workaround until a better solution for this problem is found
// This + the csops hook should resolve all cases unless a tweak does something really stupid
jbclient_cs_revalidate();
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion BaseBin/systemhook/src/objc.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ bool NSConcreteTask_launchWithDictionary_error__hook(id self, id sender, NSDicti
void dopamine_fix_NSTask(void)
{
// This only works if libobjc and Foundation are already loaded, that is by design
// So as of right now it only automatically works if some any tweak is loaded (as libellekit depends on Foundation)
// So as of right now it only automatically works if some tweak is loaded (as libellekit depends on Foundation)
// If you want to use NSTask in your app or whatever, call this function yourself after Foundation is loaded
// This could be automated but it's difficult due to image loading callbacks being shit
void *libobjcHandle = dlopen("/usr/lib/libobjc.A.dylib", RTLD_NOLOAD);
Expand Down

0 comments on commit 3485fc0

Please sign in to comment.