Skip to content

Commit 04ef891

Browse files
committed
disable DI hook and dependant functions
1 parent 555a000 commit 04ef891

4 files changed

Lines changed: 19 additions & 19 deletions

File tree

android/app/src/main/cpp/l2c_fcr_hook.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ static bool hookLibrary(const char* libname) {
265265
findSymbolOffset(decompressed,
266266
"l2c_fcr_chk_chan_modes");
267267

268-
uint64_t sdp_offset =
269-
findSymbolOffset(decompressed,
270-
"BTA_DmSetLocalDiRecord");
268+
// uint64_t sdp_offset =
269+
// findSymbolOffset(decompressed,
270+
// "BTA_DmSetLocalDiRecord");
271271

272272
if (chk_offset) {
273273
void* target =
@@ -280,16 +280,16 @@ static bool hookLibrary(const char* libname) {
280280
LOGI("Hooked l2c_fcr_chk_chan_modes");
281281
}
282282

283-
if (sdp_offset) {
284-
void* target =
285-
reinterpret_cast<void*>(base + sdp_offset);
286-
287-
hook_func(target,
288-
(void*)fake_BTA_DmSetLocalDiRecord,
289-
(void**)&original_BTA_DmSetLocalDiRecord);
290-
291-
LOGI("Hooked BTA_DmSetLocalDiRecord");
292-
}
283+
// if (sdp_offset) {
284+
// void* target =
285+
// reinterpret_cast<void*>(base + sdp_offset);
286+
//
287+
// hook_func(target,
288+
// (void*)fake_BTA_DmSetLocalDiRecord,
289+
// (void**)&original_BTA_DmSetLocalDiRecord);
290+
//
291+
// LOGI("Hooked BTA_DmSetLocalDiRecord");
292+
// }
293293

294294
return true;
295295
}

android/app/src/main/java/me/kavishdevar/librepods/screens/AccessibilitySettingsScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ fun AccessibilitySettingsScreen(navController: NavController) {
9999
val isDarkTheme = isSystemInDarkTheme()
100100
val textColor = if (isDarkTheme) Color.White else Color.Black
101101
val aacpManager = remember { ServiceManager.getService()?.aacpManager }
102-
val isSdpOffsetAvailable = remember { mutableStateOf(true) } // always available rn, for testing without radare
102+
val isSdpOffsetAvailable = remember { mutableStateOf(false) } // always available rn, for testing without radare
103103
// remember { mutableStateOf(RadareOffsetFinder.isSdpOffsetAvailable()) }
104104

105105
val trackColor = if (isDarkTheme) Color(0xFFB3B3B3) else Color(0xFF929491)

android/app/src/main/java/me/kavishdevar/librepods/screens/AirPodsSettingsScreen.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,10 @@ fun AirPodsSettingsScreen(dev: BluetoothDevice?, service: AirPodsService,
267267
}
268268
// val actAsAppleDeviceHookEnabled = RadareOffsetFinder.isSdpOffsetAvailable()
269269
// if (actAsAppleDeviceHookEnabled) {
270-
item(key = "spacer_hearing_health") { Spacer(modifier = Modifier.height(32.dp)) }
271-
item(key = "hearing_health") {
272-
HearingHealthSettings(navController = navController)
273-
}
270+
// item(key = "spacer_hearing_health") { Spacer(modifier = Modifier.height(32.dp)) }
271+
// item(key = "hearing_health") {
272+
// HearingHealthSettings(navController = navController)
273+
// }
274274
// }
275275

276276
if (capabilities.contains(Capability.LISTENING_MODE)) {

android/app/src/main/java/me/kavishdevar/librepods/screens/TransparencySettingsScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ fun TransparencySettingsScreen(navController: NavController) {
9090
val verticalScrollState = rememberScrollState()
9191
val attManager = ServiceManager.getService()?.attManager ?: return
9292
val aacpManager = remember { ServiceManager.getService()?.aacpManager }
93-
val isSdpOffsetAvailable = remember { mutableStateOf(true) } // always available rn, for testing without radare
93+
val isSdpOffsetAvailable = remember { mutableStateOf(false) } // always available rn, for testing without radare
9494
// remember { mutableStateOf(RadareOffsetFinder.isSdpOffsetAvailable()) }
9595

9696
val trackColor = if (isDarkTheme) Color(0xFFB3B3B3) else Color(0xFF929491)

0 commit comments

Comments
 (0)