aaptの使用


aapt:Android Asset Packaging Tool、SDKのtools/ディレクトリの下にあります.このツールは、ZIP形式のドキュメント添付ファイル(zip,jar,apk)を表示、作成、更新することができる.リソースファイルをバイナリファイルにコンパイルすることもできる.
同期ソフトウェアでapk情報を得るには、androidがすでに提供しているツールを使用します.
aapt d[ump] [--values] WHAT file.{apk} [asset [asset ...]]
   badging          Print the label and icon for the app declared in APK.
   permissions      Print the permissions from the APK.
   resources        Print the resource table from the APK.
   configurations   Print the configurations in the APK.
   xmltree          Print the compiled xmls in the given assets.
   xmlstrings       Print the strings of the given compiled xml assets.

aapt dump badging*を使用する.apkは、このapkファイルのプログラム名、パッケージ名、使用するsdk、プログラムバージョン、権限情報などを表示できます.次のようになります.
aapt dump bagging EngineeringTest.apkは以下の詳細を得た
package: name='com.archermind.engineeringtest' versionCode='1' versionName='1.0'
sdkVersion:'8'
application-label:'EngineeringTest'
application-icon-120:'res/drawable-ldpi/ic_launcher.png'
application-icon-160:'res/drawable-mdpi/ic_launcher.png'
application-icon-240:'res/drawable-hdpi/ic_launcher.png'
application: label='EngineeringTest' icon='res/drawable-mdpi/ic_launcher.png'
launchable-activity: name='com.archermind.engineeringtest.EngineeringTestActivity'  label='EngineeringTest' icon=''
uses-permission:'android.permission.INTERNET'
uses-feature:'android.hardware.touchscreen'
main
other-activities
other-receivers
other-services
supports-screens: 'small' 'normal' 'large'
supports-any-density: 'true'
locales: '--_--'
densities: '120' '160' '240'

上記の情報を文字列に読み込み、正規表現で一致させます.apkの情報を同期ソフトウェアに入れることができます.
また、同期ソフトには、androidシステムのsystem/buildに置かれている携帯電話のファームウェアの情報、例えば携帯電話romのバージョンなども含まれているはずです.propファイルの中にあります.adb shell catを使用して表示できます.特定の行の意味を表示するには、次のURLを参照してください.
http://www.cnblogs.com/wanqieddy/archive/2011/11/25/2263367.html