1 // Copyright 2020 The Android Open Source Project
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #pragma once
16 
17 /* Maximum numbers of emulators that can run concurrently without
18  * forcing their port numbers with the -port option.
19  * This is not a hard limit. Instead, when starting up, the program
20  * will try to bind to localhost ports 5554 + n*2, for n in
21  * [0..MAX_EMULATORS), if it fails, it will refuse to start.
22  * You can route around this by using the -port or -ports options
23  * to specify the ports manually.
24  */
25 #define MAX_ANDROID_EMULATORS  16
26 
27 #define ANDROID_CONSOLE_BASEPORT 5554
28 
29 /* The name of the .ini file that contains the initial hardware
30  * properties for the AVD. This file is specific to the AVD and
31  * is in the AVD's directory.
32  */
33 #define CORE_CONFIG_INI "config.ini"
34 
35 /* The name of the .ini file that contains the complete hardware
36  * properties for the AVD. This file is specific to the AVD and
37  * is in the AVD's directory. This will be used to launch the
38  * corresponding core from the UI.
39  */
40 #define CORE_HARDWARE_INI "hardware-qemu.ini"
41 
42 /* The name of the snapshot lock file that is used to serialize
43  * snapshot operations on the same AVD across multiple emulator
44  * instances.
45  */
46 #define SNAPSHOT_LOCK "snapshot.lock"
47 
48 #define MULTIINSTANCE_LOCK "multiinstance.lock"
49 
50 /* The file where the crash reporter holds a copy of
51  * the hardware properties. This file is in a temporary
52  * directory set up by the crash reporter.
53  */
54 #define CRASH_AVD_HARDWARE_INFO "avd_info.txt"
55 #define CRASH_AVD_INI "avd_ini_path"
56