LoginSignup
2
4

More than 5 years have passed since last update.

CUI環境でAndroid Emulatorを起動する

Last updated at Posted at 2017-02-11

やること

  • Ubuntu Server(16.04.1 LTS)上で、Android API 21(Android 5.0)のemulatorを起動する

前提条件

  • Android SDKをインストールしていること

手順

  • ABIをインストールする
# ABI名を調べる
$ android list sdk --extended --no-ui --all | grep abi
...
id: 97 or "sys-img-armeabi-v7a-android-21"
id: 100 or "sys-img-armeabi-v7a-google_apis-21"

# ABIをインストールする
$ echo "y" | android update sdk -a --no-ui --filter sys-img-armeabi-v7a-android-21
  • AVDを作る
$ echo n | android create avd --force --name emulator-android-21 --target android-21 -c 50M -s WXGA800 --abi armeabi-v7a
  • エミュレータを実行する
$ emulator -avd emulator-android-21 -no-skin -no-audio -no-window
  • adbで動作確認する
$ adb devices
List of devices attached
emulator-5554   offline

# device状態になるまで1分ぐらいかかる
$ adb devices
List of devices attached
emulator-5554   device

$ adb shell
root@generic:/ #

参考

2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4