I've found the code to actually test the permissions. But I don't know how to delete the permissions given (or denied) in order to test every case.
Any idea? Every solution found doesn't work by now (runtime exec, get activity and clear data, etc.)
Any idea would be appreciated.