Android Q - Permission error on launching Appium Unlock App

Current appium is installing the apps by using adb install -r .

From Android Q: It is forcing the user to set the app permissions at run time.
When we open appium unlock app it is asking the user permission. Without accepting user permission we can’t use this app.
To avoid this issue we can use the below work around to work smooth in Android “Q”.
We better to install app with the full app permissions.
I have used below command to achieve this. It will install the APK on to the device and by default all permissions are approved.
adb install -g -r apkfile.apk

This is applicable for all apps which Appium installs silently when it starts session.