Reputation: 1
I am working on an project, which requires me to find out the app permission from an APK file. From what I know about app permission is that it tells me what the app can access on the user's device. I believe this piece of information is stored in the AndroidManifest.xml in the APK file. Below, there are two lines of codes which I think showing the permission, INTERNET and ACCESS_NETWORK_STATE. Am I correct? If it is not correct, where can I find them? Thank you.
uses-permission android:name="android.permission.INTERNET"
uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"
Upvotes: 0
Views: 87
Reputation: 411
Your questions was not clearly explained but still i am trying my best.
yes application permission is defined and stored in androidManifest.xml file. These permission is defined with uses-permission tag
Example:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.snazzyapp">
<--!here is your permission !-->
<uses-permission android:name="android.permission.SEND_SMS"/>
<application ...>
...
</application>
</manifest>
You can also check out offical android permission guidelines
As questions says "you need to get defined permission from apk file"
You can do it following.
Firstly extract the apk file programmatically
And then parse androidManifest.xml and get all defined permission.
Upvotes: 0