mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-04-20 21:23:30 +00:00
move files across computers
This commit is contained in:
22
android-hooking/hook.js
Normal file
22
android-hooking/hook.js
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Java.perform(function () {
|
||||||
|
// Locate the native library
|
||||||
|
var libbluetooth = Module.findExportByName("libbluetooth_jni.so", "l2c_fcr_chk_chan_modes");
|
||||||
|
|
||||||
|
if (libbluetooth) {
|
||||||
|
console.log("Found l2c_fcr_chk_chan_modes at: " + libbluetooth);
|
||||||
|
|
||||||
|
// Hook the function
|
||||||
|
Interceptor.attach(libbluetooth, {
|
||||||
|
onEnter: function (args) {
|
||||||
|
console.log("l2c_fcr_chk_chan_modes called");
|
||||||
|
},
|
||||||
|
onLeave: function (retval) {
|
||||||
|
console.log("Original return value: " + retval.toInt32());
|
||||||
|
retval.replace(1); // Force return value to true (non-zero)
|
||||||
|
console.log("Modified return value to: " + retval.toInt32());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.log("l2c_fcr_chk_chan_modes not found!");
|
||||||
|
}
|
||||||
|
});
|
||||||
48
android/app/src/main/java/me/kavishdevar/aln/LongPress.kt
Normal file
48
android/app/src/main/java/me/kavishdevar/aln/LongPress.kt
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
package me.kavishdevar.aln
|
||||||
|
|
||||||
|
import androidx.compose.foundation.layout.Column
|
||||||
|
import androidx.compose.foundation.layout.Row
|
||||||
|
import androidx.compose.material3.Checkbox
|
||||||
|
import androidx.compose.material3.Text
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.runtime.mutableStateOf
|
||||||
|
import androidx.compose.runtime.remember
|
||||||
|
import androidx.navigation.NavController
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun LongPress(navController: NavController) {
|
||||||
|
val offChecked = remember { mutableStateOf(false) }
|
||||||
|
val ncChecked = remember { mutableStateOf(false) }
|
||||||
|
val transparencyChecked = remember { mutableStateOf(false) }
|
||||||
|
val adaptiveChecked = remember { mutableStateOf(false) }
|
||||||
|
Column {
|
||||||
|
Row {
|
||||||
|
Text("Off")
|
||||||
|
Checkbox(
|
||||||
|
checked = offChecked.value,
|
||||||
|
onCheckedChange = { offChecked.value = it },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
Row {
|
||||||
|
Text("Noise Cancellation")
|
||||||
|
Checkbox(
|
||||||
|
checked = ncChecked.value,
|
||||||
|
onCheckedChange = { ncChecked.value = it },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
Row {
|
||||||
|
Text("Transparency")
|
||||||
|
Checkbox(
|
||||||
|
checked = transparencyChecked.value,
|
||||||
|
onCheckedChange = { transparencyChecked.value = it },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
Row {
|
||||||
|
Text("Off")
|
||||||
|
Checkbox(
|
||||||
|
checked = adaptiveChecked.value,
|
||||||
|
onCheckedChange = { adaptiveChecked.value = it },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -146,6 +146,9 @@ fun Main() {
|
|||||||
composable("debug") {
|
composable("debug") {
|
||||||
DebugScreen(navController = navController)
|
DebugScreen(navController = navController)
|
||||||
}
|
}
|
||||||
|
composable("long_press") {
|
||||||
|
LongPress(navController = navController)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
serviceConnection = remember {
|
serviceConnection = remember {
|
||||||
|
|||||||
Reference in New Issue
Block a user