'How to use ADB command in Flutter

I'm writing a test application in Flutter to get data from available function/command in Android: in details I would like to access to Audio Codec device in order to read and write configuration register (like using i2cset and i2cget).

I read something about JNI but seems (correct me if I'm wrong) that in the latest versions of Flutter it has been removed.

Basically I would like to add a button in the UI like READ and send a command similar to

ADB i2cget -f -y 3 0x30 0x30

and return the data.

Thanks for your great help



Solution 1:[1]

You should be able to run terminal commands using Dart Process.run(), but I don't think it's able to run an adb executable.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Omatt