2016年6月4日土曜日

adb (Android Debug Bridge version 1.0.32)

Android Debug Bridge version 1.0.32
-a
directs adb to listen on all interfaces for a connection
接続のためのすべてのインタフェースで待機するよう、ADBに指示
-d
directs command to the only connected USB device. returns an error if more than one USB device is present.
USBデバイス接続のみ、コマンド指示。複数のUSBデバイスが存在する場合はエラーを返す。
-e
directs command to the only running emulator. returns an error if more than one emulator is running.
実行中のエミュレータのみ、コマンド指示。複数のエミュレータが動作している場合はエラーを返す。
-s <specific device>
directs command to the device or emulator with the given serial number or qualifier. Overrides ANDROID_SERIAL environment variable.
指定されたシリアル番号や修飾子を持つデバイスまたはエミュレータにコマンド指示。環境変数のANDROID_SERIALは無視。
-p <product name or path>
simple product name like 'sooner', or a relative/absolute path to a product out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT environment variable is used, which must be an absolute path.
'sooner'のようなシンプルなプロダクト名か、'out/target/product/sooner'のようなプロダクト出力ディレクトリへの相対的/絶対的パスを指定。
-p を使用しない場合は、絶対パスが入力された ANDROID_PRODUCT_OUT環境変数を使用する。

-H
Name of adb server host (default: localhost)
adbサーバーホストの名前(初期値:localhost)
-P
Port of adb server (default: 5037)
adbサーバーのポート(初期値:5037)
devices [-l]
list all connected devices ('-l' will also list device qualifiers)
接続されているすべての端末(スマホ)を一覧表示( '-l' … 端末の修飾子も表示)
connect <host>[:<port>]
connect to a device via TCP/IP Port 5555 is used by default if no port number is specified.
TCP / IP経由で端末(スマホ)に接続ポート番号が指定されていない場合、ポート5555は初期値で使用。
disconnect [<host>[:<port>]]
disconnect from a TCP/IP device. Port 5555 is used by default if no port number is specified. Using this command with no additional arguments will disconnect from all connected TCP/IP devices.
TCP / IPデバイスから切断。 ポート番号が指定されていない場合、ポート5555が初期値で使用。 追加の引数なしでこのコマンドを使用すると、接続されているすべてのTCP / IPデバイスから切断される。

device commands:
adb push [-p] <local> <remote>
copy file/dir to device
('-p' to display the transfer progress)
ファイルやディレクトリを、PCから端末(スマホ)にコピーする
('-p' … 転送の進行状況を表示)

adb pull [-p] [-a] <remote> [<local>]
copy file/dir from device
('-p' to display the transfer progress)
('-a' means copy timestamp and mode)
端末(スマホ)からPCへ、ファイルやディレクトリをコピーする
('-p' … 転送の進行状況を表示)
('-a' … コピー・タイムスタンプとモードを意味)

