Android--------------Several adb frequently use commands

Source: Internet
Author: User

1. Displays all the emulators currently executing:
ADB devices

2. Install the application:
adb install-r 123.apk

3. Get the files in the emulator:
adb pull <remote> <local>

4. Write the file to the emulator:
adb push <local> <remote>

5. Enter the shell mode of the simulator:
adb Shell

6. Unloading APK Package:
adb shell
CD Data/app
RM 123.apk
Exit
ADB uninstall 123.apk
ADB install-r 123.apk

7. View the ADB command Help information:
adb Help
8. Remove the System application:
adb remount (once again mounts the system partition.) Make the system partition writable again).


ADB shell
CD System/app
RM 123.apk

9. Get Administrator privileges:
adb root

10, copy file:  
      copy a file or folder to device:  
       
adb push <source> <destination> </DESTINATION></SOURCE>&NBSP
      such as: ADB push update.zip/sdcard/ 
      Copy a file or folder from your device:  
      adb pull <source> <destination></destination></source>
 
     such as: adb pull/sdcard/update.zip .

11. Obtain a list of instances of the currently executing device and the status of each instance:
ADB devices

12. #CD System/sd/dataEnter the specified directory within the system
CD..Return to the previous level folder
CD.. /..Return to top level two folder
CDGo to your personal home folder
CD ~user1Go to your personal home folder
CD-Go back to the folder where you last


#LS //list displays the current directory contents
#Rm-r xxx //delete the directory with the name xxx and all the files inside it
#RM xxx //delete file xxx
#rmdir xxx //delete the directory of XXX

#mkdir-p xxx //Recursively create a directory of XXX
#CP [Options] [source file] [destination file ],-d copy a shortcut/-r copy a folder/-i to an existing file, asking whether to overwrite
#MV [options] [source file] [destination file ]. The-u target file does not take effect until it exists. Suppose the source file is newer than the target file/-i to an existing file, ask whether to overwrite;


#Cat often uses commands to view the contents of a file and display it on the screen.


More is also used to view the contents of a file. When the contents of the file too much, a screen can not occupy, use more when a screen after reading press the space bar to continue to see the next screen. When you look at the full content, you exit. If you want to quit early, just press the Q key.
Less has the same effect as more. But better than more to be able to flip. Turn it down.

The SPACEBAR is the same as to turn the page, while pressing the "J" Key to move down (click to move down one line), press the "K" key to move up. When you use more and less to view a file. You can click the "/" button. Then enter a word carriage return. This will allow you to find the word. Suppose that multiple of the word can press the "N" key to display the next. Also you can not press "/" but press "?" Follow the same word to search for this word. The only difference is. "/" is searched down the current line. and "?

"is to search up the current line

Android--------------Several adb frequently use 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.