基于Android4.0.3的各种工具信息整理(共130个)

昨日下午,老大交给一个任务,就是对android编译出来的build/host/linux-x86/bin下面的各种可执行程序进行一个了解

于是我就花了一天的时间来搜集信息,大致有两个文件

一个是比较常用的,一个是比较齐全的,当然有部分没找到(例如test_开头的部分,大部分都是从源码里面弄出来的),也没有对其进行了解

所以有错误请谅解,由于CSDN界面比较小,可能会出现显示不全的问题,如果看不全的可以直接下载文件,文件更全

如果发现错误以及知道部分没有填写的请留言,以便我更新,谢谢

转载请指明出处:草帽的后花园

文件1:下载

Android Tools详解

aapt

aapt即Android Asset Packaging Tool , 在SDK的platform-tools目录下. 该工具可以查看, 创建, 更新ZIP格式的文档附件(zip, jar, apk). 也可将资源文件编译成二进制文件.尽管你可能没有直接使用过aapt工具, 但是build scripts和IDE插件会使用这个工具打包apk文件构成一个Android 应用程序.

  aapt工具也支持很多子命令。

  aapt l[ist]:列出资源压缩包里的内容。

  aapt d[ump]:查看APK包内指定的内容。

  aapt p[ackage]:打包生成资源压缩包。

  aapt r[emove]:从压缩包中删除指定文件。

  aapt a[dd]:向压缩包中添加指定文件。

  aapt v[ersion]:打印aapt的版本。

acp

acp Android提供的CP檔案複製工具.

Android 也提供自己的檔案複製工具acp, 在此僅附上Source Code build/tools/acp 前面的說明,供參考

The GNU/Linux "cp" uses O_LARGEFILE in its open() calls, utimes() instead of utime(), and getxattr()/setxattr() instead of chmod().  These are probably "better", but are non-portable, and not necessary for our

purposes.

adb

 adb的全称为Android Debug Bridge,就是起到调试桥的作用。通过adb我们可以在Eclipse中方便通过DDMS来调试Android程序,说白了就是debug工具。adb的工作方式比较特殊,采用监听Socket TCP 5554等端口的方式让IDE和Qemu通讯,默认情况下adb会daemon相关的网络端口,所以当我们运行Eclipse时adb进程就会自动运行。

  adb是android sdk里的一个工具, 用这个工具可以直接操作管理android模拟器或者真实的andriod设备(如G1手机). 它的主要功能有:

  * 运行设备的shell(命令行)

  * 管理模拟器或设备的端口映射

  * 计算机和设备之间上传/下载文件

  * 将本地apk软件安装至模拟器或android设备

  ADB是一个 客户端-服务器端 程序, 其中客户端是你用来操作的电脑, 服务器端是android设备.

ADB常用的几个命令

  1. 查看设备 * adb devices

  这个命令是查看当前连接的设备, 连接到计算机的android设备或者模拟器将会列出显示

  2. 安装软件

  * adb install <apk文件路径>

  这个命令将指定的apk文件安装到设备上

  3. 卸载软件

  * adb uninstall <软件名>

  * adb uninstall -k <软件名>

  如果加 -k 参数,为卸载软件但是保留配置和缓存文件.

  4. 登录设备shell

  * adb shell

  * adb shell <command命令>

  这个命令将登录设备的shell.

  后面加<command命令>将是直接运行设备命令, 相当于执行远程命令

  5. 从电脑上发送文件到设备

  * adb push <本地路径> <远程路径>

  用push命令可以把本机电脑上的文件或者文件夹复制到设备(手机)

  6. 从设备上下载文件到电脑

  * adb pull <远程路径> <本地路径>

  用pull命令可以把设备(手机)上的文件或者文件夹复制到本机电脑

  7. 显示帮助信息

  * adb help

  这个命令将显示帮助信息

  删除Android系统Rom自带的软件

  Android系统没有卸载Rom自带软件的功能.可能有些同学很想删除废了武功的Youtube,想删除墙那边的Twitter.

  加上Android的快捷方式没法修改没法自己排序没法分页.

  安装的程序太多就会发现原来找到自己想要的东西很难.

  综上所述,我觉得告知各位菜鸟同学如何删除自带的程序是很有必要的一件事情.

  1.确定手机root了,取得了root权限才能删除系统文件呀.

  2.下载Android_db.rar,解压到%windir/%System32下.

  3.手机连接数据线,在电脑上打开cmd,然后输入命令

  adb remount

  adb shell

  su

  执行完成之后,你会看到:

  * daemon not running. starting it now *

  * daemon started successfully *

  4.接着就是Linux命令行模式了,输入

  cd system/app

  你会发现没啥变化,然后输入ls回车.

  这时候列表显示了system/app里面的所有文件,也就是Rom集成的一些软件了.

  5.开始删除吧.比如删除Youtube,他的文件名是Youtube.odex和Youtube.apk

  我们要删除这2个文件,敲入以下命令:

  adb shell rm -f system/app/Youtube.odex

  adb shell rm -f system/app/Youtube.apk

