See a good blog: "Android Test" "essay" To get the app's package name and start page activity
In addition to the methods on the blog, I also found two ways:
Method One: AAPT
The prerequisite is to use the SDK Manager.exe to download the Android SDK Build-tools. Here you can choose any version of the build-tools to download, I downloaded the version 23.0.1.
After downloading, you can find the tool Aapt.exe under the build-tools of the SDK, my path is: D:\android-sdk_r23.0.2-windows\android-sdk-windows\build-tools\ 23.0.1\aapt.exe.
Execute "aapt dump badging xxx.apk" to get the package and Activity.
d:\android-sdk_r23.0.2-windows\android-sdk-windows\build-tools\23.0.1>aapt Dump badging D:\appium\apks\ Zhihu_521.apkpackage:name='com.zhihu.android' ... . ..... launchable-activity:name='com.zhihu.android.app.ui.activity.MainActivity'
Method Two: Appium analysis
Open the Appium server side and click on the Android robot icon.
Select Application path and click the Choose button to select the APK file path for the app. Select to see Appium automatically resolves the package and activity name.
Here I parse the known apk file.
For activity, check lanch activity to see all the activity lists.
Note: I will check here by default. Manactivity, the same as the AAPT tools, do not know whether it is coincidence.
Of course, it is best to take application Path and Lanch Activity unchecked after getting it.
Appium Python Four: How to get the app's package and activity