技术小黑屋

Get an Application Required Features

How to get application’s required features? Actually the aapt really does a great help.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#Usage:aapt dump badging apk_location | grep feature 

#Example
aapt dump badging /tmp/language_check_maxthon_99985f_2793_4.1.3.1000_remote_develop.apk | grep Features

#Result
uses-feature-not-required:'android.hardware.location'
uses-feature-not-required:'android.hardware.location.network'
uses-feature-not-required:'android.hardware.location.gps'
uses-feature-not-required:'android.hardware.screen.portrait'
uses-feature-not-required:'android.hardware.telephony'
uses-feature-not-required:'android.hardware.wifi'
uses-feature:'android.hardware.touchscreen'
uses-implied-feature:'android.hardware.touchscreen','assumed you require a touch screen unless explicitly made optional'

To understand the feature more detailed, please visit http://developer.android.com/guide/topics/manifest/uses-feature-element.html

Others


我的知乎 Live 推荐