aidl

AIDL:Android Interface Definition Language,即Android接口描述语言。

  Android系统中的进程之间不能共享内存,因此,需要提供一些机制在不同进程之间进行数据通信。

为了使其他的应用程序也可以访问本应用程序提供的服务,Android系统采用了远程过程调用(Remote Procedure Call,RPC)方式来实现。与很多其他的基于RPC的解决方案一样,Android使用一种接口定义语言(Interface Definition Language,IDL)来公开服务的接口。我们知道4个Android应用程序组件中的3个(Activity、Broadcast和Content Provider)都可以进行跨进程访问,另外一个Android应用程序组件Service同样可以。因此,可以将这种可以跨进程访问的服务称为AIDL(Android Interface Definition Language)服务。

建立AIDL服务要比建立普通的服务复杂一些,具体步骤如下:

  (1)在Eclipse Android工程的Java包目录中建立一个扩展名为aidl的文件。该文件的语法类似于Java代码,但会稍有不同。详细介绍见实例的内容。

  (2)如果aidl文件的内容是正确的,ADT会自动生成一个Java接口文件(*.java)。

  (3)建立一个服务类(Service的子类)。

  (4)实现由aidl文件生成的Java接口。

  (5)在AndroidManifest.xml文件中配置AIDL服务,尤其要注意的是,<action>标签中android:name的属性值就是客户端要引用该服务的ID,也就是Intent类的参数值。

android

android增量升级工具

http://web.mit.edu/zac/MacData/afs/sipb/project/android/docs/tools/help/android.html

android is an important development tool that lets you:

·         Create, delete, and view Android Virtual Devices (AVDs). See Managing AVDs from the Command Line.

·         Create and update Android projects. See Managing Projects from the Command Line.

·         Update your Android SDK with new platforms, add-ons, and documentation. See Exploring the SDK.

If you are using Eclipse, the android tool's features are integrated into ADT, so you should not need to use this tool directly.

Note: The documentation of options below is not exhaustive and may be out of date. For the most current list of options, execute android --help.

Syntax


android [global options] action [action options]

Global Options

-s

Silent mode: only errors are printed out

-h

Usage help

-v

Verbose mode: errors, warnings and informational messages are printed.

AVD actions and options

Action

Option

Description

Comments

avd

None

Launch the AVD Manager

sdk

None

Launch the Android SDK Manager

create avd

-n <name>

The name for the AVD.

Required

-t <targetID>

Target ID of the system image to use with the new AVD. To obtain a list of available targets, useandroid list targets

Required

-c <path>|<size>[K|M]

The path to the SD card image to use with this AVD or the size of a new SD card image to create for this AVD. For example, -c path/to/sdcardor -c 1000M.

-f

Force creation of the AVD

-p <path>

Path to the location at which to create the directory for this AVD's files.

-s <name>|<width>-<height>

The skin to use for this AVD, identified by name or dimensions. The android tool scans for a matching skin by name or dimension in theskins/ directory of the target referenced in the -t <targetID> argument. For example, -s HVGA-L

delete avd

-n <name>

The name of the AVD to delete

Required

move avd

-n <name>

The name of the AVD to move

Required

-p <path>

Path to the location at which to create the directory for this AVD's files.

-r <new-name>

New name of the AVD if you want to rename it

update avd

-n <name>

The name of the AVD to move

Required

Project actions and options

Action

Option

Description

Comments

create project

-n <name>

The name for the project

Required

-t <targetID>

