Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android access denied finding property "ro.hardware.chipname"

So I am trying to use Tensorflow Lite on an android app. The following code is called when the camera captures an image:

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
    if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK) {
        val bitmap = data!!.extras!!.get("data") as Bitmap
        val tensorImage = imageProcessor.process(TensorImage(DataType.UINT8).apply { load(bitmap) })
        val outputs = model.process(tensorImage.tensorBuffer)
        val buffer = outputs.outputFeature0AsTensorBuffer
        val prediction = buffer.floatArray
        debug { "$prediction" }
    }
}

However, after executing the line val outputs = model.process(tensorImage.tensorBuffer), an error message

E/libc: Access denied finding property "ro.hardware.chipname"

popped up. I have no clue about the meaning of the message (even after googling), and I seemingly cannot find a suitable permission to allow this. Any help in advance is much appreciated.

like image 386
PunnyBunny Avatar asked Feb 15 '26 14:02

PunnyBunny


1 Answers

I did encounter the same problem in my flutter/dart project, when I was trying to use NNAPI on XiaoMi Redmi K30 Pro(Snapdragon 865). Until now, there's still no concrete information about this. Few pages i found which may have sth to do with it:

https://github.com/tensorflow/models/issues/7887

https://github.com/tensorflow/tensorflow/issues/45847

like image 196
JSYRD Avatar answered Feb 17 '26 02:02

JSYRD