"Android" adb common commands

Source: Internet
Author: User

ADB common commands:

"ADB help" for assistance

"ADB Get-serialno" gets the device string number

"Adb-s <serialNumber> <command>" Send commands to specific devices

"adb root" gets root permission, which is useful for some phones, and most of the listed phones have turned this feature off. Root privileges can also be obtained through third-party tools such as pea clips.

"adb kill-server" kills ADB's server process.

"ADB start-server" starts the ADB server process.

"ADB devices" view the Android terminal that established the connection.

"Android List" displays all Android terminals

"Ddms" Start Ddms

"ADB remount" reloads the hard drive.

"ADB reboot" restarts the terminal.

"adb install C:\Users\Administrator\Desktop\tmp\app-test.apk" installation application

"ADB uninstall Com.android.helloworld" Uninstall HelloWorld, the system with the application cannot be uninstalled.

"ADB push c:\users\administrator\desktop\tmp\app-test.apk/sdcard/" copies a file from the PC to the terminal

"ADB pull/sourcepath/filename/destinationpath/filename" copies a file from the terminal to the PC side

"ADB wait-for-device " If the device is not online, do not let the execution,--that is, the instance state is device .

ADB Shell Common Commands:

"AM Start-n {package name}/{package name}. {Active activity name} "Activate activity for an app, configure reference Androidmanifest.xml, such as alarm:
# AM Start-ncom.android.alarmclock/com.android.alarmclock.alarmclock

"SetProp Key Value" Sets the property value bit of key value

"Getprop Key" gets the property value of the key

"GetEvent" gets all events

"Watchprops" monitor the change of property value

"Stop SERVER" forcibly stops a service

"Start SERVER" starts a service

"IOCTL" control device

"Dumpsys Activity" displays event stack information

"Top" displays information such as resource usage for the instant process

"Free" shows current memory usage of the process

"PS" Displays the process's own identity information

"Rm/path/filename" Deletes a file from the terminal

"MkDir" Create a new directory or file

"grep" finds specific content

"LS" displays files in the current directory

"CD" Toggles the current directory

"chmod" Changing file properties

"CP" Copy File

"DD" Copy File

"MV" To move directory files, or rename

"Cat" View file contents

"Kill" kills the process

"ipconfig" View change network interface address and parameters

"Ping" detects network status

"Netstat" View network status

"Telnet" Log on to the remote host

"Sqlite3/path/databasename.db" opens a database. You can then use database operations commands such as Select,insert,delete

"Tcpdump-p-nnn-vvv-s 0-w/path/name.pcap Port andtcp" network debugging Grab Bag

"Gst-launch Playbinuri=file:///system/media/audio/bootaudio.mp3" GST multimedia frame, playing audio files

"Alsa_amixer" Audio Debug command, you can switch channels, adjust the volume, switch devices. The parameters of different chip manufacturers are set differently.

"Alsa_aplay-d Androidplayback_speaker_normal/cache/music/dial/0.wav" plays PCM stream via ALSA.

"Alsa_arecord" for recording with Alsa

"Am Start-ncom.android.music/com.android.music.mediaplaybackactivity-d/sdcard/bootaudio.mp3" launches Android process playback mp3

"Stack--symbols-dir=./out/target/product/name/symbolsramdump" view the call stack

"Exit" exits the shell

With the ADB shell, Cd/system/bin,ls can list out most of the available commands.

"Android" adb common commands

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.