Appium get the package name and main activity for Android app

Source: Internet
Author: User
Tags appium

Get the currently running app package name and activity:

adb shell dumpsys window w |findstr \ |findstr name=

method One in Appium's Android setting, select the app package that you downloaded to your computer to get the activity.

Method Two installs the Build-tools package in ANDROID-SDK and enters this directory.

AAPT dump badging *.apk (download to the app package path on your PC)

method Three connect to the computer and open the app.

ADB devices (see if your phone is connected to your computer)

ADB Logcat | grep Activitymanager (view currently running activity)

Or:

ADB Logcat | grep Displayed (IBID.)

method Four the phone is connected to the computer.

ADB devices (see if your phone is connected to your computer)

ADB shell PM List Packages: Lists all package names to find the package name of the package you are viewing.

ADB shell Dumpsys Package Com.android.XXX: View specific information for a particular packet

Other:

ADB devices: Check to see if your Android device is connected to your computer.

ADB shell Dumpsys activity: see which activity is currently running, some processes that are running, etc.

ADB shell Dumpsys activity activities

ADB shell PM List Packages: Lists all the package names.

ADB Shell Dumpsys Package: Listing information for all installed apps

ADB shell Dumpsys Package Com.android.XXX: View specific information for a particular packet

ADB Shell Dumpsys Activity | grep mfocusedactivity: See which activity is currently being resume

ADB Logcat | grep activitymanager: View the activity that is currently running

ADB Logcat | grep Displayed: View the activity that is currently running

Appium get the package name and main activity for Android app

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.