尝试在 kotlin 中调试时 AVC 被拒绝并触发鼠标左键单击鼠标

AVC denied when trying to debug in kotlin & trigger left-click Mouse

提问人:Daira Engineering 提问时间:10/18/2023 更新时间:10/18/2023 访问量:27

问:

  1. type=1400 audit(0.0:227): avc: denied { read } for name=“value” dev=“sysfs” ino=65762 scontext=u:r:untrusted_app:s0:c163,c256,c512,c768 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 app=com.minimis.customlauncher 2023-10-18 10:03:09.470 5482-5482 .customlauncher com.minimis.customlauncher 2.我键入 = 1400 审核(0.0:228):avc:拒绝 { open } for path=“/sys/devices/platform/soc/500000.pinctrl/gpiochip0/gpio/gpio1209/value” dev=“sysfs” ino=65762 scontext=u:r:untrusted_app:s0:c163,c256,c512,c768 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 app=com.minimis.******
  2. 接收连续日志。
  3. 我正在开发一个应用程序,该应用程序通过我的自定义鼠标光标位置读取鼠标并执行鼠标左键单击。我总是在android kotlin中收到rootInActiveWindow返回null

这是我的代码:

private val nodeInfo = rootInActiveWindow;

private fun click() {
Log.d(TAG, "Before Click  \[${cursorLayout.x}, ${cursorLayout.y}\]")
if (nodeInfo == null) {
Log.d(TAG, "Error")
return
}else{
Log.d(TAG, "After Click..\>$nodeInfo  \[${cursorLayout.x}, ${cursorLayout.y}\]")
}
val nearestNodeToMouse = findSmallestNodeAtPoint(nodeInfo, cursorLayout.x, cursorLayout.y + 50)
if (nearestNodeToMouse != null) {
logNodeHierarchy(nearestNodeToMouse, 0)
nearestNodeToMouse.performAction(AccessibilityNodeInfo.ACTION_CLICK)
Toast.makeText(applicationContext,
"Action Click",Toast.LENGTH_SHORT).show()
}else{
Toast.makeText(applicationContext,
"Not Click",Toast.LENGTH_SHORT).show()
}
nodeInfo.recycle()
}
Android Kotlin MouseEvent MouseListener onMouseOver

评论

0赞 Rajat Gupta 10/18/2023
AVC deniden是来自使用SELinux的android内部安全机制的日志。它与您的要求无关。
0赞 Daira Engineering 10/18/2023
谢谢以及我如何实现我的回报

答: 暂无答案