Daira Engineering
Daira Engineering

Reputation: 1

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

  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. I type=1400 audit(0.0:228): avc: denied { 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. receive continuous log.
  3. I'm developing an application which reads the and perform left-click of mouse through my custom mouse cursor position. and I always receive rootInActiveWindow return null in android kotlin

here is my code :

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()
}

Upvotes: 0

Views: 400

Answers (0)

Related Questions