disable DI hook and dependant functions

This commit is contained in:
Kavish Devar
2026-03-29 16:28:45 +05:30
parent 555a000def
commit 04ef891c4b
4 changed files with 19 additions and 19 deletions

View File

@@ -265,9 +265,9 @@ static bool hookLibrary(const char* libname) {
findSymbolOffset(decompressed,
"l2c_fcr_chk_chan_modes");
uint64_t sdp_offset =
findSymbolOffset(decompressed,
"BTA_DmSetLocalDiRecord");
// uint64_t sdp_offset =
// findSymbolOffset(decompressed,
// "BTA_DmSetLocalDiRecord");
if (chk_offset) {
void* target =
@@ -280,16 +280,16 @@ static bool hookLibrary(const char* libname) {
LOGI("Hooked l2c_fcr_chk_chan_modes");
}
if (sdp_offset) {
void* target =
reinterpret_cast<void*>(base + sdp_offset);
hook_func(target,
(void*)fake_BTA_DmSetLocalDiRecord,
(void**)&original_BTA_DmSetLocalDiRecord);
LOGI("Hooked BTA_DmSetLocalDiRecord");
}
// if (sdp_offset) {
// void* target =
// reinterpret_cast<void*>(base + sdp_offset);
//
// hook_func(target,
// (void*)fake_BTA_DmSetLocalDiRecord,
// (void**)&original_BTA_DmSetLocalDiRecord);
//
// LOGI("Hooked BTA_DmSetLocalDiRecord");
// }
return true;
}

View File

@@ -99,7 +99,7 @@ fun AccessibilitySettingsScreen(navController: NavController) {
val isDarkTheme = isSystemInDarkTheme()
val textColor = if (isDarkTheme) Color.White else Color.Black
val aacpManager = remember { ServiceManager.getService()?.aacpManager }
val isSdpOffsetAvailable = remember { mutableStateOf(true) } // always available rn, for testing without radare
val isSdpOffsetAvailable = remember { mutableStateOf(false) } // always available rn, for testing without radare
// remember { mutableStateOf(RadareOffsetFinder.isSdpOffsetAvailable()) }
val trackColor = if (isDarkTheme) Color(0xFFB3B3B3) else Color(0xFF929491)

View File

@@ -267,10 +267,10 @@ fun AirPodsSettingsScreen(dev: BluetoothDevice?, service: AirPodsService,
}
// val actAsAppleDeviceHookEnabled = RadareOffsetFinder.isSdpOffsetAvailable()
// if (actAsAppleDeviceHookEnabled) {
item(key = "spacer_hearing_health") { Spacer(modifier = Modifier.height(32.dp)) }
item(key = "hearing_health") {
HearingHealthSettings(navController = navController)
}
// item(key = "spacer_hearing_health") { Spacer(modifier = Modifier.height(32.dp)) }
// item(key = "hearing_health") {
// HearingHealthSettings(navController = navController)
// }
// }
if (capabilities.contains(Capability.LISTENING_MODE)) {

View File

@@ -90,7 +90,7 @@ fun TransparencySettingsScreen(navController: NavController) {
val verticalScrollState = rememberScrollState()
val attManager = ServiceManager.getService()?.attManager ?: return
val aacpManager = remember { ServiceManager.getService()?.aacpManager }
val isSdpOffsetAvailable = remember { mutableStateOf(true) } // always available rn, for testing without radare
val isSdpOffsetAvailable = remember { mutableStateOf(false) } // always available rn, for testing without radare
// remember { mutableStateOf(RadareOffsetFinder.isSdpOffsetAvailable()) }
val trackColor = if (isDarkTheme) Color(0xFFB3B3B3) else Color(0xFF929491)