Skip to content

Commit b71c33d

Browse files
authored
Disable dex obfuscation for debug builds (#670)
Modules such as `io.github.mhmrdd.libxposed.ps.passit` [PlayStrong](https://t.me/meetstrong/125) call methods with `libxposed` API signatures via JNI during its initialization, which is bounded to fail if dex obfuscation is always enabled. Vector has removed the user configuration of `Xposed API Protection` (toggling the dex obfuscation option) during its daemon refactoring in #597, for the reason that this option is too technical for most users. Ideally, module developers should extend their module compatibility with dex obfuscation mode, by for example, inheriting Xposed APIs. In any case, we now disable dex obfuscation for debug builds, so that Vector users could test out these modules.
1 parent 6990e7e commit b71c33d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

daemon/src/main/kotlin/org/matrix/vector/daemon/data/DaemonState.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package org.matrix.vector.daemon.data
22

33
import java.nio.file.Path
44
import org.lsposed.lspd.models.Module
5+
import org.matrix.vector.daemon.BuildConfig
56

67
data class ProcessScope(val processName: String, val uid: Int)
78

@@ -11,7 +12,7 @@ data class ProcessScope(val processName: String, val uid: Int)
1112
*/
1213
data class DaemonState(
1314
// State non configurable for users
14-
val isDexObfuscateEnabled: Boolean = true,
15+
val isDexObfuscateEnabled: Boolean = !BuildConfig.DEBUG,
1516
// States initialized after system services are ready
1617
val isCacheReady: Boolean = false,
1718
val managerUid: Int = -1,

0 commit comments

Comments
 (0)