adb sync [ <directory> ]
copy host->device only if changed
(-l means list but don't copy)
ホスト -> 端末(スマホ)間のコピー時のみ、コピーする
('-l' … リスト表示を意味するがコピーはしない)

adb shell
run remote shell interactively
対話的にリモートシェルを実行する
adb shell <command>
run remote shell command
リモートシェルコマンドを実行する
adb emu <command>
run emulator console command
エミュレータコンソールコマンドを実行する
adb logcat [ <filter-spec> ]
View device log
デバイスログを表示する
adb forward --list
list all forward socket connections.
すべてのフォワードソケット接続をリスト表示
the format is a list of lines with the following format:
表示形式は、次の通り:
<serial> " " <local> " " <remote> "\n"
adb forward <local> <remote>
forward socket connections
フォワードソケット接続
forward specs are one of:
転送仕様は、次のいずれか:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb forward --no-rebind <local> <remote>
same as 'adb forward <local> <remote>' but fails if <local> is already forwarded
'adb forward <local> <remote>'と同じだが、<local>が既に転送されていると失敗する
adb forward --remove <local>
remove a specific forward socket connection
特定のフォワードソケット接続を削除
adb forward --remove-all
remove all forward socket connections
すべてのフォワードソケット接続を削除
adb reverse --list
list all reverse socket connections from device
端末(スマホ)からのすべての逆ソケット接続を一覧表示
adb reverse <remote> <local>
reverse socket connections
逆ソケット接続
reverse specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
adb reverse --norebind <remote> <local>
same as 'adb reverse <remote> <local>' but fails if <remote> is already reversed.
'adb reverse <remote> <local>'と同じだが、<remote>が既に逆転している場合は失敗する。
adb reverse --remove <remote>
remove a specific reversed socket connection
特定の逆ソケット接続を削除する
adb reverse --remove-all
remove all reversed socket connections from device
逆のソケット接続をすべての端末(スマホ)から削除する
adb jdwp
list PIDs of processes hosting a JDWP transport
JDWPトランスポートをホストするプロセスのPIDを一覧表示
adb install [-lrtsdg] <file>
push this package file to the device and install it
<file>で指定のアプリ(.apkファイル)を、PCから端末(スマホ)にコピーしてインストールする

(-l: forward lock application) 転送禁止アプリ
(-r: replace existing application) 既存のアプリを置き換え
(-t: allow test packages) テストパッケージを許可する
(-s: install application on sdcard) sdcardにアプリをインストール
(-d: allow version code downgrade) バージョンのダウングレードを許可
(-g: grant all runtime permissions) すべての実行時アクセス許可を付与する
adb install-multiple [-lrtsdpg] <file...>
push this package file to the device and install it
複数のアプリ(.apkファイル)を、PCから端末(スマホ)にコピーしてインストールする
(-l: forward lock application)
(-r: replace existing application)
(-t: allow test packages)
(-s: install application on sdcard)
(-d: allow version code downgrade)
(-p: partial application install)
(-g: grant all runtime permissions)
adb uninstall [-k] <package>
remove this app package from the device
('-k' means keep the data and cache directories)
指定のアプリを端末から削除する
('-k' … データディレクトリとキャッシュディレクトリは保持する)

adb bugreport
return all information from the device
that should be included in a bug report.
バグレポートに含めるべきすべての情報をデバイスから返します。
adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]
write an archive of the device's data to <file>. If no -f option is supplied then the data is written to "backup.ab" in the current directory.
端末内のデータをアーカイブで<file>に書き出す。-f オプションが指定されていない場合、データはカレントディレクトリの "backup.ab"に書き込まれる。
(-apk|-noapk enable/disable backup of the .apks themselves in the archive; the default is noapk.)
(-apk|-noapk … アーカイブ内の.apks自体のバックアップを有効または無効にする; 初期値:-noapk)
(-obb|-noobb enable/disable backup of any installed apk expansion (aka .obb) files associated with each application; the default is noobb.)
(-obb|-noobb … 各アプリに関連付けられたインストールされたapk拡張ファイル(別名.obb)のバックアップを有効または無効にする; 初期値:-noobb)
(-shared|-noshared enable/disable backup of the device's shared storage / SD card contents; the default is noshared.)
(-shared|-noshared … デバイスの共有ストレージ/ SDカードのコンテンツのバックアップを有効または無効にする; 初期値 -noshared)
(-all means to back up all installed applications)
(-all … インストールされている全てのアプリをバックアップ対象にする)
(-system|-nosystem toggles whether -all automatically includes system applications; the default is to include system apps)
(-system|-nosystem … -allを指定した場合、システム内のアプリを含ませるかどうか指定; 初期値 -system)
(<packages...> is the list of applications to be backed up. If the -all or -shared flags are passed, then the package list is optional. Applications explicitly given on the command line will be included even if -nosystem would ordinarily cause them to be omitted.)
(<packages...> … バックアップするアプリを複数指定。-all または -shared フラグが渡された場合、パッケージリストは任意。-nosystem で通常は省略されるアプリでも、<packages...>で指定すると含められる。)
adb restore <file>
restore device contents from the <file> backup archive
<file>で指定したバックアップアーカイブから端末(スマホ)の内容を復元する
adb disable-verity
disable dm-verity checking on USERDEBUG builds
USERDEBUGビルドでdm-verityチェックを無効にする
adb enable-verity
re-enable dm-verity checking on USERDEBUG builds
USERDEBUGビルドのdm-verityチェックを再度有効にする
adb keygen <file>
generate adb public/private key. The private key is stored in <file>, and the public key is stored in <file>.pub. Any existing files are overwritten.
adb用の公開鍵/秘密鍵を生成する。秘密鍵は<file>に格納され、公開鍵は<file>.pubに格納される。既存のファイルはすべて上書きされる。
adb help
show this help message
このヘルプメッセージを表示
adb version
show version num
バージョン番号を表示

networking:
adb ppp <tty> [parameters]
Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
USB経由でPPPを実行する。
注:PPP接続を自動的に開始すべきではない。
<tty> … PPPストリームのttyを指す。 例)dev:/dev/omap_csmi_tty1
[parameters] … 例)defaultroute debug dump local notty usepeerdns


adb sync notes:
adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
<localdir>はいくつかの方法で解釈できる:

If <directory> is not specified, /system, /vendor (if present), /oem (if present) and /data partitions will be updated.
If it is "system", "vendor", "oem" or "data", only the corresponding partition is updated.
<directory>が指定されていない場合、/system、(存在する場合、/vendor)、(存在する場合、/oem)および /data パーティションが更新される。
"system"、"vendor"、"oem"、"data"は、対応するパーティションのみが更新される。

environment variables:
ADB_TRACE
Print debug information. A comma separated list of the following values
デバッグ情報を出力。 カンマ区切りの次の値のリスト
1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
ANDROID_SERIAL
The serial number to connect to. -s takes priority over this if given.
接続先のシリアル番号。この指定より -s の方が優先される。
ANDROID_LOG_TAGS
When used with the logcat option, only these debug tags are printed.
logcatオプションとともに使用すると、これらのデバッグタグだけが出力される。