I've figured out that if I want to check the permissions directly from the main() function of the Android Service, it gets stuck. The same approach works well for the normal Activity.
Some investigation shows that there might be a deadlock in QtNative.java.
A QCoreApplication::checkPermission() call results in a call to checkSelfPermission() in QtNative.java. It attempts to lock the m_mainActivityMutex, which seems to be still locked by a call to startApplication().
The straightforward solution is to run the QCoreApplication::checkPermission() from a QTimer::singleShot(), that will put it on the event loop.
I'm attaching a small example that reproduces the problem.