
How can PermissionQ app access to the permission screen of another app since there is an answer on a question about permission screen on stackoverflow that it is not possible.

How can PermissionQ app access to the permission screen of another app since there is an answer on a question about permission screen on stackoverflow that it is not possible.
According to Android Docs, there is a class called PackageManager that can help you take a look at the Installed Packages on your phone.
In addition, it has the following method which should answer your question.
getPackageInfo(String packageName, int flags) :
Retrieves overall information about an application package that is installed on the system.
When combined with the flag PackageManager.GET_PERMISSIONS, you can retrieve the package's permissions.
Now regarding the actual changing of the Permissions for a certain application, I checked one of the applications that does what you asked about.
What the application has is its own accessibility service that turns off the permissions for you.
So, what happens is
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
Uri uri = Uri.fromParts("package", packageName, null);
intent.setData(uri);
startActivity(intent);
Observe your actions which is probably used to know that the Permissions screen of a certain application opened. Then it uses Retrieve window content to be able to see which checkbox or toggle it needs to activate a press on and interact with.You have to toggle the accessibility service from your settings, or it does not start. This is the only way I know of that you can do such a thing without root privileges.