get apkinfo use pure go code. (packageName, mainActivty etc...)
Download binaries from releases
Or build from source
$ go get -v github.com/codeskyblue/apkinfo
This tool is very simple to use.
$ apkinfo cloudmusic.apk
## Package
PackageName: com.netease.cloudmusic
MainActivity: com.netease.cloudmusic.activity.LoadingActivity
## ADB
adb shell am start -a com.netease.cloudmusic/.activity.LoadingActivity
## AppCrawler
appcrawler --capability appPackage=com.netease.cloudmusic,appActivity=.activity.LoadingActivity
## Appium
{
"appActivity": ".activity.LoadingActivity",
"appPackage": "com.netease.cloudmusic",
"deviceName": "whatever",
"platformName": "Android",
"resetKeyboard": true,
"unicodeKeyboard": true
}
获取格式化的json信息
$ apkinfo -json cloudmusic.apk
{
"label": "网易云音乐",
"mainActivity": "com.netease.cloudmusic.activity.LoadingActivity",
"packageName": "com.netease.cloudmusic",
"versionCode": 118,
"versionName": "5.2.0"
}
获取icon
$ apkinfo -icon icon.jpg
Can not extract icon which is using Adaptive icon