I am trying to implement an Android Application where it makes use of tinyalsa: pcm_open() API. I get "cannot open device (0) for card(2): Permission denied" error when I tried to launch the application from Android Studio that attempts to open an audio stream from 8MIC-PRI-MX8 mic array board. Note: 8MIC-PRI-MX8 mic array board appears as an alsa device "/dev/snd/pcmC2D0c" on i.Mx 8mmini EVK.
However, the application launches fine if I build it outside of Android Studio and run it on the device with (adb) root permissions via command line.
This leads me to believe that I need to root EVK_8mm in order to gain access to "/dev/snd/pcmC2D0c" alsa device. I started following the steps decribed here GitHub - 0xFireball/root_avd: Rooting the Android Studio AVDs
Then, I hit a road block when I tried to run following commands:
$ adb remount
dm_verity is enabled on the vendor partition.
Use "adb disable-verity" to disable verity.
$ adb disable-verity
Device is locked. Please unlock the device first
I came across this thread How to remount /system - 8.1 imx8m where it provides steps to remount the device. I started following the steps below: