Android Build simulator for debugging

Source: Internet
Author: User

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

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.