Target ID of the system image to use with the new AVD. To obtain a list of available targets, useandroid list targets

Required

-k <path>|<size>[K|M]

Package namespace

Required

-a

Name for the default Activity class

Required

-p <path>

Location of your project directory

Required

update project

-n <name>

The name of the project to update

-p <path>

Location path of the project

Required

-l <library path>

Location path of an Android Library to add, relative to the main project

-s <subprojects>

Update any projects in subfolders such as test projects

-t <targetID>

Target id to set for the project

create-test-project

-n <name>

The name of the project

-p <path>

Location path of the project

Required

-m <main>

The name of the project

Required

update-test-project

-p <path>

Location path of the project to test, relative to the new project

Required

-m <main>

The main class of the project to test

Required

create-lib-project

-k <packageName>

(Required) Package name of the library project

Required

-p <path>

Location path of the project

Required

-t <targetID>

Target ID of the library project

Required

-n <name>

The name of the project

Required

update-lib-project

-p <path>

Location path of the project

Required

-l <libraryPath>

Location path of an Android Library to add, relative to the main project

-t <name>

Target ID of the library project

Update actions

update adb

Updates adb to support the USB devices declared in the SDK add-ons.

update sdk

Updates the SDK by suggesting new platforms to install if available.

apicheck

Apicheck的本质是比较当前生成的api.xml(和frameworks/api/下面的文件相同)。 其执行的命令如下:

out/host/linux-x86/bin/apicheck -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 frameworks/base/api/8.xml out/target/common/obj/PACKAGING/public_api.xml || ( cat build/core/apicheck_msg_last.txt ; exit 38 )

out/host/linux-x86/bin/apicheck -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 -error 25 frameworks/base/api/current.xml out/target/common/obj/PACKAGING/public_api.xml || ( cat build/core/apicheck_msg_current.txt ; exit 38 )

即 本次编译生成的out/target/common/obj/PACKAGING/public_api.xml与(视为正确的)frameworks /base/api/8.xml和(视为正确的)frameworks/base/api/current.xml进行比较。

apkcheck

/***

 * Checks an APK's dependencies against the published API specification.

 *

 * We need to read two XML files (spec and APK) and perform some operations

 * on the elements.  The file formats are similar but not identical, so

 * we distill it down to common elements.

 *

 * We may also want to read some additional API lists representing

 * libraries that would be included with a "uses-library" directive.

 *

 * For performance we want to allow processing of multiple APKs so

 * we don't have to re-parse the spec file each time.

 */

aprotoc

Usage: ./aprotoc [OPTION] PROTO_FILES

Parse PROTO_FILES and generate output based on the options given:

  -IPATH, --proto_path=PATH   Specify the directory in which to search for

                              imports.  May be specified multiple times;

                              directories will be searched in order.  If not

                              given, the current working directory is used.

  --version                   Show version info and exit.

  -h, --help                  Show this text and exit.

  --encode=MESSAGE_TYPE       Read a text-format message of the given type

                              from standard input and write it in binary

                              to standard output.  The message type must

                              be defined in PROTO_FILES or their imports.

  --decode=MESSAGE_TYPE       Read a binary message of the given type from

                              standard input and write it in text format

                              to standard output.  The message type must

                              be defined in PROTO_FILES or their imports.

  --decode_raw                Read an arbitrary protocol message from

                              standard input and write the raw tag/value

                              pairs in text format to standard output.  No

                              PROTO_FILES should be given when using this

                              flag.

  -oFILE,                     Writes a FileDescriptorSet (a protocol buffer,

    --descriptor_set_out=FILE defined in descriptor.proto) containing all of

                              the input files to FILE.

  --include_imports           When using --descriptor_set_out, also include

                              all dependencies of the input files in the

                              set, so that the set is self-contained.

  --error_format=FORMAT       Set the format in which to print errors.

                              FORMAT may be 'gcc' (the default) or 'msvs'

                              (Microsoft Visual Studio format).

  --plugin=EXECUTABLE         Specifies a plugin executable to use.

                              Normally, protoc searches the PATH for

                              plugins, but you may specify additional

                              executables not in the path using this flag.

                              Additionally, EXECUTABLE may be of the form

                              NAME=PATH, in which case the given plugin name

                              is mapped to the given executable even if

                              the executable's own name differs.

  --cpp_out=OUT_DIR           Generate C++ header and source.

  --java_out=OUT_DIR          Generate Java source file.

  --javamicro_out=OUT_DIR     Generate Java source file micro runtime.

  --python_out=OUT_DIR        Generate Python source file.

