One of Android development tools: emulator, adb, and sqlite3

Source: Internet
Author: User
Emulator can be used to start the simulator. Emulator-avd G8-partition-size 150-memory 855 G8 is the name of my simulator, the size of the ROM set by partition-size, memory is the size of the Set RAM adb is the most commonly used tool, called Android Debug Bridge ).

It is a tool used to manage simulators and VMS. It is a cs program and consists of three parts:

1. A client. Run (PC) on your development machine and use shell to call another client through the adb command. Other tools such as ADT and DDMS can also be clients.

2. A server. It runs on your pc as a background service. It serves as a bridge between the client and the simulator and deamon.

3. A deamon. Processes running in the simulator and real machine background.

I. adb Configuration

In windows, you only need to set the environment variables.

This is also true in linux. My system is fedora14. perform the following steps:

1. $ gedit ~ /. Bashrc

2. Add your adb path at the end

# Adb PATH

Export PATH = $ PATH:/home/linc/Dev/android/android-sdk-linux_x86/platform-tools/

In this case, try it. Enter adb shell.

2. What can adb do?

1. view the current simulator and real machine

Adb devices

2. Installer

Adb-s emulator-5556 install helloWorld.apk

3. Forwarding Port

Adb forward tcp: 6100 tcp: 7100

4. Copy an object

(1) copy from pc to simulator or real machine (push)

Adb push <local> <remote>

(2) copy files from a simulator or a real machine to a pc (pull)

Adb pull <remote> <local>

Example: adb push foo.txt/sdcard/foo.txt

5. Start and Stop the service

Adb start-server

Adb kill-server

6. shell

Adb shell

You can use shell commands to control machines in linux, such as ls and mkdir.

7. help

An important command, adb help.

In fact, adb has many functions. You can read the official documentation.

Sqlite3sqlite is undoubtedly a very successful database, there are many tools to debug it, we recommend a visualization tool sqliteexport. In fact, the Android SDK comes with sqlite3. This is a command line tool and you will find it very useful. 1, sqlite3 location in/android-sdk-linux_x86/tools/Path 2, open the database sqlite3/data/com. linc/databases/db. db3, command. help. With this command, you will learn all the commands .. View the table in db using tables. 4. Execute SQL statements to execute many statements, such as query: select * from name; 5. limit keywords such as return 11th data records starting from 100 select * from name limit 10 100; 6. view the current sqlite3 encoding method PRAGMA encoding; print out the UTF-8

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.