adb Use of Commands
execution results are adb output The following status information for each device:
l Serial Number(serialnumber)-byadbA string created using the console number to uniquely identify an emulator or phone device, in the format<Device Type>-<Port number>, such as:emulator-5554
l Status (state) - The connection state, whose value is:
noffline &NBSP;-&NBSP; Not connected or not responding
ndevice - has been connected to the service provider. Note that this status does not indicate android adb but this state is the normal operational state.
The output form of each device is as follows:
[SerialNumber] [State]
Below is Devices command and its execution result:
$ ADB devices
List of devices attached
emulator-5554 Device
emulator-5556 Device
emulator-5558 Device
if no emulator or phone is running, the state returns the No device .
Install the application
You can use adb to copy applications from your development computer and install them on your emulator or phone, using the install command, where you must specify the path to the . apk file to install:
ADB install <path_to_apk>
ADB uninstall (-K) (software name)
If k is a parameter, the software is uninstalled but the configuration and cache files are preserved.
If you delete the app that comes with your system, you need root permission to delete it on your computer.
ADB remount (make system partition from read-only to readable and writable)-"adb shell--" rm/system/app/xx
Transfer files with simulator or phone
You can use the pull and push commands of adb to copy files from an emulator or phone, or to copy files to an emulator or phone. Unlike the install command, it can only copy . apk files to a specific location, and the pull and push commands can copy any folder and file to any location on the emulator or phone.
Copy a file or folder (recursive) from the emulator or phone using:
ADB pull <remote><local>
Copy a file or folder (recursive) to the emulator or phone using:
ADB push <local><remote>
In this command <local> and <remote> refer to the path of the file or folder, on the development computer is local, on the simulator or mobile phone is remote .
For example:
ADB push Foo.txt/sdcard/foo.txt
This article is from the "No Water Fish" blog, please be sure to keep this source http://javaqun.blog.51cto.com/10687700/1707704
Use of ADB