added app permission retrieval and database export