Ant Compile Package &wifi Debug & adb Shell common commands

Source: Internet
Author: User

Ant Compilation Package 1: Package with ADT Tool:
1:Switch to project directory: Run, Android update project-p. Android update project-p./--library. /com.example.plugin1.ifs 2: Refresh: Two more directories,
         3: local.properties Configuration:sdk.dir=e:\\samy\ADT-huixin_x86-20140321\\SDK
key.store=./keystore/****key.store.password=*****
Key.alias=***_app_key
key.alias.password=****
4: Package run: (1): Android update project-p. (if you have Lib library, you have to switch to the directory where each Lib is running Android update project-p. )Switch to the home directory again to run) (2): ant clean release; (Make sure Elipse is not automatically compiled)

2: Single ant use:

Ant basic Use mode :

1. Configure Environment Variables :

ant_home:c:\ant-1.8-----> Ant Installation/Decompression directory path

Append to Path: C:\ant-1.8\bin------The Bin directory path in >ant

2. Confirm that the environment variable configuration is successful

Open the cmd window and enter the command: Ant:

See the following display:


Because the ant build requires a default Build.xml file, it is a hint that the ant environment has been successfully configured.


wifi debug Command: (You must save your device and the developer's computer in the same network segment) adb tcpip 5555 adb connect 192.168.1.109:5555; (every day the linked device IP is dynamically allocated, so you have to go to the WiFi router every day to view the IP of the backend link device, so as to facilitate the link to view)
adb Shell common commands:
completely remove the built-in software:
Directly under the ADB directory: set, adb uninstall SO.CONTACTS.HUBSUCD SYSTEM/APPRM contactshub_qishang_1114.apk
EXITADB reboot "Phone Restart"
ADB remount;rootadb Start-server
adb install-r application. APK
adb pull <remote> <local>

11. Install the application:

ADB install-r application. apk

12. Get the files in the emulator:

ADB pull <remote> <local>

13. Write the file to the emulator:

ADB push <local> <remote>

16. Unloading APK Package:

ADB shell

CD Data/app

RM APK Package

Exit

The main package name of the ADB uninstall APK package

ADB install-r APK Package

17. View the ADB command Help information:

ADB Help

18. View the log information on the command line:

ADB logcat-s label Signature

The commands behind the ADB shell come mainly from:

SOURCE \system\core\toolbox directory and source code \FRAMEWORKS\BASE\CMDS directory.

20. Remove the System application:

ADB remount (re-mount the system partition so that the system partition is re-writable).

ADB shell

CD System/app

RM *.apk

21. Get Administrator Privileges:

ADB root

22. Start activity:

ADB shell am START-N package Name/package name + class name (-N class name,-a action,-d date,-m mime-type,-c category,-e Extended data, etc.).

23. Release Port:

You can set any port number as the request port for the host to the emulator or device. Such as:
ADB forward tcp:5555 tcp:8000

24. Copy files:

You can copy files to a device or from a device,
To copy a file or directory to a device or emulator:
ADB push <source> <destination></destination></source>
such as: adb push test.txt/tmp/test.txt
To copy a file or directory from a device or emulator:
ADB pull <source> <destination></destination></source>
such as: ADB pull/addroid/lib/libwebcore.so.

26. Check the bug report:
ADB bugreport
27. Record the wireless communication log:

Generally speaking, the wireless communication log is very many, at run time not necessary to record, but we can still through the command, set the record:
ADB shell
Logcat-b Radio

28. Get the ID and serial number of the device:

ADB get-product
ADB Get-serialno

29. Accessing the database SQLite3

ADB shell
Sqlite3

#cd system/sd/data//Enter the specified folder within the system
#ls//list displays the contents of the current folder
#rm-R xxx//delete the folder with the name xxx and all the files inside it
#rm XXX//delete file xxx
#rmdir xxx//delete xxx folder

Edit by Samy August 27, 2014 19:26:26



From for notes (Wiz)

Ant Compile Package &wifi Debug & adb Shell common commands

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.