atree

./atree: At least one -f option must be supplied.

 

Usage: atree OPTIONS

 

Options:

  -f FILELIST    Specify one or more files containing the

                 list of files to copy.

  -I INPUTDIR    Specify one or more base directories in

                 which to look for the files

  -o OUTPUTDIR   Specify the directory to copy all of the

                 output files to.

  -l             Use hard links instead of copying the files.

  -m DEPENDENCY  Output a make-formatted file containing the list.

                 of files included.  It sets the variable ATREE_FILES.

  -v VAR=VAL     Replaces ${VAR} by VAL when reading input files.

  -d             Verbose debug mode.

 

FILELIST file format:

  The FILELIST files contain the list of files that will end up

  in the final OUTPUTDIR.  Atree will look for files in the INPUTDIR

  directories in the order they are specified.

 

  In a FILELIST file, comment lines start with a #.  Other lines

  are of the format:

 

    [rm|strip] DEST

    SRC [strip] DEST

    -SRCPATTERN

 

  DEST should be path relative to the output directory.

  'rm DEST' removes the destination file and fails if it's missing.

  'strip DEST' strips the binary destination file.

  If SRC is supplied, the file names can be different.

  SRCPATTERN is a pattern for the filenames.

bb2sym

./sdk/emulator/qtools/bb2sym.cpp

./bb2sym: invalid option -- 'h'

Usage: ./bb2sym [options] trace_file elf_file

  -e :kernel exclude all kernel symbols

  -e :libs   exclude all library symbols

  -e <func>  exclude function <func>

  -e <pid>   exclude process <pid>

  -i :kernel include all kernel symbols

  -i :libs   include all library symbols

  -i <func>  include function <func>

  -i <pid>   include process <pid>

  -l :kernel lump all the kernel symbols together

  -l :libs   lump all the library symbols together

  -m         do not demangle C++ symbols (m for 'mangle')

  -r <root>  use <root> as the path for finding ELF executables

bb_dump

./sdk/emulator/qtools/bb_dump.cpp

./bb_dump: invalid option -- 'h'

Usage: ./bb_dump [options] trace_file elf_file

  -e :kernel exclude all kernel symbols

  -e :libs   exclude all library symbols

  -e <func>  exclude function <func>

  -e <pid>   exclude process <pid>

  -i :kernel include all kernel symbols

  -i :libs   include all library symbols

  -i <func>  include function <func>

  -i <pid>   include process <pid>

  -l :kernel lump all the kernel symbols together

  -l :libs   lump all the library symbols together

  -m         do not demangle C++ symbols (m for 'mangle')

  -r <root>  use <root> as the path for finding ELF executables

bbprof

./sdk/emulator/qtools/bbprof.cpp

bison

Bison是一种通用目的的分析器生成器。它将LALR(1)上下文无关文法的描述转化成分析该文法的C程序。 一旦你精通Bison,你可以用它生成从简单的桌面计算器到复杂的程序设计语言等等许多语言的分析器。

  Bison向上兼容Yacc;所有书写正确的Yacc语法都应该可以不加更改地与Bison一起工作, 熟悉Yacc的人能毫不费力地使用Bison。

bsdiff

bsdiff是二进制差分工具

/**-

 * Copyright 2003,2004 Colin Percival

 * All rights reserved

 *

 * Redistribution and use in source and binary forms, with or without

 * modification, are permitted providing that the following conditions

 * are met:

 * 1. Redistributions of source code must retain the above copyright

 *    notice, this list of conditions and the following disclaimer.

 * 2. Redistributions in binary form must reproduce the above copyright

 *    notice, this list of conditions and the following disclaimer in the

 *    documentation and/or other materials provided with the distribution.

 *

 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR

 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED

 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY

 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS

 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)

 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,

 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING

 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

 * POSSIBILITY OF SUCH DAMAGE.

 *

 * Changelog:

 * 2005-04-26 - Define the header as a C structure, add a CRC32 checksum to

 *              the header, and make all the types 32-bit.

 *                --Benjamin Smedberg <benjamin@smedbergs.us>

 * 2009-03-31 - Change to use Streams.  Move CRC code to crc.{h,cc}

 *              Changed status to an enum, removed unused status codes.

 *                --Stephen Adams <sra@chromium.org>

 */

