After installing the Android development environment, use the following commands, Android, ADB, emulator
Android-the most basic Android commands, you can make SDK updates, list device sources, generate virtual devices, etc.
Adb-android Debug Bridge, is a client program that can connect to a server listening on 5037 ports (ADB server), this ADB server scans the virtual set or the odd port number between 5555-5585 on a physical device, These port numbers are ADB daemon monitoring, ADBD is running on each device daemon, to listen to commands from the ADB, to perform some operations, such as installation programs, send files, pull files and so on.
The structure diagram is roughly:
ADB-5037:ADB server in PC-5555:ADB daemon in device
Emulator-commands for virtual devices, such as turning on virtual devices.
#列出可用的设备源
Android list target
Id:1 or "android-21"
Name:
...
#根据可用的设备源建立一个虚拟的设备实例,-n Specifies the name,-t specifies the ID number.
Android Create Avd-n Zhcemulator-t 1
#列出所有的虚拟设备实例
Android List AVD
#打开虚拟设备
EMULATOR-AVD Zhcemulator
#有时候会出现error: This platform have more than one ABI, specify one using--abi
This is missing image and downloading the image of arm or Intel.
#有时候可能会出现failed to open Lib64egl_translator errors, this is because some shared libraries emulator cannot be found, shared libraries under tools/lib/, such as:
Lib64egl_translator.so
Lib64gles_cm_translator.so
Lib64gles_v2_translator.so
Lib64openglrender.so
。。。
Add it to the LD_LIBRARY_PATH environment variable.
or copy the so file directly into the tools directory.
If the problem is not solved, then it may be the problem of the video card, you can upgrade the graphics card driver.
Export Ld_library_path
#列出当前的设备, including physical and emulator
ADB devices
#进入设备的shell环境
Adb-s Zhcemulator Shell
#安装程序
Adb-s Zhcemulator Install hongchangfirst.apk
#更新已有程序
Adb-s Zhcemulator Install-r hongchangfirst.apk
#向android上push一个文件
Adb-s Zhcemulator push/home/hongchangfirst/a.data/mnt/sdcard/
#从android上拉取一个文件夹下来
Adb-s Zhcemulator pull/mnt/sdcard/home/hongchangfist/
GUI for #打开sdk Manager
Android Update SDK
Android Update SDK--no-ui
Original: http://blog.csdn.net/hongchangfirst/article/details/41896411
Author: Hongchangfirst
Hongchangfirst's homepage: http://blog.csdn.net/hongchangfirst
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Android Build simulator for debugging