Adb commands and androidadb commands in android

Source: Internet
Author: User

Adb commands and androidadb commands in android

AdbCommon commands

1. display all Android platforms in the system:

Android list targets

2. Display All AVD (simulators) in the system ):

Android list avd

3. Create an AVD (simulator ):

 Android create avd -- nameName-- TargetPlatform No.

4. Start the simulator:

Emulator-avdName-Sdcard ~ /Name. Img (-skin 1280x800)

5. Delete AVD (simulator ):

Android delete avd -- nameName

6. Create an SDCard:

 Mksdcard 1024 M ~ /Name. Img

7. AVD (simulator) Location:

Linux (~ /. Android/avd) Windows (C: \ Documents ents and Settings \ Administrator \. android \ avd)

8. Start DDMS:

Ddms

9. display all currently running simulators:

Adb devices

10. Run the following command on a simulator:

Abd-sSimulator numberCommand

11. Install the application:

Adb install-rApplications. Apk

12. Get the files in the simulator:

Adb pull <remote> <local>

13. Write a file to the simulator:

Adb push <local> <remote>

14. Enter the shell mode of the simulator:

Adb shell

15. Start the SDK, documentation, and instance Download Manager:

Android

16. Upload the apk package:

 Adb shell

Cd data/app

Rm apkPackage

 Exit

Adb uninstall apkMAIN package name

Adb install-r apkPackage

17. view the adb Command help information:

Adb help

18. view LOG information in the command line:

Adb logcat-sTag Name

19. The commands followed by the adb shell mainly come from:

Source code \ system \ core \ toolbox directory and source code \ frameworks \ base \ cmds directory.

20. delete system applications:

 Adb remount(Re-mount the system partition to make the system partition writable ).

Adb shell

Cd system/app

Rm *. apk

21. Get administrator permissions:

Adb root

22. Start Activity:

 Adb shell am start-nPackage name/Package name + class name (-NClass Name,-A action,-d date,-m MIME-TYPE,-c category,-eExtended Data,).

23. Release Port:

 You can set any port number as the request port from the host to the simulator or device. For example: 
Adb forward tcp: 5555tcp: 8000

24. copy a file:

You can copy files to or from a device,
Copy a file or directory to the device or simulator:
  Adb push <source> <destination> </source>
For example, adbpush test.txt/tmp/test.txt
Copy a file or directory from a device or simulator:
Adb pull <source> <destination> </source>
For example, adbpull/addroid/lib/libwebcore. so.

25. Search for simulator/device instances:

Obtain the list of running Simulators/devices and the status of each instance:
Adb devices

26. view the bug report:
Adb bugreport
27. Record wireless communication logs:

In general, there are a lot of wireless communication logs and there is no need to record them during operation, but we can still set the record through the command:
 Adb shell
Logcat-B radio

28. Obtain the device ID and serial number:

Adbget-product
Adb get-serialno

29. Access the database SQLite3

Adbshell
Sqlite3

# Cdsystem/sd/data // enter the specified folder in the system
# Ls // the contents of the current folder are displayed in the list
# Rm-r xxx // delete a folder named xxx and all its files
# Rm xxx // delete file xxx
# Rmdir xxx // Delete the xxx folder

Related Article

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.