bspatch

bspatch是补丁合成工具

cfassembler

 

check_stack

Usage: ./check_stack [options] trace_name elf_file

  -e :kernel exclude all kernel symbols

  -e :libs   exclude all library symbols

  -e <func>  exclude function <func>

  -e <pid>   exclude process <pid>

  -i :kernel include all kernel symbols

  -i :libs   include all library symbols

  -i <func>  include function <func>

  -i <pid>   include process <pid>

  -l :kernel lump all the kernel symbols together

  -l :libs   lump all the library symbols together

  -m         do not demangle C++ symbols (m for 'mangle')

  -r <root>  use <root> as the path for finding ELF executables

check_trace

Usage: ./check_trace [options] trace_file elf_file

  -e :kernel exclude all kernel symbols

  -e :libs   exclude all library symbols

  -e <func>  exclude function <func>

  -e <pid>   exclude process <pid>

  -i :kernel include all kernel symbols

  -i :libs   include all library symbols

  -i <func>  include function <func>

  -i <pid>   include process <pid>

  -l :kernel lump all the kernel symbols together

  -l :libs   lump all the library symbols together

  -m         do not demangle C++ symbols (m for 'mangle')

  -r <root>  use <root> as the path for finding ELF executables

clang

clang是苹果公司开发的C语言C++、Objective C、Objective C++语言的轻量级编译器源代码发布于BSD协议下。

OVERVIEW: clang "gcc-compatible" driver

 

USAGE: clang [options] <inputs>

 

OPTIONS:

  -###                    Print the commands to run for this compilation

  --analyze               Run the static analyzer

  --help                  Display available options

  --relocatable-pch       Build a relocatable precompiled header

  -E                      Only run the preprocessor

  -ObjC++                 Treat source input files as Objective-C++ inputs

  -ObjC                   Treat source input files as Objective-C inputs

  -Qunused-arguments      Don't emit warning for unused driver arguments

  -S                      Only run preprocess and compilation steps

  -Wa,<arg>               Pass the comma separated arguments in <arg> to the assembler

  -Wl,<arg>               Pass the comma separated arguments in <arg> to the linker

  -Wp,<arg>               Pass the comma separated arguments in <arg> to the preprocessor

  -Xanalyzer <arg>        Pass <arg> to the static analyzer

  -Xassembler <arg>       Pass <arg> to the assembler

  -Xclang <arg>           Pass <arg> to the clang compiler

  -Xlinker <arg>          Pass <arg> to the linker

  -Xpreprocessor <arg>    Pass <arg> to the preprocessor

  -arcmt-migrate-emit-errors

                          Emit ARC errors even if the migrator can fix them

  -arcmt-migrate-report-output <value>

                          Output path for the plist report

  -c                      Only run preprocess, compile, and assemble steps

  -emit-ast               Emit Clang AST files for source inputs

  -emit-llvm              Use the LLVM representation for assembler and object files

  -fcatch-undefined-behavior

                          Generate runtime checks for undefined behavior.

  -flimit-debug-info      Limit debug information produced to reduce size of debug binary

  -ftrap-function=<value> Issue call to specified function rather than a trap instruction

  -o <file>               Write output to <file>

  -pipe                   Use pipes between commands, when possible

  -print-file-name=<file> Print the full library path of <file>

  -print-libgcc-file-name Print the library path for "libgcc.a"

  -print-prog-name=<name> Print the full program path of <name>

  -print-search-dirs      Print the paths used for finding libraries and programs

  -rewrite-objc           Rewrite Objective-C source to C++

  -save-temps             Save intermediate compilation results

  -time                   Time individual commands

  -verify                 Verify output using a verifier.

  -v                      Show commands to run and use verbose output

  -working-directory <value>

                          Resolve file paths relative to the specified directory

  -x <language>           Treat subsequent input files as having type <language>

clang-tblgen

USAGE: clang-tblgen [options] <input file>

 

