[android]エミュレータ等のコマンドのオプションの覚書
さて、そろそろ開発を再開する。
そんな間に、Google IO でFroyoやWebM、さらにGoogleTVまで発表されたりして、なかなか楽しげな
未来を魅せてくれた。
なかなかそれらに取りかかれない、魅力的なんだけどなー
そういえば、申し込んでいたGoogle Storageが利用可能になったよ、長かった
そんなこんなで、androidの開発環境のアップデートとかも行った。
android 2.1用のSDKもなぜか更新が入ってたりして、そのせいかわからないけれど
DonutsなADBのeclipseからの起動・デバッグがうまくいかないことがよく起きるようになった。
(userdataのリセットも効かないし。。。)
それでエミュレータの再作成をしてみたので、その手順を書く。
ついでに環境の構築方法もまとめてみた。
できたよー
おまけ
[記録]
SDKのバージョンも上がって何か変わっているのかな?
今のバージョンのコマンドのオプションを置いておく。
>adb -help
Android Debug Bridge version 1.0.26
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s - directs command to the USB device or emulator with
the given serial number. Overrides ANDROID_SERIAL
environment variable.
-p - 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.
devices - list all connected devices
connect : - connect to a device via TCP/IP
disconnect : - disconnect from a TCP/IP device
device commands:
adb push - copy file/dir to device
adb pull [] - copy file/dir from device
adb sync [ ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell - run remote shell command
adb emu - run emulator console command
adb logcat [ ] - View device log
adb forward - forward socket connections
forward specs are one of:
tcp:
localabstract:
localreserved:
localfilesystem:
dev:
jdwp: (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] - push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
('-s' means install on SD card instead of internal storage)
adb uninstall [-k] - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints:
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recoveryprogram
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip - restarts the adbd daemon listening on TCP on the specified portnetworking:
adb ppp [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ ]
can be interpreted in several ways:
- If is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition
is updated.
そんな間に、Google IO でFroyoやWebM、さらにGoogleTVまで発表されたりして、なかなか楽しげな
未来を魅せてくれた。
なかなかそれらに取りかかれない、魅力的なんだけどなー
そういえば、申し込んでいたGoogle Storageが利用可能になったよ、長かった
そんなこんなで、androidの開発環境のアップデートとかも行った。
android 2.1用のSDKもなぜか更新が入ってたりして、そのせいかわからないけれど
DonutsなADBのeclipseからの起動・デバッグがうまくいかないことがよく起きるようになった。
(userdataのリセットも効かないし。。。)
それでエミュレータの再作成をしてみたので、その手順を書く。
ついでに環境の構築方法もまとめてみた。
- SDK Starter Packageのダウンロード(ここからC:\android-sdk-windowsに解凍)
- C:\android-sdk-windows\toolsにパスを通す
- SDK Setup.exeを起動して、更新されている分をとりあえず全部更新
- (なんとなくHT-03Aが手元にあるので)ここからHT-03Aのスキンを入手
- adv managerで展開したスキンを指定してadvを作成
できたよー
おまけ
[記録]
SDKのバージョンも上がって何か変わっているのかな?
今のバージョンのコマンドのオプションを置いておく。
- android
C:\Users\akira>android --help
Usage:
android [global options] action [action options]
Global options:
-v --verbose Verbose mode: errors, warnings and informational messages are pr
inted.
-h --help Help on a specific command.
-s --silent Silent mode: only errors are printed out.
Valid actions are composed of a verb and an optional direct object:
- list : Lists existing targets or virtual devices.
- list avd : Lists existing Android Virtual Devices.
- list target : Lists existing targets.
- create avd : Creates a new Android Virtual Device.
- move avd : Moves or renames an Android Virtual Device.
- delete avd : Deletes an Android Virtual Device.
- update avd : Updates an Android Virtual Device to match the folders of
a new SDK.
- create project : Creates a new Android Project.
- update project : Updates an Android Project (must have an AndroidManifest.
xml).
- create test-project: Creates a new Android Test Project.
- update test-project: Updates an Android Test Project (must have an AndroidMani
fest.xml).
- create lib-project : Creates a new Android Library Project.
- update lib-project : Updates an Android Library Project (must have an AndroidM
anifest.xml).
- update adb : Updates adb to support the USB devices declared in the SD
K add-ons.
- update sdk : Updates the SDK by suggesting new platforms to install if
available.
Action "list ":
Lists existing targets or virtual devices.
Options:
No options
Action "list avd":
Lists existing Android Virtual Devices.
Options:
No options
Action "list target":
Lists existing targets.
Options:
No options
Action "create avd":
Creates a new Android Virtual Device.
Options:
-c --sdcard Path to a shared SD card image, or size of a new sdcard for the
new AVD
-t --target Target id of the new AVD [required]
-n --name Name of the new AVD [required]
-p --path Location path of the directory where the new AVD will be created
-f --force Force creation (override an existing AVD)
-s --skin Skin of the new AVD
Action "move avd":
Moves or renames an Android Virtual Device.
Options:
-p --path New location path of the directory where to move the AVD
-n --name Name of the AVD to move or rename [required]
-r --rename New name of the AVD to rename
Action "delete avd":
Deletes an Android Virtual Device.
Options:
-n --name Name of the AVD to delete [required]
Action "update avd":
Updates an Android Virtual Device to match the folders of a new SDK.
Options:
-n --name Name of the AVD to update [required]
Action "create project":
Creates a new Android Project.
Options:
-n --name Project name
-t --target Target id of the new project [required]
-p --path Location path of new project [required]
-k --package Package name [required]
-a --activity Activity name [required]
Action "update project":
Updates an Android Project (must have an AndroidManifest.xml).
Options:
-p --path Location path of the project [required]
-l --library Location path of an Android Library to add, relative to the main
project
-n --name Project name
-t --target Target id to set for the project
-s --subprojects Also update any projects in sub-folders, such as test project
s.
Action "create test-project":
Creates a new Android Test Project.
Options:
-p --path Location path of new project [required]
-m --main Location path of the project to test, relative to the new projec
t [required]
-n --name Project name
Action "update test-project":
Updates an Android Test Project (must have an AndroidManifest.xml).
Options:
-m --main Location path of the project to test, relative to the new projec
t [required]
-p --path Location path of the project [required]
Action "create lib-project":
Creates a new Android Library Project.
Options:
-n --name Project name
-p --path Location path of new project [required]
-t --target Target id of the new project [required]
-k --package Package name [required]
Action "update lib-project":
Updates an Android Library Project (must have an AndroidManifest.xml).
Options:
-p --path Location path of the project [required]
-l --library Location path of an Android Library to add, relative to the main
project
-t --target Target id to set for the project
Action "update adb":
Updates adb to support the USB devices declared in the SDK add-ons.
Options:
No options
Action "update sdk":
Updates the SDK by suggesting new platforms to install if available.
Options:
No options
- adbのオプション
>adb -help
Android Debug Bridge version 1.0.26
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s - directs command to the USB device or emulator with
the given serial number. Overrides ANDROID_SERIAL
environment variable.
-p - 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.
devices - list all connected devices
connect : - connect to a device via TCP/IP
disconnect : - disconnect from a TCP/IP device
device commands:
adb push - copy file/dir to device
adb pull [] - copy file/dir from device
adb sync [ ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell - run remote shell command
adb emu - run emulator console command
adb logcat [ ] - View device log
adb forward - forward socket connections
forward specs are one of:
tcp:
localabstract:
localreserved:
localfilesystem:
dev:
jdwp: (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] - push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
('-s' means install on SD card instead of internal storage)
adb uninstall [-k] - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints:
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recoveryprogram
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip - restarts the adbd daemon listening on TCP on the specified portnetworking:
adb ppp [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ ]
can be interpreted in several ways:
- If is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition
is updated.
- emulatorのオプション
>emulator -helpAndroid Emulator usage: emulator [options] [-qemu args] options: -sysdirsearch for system disk images in -system read initial system image from -datadir write user data into -kernel use specific emulated kernel -ramdisk ramdisk image (default /ramdisk.img -image obsolete, use -system instead -init-data initial data image (default /userdata.img -initdata same as '-init-data ' -data data image (default /userdata-qemu.img -partition-size system/data partition size in MBs -cache cache partition image (default is temporary file) -no-cache disable the cache partition -nocache same as -no-cache -sdcard SD card image (default /sdcard.img -wipe-data reset the use data image (copy it from initdata) -avd use a specific android virtual device -skindir search skins in (default /skins) -skin select a given skin -no-skin don't use any emulator skin -noskin same as -no-skin -memory physical RAM size in MBs -netspeed maximum network download/upload speeds -netdelay network latency emulation -netfast disable network shaping -trace enable code profiling (F9 to start) -show-kernel display kernel messages -shell enable root shell on current terminal -no-jni disable JNI checks in the Dalvik runtime -nojni same as -no-jni -logcat enable logcat output with given tags -no-audio disable audio support -noaudio same as -no-audio -audio use specific audio backend -audio-in use specific audio input backend -audio-out use specific audio output backend -raw-keys disable Unicode keyboard reverse-mapping -radio redirect radio modem interface to character device -port TCP port that will be used for the console -ports , TCP ports used for the console and adb bridge -onion use overlay PNG image over screen -onion-alpha <%age> specify onion-skin translucency -onion-rotation 0|1|2|3 specify onion-skin rotation -scale
scale emulator window -dpi-device specify device's resolution in dpi (default 165) -http-proxy make TCP connections through a HTTP/HTTPS proxy -timezone use this timezone instead of the host's default -dns-server use this DNS server(s) in the emulated system -cpu-delay throttle CPU emulation -no-boot-anim disable animation for faster boot -no-window disable graphical window display -version display emulator version number -report-console report console port to remote socket -gps redirect NMEA GPS to character device -keyset specify keyset file name -shell-serial specific character device for root shell -old-system support old (pre 1.4) system images -tcpdump capture network packets to file -bootchart enable bootcharting -charmap use specific key character map -prop = set system property on boot -memcheck enable memory access checking -qemu args... pass arguments to qemu -qemu -h display qemu help -verbose same as '-debug-init' -debug enable/disable debug messages -debug- enable specific debug messages -debug-no- disable specific debug messages -help print this help -help- print option-specific help -help-disk-images about disk images -help-keys supported key bindings -help-debug-tags debug tags for -debug -help-char-devices character specification -help-environment environment variables -help-keyset-file key bindings configuration file -help-virtual-device virtual device management -help-sdk-images about disk images when using the SDK -help-build-images about disk images when building Android -help-all prints all help content

コメント
コメントを投稿