Commands used in Android development-sort and paste

Source: Internet
Author: User

 

Some commands are not commonly used, so I forget them. Here, I will check them if I forget them ..

 

* Create an android Virtual Device (AVD)

Android create AVD-n-name-T-target (1, 2, 3)

* Ddms (its file management function)

* Create an sdcard

Mksdcard-l label <size> <sdfilepath>

* Start the simulator.

Emulator-AVD-name

* Start a simulator with sdcard

Emulator-AVD-name-sdcard <sdfilepath>

* ADB has many functions, such as install, uninstall, and shell.

* Specify a specific device and send commands

ADB-S <serial number> install/uninstall ....

* Killing the ADB Service

ADB kill-Server

* Restart the ADB service.

ADB start-Server

* Start an activity.

ADB shell am start <intent>/<-N classname>

* Send a broadcast

ADB shell AM broadcast <intent>

* Monkey test

ADB shell monkey-v-P pkgname millisecond

* Generate a key

Keytool - Genkey - V - Keystore My - Release - Key . Keystore - Alias Alias_name - Keyalg RSA - Validity 10000

* Release Compilation

Ant release

* APK Signature

Jarsigner - Verbose - Keystore My - Release - Key . Keystore My_application . APK alias_name

* Verify the signature

Jarsigner - Verify - Verbose my_application . APK

* APK alignment

Zipalign - V 4 Your_project_name - Unaligned . APK Your_project_name . APK

* APK alignment Verification

Zipalign-C-V 4 application.apk

* Change the default APK installation path.

$ ADB Shell
$ PM setinstalllocation 0

0 the app determines whether the software can be installed on the SD card. 

1. Force all apps to be installed in ROM 

2. Force all apps to be installed on the SD card 

 

 

Related Article

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.