LoginSignup
3
2

More than 5 years have passed since last update.

aapt(Android Asset Packaging Tool)でapkファイルが対応しているネイティブコードのCPUアーキテクチャを確認する

Posted at

aaptのパス

たとえば、こんな所にある

~/Library/Android/sdk/build-tools/28.0.3/aapt

aapt dump badging $APK_FILE_PATH

aapt dump badging MyGame-debug.apk

package: name='com.your_company.mygame' versionCode='1' versionName='1.0'
install-location:'auto'
sdkVersion:'14'
targetSdkVersion:'27'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.VIBRATE'
application-label:'MyGame'
application-icon-160:'res/mipmap-mdpi-v4/ic_launcher.png'
application-icon-240:'res/mipmap-hdpi-v4/ic_launcher.png'
application-icon-320:'res/mipmap-xhdpi-v4/ic_launcher.png'
application-icon-480:'res/mipmap-xxhdpi-v4/ic_launcher.png'
application: label='MyGame' icon='res/mipmap-mdpi-v4/ic_launcher.png'
application-debuggable
launchable-activity: name='org.cocos2dx.cpp.AppActivity'  label='MyGame' icon=''
feature-group: label=''
  uses-gl-es: '0x20000'
  uses-feature: name='android.hardware.faketouch'
  uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
  uses-feature: name='android.hardware.screen.landscape'
  uses-implied-feature: name='android.hardware.screen.landscape' reason='one or more activities have specified a landscape orientation'
main
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '160' '240' '320' '480'
native-code: 'arm64-v8a' 'armeabi-v7a' 'x86'

native-code

ってところが、対応しているCPUのアーキテクチャ

aapt list $APK_FILE_PATH

ついでに、apkファイルの中を確認してみるコマンド

aapt list MyGame-debug.apk

AndroidManifest.xml
META-INF/CERT.RSA
META-INF/CERT.SF
META-INF/MANIFEST.MF
assets/CloseNormal.png
assets/CloseSelected.png
assets/HelloWorld.png
assets/fonts/Marker Felt.ttf
assets/fonts/arial.ttf
assets/res/.gitkeep
classes.dex
lib/arm64-v8a/libMyGame.so
lib/armeabi-v7a/libMyGame.so
lib/x86/libMyGame.so
res/mipmap-hdpi-v4/ic_launcher.png
res/mipmap-mdpi-v4/ic_launcher.png
res/mipmap-xhdpi-v4/ic_launcher.png
res/mipmap-xxhdpi-v4/ic_launcher.png
resources.arsc

確かに、lib配下に、それぞれのアーキテクチャ毎のファイルが存在する事を確認できる。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2