android: add support for different settings at avd creation time.
Starting with sdcard size as well as screen dimensions and density. Also adds a marshmallow tablet AVD configuration. Bug: 922145 Change-Id: I72d083599e920307f5db1eeb7e6fd708105878bb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918275 Commit-Queue: John Budorick <jbudorick@chromium.org> Reviewed-by: Ted Choc <tedchoc@chromium.org> Reviewed-by: Yun Liu <yliuyliu@google.com> Cr-Commit-Position: refs/heads/master@{#721646}
This commit is contained in:

committed by
Commit Bot

parent
48b0240c90
commit
dbb0b57289
2
.yapfignore
Normal file
2
.yapfignore
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Generated protobuf code.
|
||||||
|
*_pb2.py
|
1
OWNERS
1
OWNERS
@ -14,6 +14,7 @@ per-file .gn=file://build/OWNERS
|
|||||||
per-file .vpython*=dpranke@chromium.org
|
per-file .vpython*=dpranke@chromium.org
|
||||||
per-file .vpython*=iannucci@chromium.org
|
per-file .vpython*=iannucci@chromium.org
|
||||||
per-file .vpython*=jbudorick@chromium.org
|
per-file .vpython*=jbudorick@chromium.org
|
||||||
|
per-file .yapfignore=*
|
||||||
per-file AUTHORS=*
|
per-file AUTHORS=*
|
||||||
per-file BUILD.gn=file://build/OWNERS
|
per-file BUILD.gn=file://build/OWNERS
|
||||||
per-file codereview.settings=agable@chromium.org
|
per-file codereview.settings=agable@chromium.org
|
||||||
|
@ -23,8 +23,21 @@ from pylib import constants
|
|||||||
from pylib.local.emulator.proto import avd_pb2
|
from pylib.local.emulator.proto import avd_pb2
|
||||||
|
|
||||||
_ALL_PACKAGES = object()
|
_ALL_PACKAGES = object()
|
||||||
|
_CONFIG_INI_CONTENTS = textwrap.dedent("""\
|
||||||
|
disk.dataPartition.size=4G
|
||||||
|
hw.lcd.density={density}
|
||||||
|
hw.lcd.height={height}
|
||||||
|
hw.lcd.width={width}
|
||||||
|
""")
|
||||||
_DEFAULT_AVDMANAGER_PATH = os.path.join(constants.ANDROID_SDK_ROOT, 'tools',
|
_DEFAULT_AVDMANAGER_PATH = os.path.join(constants.ANDROID_SDK_ROOT, 'tools',
|
||||||
'bin', 'avdmanager')
|
'bin', 'avdmanager')
|
||||||
|
# Default to a 480dp mdpi screen (a relatively large phone).
|
||||||
|
# See https://developer.android.com/training/multiscreen/screensizes
|
||||||
|
# and https://developer.android.com/training/multiscreen/screendensities
|
||||||
|
# for more information.
|
||||||
|
_DEFAULT_SCREEN_DENSITY = 160
|
||||||
|
_DEFAULT_SCREEN_HEIGHT = 960
|
||||||
|
_DEFAULT_SCREEN_WIDTH = 480
|
||||||
|
|
||||||
|
|
||||||
class AvdException(Exception):
|
class AvdException(Exception):
|
||||||
@ -85,7 +98,7 @@ class _AvdManagerAgent(object):
|
|||||||
'-Dcom.android.sdkmanager.toolsdir=%s' % fake_tools_dir,
|
'-Dcom.android.sdkmanager.toolsdir=%s' % fake_tools_dir,
|
||||||
})
|
})
|
||||||
|
|
||||||
def Create(self, avd_name, system_image, force=False):
|
def Create(self, avd_name, system_image, force=False, sdcard=None):
|
||||||
"""Call `avdmanager create`.
|
"""Call `avdmanager create`.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -106,6 +119,8 @@ class _AvdManagerAgent(object):
|
|||||||
]
|
]
|
||||||
if force:
|
if force:
|
||||||
create_cmd += ['--force']
|
create_cmd += ['--force']
|
||||||
|
if sdcard:
|
||||||
|
create_cmd += ['--sdcard', sdcard]
|
||||||
|
|
||||||
create_proc = cmd_helper.Popen(
|
create_proc = cmd_helper.Popen(
|
||||||
create_cmd,
|
create_cmd,
|
||||||
@ -213,7 +228,8 @@ class AvdConfig(object):
|
|||||||
avd_manager.Create(
|
avd_manager.Create(
|
||||||
avd_name=self._config.avd_name,
|
avd_name=self._config.avd_name,
|
||||||
system_image=self._config.system_image_name,
|
system_image=self._config.system_image_name,
|
||||||
force=force)
|
force=force,
|
||||||
|
sdcard=self._config.avd_settings.sdcard.size)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
logging.info('Modifying AVD configuration.')
|
logging.info('Modifying AVD configuration.')
|
||||||
@ -227,14 +243,16 @@ class AvdConfig(object):
|
|||||||
with open(root_ini, 'a') as root_ini_file:
|
with open(root_ini, 'a') as root_ini_file:
|
||||||
root_ini_file.write('path.rel=avd/%s.avd\n' % self._config.avd_name)
|
root_ini_file.write('path.rel=avd/%s.avd\n' % self._config.avd_name)
|
||||||
|
|
||||||
|
height = (self._config.avd_settings.screen.height
|
||||||
|
or _DEFAULT_SCREEN_HEIGHT)
|
||||||
|
width = (self._config.avd_settings.screen.width or _DEFAULT_SCREEN_WIDTH)
|
||||||
|
density = (self._config.avd_settings.screen.density
|
||||||
|
or _DEFAULT_SCREEN_DENSITY)
|
||||||
|
|
||||||
with open(config_ini, 'a') as config_ini_file:
|
with open(config_ini, 'a') as config_ini_file:
|
||||||
config_ini_file.write(
|
config_ini_contents = _CONFIG_INI_CONTENTS.format(
|
||||||
textwrap.dedent("""\
|
density=density, height=height, width=width)
|
||||||
disk.dataPartition.size=4G
|
config_ini_file.write(config_ini_contents)
|
||||||
hw.lcd.density=160
|
|
||||||
hw.lcd.height=960
|
|
||||||
hw.lcd.width=480
|
|
||||||
"""))
|
|
||||||
|
|
||||||
# Start & stop the AVD.
|
# Start & stop the AVD.
|
||||||
self._Initialize()
|
self._Initialize()
|
||||||
|
@ -18,6 +18,34 @@ message CIPDPackage {
|
|||||||
string dest_path = 3;
|
string dest_path = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message ScreenSettings {
|
||||||
|
// Screen height in pixels.
|
||||||
|
uint32 height = 1;
|
||||||
|
|
||||||
|
// Screen width in pixels.
|
||||||
|
uint32 width = 2;
|
||||||
|
|
||||||
|
// Scren density in dpi.
|
||||||
|
uint32 density = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SdcardSettings {
|
||||||
|
// Size of the sdcard that should be created for this AVD.
|
||||||
|
// Can be anything that `mksdcard` or `avdmanager -c` would accept:
|
||||||
|
// - a number of bytes
|
||||||
|
// - a number followed by K, M, or G, indicating that many
|
||||||
|
// KiB, MiB, or GiB, respectively.
|
||||||
|
string size = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AvdSettings {
|
||||||
|
// Settings pertaining to the AVD's screen.
|
||||||
|
ScreenSettings screen = 1;
|
||||||
|
|
||||||
|
// Settings pertaining to the AVD's sdcard.
|
||||||
|
SdcardSettings sdcard = 2;
|
||||||
|
}
|
||||||
|
|
||||||
message Avd {
|
message Avd {
|
||||||
// The emulator to use in running the AVD.
|
// The emulator to use in running the AVD.
|
||||||
CIPDPackage emulator_package = 1;
|
CIPDPackage emulator_package = 1;
|
||||||
@ -32,4 +60,7 @@ message Avd {
|
|||||||
CIPDPackage avd_package = 4;
|
CIPDPackage avd_package = 4;
|
||||||
// The name of the AVD to create or use.
|
// The name of the AVD to create or use.
|
||||||
string avd_name = 5;
|
string avd_name = 5;
|
||||||
|
|
||||||
|
// How to configure the AVD at creation.
|
||||||
|
AvdSettings avd_settings = 6;
|
||||||
}
|
}
|
||||||
|
@ -2,217 +2,300 @@
|
|||||||
# source: avd.proto
|
# source: avd.proto
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode('latin1'))
|
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
||||||
from google.protobuf import descriptor as _descriptor
|
from google.protobuf import descriptor as _descriptor
|
||||||
from google.protobuf import message as _message
|
from google.protobuf import message as _message
|
||||||
from google.protobuf import reflection as _reflection
|
from google.protobuf import reflection as _reflection
|
||||||
from google.protobuf import symbol_database as _symbol_database
|
from google.protobuf import symbol_database as _symbol_database
|
||||||
from google.protobuf import descriptor_pb2
|
|
||||||
# @@protoc_insertion_point(imports)
|
# @@protoc_insertion_point(imports)
|
||||||
|
|
||||||
_sym_db = _symbol_database.Default()
|
_sym_db = _symbol_database.Default()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DESCRIPTOR = _descriptor.FileDescriptor(
|
DESCRIPTOR = _descriptor.FileDescriptor(
|
||||||
name='avd.proto',
|
name='avd.proto',
|
||||||
package='tools.android.avd.proto',
|
package='tools.android.avd.proto',
|
||||||
syntax='proto3',
|
syntax='proto3',
|
||||||
serialized_pb=_b(
|
serialized_options=None,
|
||||||
'\n\tavd.proto\x12\x17tools.android.avd.proto\"G\n\x0b\x43IPDPackage\x12\x14\n\x0cpackage_name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x11\n\tdest_path\x18\x03 \x01(\t\"\xf1\x01\n\x03\x41vd\x12>\n\x10\x65mulator_package\x18\x01 \x01(\x0b\x32$.tools.android.avd.proto.CIPDPackage\x12\x42\n\x14system_image_package\x18\x02 \x01(\x0b\x32$.tools.android.avd.proto.CIPDPackage\x12\x19\n\x11system_image_name\x18\x03 \x01(\t\x12\x39\n\x0b\x61vd_package\x18\x04 \x01(\x0b\x32$.tools.android.avd.proto.CIPDPackage\x12\x10\n\x08\x61vd_name\x18\x05 \x01(\tb\x06proto3'
|
serialized_pb=_b('\n\tavd.proto\x12\x17tools.android.avd.proto\"G\n\x0b\x43IPDPackage\x12\x14\n\x0cpackage_name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x11\n\tdest_path\x18\x03 \x01(\t\"@\n\x0eScreenSettings\x12\x0e\n\x06height\x18\x01 \x01(\r\x12\r\n\x05width\x18\x02 \x01(\r\x12\x0f\n\x07\x64\x65nsity\x18\x03 \x01(\r\"\x1e\n\x0eSdcardSettings\x12\x0c\n\x04size\x18\x01 \x01(\t\"\x7f\n\x0b\x41vdSettings\x12\x37\n\x06screen\x18\x01 \x01(\x0b\x32\'.tools.android.avd.proto.ScreenSettings\x12\x37\n\x06sdcard\x18\x02 \x01(\x0b\x32\'.tools.android.avd.proto.SdcardSettings\"\xad\x02\n\x03\x41vd\x12>\n\x10\x65mulator_package\x18\x01 \x01(\x0b\x32$.tools.android.avd.proto.CIPDPackage\x12\x42\n\x14system_image_package\x18\x02 \x01(\x0b\x32$.tools.android.avd.proto.CIPDPackage\x12\x19\n\x11system_image_name\x18\x03 \x01(\t\x12\x39\n\x0b\x61vd_package\x18\x04 \x01(\x0b\x32$.tools.android.avd.proto.CIPDPackage\x12\x10\n\x08\x61vd_name\x18\x05 \x01(\t\x12:\n\x0c\x61vd_settings\x18\x06 \x01(\x0b\x32$.tools.android.avd.proto.AvdSettingsb\x06proto3')
|
||||||
))
|
)
|
||||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_CIPDPACKAGE = _descriptor.Descriptor(
|
_CIPDPACKAGE = _descriptor.Descriptor(
|
||||||
name='CIPDPackage',
|
name='CIPDPackage',
|
||||||
full_name='tools.android.avd.proto.CIPDPackage',
|
full_name='tools.android.avd.proto.CIPDPackage',
|
||||||
filename=None,
|
filename=None,
|
||||||
file=DESCRIPTOR,
|
file=DESCRIPTOR,
|
||||||
containing_type=None,
|
containing_type=None,
|
||||||
fields=[
|
fields=[
|
||||||
_descriptor.FieldDescriptor(
|
_descriptor.FieldDescriptor(
|
||||||
name='package_name',
|
name='package_name', full_name='tools.android.avd.proto.CIPDPackage.package_name', index=0,
|
||||||
full_name='tools.android.avd.proto.CIPDPackage.package_name',
|
number=1, type=9, cpp_type=9, label=1,
|
||||||
index=0,
|
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||||
number=1,
|
message_type=None, enum_type=None, containing_type=None,
|
||||||
type=9,
|
is_extension=False, extension_scope=None,
|
||||||
cpp_type=9,
|
serialized_options=None, file=DESCRIPTOR),
|
||||||
label=1,
|
_descriptor.FieldDescriptor(
|
||||||
has_default_value=False,
|
name='version', full_name='tools.android.avd.proto.CIPDPackage.version', index=1,
|
||||||
default_value=_b("").decode('utf-8'),
|
number=2, type=9, cpp_type=9, label=1,
|
||||||
message_type=None,
|
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||||
enum_type=None,
|
message_type=None, enum_type=None, containing_type=None,
|
||||||
containing_type=None,
|
is_extension=False, extension_scope=None,
|
||||||
is_extension=False,
|
serialized_options=None, file=DESCRIPTOR),
|
||||||
extension_scope=None,
|
_descriptor.FieldDescriptor(
|
||||||
options=None),
|
name='dest_path', full_name='tools.android.avd.proto.CIPDPackage.dest_path', index=2,
|
||||||
_descriptor.FieldDescriptor(
|
number=3, type=9, cpp_type=9, label=1,
|
||||||
name='version',
|
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||||
full_name='tools.android.avd.proto.CIPDPackage.version',
|
message_type=None, enum_type=None, containing_type=None,
|
||||||
index=1,
|
is_extension=False, extension_scope=None,
|
||||||
number=2,
|
serialized_options=None, file=DESCRIPTOR),
|
||||||
type=9,
|
],
|
||||||
cpp_type=9,
|
extensions=[
|
||||||
label=1,
|
],
|
||||||
has_default_value=False,
|
nested_types=[],
|
||||||
default_value=_b("").decode('utf-8'),
|
enum_types=[
|
||||||
message_type=None,
|
],
|
||||||
enum_type=None,
|
serialized_options=None,
|
||||||
containing_type=None,
|
is_extendable=False,
|
||||||
is_extension=False,
|
syntax='proto3',
|
||||||
extension_scope=None,
|
extension_ranges=[],
|
||||||
options=None),
|
oneofs=[
|
||||||
_descriptor.FieldDescriptor(
|
],
|
||||||
name='dest_path',
|
serialized_start=38,
|
||||||
full_name='tools.android.avd.proto.CIPDPackage.dest_path',
|
serialized_end=109,
|
||||||
index=2,
|
|
||||||
number=3,
|
|
||||||
type=9,
|
|
||||||
cpp_type=9,
|
|
||||||
label=1,
|
|
||||||
has_default_value=False,
|
|
||||||
default_value=_b("").decode('utf-8'),
|
|
||||||
message_type=None,
|
|
||||||
enum_type=None,
|
|
||||||
containing_type=None,
|
|
||||||
is_extension=False,
|
|
||||||
extension_scope=None,
|
|
||||||
options=None),
|
|
||||||
],
|
|
||||||
extensions=[],
|
|
||||||
nested_types=[],
|
|
||||||
enum_types=[],
|
|
||||||
options=None,
|
|
||||||
is_extendable=False,
|
|
||||||
syntax='proto3',
|
|
||||||
extension_ranges=[],
|
|
||||||
oneofs=[],
|
|
||||||
serialized_start=38,
|
|
||||||
serialized_end=109,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
_SCREENSETTINGS = _descriptor.Descriptor(
|
||||||
|
name='ScreenSettings',
|
||||||
|
full_name='tools.android.avd.proto.ScreenSettings',
|
||||||
|
filename=None,
|
||||||
|
file=DESCRIPTOR,
|
||||||
|
containing_type=None,
|
||||||
|
fields=[
|
||||||
|
_descriptor.FieldDescriptor(
|
||||||
|
name='height', full_name='tools.android.avd.proto.ScreenSettings.height', index=0,
|
||||||
|
number=1, type=13, cpp_type=3, label=1,
|
||||||
|
has_default_value=False, default_value=0,
|
||||||
|
message_type=None, enum_type=None, containing_type=None,
|
||||||
|
is_extension=False, extension_scope=None,
|
||||||
|
serialized_options=None, file=DESCRIPTOR),
|
||||||
|
_descriptor.FieldDescriptor(
|
||||||
|
name='width', full_name='tools.android.avd.proto.ScreenSettings.width', index=1,
|
||||||
|
number=2, type=13, cpp_type=3, label=1,
|
||||||
|
has_default_value=False, default_value=0,
|
||||||
|
message_type=None, enum_type=None, containing_type=None,
|
||||||
|
is_extension=False, extension_scope=None,
|
||||||
|
serialized_options=None, file=DESCRIPTOR),
|
||||||
|
_descriptor.FieldDescriptor(
|
||||||
|
name='density', full_name='tools.android.avd.proto.ScreenSettings.density', index=2,
|
||||||
|
number=3, type=13, cpp_type=3, label=1,
|
||||||
|
has_default_value=False, default_value=0,
|
||||||
|
message_type=None, enum_type=None, containing_type=None,
|
||||||
|
is_extension=False, extension_scope=None,
|
||||||
|
serialized_options=None, file=DESCRIPTOR),
|
||||||
|
],
|
||||||
|
extensions=[
|
||||||
|
],
|
||||||
|
nested_types=[],
|
||||||
|
enum_types=[
|
||||||
|
],
|
||||||
|
serialized_options=None,
|
||||||
|
is_extendable=False,
|
||||||
|
syntax='proto3',
|
||||||
|
extension_ranges=[],
|
||||||
|
oneofs=[
|
||||||
|
],
|
||||||
|
serialized_start=111,
|
||||||
|
serialized_end=175,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
_SDCARDSETTINGS = _descriptor.Descriptor(
|
||||||
|
name='SdcardSettings',
|
||||||
|
full_name='tools.android.avd.proto.SdcardSettings',
|
||||||
|
filename=None,
|
||||||
|
file=DESCRIPTOR,
|
||||||
|
containing_type=None,
|
||||||
|
fields=[
|
||||||
|
_descriptor.FieldDescriptor(
|
||||||
|
name='size', full_name='tools.android.avd.proto.SdcardSettings.size', index=0,
|
||||||
|
number=1, type=9, cpp_type=9, label=1,
|
||||||
|
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||||
|
message_type=None, enum_type=None, containing_type=None,
|
||||||
|
is_extension=False, extension_scope=None,
|
||||||
|
serialized_options=None, file=DESCRIPTOR),
|
||||||
|
],
|
||||||
|
extensions=[
|
||||||
|
],
|
||||||
|
nested_types=[],
|
||||||
|
enum_types=[
|
||||||
|
],
|
||||||
|
serialized_options=None,
|
||||||
|
is_extendable=False,
|
||||||
|
syntax='proto3',
|
||||||
|
extension_ranges=[],
|
||||||
|
oneofs=[
|
||||||
|
],
|
||||||
|
serialized_start=177,
|
||||||
|
serialized_end=207,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
_AVDSETTINGS = _descriptor.Descriptor(
|
||||||
|
name='AvdSettings',
|
||||||
|
full_name='tools.android.avd.proto.AvdSettings',
|
||||||
|
filename=None,
|
||||||
|
file=DESCRIPTOR,
|
||||||
|
containing_type=None,
|
||||||
|
fields=[
|
||||||
|
_descriptor.FieldDescriptor(
|
||||||
|
name='screen', full_name='tools.android.avd.proto.AvdSettings.screen', index=0,
|
||||||
|
number=1, type=11, cpp_type=10, label=1,
|
||||||
|
has_default_value=False, default_value=None,
|
||||||
|
message_type=None, enum_type=None, containing_type=None,
|
||||||
|
is_extension=False, extension_scope=None,
|
||||||
|
serialized_options=None, file=DESCRIPTOR),
|
||||||
|
_descriptor.FieldDescriptor(
|
||||||
|
name='sdcard', full_name='tools.android.avd.proto.AvdSettings.sdcard', index=1,
|
||||||
|
number=2, type=11, cpp_type=10, label=1,
|
||||||
|
has_default_value=False, default_value=None,
|
||||||
|
message_type=None, enum_type=None, containing_type=None,
|
||||||
|
is_extension=False, extension_scope=None,
|
||||||
|
serialized_options=None, file=DESCRIPTOR),
|
||||||
|
],
|
||||||
|
extensions=[
|
||||||
|
],
|
||||||
|
nested_types=[],
|
||||||
|
enum_types=[
|
||||||
|
],
|
||||||
|
serialized_options=None,
|
||||||
|
is_extendable=False,
|
||||||
|
syntax='proto3',
|
||||||
|
extension_ranges=[],
|
||||||
|
oneofs=[
|
||||||
|
],
|
||||||
|
serialized_start=209,
|
||||||
|
serialized_end=336,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
_AVD = _descriptor.Descriptor(
|
_AVD = _descriptor.Descriptor(
|
||||||
name='Avd',
|
name='Avd',
|
||||||
full_name='tools.android.avd.proto.Avd',
|
full_name='tools.android.avd.proto.Avd',
|
||||||
filename=None,
|
filename=None,
|
||||||
file=DESCRIPTOR,
|
file=DESCRIPTOR,
|
||||||
containing_type=None,
|
containing_type=None,
|
||||||
fields=[
|
fields=[
|
||||||
_descriptor.FieldDescriptor(
|
_descriptor.FieldDescriptor(
|
||||||
name='emulator_package',
|
name='emulator_package', full_name='tools.android.avd.proto.Avd.emulator_package', index=0,
|
||||||
full_name='tools.android.avd.proto.Avd.emulator_package',
|
number=1, type=11, cpp_type=10, label=1,
|
||||||
index=0,
|
has_default_value=False, default_value=None,
|
||||||
number=1,
|
message_type=None, enum_type=None, containing_type=None,
|
||||||
type=11,
|
is_extension=False, extension_scope=None,
|
||||||
cpp_type=10,
|
serialized_options=None, file=DESCRIPTOR),
|
||||||
label=1,
|
_descriptor.FieldDescriptor(
|
||||||
has_default_value=False,
|
name='system_image_package', full_name='tools.android.avd.proto.Avd.system_image_package', index=1,
|
||||||
default_value=None,
|
number=2, type=11, cpp_type=10, label=1,
|
||||||
message_type=None,
|
has_default_value=False, default_value=None,
|
||||||
enum_type=None,
|
message_type=None, enum_type=None, containing_type=None,
|
||||||
containing_type=None,
|
is_extension=False, extension_scope=None,
|
||||||
is_extension=False,
|
serialized_options=None, file=DESCRIPTOR),
|
||||||
extension_scope=None,
|
_descriptor.FieldDescriptor(
|
||||||
options=None),
|
name='system_image_name', full_name='tools.android.avd.proto.Avd.system_image_name', index=2,
|
||||||
_descriptor.FieldDescriptor(
|
number=3, type=9, cpp_type=9, label=1,
|
||||||
name='system_image_package',
|
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||||
full_name='tools.android.avd.proto.Avd.system_image_package',
|
message_type=None, enum_type=None, containing_type=None,
|
||||||
index=1,
|
is_extension=False, extension_scope=None,
|
||||||
number=2,
|
serialized_options=None, file=DESCRIPTOR),
|
||||||
type=11,
|
_descriptor.FieldDescriptor(
|
||||||
cpp_type=10,
|
name='avd_package', full_name='tools.android.avd.proto.Avd.avd_package', index=3,
|
||||||
label=1,
|
number=4, type=11, cpp_type=10, label=1,
|
||||||
has_default_value=False,
|
has_default_value=False, default_value=None,
|
||||||
default_value=None,
|
message_type=None, enum_type=None, containing_type=None,
|
||||||
message_type=None,
|
is_extension=False, extension_scope=None,
|
||||||
enum_type=None,
|
serialized_options=None, file=DESCRIPTOR),
|
||||||
containing_type=None,
|
_descriptor.FieldDescriptor(
|
||||||
is_extension=False,
|
name='avd_name', full_name='tools.android.avd.proto.Avd.avd_name', index=4,
|
||||||
extension_scope=None,
|
number=5, type=9, cpp_type=9, label=1,
|
||||||
options=None),
|
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||||
_descriptor.FieldDescriptor(
|
message_type=None, enum_type=None, containing_type=None,
|
||||||
name='system_image_name',
|
is_extension=False, extension_scope=None,
|
||||||
full_name='tools.android.avd.proto.Avd.system_image_name',
|
serialized_options=None, file=DESCRIPTOR),
|
||||||
index=2,
|
_descriptor.FieldDescriptor(
|
||||||
number=3,
|
name='avd_settings', full_name='tools.android.avd.proto.Avd.avd_settings', index=5,
|
||||||
type=9,
|
number=6, type=11, cpp_type=10, label=1,
|
||||||
cpp_type=9,
|
has_default_value=False, default_value=None,
|
||||||
label=1,
|
message_type=None, enum_type=None, containing_type=None,
|
||||||
has_default_value=False,
|
is_extension=False, extension_scope=None,
|
||||||
default_value=_b("").decode('utf-8'),
|
serialized_options=None, file=DESCRIPTOR),
|
||||||
message_type=None,
|
],
|
||||||
enum_type=None,
|
extensions=[
|
||||||
containing_type=None,
|
],
|
||||||
is_extension=False,
|
nested_types=[],
|
||||||
extension_scope=None,
|
enum_types=[
|
||||||
options=None),
|
],
|
||||||
_descriptor.FieldDescriptor(
|
serialized_options=None,
|
||||||
name='avd_package',
|
is_extendable=False,
|
||||||
full_name='tools.android.avd.proto.Avd.avd_package',
|
syntax='proto3',
|
||||||
index=3,
|
extension_ranges=[],
|
||||||
number=4,
|
oneofs=[
|
||||||
type=11,
|
],
|
||||||
cpp_type=10,
|
serialized_start=339,
|
||||||
label=1,
|
serialized_end=640,
|
||||||
has_default_value=False,
|
|
||||||
default_value=None,
|
|
||||||
message_type=None,
|
|
||||||
enum_type=None,
|
|
||||||
containing_type=None,
|
|
||||||
is_extension=False,
|
|
||||||
extension_scope=None,
|
|
||||||
options=None),
|
|
||||||
_descriptor.FieldDescriptor(
|
|
||||||
name='avd_name',
|
|
||||||
full_name='tools.android.avd.proto.Avd.avd_name',
|
|
||||||
index=4,
|
|
||||||
number=5,
|
|
||||||
type=9,
|
|
||||||
cpp_type=9,
|
|
||||||
label=1,
|
|
||||||
has_default_value=False,
|
|
||||||
default_value=_b("").decode('utf-8'),
|
|
||||||
message_type=None,
|
|
||||||
enum_type=None,
|
|
||||||
containing_type=None,
|
|
||||||
is_extension=False,
|
|
||||||
extension_scope=None,
|
|
||||||
options=None),
|
|
||||||
],
|
|
||||||
extensions=[],
|
|
||||||
nested_types=[],
|
|
||||||
enum_types=[],
|
|
||||||
options=None,
|
|
||||||
is_extendable=False,
|
|
||||||
syntax='proto3',
|
|
||||||
extension_ranges=[],
|
|
||||||
oneofs=[],
|
|
||||||
serialized_start=112,
|
|
||||||
serialized_end=353,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
_AVDSETTINGS.fields_by_name['screen'].message_type = _SCREENSETTINGS
|
||||||
|
_AVDSETTINGS.fields_by_name['sdcard'].message_type = _SDCARDSETTINGS
|
||||||
_AVD.fields_by_name['emulator_package'].message_type = _CIPDPACKAGE
|
_AVD.fields_by_name['emulator_package'].message_type = _CIPDPACKAGE
|
||||||
_AVD.fields_by_name['system_image_package'].message_type = _CIPDPACKAGE
|
_AVD.fields_by_name['system_image_package'].message_type = _CIPDPACKAGE
|
||||||
_AVD.fields_by_name['avd_package'].message_type = _CIPDPACKAGE
|
_AVD.fields_by_name['avd_package'].message_type = _CIPDPACKAGE
|
||||||
|
_AVD.fields_by_name['avd_settings'].message_type = _AVDSETTINGS
|
||||||
DESCRIPTOR.message_types_by_name['CIPDPackage'] = _CIPDPACKAGE
|
DESCRIPTOR.message_types_by_name['CIPDPackage'] = _CIPDPACKAGE
|
||||||
|
DESCRIPTOR.message_types_by_name['ScreenSettings'] = _SCREENSETTINGS
|
||||||
|
DESCRIPTOR.message_types_by_name['SdcardSettings'] = _SDCARDSETTINGS
|
||||||
|
DESCRIPTOR.message_types_by_name['AvdSettings'] = _AVDSETTINGS
|
||||||
DESCRIPTOR.message_types_by_name['Avd'] = _AVD
|
DESCRIPTOR.message_types_by_name['Avd'] = _AVD
|
||||||
|
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||||
|
|
||||||
CIPDPackage = _reflection.GeneratedProtocolMessageType(
|
CIPDPackage = _reflection.GeneratedProtocolMessageType('CIPDPackage', (_message.Message,), dict(
|
||||||
'CIPDPackage',
|
DESCRIPTOR = _CIPDPACKAGE,
|
||||||
(_message.Message, ),
|
__module__ = 'avd_pb2'
|
||||||
dict(
|
# @@protoc_insertion_point(class_scope:tools.android.avd.proto.CIPDPackage)
|
||||||
DESCRIPTOR=_CIPDPACKAGE,
|
))
|
||||||
__module__='avd_pb2'
|
|
||||||
# @@protoc_insertion_point(class_scope:tools.android.avd.proto.CIPDPackage)
|
|
||||||
))
|
|
||||||
_sym_db.RegisterMessage(CIPDPackage)
|
_sym_db.RegisterMessage(CIPDPackage)
|
||||||
|
|
||||||
Avd = _reflection.GeneratedProtocolMessageType(
|
ScreenSettings = _reflection.GeneratedProtocolMessageType('ScreenSettings', (_message.Message,), dict(
|
||||||
'Avd',
|
DESCRIPTOR = _SCREENSETTINGS,
|
||||||
(_message.Message, ),
|
__module__ = 'avd_pb2'
|
||||||
dict(
|
# @@protoc_insertion_point(class_scope:tools.android.avd.proto.ScreenSettings)
|
||||||
DESCRIPTOR=_AVD,
|
))
|
||||||
__module__='avd_pb2'
|
_sym_db.RegisterMessage(ScreenSettings)
|
||||||
# @@protoc_insertion_point(class_scope:tools.android.avd.proto.Avd)
|
|
||||||
))
|
SdcardSettings = _reflection.GeneratedProtocolMessageType('SdcardSettings', (_message.Message,), dict(
|
||||||
|
DESCRIPTOR = _SDCARDSETTINGS,
|
||||||
|
__module__ = 'avd_pb2'
|
||||||
|
# @@protoc_insertion_point(class_scope:tools.android.avd.proto.SdcardSettings)
|
||||||
|
))
|
||||||
|
_sym_db.RegisterMessage(SdcardSettings)
|
||||||
|
|
||||||
|
AvdSettings = _reflection.GeneratedProtocolMessageType('AvdSettings', (_message.Message,), dict(
|
||||||
|
DESCRIPTOR = _AVDSETTINGS,
|
||||||
|
__module__ = 'avd_pb2'
|
||||||
|
# @@protoc_insertion_point(class_scope:tools.android.avd.proto.AvdSettings)
|
||||||
|
))
|
||||||
|
_sym_db.RegisterMessage(AvdSettings)
|
||||||
|
|
||||||
|
Avd = _reflection.GeneratedProtocolMessageType('Avd', (_message.Message,), dict(
|
||||||
|
DESCRIPTOR = _AVD,
|
||||||
|
__module__ = 'avd_pb2'
|
||||||
|
# @@protoc_insertion_point(class_scope:tools.android.avd.proto.Avd)
|
||||||
|
))
|
||||||
_sym_db.RegisterMessage(Avd)
|
_sym_db.RegisterMessage(Avd)
|
||||||
|
|
||||||
|
|
||||||
# @@protoc_insertion_point(module_scope)
|
# @@protoc_insertion_point(module_scope)
|
||||||
|
@ -23,3 +23,9 @@ avd_package {
|
|||||||
dest_path: ".android"
|
dest_path: ".android"
|
||||||
}
|
}
|
||||||
avd_name: "android_23_google_apis_x86"
|
avd_name: "android_23_google_apis_x86"
|
||||||
|
|
||||||
|
avd_settings {
|
||||||
|
sdcard {
|
||||||
|
size: "1G"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
36
tools/android/avd/proto/generic_android23_tablet.textpb
Normal file
36
tools/android/avd/proto/generic_android23_tablet.textpb
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# Copyright 2019 The Chromium Authors. All rights reserved.
|
||||||
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
|
# found in the LICENSE file.
|
||||||
|
|
||||||
|
# Configuration for a generic x86 android-23 AVD.
|
||||||
|
|
||||||
|
emulator_package {
|
||||||
|
package_name: "chromium/third_party/android_sdk/public/emulator"
|
||||||
|
version: "xhyuoquVvBTcJelgRjMKZeoBVSQRjB7pLVJPt5C9saIC"
|
||||||
|
dest_path: ".emulator_sdk"
|
||||||
|
}
|
||||||
|
|
||||||
|
system_image_package {
|
||||||
|
package_name: "chromium/third_party/android_sdk/public/system-images/android-23/google_apis/x86"
|
||||||
|
version: "npuCAATVbhmywZwGhI3tMoECTrBBzzyJLpjAPXqtmYYC"
|
||||||
|
dest_path: ".emulator_sdk"
|
||||||
|
}
|
||||||
|
system_image_name: "system-images;android-23;google_apis;x86"
|
||||||
|
|
||||||
|
avd_package {
|
||||||
|
package_name: "chromium/third_party/android_sdk/public/avds/android-23/google_apis/x86/generic_android23_tablet"
|
||||||
|
version: "prDIAhfL713ebi5ur9gepMDILlIc08eSUWVDRG3zagcC"
|
||||||
|
dest_path: ".android"
|
||||||
|
}
|
||||||
|
avd_name: "generic_android23_tablet"
|
||||||
|
|
||||||
|
avd_settings {
|
||||||
|
screen {
|
||||||
|
density: 160
|
||||||
|
height: 1024
|
||||||
|
width: 600
|
||||||
|
}
|
||||||
|
sdcard {
|
||||||
|
size: "1G"
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user