Related actions for real machine devices (Android phone or Android tablet) test

Source: Internet
Author: User

After the environment is set up, if you need to access the real machine for testing, you need the following steps:

1.1.1 Device access to the computer settings

About Android device access to the computer, such as app Bao or mobile phone assistant, such as a picture tutorial, similar to:

1.1.2 Viewing devices

Connect your phone with a data cable to your computer and authorize USB debug mode. To view the effect of the connection, run the command under cmd: adb devices-l view Udid as shown in:

If there is an output, the connection is successful.

1.1.3 Real Machine Install APK

There are several ways to install the APK, here are 3 types:

The first: Copy the APK installation package to your phone and install it directly.

The second type: installed through third-party software (e.g., App Bao).

The third type: Install under DOS by command.

Steps:

1. Connect your phone or tablet to your computer and enter the command to view the device.

If it appears, the device connection OK, if not the above information, indicating that the phone driver is not installed or other reasons.

2. Enter the command: adb install E:\apk\baiduyun.apk installation.

1.1.4 View apk packagename and activity name

The first method:

Steps:

1. Switch from DOS to ADT Path: E:\adt\sdk\build-tools\android-4.4W.

2. Execute {Local package full path}.

3. View the app-package name.

See the information about the App-package package by looking at it.

Package:name= ' Com.baidu.netdisk '

4. View the app-activity activity name.

See the information about the app-activity activity name by looking at it.

Launchable-activity:name= ' Com.baidu.netdisk.ui.Navigate '

The second method:

1 . Open the installed cloud Notes app with your phone.

2. Under E:\adt\sdk\tools, there is a hierarchyviewer file that can be viewed.

You can see the following information:

App-package Package Name: Com.baidu.netdisk

App-activity Activity Name: com.baidu.netdisk.ui.Navigate

1.1.5 launches the app under DOS.

Run command: adb shell

$ am Start-n {Package] name}/{activity name}

For example: $ am start–n com.baidu.netdisk/com.baidu.netdisk.ui.navigate

Related actions for real machine devices (Android phone or Android tablet) test

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.