OPTIONS:

  -I=<directory>                     - Directory of include files

  -d=<filename>                      - Dependency filename

  Action to perform:

    -gen-opt-parser-defs             - Generate option definitions

    -gen-opt-parser-impl             - Generate option parser implementation

    -gen-clang-attr-classes          - Generate clang attribute clases

    -gen-clang-attr-impl             - Generate clang attribute implementations

    -gen-clang-attr-list             - Generate a clang attribute list

    -gen-clang-attr-pch-read         - Generate clang PCH attribute reader

    -gen-clang-attr-pch-write        - Generate clang PCH attribute writer

    -gen-clang-attr-spelling-list    - Generate a clang attribute spelling list

    -gen-clang-attr-late-parsed-list - Generate a clang attribute LateParsed list

    -gen-clang-diags-defs            - Generate Clang diagnostics definitions

    -gen-clang-diag-groups           - Generate Clang diagnostic groups

    -gen-clang-diags-index-name      - Generate Clang diagnostic name index

    -gen-clang-decl-nodes            - Generate Clang AST declaration nodes

    -gen-clang-stmt-nodes            - Generate Clang AST statement nodes

    -gen-clang-sa-checkers           - Generate Clang Static Analyzer checkers

    -gen-arm-neon                    - Generate arm_neon.h for clang

    -gen-arm-neon-sema               - Generate ARM NEON sema support for clang

    -gen-arm-neon-test               - Generate ARM NEON tests for clang

  -help                              - Display available options (-help-hidden for more)

  -o=<filename>                      - Output filename

  -version                           - Display the version of this program

cmu2nuance

//

// This converts the data found at http://www.speech.cs.cmu.edu/cgi-bin/cmudict

// into the *.ok format used by Nuance.

// We use the file c0.6, which corresponds to (v. 0.6).

//

// to run: make cmu2nuance && ./cmu2nuance <c0.6 >c0.6.ok

//

// TODO: look at generation of 'L', ')', and ','

//

coverage

// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-store=region -analyzer-max-loop 4 -verify %s

./external/clang/test/Analysis/coverage.c

./sdk/emulator/qtools/coverage.cpp

Usage: ./coverage [options] trace_file elf_file

  -e :kernel exclude all kernel symbols

  -e :libs   exclude all library symbols

  -e <func>  exclude function <func>

  -e <pid>   exclude process <pid>

  -i :kernel include all kernel symbols

  -i :libs   include all library symbols

  -i <func>  include function <func>

  -i <pid>   include process <pid>

  -l :kernel lump all the kernel symbols together

  -l :libs   lump all the library symbols together

  -m         do not demangle C++ symbols (m for 'mangle')

  -r <root>  use <root> as the path for finding ELF executables

dalvik

Dalvik是Google公司自己设计用于Android平台的Java虚拟机。Dalvik虚拟机是Google等厂商合作开发的Android移动设备平台的核心组成部分之一。它可以支持已转换为 .dex(即Dalvik Executable)格式的Java应用程序的运行,.dex格式是专为Dalvik设计的一种压缩格式,适合内存和处理器速度有限的系统。Dalvik 经过优化,允许在有限的内存中同时运行多个虚拟机的实例,并且每一个Dalvik 应用作为一个独立的Linux 进程执行。独立的进程可以防止在虚拟机崩溃的时候所有程序都被关闭。

dalvik/vm/dalvik

dalvikvm

/*

 * Command-line invocation of the Dalvik VM.

 */

dalvik/dalvikvm/Main.cpp

Android启动时,DalvikVM监视所有的程序(APK文件)和框架,并且为他们创建一个依存关系树。DalvikVM通过这个依存关系树来为每个程序优化代码并存储在Dalvik缓存中。这样,所有程序在运行时都会使用优化过的代码。这就是当你刷一个新的ROM时,有时候第一次启动时间非常非常长的原因。当一个程序(或者框架库)发生变更,DalvikVM将会重新优化代码并且再次将其存在缓存中。在cache/dalvik-cache是存放system上的程序生成的dex文件,而data/dalvik-cache则是存放data/app生成的dex文件。

dasm

/**

 * This class represents the public API for Dasm. It has two main methods (readD

 * and write) and few utility methods. To compile .d file: -create DAsm instance

 * -call readD() to read and parse content of .d file -call write() to write out

 * binary representation of .d file. .d file can contain several classes and/or

 * intefaces declarations.

 */

