Simple and practical practice for Android ADB

Source: Internet
Author: User

Using Activity Manager

App resolution high test low resolution for screen fit

Override emulator/device display density. This command was helpful for testing your app across different screens densities on high-density screen environment using a Low density screens, and vice versa.

1.display-density <dpi>

eg

AM display-density 480

Override emulator/device display size. This command was helpful for testing your app across different screens sizes by mimicking a small screen resolution using a Device with a large-screen, and vice versa.

2.display-size [Reset|<wxh>] 

eg

Am Display-size 1280x800

Kill all background processes.

Kill-all

3.ADB shell pm Uninstall []

eg

ADB shell PM install/storage/emulated/0/download/app-release.apk

Problems may occur:

Failure [Install_failed_invalid_uri]

Reason that the item exists on your phone. So first uninstall and then install.

adb shell pm Uninstall Com.lskj.rrhr.shortkeytest Red part refers to the APK's package

Manifest Package
You may be concerned about how to upload the APK to a mobile live simulator.
ADB push [apk pc Local Path] [target path on phone]
EG:ADB Push App/app-release.apk/storage/emulated/0/download

4.ADB Shell pm Install [apk path on the phone]

5.adb push [apk pc Local Path] [target path on phone]

6.ADB devices View all current devices

7.ADB Pull < Remote path > < local path >

Simple and practical practice for Android ADB

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.