Authorize automatically vpndialogs/.ConfirmDialog

Hello 

We're planning to integrate a VPN application (Zscaler). When it is initialized, we have an Android popup (see below) that the user must authorize by pressing the "OK" button. 
I'm looking for a way to automate this action. 

com.android.vpndialogs/.ConfirmDialog

We have a solution that uses a JS script (Mobicontrol) with the device.injectKey function to perform TAB, Enter and timers.
This doesn't seem 100% reliable to me, I'm afraid of having a lot of failures. 

Does anyone have a better solution to avoid this popup or to authorize it automatically ? 

Activity name Popup  : com.android.vpndialogs/.ConfirmDialog

This GitHub post explains the same problem, but ADB resolution is not remotely automatable...
https://stackoverflow.com/questions/67980851/grant-android-vpn-permission-via-command-line-using-adb

Thank you for your help

2 years ago
SOTI MobiControl
ANSWERS