ddms

 DDMS 的全称是Dalvik Debug Monitor Service,是 Android 开发环境中的Dalvik虚拟机调试监控服务。它为我们提供例如:为测试设备截屏,针对特定的进程查看正在运行的线程以及堆信息、Logcat、广播状态信息、模拟电话呼叫、接收SMS、虚拟地理坐标等等。

  DDMS将搭建起IDE与测试终端(Emulator或者connected device)的链接,他们应用各自独立的端口监听调试信息,DDMS可以实时监测到测试终端的连接情况.当有新的测试终端连接后,DDMS将捕捉到终端的ID,并通过adb建立调试器,从而实现发送指令到测试终端的目的;

  DDMS监听第一个终端APP进程的端口为8600,App进程将分配8601,如果有更多的终端或者更多App进程将按照这个顺序依次类推.DDMS通过8700端口接收所有终端的指令.

dexdeps

dexdeps -- DEX external dependency dump

This tool dumps a list of fields and methods that a DEX file uses but does

not define.  When combined with a list of public APIs, it can be used to

determine whether an APK is accessing fields and calling methods that it

shouldn't be.  It may also be useful in determining whether an application

requires a certain minimum API level to execute.

Basic usage:

  dexdeps [options] <file.{dex,apk,jar}> ...

For zip archives (including .jar and .apk), dexdeps will look for a

"classes.dex" entry.

Supported options are:

  --format={brief,xml}

    Specifies the output format.

    "brief" produces one line of output for each field and method.  Field

    and argument types are shown as descriptor strings.

    "xml" produces a larger output file, readable with an XML browser.  Types

    are shown in a more human-readable form (e.g. "[I" becomes "int[]").

  --just-classes

    Indicates that output should only include a list of classes, as

    opposed to also listing fields and methods.

dexdump

/*

* The "dexdump" tool is intended to mimic "objdump".  When possible, use

* similar command-line arguments.

*

* TODO: rework the "plain" output format to be more regexp-friendly

* Differences between XML output and the "current.xml" file:

* - classes in same package are not all grouped together; generally speaking

*   nothing is sorted

* - no "deprecated" on fields and methods

* - no "value" on fields

* - no parameter names

* - no generic signatures on parameters, e.g. type="java.lang.Class&lt;?&gt;"

* - class shows declared fields and methods; does not show inherited fields

*/

dalvik/dexdump/DexDump.cpp

dexlist

/* List all methods in all concrete classes in one or more DEX files.*/

dalvik/dexlist/DexList.cpp

dexopt

/*

* Command-line DEX optimization and verification entry point.

*

* There are three ways to launch this:

* (1) From the VM.  This takes a dozen args, one of which is a file

*     descriptor that acts as both input and output.  This allows us to

*     remain ignorant of where the DEX data originally came from.

* (2) From installd or another native application.  Pass in a file

*     descriptor for a zip file, a file descriptor for the output, and

*     a filename for debug messages.  Many assumptions are made about

*     what's going on (verification + optimization are enabled, boot

*     class path is in BOOTCLASSPATH, etc).

* (3) On the host during a build for preoptimization. This behaves

*     almost the same as (2), except it takes file names instead of

*     file descriptors.

*

* There are some fragile aspects around bootclasspath entries, owing

* largely to the VM's history of working on whenever it thought it needed

* instead of strictly doing what it was told.  If optimizing bootclasspath

* entries, always do them in the order in which they appear in the path.

*/

dictTest

external-srec/tools/dictTest/dictTest.c

dmtracedump

http://web.mit.edu/zac/MacData/afs/sipb/project/android/docs/tools/help/dmtracedump.html

dmtracedump is a tool that gives you an alternate way of generating graphical call-stack diagrams from trace log files (instead of using Traceview).

This document is a reference to the available command line options. For more information on generating trace logs, seeProfiling with Traceview and dmtracedump.

The usage for dmtracedump is:

dmtracedump [-ho] [-s sortable] [-d trace-base-name] [-g outfile] <trace-base-name>

The tool then loads trace log data from <trace-base-name>.data and <trace-base-name>.key. The table below lists the options for dmtracedump.

