Android test adb command, Monkey command

Source: Internet
Author: User

(1)

The ADB is a bridge between the Android phone and the PC, allowing users to fully operate the phone on their computer.

(2)

A. View all current connected devices

ADB devices

Disconnect all current settings

ADB kill-server

Start All devices

ADB start-server

B. Access to the phone's internal environment

ADB shell

C. Get Device status

ADB get-state

D. Installing and uninstalling Packages

adb install '. apk '

adb uninstall '. apk '

E. See what packages the emulator gets, get the currently running package name

Under the window test environment

Monkey

Test with Monkey, package name Com.xioa.sc time 10,000, time interval 100 milliseconds

adb shell monkey-p Com.xiao.sc--throttle 100 10000

1) Parameter:-P
The parameter-P is used for constraint restrictions, and this parameter specifies one or more packages (the package, or app). After the package is specified, monkey will only allow the system to launch the specified app. If you do not specify a package, Monkey will allow the system to boot all apps in the device.

* Specify a package: adb shell monkey-p com.htc.Weather 100
Description: Com.htc.Weather is the package name, 100 is the event count (i.e. let the monkey program simulate 100 random user events).

2) Parameters:--throttle <</span> ms >
Used to specify the delay between user actions (that is, events), in milliseconds;

* Example: adb shell monkey-p com.htc.Weather--throttle 3000 100

Reference Address: http://blog.sina.com.cn/s/blog_6fed0c780101ns8l.html

Android test adb command, Monkey command

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.