Option

Description

-d <trace-base-name>

Diff with this trace name

-g <outfile>

Generate output to <outfile>

-h

Turn on HTML output

-o

Dump the trace file instead of profiling

-d <trace-base-name>

URL base to the location of the sortable javascript file

-t <percent>

Minimum threshold for including child nodes in the graph (child's inclusive time as a percentage of parent inclusive time). If this option is not used, the default threshold is 20%.

使用细节:

http://www.kuqin.com/mobile/20110828/264079.html

draw9patch

http://web.mit.edu/zac/MacData/afs/sipb/project/android/docs/tools/help/draw9patch.html

The Draw 9-patch tool allows you to easily create a NinePatch graphic using a WYSIWYG editor.

For an introduction to Nine-patch graphics and how they work, please read the section about Nine-patch in the 2D Graphics document.

Here's a quick guide to create a Nine-patch graphic using the Draw 9-patch tool. You'll need the PNG image with which you'd like to create a NinePatch.

1.       From a terminal, launch the draw9patch application from your SDK /tools directory.

2.       Drag your PNG image into the Draw 9-patch window (or File >Open 9-patch... to locate the file). Your workspace will now open.

The left pane is your drawing area, in which you can edit the lines for the stretchable patches and content area. The right pane is the preview area, where you can preview your graphic when stretched.

3.       Click within the 1-pixel perimeter to draw the lines that define the stretchable patches and (optional) content area. Right-click (or hold Shift and click, on Mac) to erase previously drawn lines.

4.       When done, select File > Save 9-patch...

Your image will be saved with the .9.png file name.

Note: A normal PNG file (*.png) will be loaded with an empty one-pixel border added around the image, in which you can draw the stretchable patches and content area. A previously saved 9-patch file (*.9.png) will be loaded as-is, with no drawing area added, because it already exists.


Optional controls include:

·         Zoom: Adjust the zoom level of the graphic in the drawing area.

·         Patch scale: Adjust the scale of the images in the preview area.

·         Show lock: Visualize the non-drawable area of the graphic on mouse-over.

·         Show patches: Preview the stretchable patches in the drawing area (pink is a stretchable patch).

·         Show content: Highlight the content area in the preview images (purple is the area in which content is allowed).

·         Show bad patches: Adds a red border around patch areas that may produce artifacts in the graphic when stretched. Visual coherence of your stretched image will be maintained if you eliminate all bad patches.

在另一份文档中有比较详细的说明

使用细节:http://blog.sina.com.cn/s/blog_7501670601010mfl.html

dumpeventlog

# Set up prog to be the path of this script, including following symlinks,
# and set up progdir to be the fully-qualified pathname of its directory.

sdk/dumpeventlog/etc/dumpeventlog

dump_regions

sdk/emulator/qtools/dump_regions.cpp

dx

http://blog.csdn.net/electricity/article/details/6543676

dx是将javaclasses文件编译为字节码dex文件 


dx --dex --output=<
要生成的classes.dex路径> <要处理的类文件的路径>

dx --dex --output=D:/HelloWorld/bin/classes.dex D:/HelloWorld/bin

dx-tests

cts/tools/dx-tests/dx-tests.html

edify

刷机脚本http://productbbs.it168.com/thread-511466-1-1.html

Edify语法简介(Updater-Script) 
这是Android系统来运行updater-scriptsEdify语言的基本介绍(常说的刷机脚本)。
大部分的Edify命名都是函数,当调用这些函数结束的时候,会返回数据给脚本。当然,你也可以使用这些函数的返值来确认成功与否,例如:
ifelse(mount("yaffs2", "MTD", "system", "/system") == "system", ui_print("Successfully Mounted!"), ui_print("Mount Failed!");
这个命令会尝试去挂载命名为“system”的“MTD”分区到“/system”。如果挂载成功,脚本会显示“Successfully Mounted!”,否则会显示“Mount Failed!”。
现面是用在EdifyUpdater-script中的函数例子:
1
:函数名称: mount
   
函数语法: mount(fs_type, partition_type, location, mount_point)
   
参数详解: fs_type-----------------"yaffs2" "ext4"
   partition_type----------"MTD"
"EMMC"
   location-----------------
分区(partition)驱动器(device)

  • 1
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值